duy 2 жил өмнө
parent
commit
581095ead4

+ 4 - 69
src/views/manager/projectinfo/independent.vue

@@ -169,12 +169,12 @@
               @click="toFormulaEdit(scope.row,1)"
               >全局公式</el-link
             >
-            <el-link
+            <!-- <el-link
               class="mg-l-10"
               :type="scope.row.isSaveFormula == 1 ? 'warning' : 'primary'"
               @click="toFormulaEdit(scope.row,10)"
               >节点公式</el-link
-            >
+            > -->
             <!-- <el-link
               class="mg-l-10"
               type="danger"
@@ -403,10 +403,8 @@ export default {
     };
   },
   created() {
-    // this.loadData = this.loadData1;
      this.projectid = this.$route.query.pid;
      this.wbsid=this.$route.query.wbsid;
-    //  this.treeLoad1()
   },
   methods: {
  async sortpai(data,node) {
@@ -446,16 +444,6 @@ export default {
         this.sort =tabArr
       }
     },
-   
-     async treeLoad1 () {
-      let id = 12345678910
-      this.loading=true
-      let das = await this.tabTypeLazyTree(id, this.projectid,this.page.current,this.page.size)
-      console.log(this.projectid,'projectid');
-     this.data=das.records
-     this.loading=false
-      // return resolve(das.records)
-    },
         //#region 接口
     async tabTypeLazyTree (parentId, projectId,current,size,titleName) {//清表树
       console.log(parentId, projectId);
@@ -549,8 +537,6 @@ export default {
            })
           })
       }
-     
-
     },
      onLoad(page){
       if(this.treeId){
@@ -575,13 +561,6 @@ export default {
         console.log(this.page,'this.page111111');
         if(data.hasChildren){
           this.onLoad(this.page)
-          // this.tabloading=true;
-          //  this.tabTypeLazyTree(data.id, this.projectid,this.page.current,this.page.size).then((res)=>{
-          // console.log(res.records);
-          // this.loadData=res.records;
-          //  this.page.total=res.total;
-          //  this.tabloading=false;
-          // })
         }
         if(data.hasChildren===false&&node.level==2){
           this.tabloading=true;
@@ -669,8 +648,8 @@ export default {
       this.editElementQuery.initTableName =row. initTableName;
       this.editElementQuery.pid = this.$route.query.pid;
       this.editElementQuery.wbsid = this.$route.query.wbsid;
-        this.editElementQuery.initTableId = row.initTableId;
-       this.editElementQuery.nodeid = this.curTreeData.id;
+      this.editElementQuery.initTableId = row.initTableId;
+      this.editElementQuery.nodeid = this.curTreeData.id;
       this.editElementVisible = true;
     },
     async getExcelHtml2(pkeyId) {
@@ -717,37 +696,11 @@ export default {
     },
         //跳转到公式配置页面
     toFormulaEdit(row,type) {
-      // this.$router.push({
-      //   path: '/formula/edit',
-      //   query: {
-      //     wbsid: this.id,
-      //     eleid: row.id,
-      //     nodeid:this.curTreeData.id,
-      //     projectid:this.projectid
-      //   }
-      // });
-
       this.formulaCurRow = row;
       this.formulaCompVisible = true;
       this.formulaCurRow.globaltype = type;
     },
     //刷新左边树形数据
-    // refreshTree(){
-    //     //刷新左边树形数据
-    //    const parentId =12345678910 
-    //       tabTypeLazyTree({parentId,projectId:this.projectid,current:1,size:1000}).then(res => {
-    //         this.data=res.data.data.records;
-    //          this.$nextTick(()=>{
-    //            if(this.curNode.level==2){
-    //                this.defaultExpandKey.push(this.curNode.data.parentId)
-    //            }else{
-    //               this.defaultExpandKey.push(this.curNode.data.id)
-    //            }
-            
-    //         })
-          
-    //       });
-    // },
       refreshTree(){
         //刷新左边树形数据
       if(this.curNode.level===1){
@@ -777,24 +730,6 @@ export default {
         this.$refs.trees.setCurrentKey(this.curNode.data.id);
       });
     },
-    // getNodeDetail(data, node) {
-    //   let parentName = "";
-    //   if (node.parent.data) {
-    //     parentName = node.parent.data.title;
-    //   }
-    //   this.curTreeData = data;
-    //   this.curTreeNode = node;
-    //   this.curTreeData.parentName = parentName;
-    //   getDetail(data.id, this.id, this.projectid).then((res) => {
-    //     res.data.data.parentName = parentName;
-    //     this.tableData = [res.data.data];
-    //     this.nodeDetail = Object.assign({}, res.data.data);
-    //   });
-    //   this.updateNodeTable();
-
-    //   //获取节点展开路径
-    //   this.getExpandedKeys(node);
-    // },
 
   },
 

+ 9 - 46
src/views/manager/wbsinfo/element.vue

@@ -238,12 +238,12 @@
               @click="toFormulaEdit(scope.row,1)"
               >全局公式</el-link
             >
-            <el-link
+            <!-- <el-link
               class="mg-l-10"
               :type="scope.row.isSaveFormula == 1 ? 'warning' : 'primary'"
               @click="toFormulaEdit(scope.row,10)"
               >节点公式</el-link
-            >
+            > -->
             <!-- <el-link
               class="mg-l-10"
               type="danger"
@@ -806,11 +806,7 @@ export default {
           confirmButtonText: '删除',
           cancelButtonText: '取消'
         }).then(() => {
-          // removeElement(row.id, this.curEleTable.initTableName, row.ekey).then(() => {
-          //   list.splice(index, 1);
-          // })
-          // this.curEleTable.elementTotal --;
-             removeElement(row.id, this.curEleTable.initTableName, row.ekey).then(() => {
+            removeElement(row.id, this.curEleTable.initTableName, row.ekey).then(() => {
             list.splice(index, 1);
           })
           this.curEleTable.elementTotal --;
@@ -838,10 +834,7 @@ export default {
       //console.log(cellValue)
     },
       currentChange (currentPage) {
-       console.log('currentPage');
-          this.page.current = currentPage;
-        
-        
+        this.page.current = currentPage;
       },
       sizeChange (pageSize) {
         this.page.size = pageSize;
@@ -856,7 +849,6 @@ export default {
      async tabTypeLazyTreeAll ( parentId,current,size,titleName) {//清表树
       console.log(parentId);
       const { data: res } = await tabTypeLazyTreeAll({parentId,current,size,titleName}	)
-      console.log(res,'tabTypeLazyTreeAll');
       if (res.code === 200) {
         return res.data
 
@@ -884,8 +876,7 @@ export default {
             }, 1000);
         }else{
            this.loadData=[]
-            this.page.total=0
-          
+           this.page.total=0
         }
           
       },
@@ -893,7 +884,6 @@ export default {
 
     refreshChange () {
       this.searchChange();
-     
     },
      onLoad(page, params = {}){
       if(this.treeId){
@@ -925,8 +915,6 @@ export default {
            })
           })
       }
-     
-
     },
         //搜索
     searchChange(){
@@ -945,7 +933,7 @@ export default {
             arr.push(this.curTreeData)
             this.loadData=arr
             this.page.total=1;
-               setTimeout(() => {
+            setTimeout(() => {
               this.tabloading=false
               
             }, 1000);
@@ -958,8 +946,6 @@ export default {
               
             }, 1000);
         }
-         
-
       }else{
          this.$message.warning("请选选择左侧节点");
       }
@@ -973,7 +959,6 @@ export default {
         this.tabTypeLazyTreeAll(this.treeId, this.page.current,this.page.size).then((res)=>{
           this.loadData=res.records
           this.page.total=res.total
-
         })
     },
     handleDelete () {
@@ -988,7 +973,6 @@ export default {
       })
         .then(() => {
           return delTabInfoAll(this.ids);
-          // console.log(this.ids,'this.ids删除');
         })
         .then(() => {
           this.onLoad(this.page);//刷新表格数据
@@ -1024,7 +1008,6 @@ export default {
     // },
         //刷新左边树形数据
       refreshTreeData(){
-        //刷新左边树形数据
       if(this.curNode.level===1){
          const parentId =12345678910 
         tabTypeLazyTreeAll({parentId,current:1,size:1000}).then(res => {
@@ -1032,9 +1015,7 @@ export default {
              this.$nextTick(()=>{
               this.defaultExpandKey.push(this.curNode.data.id);
               this.$refs.avueTree.setCurrentKey(this.curNode.data.id);
-            
             })
-          
           });
       }else{
 
@@ -1056,8 +1037,7 @@ export default {
     editElement (row) {
       console.log(row,'row');
       this.curEleTable = row;
-      // selectFormElements(this.curEleTable.initTableId).then((res) => {
-        this.editEleloading=true
+      this.editEleloading=true
       selectPrivateFormElements(this.curEleTable.id).then((res) => {
            this.editEleloading=false
           res.data.data.forEach((element) => {
@@ -1084,9 +1064,7 @@ export default {
       this.from.tableType=this.formatTableType(this.from.tableType);
       this.from.tableOwner=row.tabOwner
       this.from.tableOwner=this.formatOwner(this.from.tableOwner);
-      // console.log( this.formatOwner(this.from.tableOwner),' this.from.tableOwner');
-       this.$refs.PublicWbs.show();
-      // this.AssociatedPublicTap = true;
+      this.$refs.PublicWbs.show();
     },
 
     saveNewEle (row) {
@@ -1203,16 +1181,6 @@ export default {
     },
         //跳转到公式配置页面
     toFormulaEdit(row,type) {
-      // this.$router.push({
-      //   path: '/formula/edit',
-      //   query: {
-      //     wbsid: this.id,
-      //     eleid: row.id,
-      //     nodeid:this.curTreeData.id,
-      //     projectid:this.projectid
-      //   }
-      // });
-
       this.formulaCurRow = row;
       this.formulaCurRow.globaltype = type;
       this.formulaCompVisible = true;
@@ -1327,11 +1295,10 @@ export default {
     async updateBatchNodeTableInfoElement (da) {//共有编辑元素
     console.log(da,'编辑表单');
       const { data: res } = await updateBatchNodeTableInfoElement(da)
-      //console.log(res);
       if (res.code == 200) {
         this.$message.success('操作成功');
         this.editElementFormTag = false
-         this.onLoad1(this.page);
+        this.onLoad1(this.page);
       }
     },
 
@@ -1369,10 +1336,6 @@ export default {
 
   },
   created () {
-    // let id=12345678910
-    // this.tabTypeLazyTreeAll(id).then((res)=>{
-    //         this.treeData=res.records;
-    //     });
      this.getTableTypelist();
      this.getOwnerTypelist();
      this.getDataTypelist();