|
@@ -162,8 +162,8 @@ const addTreeClick = () => {
|
|
if (rightTreeData.value.length < 1) {
|
|
if (rightTreeData.value.length < 1) {
|
|
//直接把左边勾选的树复制到右侧
|
|
//直接把左边勾选的树复制到右侧
|
|
let allTree = deepClone(leftTreeData.value)
|
|
let allTree = deepClone(leftTreeData.value)
|
|
- const halfKeys = right.getHalfCheckedKeys()
|
|
|
|
- const keys = right.getCheckedKeys().concat(halfKeys)
|
|
|
|
|
|
+ const halfKeys = left.getHalfCheckedKeys()
|
|
|
|
+ const keys = left.getCheckedKeys().concat(halfKeys)
|
|
getRightTree(allTree, keys)
|
|
getRightTree(allTree, keys)
|
|
rightTreeData.value = allTree
|
|
rightTreeData.value = allTree
|
|
} else {
|
|
} else {
|
|
@@ -324,13 +324,14 @@ const saveDataApi = async () => {
|
|
submitLoading.value = true
|
|
submitLoading.value = true
|
|
const ids = await getTreeAllId('right')
|
|
const ids = await getTreeAllId('right')
|
|
const { pid, cid } = getObjValue(dataInfo.value)
|
|
const { pid, cid } = getObjValue(dataInfo.value)
|
|
- const { code } = contractApi.submitWbsTreeInContract({
|
|
|
|
|
|
+ const { code } = await contractApi.submitWbsTreeInContract({
|
|
wbsId: wbsId.value,
|
|
wbsId: wbsId.value,
|
|
projectId: pid,
|
|
projectId: pid,
|
|
contractId: cid,
|
|
contractId: cid,
|
|
wbsTreeIds: ids,
|
|
wbsTreeIds: ids,
|
|
})
|
|
})
|
|
submitLoading.value = false
|
|
submitLoading.value = false
|
|
|
|
+
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
window?.$message?.success('保存成功')
|
|
window?.$message?.success('保存成功')
|
|
}
|
|
}
|