Pārlūkot izejas kodu

同步节点修改

duy 2 mēneši atpakaļ
vecāks
revīzija
3cf5290ae4
1 mainītis faili ar 12 papildinājumiem un 6 dzēšanām
  1. 12 6
      src/views/manager/projectinfo/tree.vue

+ 12 - 6
src/views/manager/projectinfo/tree.vue

@@ -2541,7 +2541,7 @@ export default {
       checkIdList:[
        
       ],
-      isShowLeft:true,
+      isShowLeft:false,
       isShowTable:false,
       templateIdList:[],//同步源
       saveProTagLoading:false,
@@ -4205,6 +4205,7 @@ export default {
   async  syncNodeTableHandle(data) {
      console.log('后管数据同步',data);
      this.curTreeData=data
+     this.isShowLeft=false
      await  this.getNodeStatusData()
       if(this.syncListDialog){
         return
@@ -4214,7 +4215,7 @@ export default {
    
       
      this.proSyncTag=true
-     this.isShowLeft=false
+    
      this.isShowTable=true
      this.getTypeOptions()
     this.getRangeOptions()
@@ -4256,15 +4257,17 @@ export default {
     //同步元素表单排序到合同段
    async syncSortHandle(data) {
       console.log('同步到合同');
+      this.isShowLeft=false
       this.curTreeData=data
-      await  this.getNodeStatusData()
+   
       if(this.syncListDialog){
         return
       }
+      await  this.getNodeStatusData()
        this.syncForm.range='2'
        
        this.proSyncTag=true
-       this.isShowLeft=false
+     
        this.isShowTable=true
        this.getTypeOptions()
        this.getRangeOptions()
@@ -4839,8 +4842,9 @@ export default {
         this.typeOptions = res.data.data;
       });
      },
-     handleCheckChange(_,{checkedKeys,halfCheckedNodes}) {
+  async   handleCheckChange(_,{checkedKeys,halfCheckedNodes}) {
         let ids=checkedKeys && checkedKeys.length ? checkedKeys.join(',') : ''
+      await  this.getNodeStatusData()
         this.getTempProjectList(ids)
       },
      async getTempProjectList(ids){
@@ -5089,13 +5093,15 @@ export default {
       
     },
     getNodeStatusData(){
-      let ids
+     
+      let ids=''
       if(this.isShowLeft){
         ids=this.$refs.syncProTree.getCheckedKeys()
         ids=ids.join(',')
       }else{
         ids=this.curTreeData.primaryKeyId
       }
+
       getNodeStatus({ id:ids}).then((res) => {
 
         if(res.data.code==200){