duy 2 年之前
父節點
當前提交
d5e3e4fe0a
共有 1 個文件被更改,包括 14 次插入9 次删除
  1. 14 9
      src/views/manager/projectinfo/tree.vue

+ 14 - 9
src/views/manager/projectinfo/tree.vue

@@ -3699,15 +3699,20 @@ export default {
               target={elementId:e.id,paramId:this.curParam.id};
              }
         })
-        specifiedParamElements(target).then(data=>{
-          this.linkCheckVisible = false;
-          getParamElements({nodeId:this.curTreeData.id,projectId:this.projectid,paramId:this.curParam.id,scopeType:10}).then((res) => {
-           if (res.data.data.length) {
-              this.linkEleTableList = res.data.data;
-              } else {
-               this.linkEleTableList = [];
-           }})
-        })
+        if(JSON.stringify(target) !== '{}'){
+          specifiedParamElements(target).then(data=>{
+            this.linkCheckVisible = false;
+            getParamElements({nodeId:this.curTreeData.id,projectId:this.projectid,paramId:this.curParam.id,scopeType:10}).then((res) => {
+            if (res.data.data.length) {
+                this.linkEleTableList = res.data.data;
+                } else {
+                this.linkEleTableList = [];
+            }})
+          })
+        }else{
+          this.$message.warning('请先选择关联元素')
+        }
+     
     },
     //树形控件菜单相关方法
     mouseout(){