Commit 121a6d85 by 芋道源码 Committed by Gitee

!661 BPM:流程清理

Merge pull request !661 from Lesan/feature/bpm-流程清理
parents c8447fe4 1af93e50
...@@ -72,3 +72,7 @@ export const deleteModel = async (id: number) => { ...@@ -72,3 +72,7 @@ export const deleteModel = async (id: number) => {
export const deployModel = async (id: number) => { export const deployModel = async (id: number) => {
return await request.post({ url: '/bpm/model/deploy?id=' + id }) return await request.post({ url: '/bpm/model/deploy?id=' + id })
} }
export const cleanModel = async (id: number) => {
return await request.delete({ url: '/bpm/model/clean?id=' + id })
}
...@@ -205,6 +205,14 @@ ...@@ -205,6 +205,14 @@
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
type="danger" type="danger"
command="handleClean"
v-if="checkPermi(['bpm:model:delete'])"
:disabled="!isManagerUser(scope.row)"
>
清理
</el-dropdown-item>
<el-dropdown-item
type="danger"
command="handleDelete" command="handleDelete"
v-if="checkPermi(['bpm:model:delete'])" v-if="checkPermi(['bpm:model:delete'])"
:disabled="!isManagerUser(scope.row)" :disabled="!isManagerUser(scope.row)"
...@@ -285,6 +293,9 @@ const handleModelCommand = (command: string, row: any) => { ...@@ -285,6 +293,9 @@ const handleModelCommand = (command: string, row: any) => {
case 'handleChangeState': case 'handleChangeState':
handleChangeState(row) handleChangeState(row)
break break
case 'handleClean':
handleClean(row)
break
default: default:
break break
} }
...@@ -318,6 +329,19 @@ const handleDelete = async (row: any) => { ...@@ -318,6 +329,19 @@ const handleDelete = async (row: any) => {
} catch {} } catch {}
} }
/** 清理按钮操作 */
const handleClean = async (row: any) => {
try {
// 清理的二次确认
await message.confirm('是否确认清理流程名字为"' + row.name + '"的数据项?')
// 发起清理
await ModelApi.cleanModel(row.id)
message.success('清理成功')
// 刷新列表
emit('success')
} catch {}
}
/** 更新状态操作 */ /** 更新状态操作 */
const handleChangeState = async (row: any) => { const handleChangeState = async (row: any) => {
const state = row.processDefinition.suspensionState const state = row.processDefinition.suspensionState
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment