From 2e20334b05e3cb49434ec07aa8d77b30578466ab Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期五, 29 十一月 2024 17:38:37 +0800
Subject: [PATCH] Merge branch 'master' of http://47.96.225.205:8888/r/ITM_V2_2DModel

---
 src/components/equ-add-form.vue |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/components/equ-add-form.vue b/src/components/equ-add-form.vue
index ff12890..8613c6b 100644
--- a/src/components/equ-add-form.vue
+++ b/src/components/equ-add-form.vue
@@ -86,7 +86,7 @@
           />
         </div>
         <div class="flex m-t-2rem">
-          <div class="label ">端口:</div>
+          <div class="label require">端口:</div>
           <input
             class="value input"
             v-model="port"
@@ -222,11 +222,11 @@
     },
     async submit() {
       //todo 提交设备
-      if (!this.isValidIP(this.ipAddress)) {
+      if (this.ipAddress && !this.isValidIP(this.ipAddress)) {
         this.$message.warning("请输入有效的IP地址");
         return;
       }
-      if (!this.name || !this.selectcode || !this.cabinetName || !this.networkPort) {
+      if (!this.name || !this.selectcode || !this.cabinetName || !this.networkPort || !this.port ) {
         this.$message.warning("数据未填写完整");
         return;
       }
@@ -261,8 +261,8 @@
           areaCode: this.selectcode,
           switchName: this.name,
           
-          areaRow:this.cur_item?.row,
-          areaCell:this.cur_item?.cell,
+          areaRow:this.cur_item?.row?this.cur_item?.row:-1,
+          areaCell:this.cur_item?.cell?this.cur_item?.cell:-1,
 
         },
       };

--
Gitblit v1.9.3