Explorar o código

节点参数弹窗修改

duy %!s(int64=2) %!d(string=hai) anos
pai
achega
ae7724e48a
Modificáronse 2 ficheiros con 21 adicións e 3 borrados
  1. 10 1
      src/views/manager/projectinfo/tree.vue
  2. 11 2
      src/views/manager/wbsinfo/edit.vue

+ 10 - 1
src/views/manager/projectinfo/tree.vue

@@ -1223,6 +1223,7 @@
       class="jiedian"
       :close-on-click-modal="false"
       :show-close="false"
+      @close="closenodeInfoVisible"
     >
       <div>
         <el-button
@@ -1304,6 +1305,7 @@
       append-to-body
       class="jiedian"
       :close-on-click-modal="false"
+   
     >
       <div>
         <div class="flexEnd">
@@ -2891,6 +2893,10 @@ export default {
       this.parameters(data.primaryKeyId);
       this.nodeInfoVisible = true;
     },
+    closenodeInfoVisible(){
+      this.nodeInfoTable=[]
+      this.nodeInfoVisible = false;
+    },
     addNodeInfoTable() {
       //添加节点参数数据
       this.nodeInfoTable.unshift({
@@ -2932,6 +2938,7 @@ export default {
       this.infoNameVisible = true;
       this.namelists = [...this.namelist];
     },
+
     async setParameterName() {
       //设置参数名称中添加节点参数按钮
       // wbsId: this.jiedianId
@@ -3029,7 +3036,9 @@ export default {
       const { data: res } = await parameters({ wbsId });
       console.log(res);
       if (res.code == 200) {
-        this.nodeInfoTable = res.data;
+        if( Array.isArray(res.data)){
+          this.nodeInfoTable = res.data
+        }
       }
     },
     async saveOrUpdateBatch(da) {

+ 11 - 2
src/views/manager/wbsinfo/edit.vue

@@ -1276,6 +1276,7 @@
       class="jiedian"
       :close-on-click-modal="false"
       :show-close="false"
+      @close="closenodeInfoVisible"
     >
       <div>
         <el-button
@@ -2686,6 +2687,10 @@ export default {
       this.parameters(data.id)
       this.nodeInfoVisible = true;
     },
+    closenodeInfoVisible(){
+      this.nodeInfoTable=[]
+      this.nodeInfoVisible = false;
+    },
     addNodeInfoTable () {//添加节点参数数据
       this.nodeInfoTable.unshift({ k: '', v: '', remark: '', nodeId: this.jiedianId,type: 1 })
     },
@@ -2803,9 +2808,13 @@ export default {
     },
     async parameters (wbsId) {//获取接待你参数列表
       const { data: res } = await parameters({ wbsId })
-      //console.log(res);
+      console.log(res);
       if (res.code == 200) {
-        this.nodeInfoTable = res.data
+        if( Array.isArray(res.data)){
+          this.nodeInfoTable = res.data
+        }
+        
+       
       }
     },
     async saveOrUpdateBatch (da) {//保存