Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1af93e50
authored
Jan 17, 2025
by
Lesan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 模型的流程数据清理功能
parent
8e5271a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
src/api/bpm/model/index.ts
+4
-0
src/views/bpm/model/CategoryDraggableModel.vue
+24
-0
No files found.
src/api/bpm/model/index.ts
View file @
1af93e50
...
...
@@ -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
})
}
src/views/bpm/model/CategoryDraggableModel.vue
View file @
1af93e50
...
...
@@ -205,6 +205,14 @@
</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
type=
"danger"
command=
"handleDelete"
v-if=
"checkPermi(['bpm:model:delete'])"
:disabled=
"!isManagerUser(scope.row)"
...
...
@@ -285,6 +293,9 @@ const handleModelCommand = (command: string, row: any) => {
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment