!661 BPM:流程清理

Merge pull request !661 from Lesan/feature/bpm-流程清理
pull/667/head
芋道源码 2025-01-17 11:30:14 +00:00 committed by Gitee
commit 121a6d85ff
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 28 additions and 0 deletions

View File

@ -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 })
}

View File

@ -203,6 +203,14 @@
> >
{{ scope.row.processDefinition.suspensionState === 1 ? '停用' : '启用' }} {{ scope.row.processDefinition.suspensionState === 1 ? '停用' : '启用' }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item
type="danger"
command="handleClean"
v-if="checkPermi(['bpm:model:delete'])"
:disabled="!isManagerUser(scope.row)"
>
清理
</el-dropdown-item>
<el-dropdown-item <el-dropdown-item
type="danger" type="danger"
command="handleDelete" command="handleDelete"
@ -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) => {
} 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