|
@@ -1107,7 +1107,7 @@ const firstItemBox = () => {
|
|
|
}
|
|
|
//首件请求
|
|
|
const firstItemHttp = async (info) => {
|
|
|
- const { error, code } = await wbsApi.wbsTreeFirstSave({
|
|
|
+ const { error, code, msg } = await wbsApi.wbsTreeFirstSave({
|
|
|
primaryKeyId: info['primaryKeyId'],
|
|
|
saveOrDeleted: info['isFirst'] ? 1 : 0,
|
|
|
})
|
|
@@ -1115,7 +1115,9 @@ const firstItemHttp = async (info) => {
|
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success('操作成功')
|
|
|
window?.location?.reload() //刷新页面
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ window?.$message?.error(msg)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//编辑节点
|
|
@@ -1164,7 +1166,7 @@ const editNodeClick = async () => {
|
|
|
//发起请求
|
|
|
editNodeLoading.value = true
|
|
|
const { primaryKeyId, title, partitionCode } = formEditNodeModel.value
|
|
|
- const { error, code } = await wbsApi.wbsTreeUpdateNode({
|
|
|
+ const { error, code, msg } = await wbsApi.wbsTreeUpdateNode({
|
|
|
nodeName: title || '',
|
|
|
pKeyId: primaryKeyId || '',
|
|
|
partitionCode: partitionCode || '',
|
|
@@ -1177,7 +1179,9 @@ const editNodeClick = async () => {
|
|
|
nodeDataInfo.value['partitionCode'] = partitionCode || ''
|
|
|
editNodeModal.value = false
|
|
|
window?.location?.reload() //刷新页面
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ window?.$message?.error(msg)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1387,7 +1391,7 @@ const copyNodeClick = async () => {
|
|
|
const copyContractTreeNode = async (type, form, table, classify) => {
|
|
|
copyNodeLoading.value = true
|
|
|
if (type === '1') {
|
|
|
- const { error, code } = await wbsApi.copyContractTreeNode({
|
|
|
+ const { error, code, msg } = await wbsApi.copyContractTreeNode({
|
|
|
copyType: type,
|
|
|
needCopyNodeName: form?.title || '',
|
|
|
partitionCode: form?.partitionCode || '',
|
|
@@ -1403,9 +1407,11 @@ const copyContractTreeNode = async (type, form, table, classify) => {
|
|
|
window?.$message?.success('复制成功')
|
|
|
copyNodeModal.value = false
|
|
|
window?.location?.reload() //刷新页面
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ window?.$message?.error(msg)
|
|
|
+ }
|
|
|
} else {
|
|
|
- const { error, code } = await wbsApi.copyContractTreeNode({
|
|
|
+ const { error, code, msg } = await wbsApi.copyContractTreeNode({
|
|
|
copyType: type,
|
|
|
needCopyNodeName: form?.title || '',
|
|
|
needCopyPrimaryKeyId: form?.primaryKeyId || '',
|
|
@@ -1420,7 +1426,9 @@ const copyContractTreeNode = async (type, form, table, classify) => {
|
|
|
window?.$message?.success('复制成功')
|
|
|
copyNodeModal.value = false
|
|
|
window?.location?.reload() //刷新页面
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ window?.$message?.error(msg)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//复制数据
|
|
@@ -1512,7 +1520,7 @@ const addNodeClick = async () => {
|
|
|
const addNodeClickCur = async ()=>{
|
|
|
//发起请求
|
|
|
addNodeLoadingCus.value = true
|
|
|
- const { error, code } = await wbsApi.saveCustomAddContractNode({
|
|
|
+ const { error, code, msg } = await wbsApi.saveCustomAddContractNode({
|
|
|
nodeName: nodeNameinput.value,
|
|
|
nodeType: nodeDataInfo.value?.nodeType || '',
|
|
|
partitionCode: nodeDataInfo.value?.partitionCode || '',
|
|
@@ -1524,6 +1532,8 @@ const addNodeClickCur = async ()=>{
|
|
|
window?.$message?.success('新增成功')
|
|
|
addNodeModalCus.value = false
|
|
|
window?.location?.reload() //刷新页面
|
|
|
+ } else {
|
|
|
+ window?.$message?.error(msg)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1544,7 +1554,7 @@ const removeContractTreeNode = async () => {
|
|
|
text: '删除节点中,请耐心等待...',
|
|
|
background: 'rgba(0, 0, 0, 0.7)',
|
|
|
})
|
|
|
- const { error, code } = await wbsApi.removeContractTreeNode({
|
|
|
+ const { error, code, msg } = await wbsApi.removeContractTreeNode({
|
|
|
ids: nodeDataInfo.value?.primaryKeyId || '',
|
|
|
})
|
|
|
//处理结果
|
|
@@ -1552,6 +1562,8 @@ const removeContractTreeNode = async () => {
|
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success('删除成功')
|
|
|
window?.location?.reload() //刷新页面
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1590,13 +1602,15 @@ const sortNodeClick = async () => {
|
|
|
})
|
|
|
//发起请求
|
|
|
sortNodeLoading.value = true
|
|
|
- const { error, code } = await wbsApi.diySortTreeNode({ sortList })
|
|
|
+ const { error, code, msg } = await wbsApi.diySortTreeNode({ sortList })
|
|
|
sortNodeLoading.value = false
|
|
|
//判断状态
|
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success('保存成功')
|
|
|
sortNodeModal.value = false
|
|
|
window?.location?.reload() //刷新页面
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1916,7 +1930,7 @@ const getAttachmentList = async ()=>{
|
|
|
//删除
|
|
|
const delFile = async (item)=>{
|
|
|
item.loading = true
|
|
|
- const { error, code } = await wbsApi.removeBussFile({
|
|
|
+ const { error, code, msg } = await wbsApi.removeBussFile({
|
|
|
ids: item.id,
|
|
|
})
|
|
|
item.loading = false
|
|
@@ -1926,6 +1940,7 @@ const getAttachmentList = async ()=>{
|
|
|
getTableDataAll()
|
|
|
return true
|
|
|
} else {
|
|
|
+ window.$message.error(msg)
|
|
|
return false
|
|
|
}
|
|
|
}
|