Explorar el Código

节点参数,同步公式增加参数

duy hace 2 años
padre
commit
3f977f3030
Se han modificado 2 ficheros con 43 adiciones y 31 borrados
  1. 4 2
      src/api/manager/wbsprivate.js
  2. 39 29
      src/views/manager/projectinfo/tree.vue

+ 4 - 2
src/api/manager/wbsprivate.js

@@ -107,7 +107,8 @@ export const syncNodeParam = (projectId) => {
     url: '/api/blade-manager/wbsPrivate/sync-node-param',
     method: 'post',
     params: {
-      projectId
+      projectId,
+      pKeyId
     }
   })
 }
@@ -117,7 +118,8 @@ export const syncProjecteVisa = (projectId) => {
     url: '/api/blade-manager/wbsPrivate/sync-project-eVisa',
     method: 'post',
     params: {
-      projectId
+      projectId,
+      pKeyId
     }
   })
 }

+ 39 - 29
src/views/manager/projectinfo/tree.vue

@@ -3270,7 +3270,7 @@ export default {
     },
 
     syncInfoHandle(item) {
-    
+    if(this.curTreeData.primaryKeyId){
       this.$confirm("是否同步节点参数?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -3282,7 +3282,7 @@ export default {
           ele.load=true
         }
       })
-        syncNodeParam(this.projectid)
+        syncNodeParam(this.projectid,this.curTreeData.primaryKeyId)
           .then(() => {
             this.$message({
               type: "success",
@@ -3298,6 +3298,10 @@ export default {
             })
           });
       });
+    }else{
+      this.$message.warning('请先选择左侧节点')
+    }
+      
     },
 
     //显示别名弹窗
@@ -3427,34 +3431,40 @@ export default {
       });
     },
     syncElectric(item){
-      console.log('同步电签默认信息');
-       this.$confirm("是否同步电签默认信息?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        this.syncElectricLoad = true;
-        this.menuoptions.forEach((ele)=>{
-        if(item.value==ele.value){
-          ele.load=true
-        }
-      })
-        syncProjecteVisa(this.projectid)
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "同步成功!",
+      if(this.curTreeData.primaryKeyId){
+          console.log('同步电签默认信息');
+        this.$confirm("是否同步电签默认信息?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.syncElectricLoad = true;
+          this.menuoptions.forEach((ele)=>{
+          if(item.value==ele.value){
+            ele.load=true
+          }
+        })
+
+          syncProjecteVisa(this.projectid,this.curTreeData.primaryKeyId)
+            .then(() => {
+              this.$message({
+                type: "success",
+                message: "同步成功!",
+              });
+            })
+            .finally(() => {
+              this.syncElectricLoad = false;
+                this.menuoptions.forEach((ele)=>{
+                  if(item.value==ele.value){
+                    ele.load=false
+                  }
+                })
             });
-          })
-          .finally(() => {
-            this.syncElectricLoad = false;
-              this.menuoptions.forEach((ele)=>{
-                if(item.value==ele.value){
-                  ele.load=false
-                }
-              })
-          });
-      });
+        });
+      }else{
+        this.$message.warning('请先选择左侧节点')
+      }
+    
     },