Переглянути джерело

工程节点元素公式配置

duy 2 роки тому
батько
коміт
4bb7c78d34

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

@@ -612,35 +612,7 @@ export default {
     //     })
     //   }
     // },
-    geTreeData(){
-      this.treeLoad = true;
-      if(this.globaltype===1&&this.elementType){
-         tabTypeLazyTreeAll({parentId:12345678910,current:1,size:1000}).then((res)=>{
-           this.treeLoad = false;
-           this.treeData = res.data.data.records;
-            // this.defaultExpanded = [this.nodeid];
-         })
-      }else{
-         tabTypeLazyTree({parentId:12345678910,projectId:this.projectId,pcurrent:1,size:1000}).then((res)=>{
-           this.treeLoad = false;
-           this.treeData = res.data.data.records;
-            // this.defaultExpanded = [this.nodeid];
-         })
-      }
-      // if(this.pid){
-      //   findProjectTree(this.pid, this.wbsid).then((res) => {
-      //     this.treeLoad = false;
-      //     this.treeData = res.data.data;
-      //     this.defaultExpanded = [this.nodeid];
-      //   })
-      // }else{
-      //   getAlltree(this.userInfo.tenant_id, 1, this.wbsid).then((res) => {
-      //     this.treeLoad = false;
-      //     this.treeData = res.data.data;
-      //     this.defaultExpanded = [this.nodeid];
-      //   })
-      // }
-    },
+   
            //#region 接口
     async tabTypeLazyTree (parentId, projectId,current,size,titleName) {//清表树
       const { data: res } = await tabTypeLazyTree({ parentId, projectId,current,size,titleName })
@@ -652,12 +624,13 @@ export default {
 
     //懒加载树
     loadNode(node, resolve) {
-   
+     console.log(this.elementType);
+       console.log(this.globaltype,'globaltype');
       let parentId = 12345678910;
       if (node.level != 0) {
         parentId = node.data.id;
       }
-      if(this.globaltype===1&&this.elementType){
+      if(this.globaltype===1&&!this.elementType){
         
            tabTypeLazyTreeAll({parentId,current:1,size:1000}).then((res) => {
             let arr = [];
@@ -666,7 +639,7 @@ export default {
             }
             return resolve(arr);
           });
-      }else{
+      }else if(this.globaltype===1&&this.elementType){
        
          tabTypeLazyTree({parentId,projectId:this.projectid,pcurrent:1,size:1000}).then((res) => {
             let arr = [];
@@ -675,13 +648,7 @@ export default {
             }
             return resolve(arr);
           });
-          // tabTypeLazyTreeAll({parentId,current:1,size:1000}).then((res) => {
-          //   let arr = [];
-          //   if (Array.isArray(res.data.data.records)) {
-          //     arr = res.data.data.records;
-          //   }
-          //   return resolve(arr);
-          // });
+       
       }
      
     },
@@ -1447,7 +1414,7 @@ export default {
     onLoad(page, params = {}){
       if(this.treeId){
         this.eleListable=true;
-        if(this.elementType){
+        if(!this.elementType){
             this.tabTypeLazyTreeAll(this.treeId, this.page.current,1000,this.input3).then((res)=>{
               this.eleList=res.records
               this.page.total=res.total

+ 1 - 1
src/views/manager/projectinfo/independent.vue

@@ -707,7 +707,7 @@ export default {
       this.formulaCurRow = row;
       this.formulaCompVisible = true;
       this.formulaCurRow.globaltype = type;
-       this.formulaCurRow.elementType = false;
+       this.formulaCurRow.elementType = true;
     },
     //刷新左边树形数据
       refreshTree(){

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

@@ -1635,12 +1635,20 @@
       <FormulaEdit  :wbsid="id" :nodeid="curTreeData.id" :eleid="formulaCurRow.id" :globaltype="formulaCurRow.globaltype" @hideDialog="formulaCompVisible = false" v-if="formulaCompVisible"></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"
+       v-if="formulaCompVisible1">
+       </FormulaEditone>
+    </el-dialog>
+
   </basic-container>
 </template>
 
 <script>
 import ManualSorting from '@/components/WbsTree/ManualSorting'
 import FormulaEdit from '@/views/formula/edit.vue'
+import FormulaEditone from '@/views/formula/edit1.vue'
 import {
   getLazytree, getDetail, update, selectByNodeTable,getParamElements,delParamElements,specifiedParamElements, getAlltree,
   saveFormAndElement, selectFormElements, removeTableById, findWbsTreeSameLevel, wbsTreeSort, findWbsTreeTableSameLevel, wbsTreeTableSort, parameters, saveOrUpdateBatch, keymap, importwbsTreeFormBatch, exportBatchTemplate, updateBatchNodeTableInfo,
@@ -1796,6 +1804,7 @@ export default {
       aliasArr:[],
 
       formulaCompVisible:false,//公式弹框
+      formulaCompVisible1:false,
       formulaCurRow:{},//当前元素
       testTreeLoad: false,
       testTreeData: [],
@@ -2509,7 +2518,14 @@ export default {
       //this.editEleFormulaVisible = false;
       this.formulaCurRow = row;
       this.formulaCurRow.globaltype = type;
-      this.formulaCompVisible = true;
+      if(type===1){
+         this.formulaCompVisible1 = true;
+           this.formulaCurRow.elementType = false;
+      }else{
+          this.formulaCompVisible = true;
+         
+      }
+    
     },
 
     getNodeTypelist () {
@@ -3133,7 +3149,8 @@ export default {
   },
   components: {
     ManualSorting,
-    FormulaEdit
+    FormulaEdit,
+    FormulaEditone
   }
 };
 </script>

+ 1 - 1
src/views/manager/wbsinfo/element.vue

@@ -1198,7 +1198,7 @@ export default {
     toFormulaEdit(row,type) {
       this.formulaCurRow = row;
       this.formulaCurRow.globaltype = type;
-      this.formulaCurRow.elementType = true;
+      this.formulaCurRow.elementType = false;
       this.formulaCompVisible = true;
     },
     editele(){