From d443433fa03a966b6674091bebe469b8c2483bb0 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期五, 29 十一月 2024 16:51:39 +0800
Subject: [PATCH] fix:1129 端口调整成必填;增加区域的图片如果已经定义返回定义的图片

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

diff --git a/src/components/equ-add-form.vue b/src/components/equ-add-form.vue
index d9de8c2..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;
       }

--
Gitblit v1.9.3