|
|
@ -51,6 +51,8 @@ |
|
|
|
import { delProcessCategory, listProcessCategory } from '/@/api/platform/workflow/extension/controller/processCategory'; |
|
|
|
import { delProcessCategory, listProcessCategory } from '/@/api/platform/workflow/extension/controller/processCategory'; |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
import { listToTree} from '/@/utils/helper/treeHelper'; |
|
|
|
import { listToTree} from '/@/utils/helper/treeHelper'; |
|
|
|
|
|
|
|
import { toRaw } from 'vue'; |
|
|
|
|
|
|
|
import XEUtils from 'xe-utils'; |
|
|
|
|
|
|
|
|
|
|
|
/** 通用变量统一声明区域 */ |
|
|
|
/** 通用变量统一声明区域 */ |
|
|
|
const { createMessage } = useMessage(); |
|
|
|
const { createMessage } = useMessage(); |
|
|
@ -97,7 +99,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作,行内删除 */ |
|
|
|
/** 删除按钮操作,行内删除 */ |
|
|
|
async function handleDel(record: Recordable) { |
|
|
|
async function handleDel(record: Recordable) { |
|
|
|
await delProcessCategory(record.id); |
|
|
|
// 针对于行删除做处理需要查找子集删除 |
|
|
|
|
|
|
|
const treeData = XEUtils.findTree(toRaw(getDataSource()), item => item.id === record.id, { children:'children' }); |
|
|
|
|
|
|
|
await delProcessCategory(XEUtils.toTreeArray([treeData.item],{ children:'children', data:'id' })); |
|
|
|
createMessage.success('删除成功!'); |
|
|
|
createMessage.success('删除成功!'); |
|
|
|
handleRefreshTable(); |
|
|
|
handleRefreshTable(); |
|
|
|
} |
|
|
|
} |
|
|
|