Browse Source

白名单库网址必填

gzb
wangzhonglu 9 months ago
parent
commit
84584bfb50
1 changed files with 20 additions and 1 deletions
  1. 20
    1
      src/views/platformSection/networkManage/whitelistLibrary.vue

+ 20
- 1
src/views/platformSection/networkManage/whitelistLibrary.vue View File

@@ -70,7 +70,10 @@
70 70
           ></Input>
71 71
         </FormItem>
72 72
         <FormItem label="类型" prop="wltype" style="width: 100%">
73
-          <RadioGroup v-model="whiteLibraryInfo.wltype">
73
+          <RadioGroup
74
+            v-model="whiteLibraryInfo.wltype"
75
+            @on-change="whiteLibraryTypeChange()"
76
+          >
74 77
             <Radio :label="1">APP</Radio>
75 78
             <Radio :label="2">网址</Radio>
76 79
           </RadioGroup>
@@ -199,6 +202,13 @@ export default {
199 202
             message: "请输入版本名称",
200 203
             trigger: "change"
201 204
           }
205
+        ],
206
+        whiteAddress: [
207
+          {
208
+            required: true,
209
+            message: "请输入网址",
210
+            trigger: "change"
211
+          }
202 212
         ]
203 213
       },
204 214
       // 新建/编辑
@@ -361,6 +371,9 @@ export default {
361 371
           if (this.whiteLibraryInfo.wltype === 1) {
362 372
             form.website = this.whiteLibraryInfo.website;
363 373
             form.versionName = this.whiteLibraryInfo.versionName;
374
+          } else {
375
+            form.website = "";
376
+            form.versionName = "";
364 377
           }
365 378
           if (this.whiteLibraryInfo.wlid && this.whiteLibraryInfo.rversion) {
366 379
             form.wlid = this.whiteLibraryInfo.wlid;
@@ -427,6 +440,12 @@ export default {
427 440
         },
428 441
         onCancel: () => {}
429 442
       });
443
+    },
444
+    whiteLibraryTypeChange() {
445
+      if (this.whiteLibraryInfo.wltype === 2) {
446
+        this.whiteLibraryInfo.versionName = "";
447
+        this.whiteLibraryInfo.website = "";
448
+      }
430 449
     }
431 450
   }
432 451
 };

Loading…
Cancel
Save