From 1af93e502d10ad034534ad2af80625f3cc5d05c1 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Fri, 17 Jan 2025 13:59:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A8=A1=E5=9E=8B=E7=9A=84=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=95=B0=E6=8D=AE=E6=B8=85=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/model/index.ts | 4 ++++ .../bpm/model/CategoryDraggableModel.vue | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts index 0c499dba..63b6af6a 100644 --- a/src/api/bpm/model/index.ts +++ b/src/api/bpm/model/index.ts @@ -72,3 +72,7 @@ export const deleteModel = async (id: number) => { export const deployModel = async (id: number) => { 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 }) +} diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index 8fe6e14d..c3455333 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -203,6 +203,14 @@ > {{ scope.row.processDefinition.suspensionState === 1 ? '停用' : '启用' }} + + 清理 + { case 'handleChangeState': handleChangeState(row) break + case 'handleClean': + handleClean(row) + break default: break } @@ -318,6 +329,19 @@ const handleDelete = async (row: any) => { } 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 state = row.processDefinition.suspensionState