瀏覽代碼

查询条件为空时 不发起请求

zhulu 1 年之前
父節點
當前提交
17db289830
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/views/system/device/index.vue

+ 2 - 1
src/views/system/device/index.vue

@@ -584,7 +584,8 @@ export default {
       this.changeSelect(data);
       this.handleQuery();
     },
-    changeSelect(val) {
+    changeSelect(val) {      
+      if(!val || !val.id) return;
       getHostByOrgId(val).then((response) => {
         this.form.hostId = null;
         this.hostList = response.data;