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
           ></Input>
70
           ></Input>
71
         </FormItem>
71
         </FormItem>
72
         <FormItem label="类型" prop="wltype" style="width: 100%">
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
             <Radio :label="1">APP</Radio>
77
             <Radio :label="1">APP</Radio>
75
             <Radio :label="2">网址</Radio>
78
             <Radio :label="2">网址</Radio>
76
           </RadioGroup>
79
           </RadioGroup>
199
             message: "请输入版本名称",
202
             message: "请输入版本名称",
200
             trigger: "change"
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
           if (this.whiteLibraryInfo.wltype === 1) {
371
           if (this.whiteLibraryInfo.wltype === 1) {
362
             form.website = this.whiteLibraryInfo.website;
372
             form.website = this.whiteLibraryInfo.website;
363
             form.versionName = this.whiteLibraryInfo.versionName;
373
             form.versionName = this.whiteLibraryInfo.versionName;
374
+          } else {
375
+            form.website = "";
376
+            form.versionName = "";
364
           }
377
           }
365
           if (this.whiteLibraryInfo.wlid && this.whiteLibraryInfo.rversion) {
378
           if (this.whiteLibraryInfo.wlid && this.whiteLibraryInfo.rversion) {
366
             form.wlid = this.whiteLibraryInfo.wlid;
379
             form.wlid = this.whiteLibraryInfo.wlid;
427
         },
440
         },
428
         onCancel: () => {}
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