|
@@ -263,7 +263,9 @@
|
|
|
<HcCopy v-if="showcopyModal" ref="copyRefs" :contractId="contract_id" :projectId="projectId" :classify="classifys"
|
|
|
:tree_AutoExpandKeys="tree_AutoExpandKeys"
|
|
|
:treenodeDataInfo="treenodeDataInfo"
|
|
|
- :showcopyModal="showcopyModal"
|
|
|
+ :copyItems="copyItems"
|
|
|
+ @changeModalType="changeType"
|
|
|
+
|
|
|
/>
|
|
|
</HcDialog>
|
|
|
</template>
|
|
@@ -881,8 +883,42 @@ const copyRefs=ref(null)
|
|
|
const copyModalClose=()=>{
|
|
|
// copyModal.value=false
|
|
|
}
|
|
|
-const copySaveClick=()=>{
|
|
|
- // copyModal.value=false
|
|
|
+const isOwntype=ref('1')
|
|
|
+const changeType=(type)=>{
|
|
|
+ isOwntype.value=type
|
|
|
+ console.log( isOwntype.value,' isOwntype.value');
|
|
|
+}
|
|
|
+const copySaveClick=async()=>{
|
|
|
+ //本节点复制
|
|
|
+ if(isOwntype.value==='2'){
|
|
|
+ const {pkeyId, isTableRender, isTableForm} = copyItems.value
|
|
|
+ if (pkeyId) {
|
|
|
+ if (isStatus.value !== 3) {
|
|
|
+ if (!isTableRender) {
|
|
|
+ await copeBussTab(pkeyId)
|
|
|
+ } else if (!isTableForm) {
|
|
|
+ window?.$message?.warning('暂无表单数据')
|
|
|
+ } else if (isTableRender) {
|
|
|
+ copyClickLoading.value = true
|
|
|
+ const isSave = await saveExcelBussData(items, null, false)
|
|
|
+ if (isSave) {
|
|
|
+ await copeBussTab(pkeyId)
|
|
|
+ } else {
|
|
|
+ copyClickLoading.value = false
|
|
|
+ window?.$message?.warning('复制本表操作失败')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning(`数据异常了, isRenderTableForm: ${isTableRender}, isTableForm: ${isTableForm}, pkeyIds:${pkeyId}`)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('已上报的资料,不允许复制')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('pkeyId为空')
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ window?.$message?.warning('暂无相关接口')
|
|
|
+ }
|
|
|
}
|
|
|
//复制本表
|
|
|
const copyClickModalLoading = ref(false)
|
|
@@ -914,34 +950,12 @@ const copyClick = async (items) => {
|
|
|
window?.$message?.warning('pkeyId为空')
|
|
|
}
|
|
|
}
|
|
|
+const copyItems=ref([])
|
|
|
+//跨节点复制弹窗
|
|
|
// const copyClick = (items) => {
|
|
|
// showcopyModal.value=true
|
|
|
-
|
|
|
-// // const {pkeyId, isTableRender, isTableForm} = items
|
|
|
-// // if (pkeyId) {
|
|
|
-// // if (isStatus.value !== 3) {
|
|
|
-// // if (!isTableRender) {
|
|
|
-// // await copeBussTab(pkeyId)
|
|
|
-// // } else if (!isTableForm) {
|
|
|
-// // window?.$message?.warning('暂无表单数据')
|
|
|
-// // } else if (isTableRender) {
|
|
|
-// // copyClickLoading.value = true
|
|
|
-// // const isSave = await saveExcelBussData(items, null, false)
|
|
|
-// // if (isSave) {
|
|
|
-// // await copeBussTab(pkeyId)
|
|
|
-// // } else {
|
|
|
-// // copyClickLoading.value = false
|
|
|
-// // window?.$message?.warning('复制本表操作失败')
|
|
|
-// // }
|
|
|
-// // } else {
|
|
|
-// // window?.$message?.warning(`数据异常了, isRenderTableForm: ${isTableRender}, isTableForm: ${isTableForm}, pkeyIds:${pkeyId}`)
|
|
|
-// // }
|
|
|
-// // } else {
|
|
|
-// // window?.$message?.warning('已上报的资料,不允许复制')
|
|
|
-// // }
|
|
|
-// // } else {
|
|
|
-// // window?.$message?.warning('pkeyId为空')
|
|
|
-// // }
|
|
|
+// copyItems.value=items
|
|
|
+
|
|
|
// }
|
|
|
|
|
|
//复制表的请求
|