Explorar el Código

项目数据同步

duy hace 2 meses
padre
commit
1dcf950c24
Se han modificado 1 ficheros con 21 adiciones y 6 borrados
  1. 21 6
      src/views/manager/projectinfo/tree.vue

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

@@ -4094,14 +4094,15 @@ export default {
     syncNodeTableHandle(data) {
      console.log('后管数据同步',data);
      this.syncForm.range='1'
+   
+   
+      
      this.proSyncTag=true
      this.isShowLeft=false
      this.isShowTable=true
      this.getTypeOptions()
-      this.getRangeOptions()
+    this.getRangeOptions()
       this.getCheckIdList()
-      console.log(data.primaryKeyId,'ids');
-      
       this.getTempProjectList(data.primaryKeyId)
      
     },
@@ -4137,14 +4138,16 @@ export default {
       });
     },
     //同步元素表单排序到合同段
-    syncSortHandle(data) {
+   async syncSortHandle(data) {
       console.log('同步到合同');
        this.syncForm.range='2'
+       
        this.proSyncTag=true
        this.isShowLeft=false
        this.isShowTable=true
        this.getTypeOptions()
-      this.getRangeOptions()
+       this.getRangeOptions()
+   
       this.getCheckIdList()
       selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
           if (res.data.data.length) {
@@ -4793,9 +4796,20 @@ export default {
         this.preTableData=[]
     },
     saveProTag(){
-      console.log(this.syncForm,'this.syncForm');
+
       this.syncForm.projectId=this.projectid
+      if(this.syncForm.rangeName==''){
+        for (let index = 0; index < this.rangeOptions.length; index++) {
+          const element =this. rangeOptions[index];
+          if(element.dictKey==this.syncForm.range){
+            this.syncForm.rangeName=element.dictValue
+            break
+          }
+          
+        }
+      }
       this.saveProTagLoading=true
+
       addSync({
         ...this.syncForm,
        type:this.syncForm.type.join(','),
@@ -4811,6 +4825,7 @@ export default {
           this.$message.error(res.data.msg)
         }
       })
+      this.saveProTagLoading=false
     },
     handleCheckAllChange(val) {
         // this.syncForm.type = val ? this.typeOptions : [];