فهرست منبع

复制节点更改

duy 2 سال پیش
والد
کامیت
d081b5fc28
1فایلهای تغییر یافته به همراه23 افزوده شده و 11 حذف شده
  1. 23 11
      src/views/data-fill/wbs.vue

+ 23 - 11
src/views/data-fill/wbs.vue

@@ -966,12 +966,12 @@ const copyNodeElTreeClick = ({data}) => {
     }
 }
 
-const setCopyNodeTable = (data, title) => {
+const setCopyNodeTable = (data, title,partitionCode) => {
     copyNodeTable.value.push({
         title: data?.title || '',
         nodeName: title || '',
         primaryKeyId: data?.primaryKeyId || '',
-       
+        partitionCode:partitionCode||''
     })
 }
 
@@ -1038,20 +1038,32 @@ const copyNodeClick = async () => {
 //单个复制、多份复制请求
 const copyContractTreeNode = async (type, form,table) => {
     copyNodeLoading.value = true
-    const {error, code} = await wbsApi.copyContractTreeNode({
-        copyType: type,
-        needCopyNodeName: form?.title || '',
-        partitionCode:form?.partitionCode || '',
-        needCopyPrimaryKeyId: form?.primaryKeyId || '',
-        parentPrimaryKeyId: form?.parent?.primaryKeyId || '',
-        copyBatchToPaths: table
-    })
+    if(type=='1'){
+         const {error, code} = await wbsApi.copyContractTreeNode({
+            copyType: type,
+            needCopyNodeName: form?.title || '',
+            partitionCode:form?.partitionCode || '',
+            needCopyPrimaryKeyId: form?.primaryKeyId || '',
+            parentPrimaryKeyId: form?.parent?.primaryKeyId || '',
+            copyBatchToPaths: table
+        })
+    }else{
+         const {error, code} = await wbsApi.copyContractTreeNode({
+            copyType: type,
+            needCopyNodeName: form?.title || '',
+           
+            needCopyPrimaryKeyId: form?.primaryKeyId || '',
+            parentPrimaryKeyId: form?.parent?.primaryKeyId || '',
+            copyBatchToPaths: table
+        })
+    }
+   
     //判断状态
     if (!error && code === 200) {
         window?.$message?.success('复制成功')
         copyNodeLoading.value = false
         copyNodeModal.value = false
-        // window?.location?.reload()  //刷新页面
+        window?.location?.reload()  //刷新页面
     }
 }
 //复制数据