|
|
@@ -4,7 +4,7 @@
|
|
|
<div id="hc_add_dialog_tree_card">
|
|
|
<hc-card-item title="工程部位" scrollbar>
|
|
|
<template #extra>
|
|
|
- <el-link type="primary" @click="addChangeNode">添加</el-link>
|
|
|
+ <el-button type="text" :loading="addBtnLoading" @click="addChangeNode">添加</el-button>
|
|
|
</template>
|
|
|
<hc-lazy-tree show-checkbox tree-key="id" :h-props="treeProps" @load="treeLoadNode" @check="treeNodeCheck" />
|
|
|
</hc-card-item>
|
|
|
@@ -314,20 +314,26 @@ const tableColumn = ref([
|
|
|
{ key: 'action', name: '操作', width: 80, align: 'center' },
|
|
|
])
|
|
|
const tableData = ref([])
|
|
|
+
|
|
|
+const addBtnLoading = ref(false)
|
|
|
const addChangeNode = async () => {
|
|
|
const nodeId = treeCheckKeys.value ?? ''
|
|
|
if (isNullES(nodeId)) {
|
|
|
window.$message.warning('请先选择节点')
|
|
|
return
|
|
|
}
|
|
|
+ addBtnLoading.value = true
|
|
|
+ console.log('nodeId', nodeId.split(','))
|
|
|
+ console.log('tableData.value.map((item) => item.id)', tableData.value.map((item) => item.id))
|
|
|
const { data } = await mainApi.getChangeNode({
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|
|
|
- changeIds: tableData.value.map((item) => item.id).join(),
|
|
|
- ids: nodeId,
|
|
|
+ changeIds: tableData.value.map((item) => item.id),
|
|
|
+ ids: nodeId.split(','),
|
|
|
})
|
|
|
const newArr = getArrValue(data)
|
|
|
tableData.value.push(...newArr)
|
|
|
+ addBtnLoading.value = false
|
|
|
}
|
|
|
|
|
|
//删除变更申请部位
|