|
@@ -955,7 +955,7 @@ const copyNodeClick = async () => {
|
|
const copyContractTreeNode = async (type, form, table, classify) => {
|
|
const copyContractTreeNode = async (type, form, table, classify) => {
|
|
copyNodeLoading.value = true
|
|
copyNodeLoading.value = true
|
|
if (type === '1') {
|
|
if (type === '1') {
|
|
- const { error, code } = await wbsApi.copyContractTreeNode({
|
|
|
|
|
|
+ const { error, code, msg } = await wbsApi.copyContractTreeNode({
|
|
copyType: type,
|
|
copyType: type,
|
|
needCopyNodeName: form?.title || '',
|
|
needCopyNodeName: form?.title || '',
|
|
partitionCode: form?.partitionCode || '',
|
|
partitionCode: form?.partitionCode || '',
|
|
@@ -971,9 +971,11 @@ const copyContractTreeNode = async (type, form, table, classify) => {
|
|
window?.$message?.success('复制成功')
|
|
window?.$message?.success('复制成功')
|
|
copyNodeModal.value = false
|
|
copyNodeModal.value = false
|
|
window?.location?.reload() //刷新页面
|
|
window?.location?.reload() //刷新页面
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+ window.$message.error(msg)
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- const { error, code } = await wbsApi.copyContractTreeNode({
|
|
|
|
|
|
+ const { error, code, msg } = await wbsApi.copyContractTreeNode({
|
|
copyType: type,
|
|
copyType: type,
|
|
needCopyNodeName: form?.title || '',
|
|
needCopyNodeName: form?.title || '',
|
|
needCopyPrimaryKeyId: form?.primaryKeyId || '',
|
|
needCopyPrimaryKeyId: form?.primaryKeyId || '',
|
|
@@ -988,6 +990,8 @@ const copyContractTreeNode = async (type, form, table, classify) => {
|
|
window?.$message?.success('复制成功')
|
|
window?.$message?.success('复制成功')
|
|
copyNodeModal.value = false
|
|
copyNodeModal.value = false
|
|
window?.location?.reload() //刷新页面
|
|
window?.location?.reload() //刷新页面
|
|
|
|
+ } else {
|
|
|
|
+ window.$message.error(msg)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -995,7 +999,7 @@ const copyContractTreeNode = async (type, form, table, classify) => {
|
|
//复制数据
|
|
//复制数据
|
|
const copyContractNodeSubmitBusinessData = async (form, table, classify) => {
|
|
const copyContractNodeSubmitBusinessData = async (form, table, classify) => {
|
|
copyNodeLoading.value = true
|
|
copyNodeLoading.value = true
|
|
- const { error, code } = await wbsApi.copyContractNodeSubmitBusinessData({
|
|
|
|
|
|
+ const { error, code, msg } = await wbsApi.copyContractNodeSubmitBusinessData({
|
|
needCopyPrimaryKeyId: form?.primaryKeyId || '',
|
|
needCopyPrimaryKeyId: form?.primaryKeyId || '',
|
|
copyBatchToPaths: table,
|
|
copyBatchToPaths: table,
|
|
classify: classify,
|
|
classify: classify,
|
|
@@ -1006,7 +1010,9 @@ const copyContractNodeSubmitBusinessData = async (form, table, classify) => {
|
|
window?.$message?.success('复制成功')
|
|
window?.$message?.success('复制成功')
|
|
copyNodeModal.value = false
|
|
copyNodeModal.value = false
|
|
window?.location?.reload() //刷新页面
|
|
window?.location?.reload() //刷新页面
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+ window.$message.error(msg)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//新增节点
|
|
//新增节点
|
|
@@ -1058,7 +1064,7 @@ const addNodeClick = async () => {
|
|
//发起请求
|
|
//发起请求
|
|
addNodeLoading.value = true
|
|
addNodeLoading.value = true
|
|
const primaryKeyId = treeItemInfo.value?.primaryKeyId || ''
|
|
const primaryKeyId = treeItemInfo.value?.primaryKeyId || ''
|
|
- const { error, code } = await wbsApi.saveContractTreeNode({
|
|
|
|
|
|
+ const { error, code, msg } = await wbsApi.saveContractTreeNode({
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
contractId: contractId.value,
|
|
contractId: contractId.value,
|
|
saveType: addTreeNodeType.value,
|
|
saveType: addTreeNodeType.value,
|
|
@@ -1072,13 +1078,15 @@ const addNodeClick = async () => {
|
|
window?.$message?.success('新增成功')
|
|
window?.$message?.success('新增成功')
|
|
addNodeModal.value = false
|
|
addNodeModal.value = false
|
|
window?.location?.reload() //刷新页面
|
|
window?.location?.reload() //刷新页面
|
|
|
|
+ } else {
|
|
|
|
+ window.$message.error(msg)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const addNodeClickCur = async ()=>{
|
|
const addNodeClickCur = async ()=>{
|
|
//发起请求
|
|
//发起请求
|
|
addNodeLoadingCus.value = true
|
|
addNodeLoadingCus.value = true
|
|
- const { error, code } = await wbsApi.saveCustomAddContractNode({
|
|
|
|
|
|
+ const { error, code, msg } = await wbsApi.saveCustomAddContractNode({
|
|
nodeName: nodeNameinput.value,
|
|
nodeName: nodeNameinput.value,
|
|
nodeType: treeItemInfo.value?.nodeType || '',
|
|
nodeType: treeItemInfo.value?.nodeType || '',
|
|
partitionCode: treeItemInfo.value?.partitionCode || '',
|
|
partitionCode: treeItemInfo.value?.partitionCode || '',
|
|
@@ -1090,6 +1098,8 @@ const addNodeClickCur = async ()=>{
|
|
window?.$message?.success('新增成功')
|
|
window?.$message?.success('新增成功')
|
|
addNodeModalCus.value = false
|
|
addNodeModalCus.value = false
|
|
window?.location?.reload() //刷新页面
|
|
window?.location?.reload() //刷新页面
|
|
|
|
+ } else {
|
|
|
|
+ window.$message.error(msg)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//删除节点
|
|
//删除节点
|
|
@@ -1108,13 +1118,15 @@ const removeContractTreeNode = async () => {
|
|
text: '删除节点中,请耐心等待...',
|
|
text: '删除节点中,请耐心等待...',
|
|
background: 'rgba(0, 0, 0, 0.7)',
|
|
background: 'rgba(0, 0, 0, 0.7)',
|
|
})
|
|
})
|
|
- const { error, code } = await wbsApi.removeContractTreeNode({
|
|
|
|
|
|
+ const { error, code, msg } = await wbsApi.removeContractTreeNode({
|
|
ids: treeItemInfo.value?.primaryKeyId || '',
|
|
ids: treeItemInfo.value?.primaryKeyId || '',
|
|
})
|
|
})
|
|
loadingInstance.close()
|
|
loadingInstance.close()
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
window?.$message?.success('删除成功')
|
|
window?.$message?.success('删除成功')
|
|
window?.location?.reload() //刷新页面
|
|
window?.location?.reload() //刷新页面
|
|
|
|
+ } else {
|
|
|
|
+ window.$message.error(msg)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1153,13 +1165,15 @@ const sortNodeClick = async () => {
|
|
})
|
|
})
|
|
//发起请求
|
|
//发起请求
|
|
sortNodeLoading.value = true
|
|
sortNodeLoading.value = true
|
|
- const { error, code } = await wbsApi.diySortTreeNode({ sortList })
|
|
|
|
|
|
+ const { error, code, msg } = await wbsApi.diySortTreeNode({ sortList })
|
|
sortNodeLoading.value = false
|
|
sortNodeLoading.value = false
|
|
//判断状态
|
|
//判断状态
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
window?.$message?.success('保存成功')
|
|
window?.$message?.success('保存成功')
|
|
sortNodeModal.value = false
|
|
sortNodeModal.value = false
|
|
window?.location?.reload() //刷新页面
|
|
window?.location?.reload() //刷新页面
|
|
|
|
+ } else {
|
|
|
|
+ window.$message.error(msg)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|