Browse Source

公式配置修改

duy 2 năm trước cách đây
mục cha
commit
55a5233177

+ 17 - 7
src/views/formula/edit1.vue

@@ -790,13 +790,23 @@ export default {
                     let paramsId = this.fromcurNode.id
                     console.log(this.nodeid,'this.initTableId');
                     // 根据 id 获取节点信息
-                    let getNodeById = this.$refs.tree.getNode(paramsId);
-                    if(getNodeById){
-                        // 设置节点选中
-                        this.$refs.tree.setCurrentKey(paramsId);
-                         this.getNodeDetail(this.fromcurNode)
-                            this.getNodeDetailComp(this.fromcurNode)
-                    }
+                    // let getNodeById = this.$refs.tree.getNode(paramsId);
+                    // if(getNodeById){
+                    //     // 设置节点选中
+                    //     this.$refs.tree.setCurrentKey(paramsId);
+                    //      this.getNodeDetail(this.fromcurNode)
+                    //         this.getNodeDetailComp(this.fromcurNode)
+                    // }
+                     let isArray = Array.isArray(this.$refs.tree)
+                  if (isArray) {
+                    // 根据 id 获取节点信息
+                    this.$refs.tree[0].setCurrentKey(paramsId);
+                  } else {
+                    this.$refs.tree.setCurrentKey(paramsId);
+                  }
+
+                  this.getNodeDetail(this.fromcurNode)
+                  this.getNodeDetailComp(this.fromcurNode)
                 })
             })
          }

+ 5 - 1
src/views/manager/projectinfo/editElement/editElement.vue

@@ -227,7 +227,7 @@
         <FormulaEdit :wbsid="wbsid" :nodeid="nodeid" :eleid="eleid" :projectid="pid" @hideDialog="formulaCompVisible = false" v-if="formulaCompVisible"  :globaltype="globaltype"></FormulaEdit>
       </el-dialog>
       <el-dialog title="" :visible.sync="formulaCompVisible1" fullscreen append-to-body class="full-dialog">
-      <FormulaEditone  :wbsid="wbsid" :nodeid="nodeid" :eleid="eleid"   :elementType="elementType" :projectid="pid" 
+      <FormulaEditone  :wbsid="wbsid" :nodeid="nodeid" :eleid="eleid"   :elementType="elementType" :projectid="pid"   :fromcurNode="curEleTable"
       :globaltype="globaltype" @hideDialog="formulaCompVisible1 = false"
        v-if="formulaCompVisible1">
        </FormulaEditone>
@@ -291,6 +291,10 @@ export default {
       type:Boolean,
       default:false
     },
+    curEleTable:{
+       type:Object,
+      default:{}
+    }
   },
   data () {
     return {

+ 2 - 0
src/views/manager/projectinfo/independent.vue

@@ -118,6 +118,7 @@
       class="full-dialog"
     >
       <EditElement
+        :curEleTable="curEleTable"
         :pkeyId="editElementQuery.pkeyId"
         :id="editElementQuery.id"
         :initTableName="editElementQuery.initTableName"
@@ -677,6 +678,7 @@ export default {
       this.editElementQuery.wbsid = this.$route.query.wbsid;
       this.editElementQuery.initTableId = row.initTableId;
       this.editElementQuery.nodeid = this.curTreeData.id;
+      this.curEleTable=row;
       this.editElementVisible = true;
     },
     async getExcelHtml2(pkeyId) {