Explorar el Código

征拆wbsid修改

duy hace 2 años
padre
commit
88d8967df5
Se han modificado 1 ficheros con 15 adiciones y 3 borrados
  1. 15 3
      src/views/manager/projectinfo/detail.vue

+ 15 - 3
src/views/manager/projectinfo/detail.vue

@@ -616,7 +616,8 @@ export default {
       rightObj2:[
        
        ],
-      nowref:{}
+      nowref:{},
+      finalWbsid:''
      
     }
   },
@@ -898,12 +899,18 @@ export default {
     saveWbsTree () {
       let obj = {};
       let ids = this.$refs.treetotree.getTreeAllId('rightTree');
+      if(this.finalWbsid.length>0){
+        this.wbsId=this.finalWbsid
+      }
       obj = {
         wbsId: this.wbsId,
         projectId: this.projectForm.id,
         wbsType: this.templateType,
         wbsTreeIds: ids
       }
+   
+     
+      console.log(this.wbsId,'this.wbsId最终');
       if (this.wbsId.toString().indexOf(',') >= 0) {
         //私有库
         obj.referenceType = "private";
@@ -1264,6 +1271,7 @@ export default {
 
         this.wbsId = this.templateType == 1 ? this.selectData.referenceWbsTemplateId : this.selectData.referenceWbsTemplateIdTrial
         if(this.templateType===5){
+          console.log('征拆选择');
           this.wbsId =this.selectData.referenceWbsTemplateIdLar
   
         }
@@ -1590,7 +1598,7 @@ export default {
                 console.log(11111111111);
                 WbsId=this.nowref.id
               }else{
-                if (this.projectForm.referenceWbsTemplateType == 'private' ||this.projectForm.referenceWbsTemplateTypeLar === 'private'&& refId != null && refId.toString().length > 0) {
+                if (this.projectForm.referenceWbsTemplateType == 'private'&& refId != null && refId.toString().length > 0 ||this.projectForm.referenceWbsTemplateTypeLar === 'private'&& refId != null && refId.toString().length > 0) {
                     WbsId = priv.pkeyId||this.selectData.referenceWbsTemplateIdTrial 
                 }
                 else {//公有
@@ -1601,8 +1609,12 @@ export default {
                 }
             }
             
-          
+            this.finalWbsid=WbsId
               console.log(WbsId,'WbsId'); 
+              console.log( this.finalWbsid,' this.finalWbsid=');
+              // this.selectData.referenceWbsTemplateIdLar=WbsId
+
+              console.log(this.selectData.referenceWbsTemplateIdLar,'this.selectData.referenceWbsTemplateIdLar');
             // findProjectTree(this.projectForm.id,  this.templateType === 1 ? WbsId : this.selectData.referenceWbsTemplateIdTrial).then((res) => {
             findProjectTree(this.projectForm.id, WbsId).then((res) => {
               if (this.rightTreeData.length>0&&this.templateType===2&&this.rightObj.wbsId==WbsId) {