duy 2 ani în urmă
părinte
comite
6d55ce54d7

+ 9 - 3
src/views/formula/edit.vue

@@ -484,6 +484,10 @@ export default {
     fromcurNode:{
       type:Object,
       default:() => ({})
+    },
+    iswbstype:{//是否是公共wbs
+      type:String,
+      default:''
     }
   },
   data() {
@@ -1443,7 +1447,7 @@ export default {
         this.eleList = this.paramDataList;
         this.eleList1 = this.paramDataList;
       }else{
-        selectFormElements(tableId,{nodeId:this.nodeid,type:0}).then((res)=>{
+        selectFormElements(tableId,{nodeId:this.nodeid,type:this.iswbstype}).then((res)=>{
           this.eleList = res.data.data;
           this.eleList1 = res.data.data;
         })
@@ -1506,7 +1510,8 @@ export default {
             this.eleTableListComp = res.data.data.tabData;
 
             this.eleTableIdComp = this.eleTableListComp[0].initTableId;
-            this.getTableEleComp(this.eleTableIdComp);
+            let tabId= this.eleTableList[0].pkeyId!==-1?this.eleTableList[0].pkeyId:this.eleTableList[0].id;
+            this.getTableEleComp(tabId);
           }else{
             this.eleTableListComp = [];
             this.eleTableIdComp = '';
@@ -1525,11 +1530,12 @@ export default {
     //方法下面的查询元素
     getTableEleComp(tableId){
         this.input3=''
+       
       if(tableId === '选择节点参数'){
         this.eleListComp = this.paramDataList;
         this.eleListComp1 = this.paramDataList;
       }else{
-        selectFormElements(tableId,{type:0}).then((res)=>{
+        selectFormElements(tabId,{nodeId:this.nodeid,type:this.iswbstype}).then((res)=>{
           this.eleListComp = res.data.data;
            this.eleListComp1 = res.data.data;
         })

+ 2 - 2
src/views/manager/projectinfo/tree.vue

@@ -1398,7 +1398,7 @@
         :nodeid="curTreeData.id"
         :eleid="formulaCurRow.id"
         :globaltype="formulaCurRow.globaltype"
-      
+        :iswbstype="2"
         @hideDialog="formulaCompVisible = false"
         v-if="formulaCompVisible"
       ></FormulaEdit>
@@ -1406,7 +1406,7 @@
       <!-- 全局公式 -->
     <el-dialog title="" :visible.sync="formulaCompVisible1" fullscreen append-to-body class="full-dialog"  @close="closeformulaComp1">
       <FormulaEditone  :wbsid="id" :nodeid="curTreeData.id" :eleid="formulaCurRow.id"   :elementType="formulaCurRow.elementType"  :projectid="projectid"  :tableType="istableType"
-      :globaltype="formulaCurRow.globaltype" @hideDialog="formulaCompVisible1 = false"  :fromcurNode="curEleTable"  
+      :globaltype="formulaCurRow.globaltype" @hideDialog="formulaCompVisible1 = false"  :fromcurNode="curEleTable"   :iswbstype="2"
        v-if="formulaCompVisible1">
        </FormulaEditone>
     </el-dialog>

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

@@ -1587,12 +1587,12 @@
 
     <el-dialog title="" :visible.sync="formulaCompVisible" fullscreen append-to-body class="full-dialog">
       <FormulaEdit  :wbsid="id" :nodeid="curTreeData.id" :eleid="formulaCurRow.id" :globaltype="formulaCurRow.globaltype" @hideDialog="formulaCompVisible = false"
-       v-if="formulaCompVisible" :fromcurNode="curTreeData"></FormulaEdit>
+       v-if="formulaCompVisible" :fromcurNode="curTreeData" :iswbstype="1"></FormulaEdit>
     </el-dialog>
 
      <el-dialog title="" :visible.sync="formulaCompVisible1" fullscreen append-to-body class="full-dialog">
       <FormulaEditone  :wbsid="id" :nodeid="curTreeData.id" :eleid="formulaCurRow.id"   :elementType="formulaCurRow.elementType"
-      :globaltype="formulaCurRow.globaltype" @hideDialog="formulaCompVisible1 = false"  :fromcurNode="curEleTable"
+      :globaltype="formulaCurRow.globaltype" @hideDialog="formulaCompVisible1 = false"  :fromcurNode="curEleTable" :iswbstype="1"
        v-if="formulaCompVisible1">
        </FormulaEditone>
     </el-dialog>