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
c3cf479f
authored
Nov 02, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能新增】工作流:流程模型增加批量修改 sort 交互
parent
77062cb3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
11 deletions
+26
-11
src/api/bpm/model/index.ts
+10
-0
src/views/bpm/model/CategoryDraggableModel.vue
+15
-10
src/views/bpm/model/index.vue
+1
-1
No files found.
src/api/bpm/model/index.ts
View file @
c3cf479f
...
@@ -38,6 +38,16 @@ export const updateModel = async (data: ModelVO) => {
...
@@ -38,6 +38,16 @@ export const updateModel = async (data: ModelVO) => {
return
await
request
.
put
({
url
:
'/bpm/model/update'
,
data
:
data
})
return
await
request
.
put
({
url
:
'/bpm/model/update'
,
data
:
data
})
}
}
// 批量修改流程分类的排序
export
const
updateModelSortBatch
=
async
(
ids
:
number
[])
=>
{
return
await
request
.
put
({
url
:
`/bpm/model/update-sort-batch`
,
params
:
{
ids
:
ids
.
join
(
','
)
}
})
}
export
const
updateModelBpmn
=
async
(
data
:
ModelVO
)
=>
{
export
const
updateModelBpmn
=
async
(
data
:
ModelVO
)
=>
{
return
await
request
.
put
({
url
:
'/bpm/model/update-bpmn'
,
data
:
data
})
return
await
request
.
put
({
url
:
'/bpm/model/update-bpmn'
,
data
:
data
})
}
}
...
...
src/views/bpm/model/CategoryDraggableModel.vue
View file @
c3cf479f
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
link
link
type=
"info"
type=
"info"
class=
"mr-20px"
class=
"mr-20px"
@
click
.
stop=
"handleSort"
@
click
.
stop=
"handle
Model
Sort"
>
>
<Icon
icon=
"fa:sort-amount-desc"
class=
"mr-5px"
/>
<Icon
icon=
"fa:sort-amount-desc"
class=
"mr-5px"
/>
排序
排序
...
@@ -56,8 +56,8 @@
...
@@ -56,8 +56,8 @@
</el-dropdown>
</el-dropdown>
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<el-button
@
click
.
stop=
"
cancelSort
"
>
取 消
</el-button>
<el-button
@
click
.
stop=
"
handleModelSortCancel
"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click
.
stop=
"
saveSor
t"
>
保存排序
</el-button>
<el-button
type=
"primary"
@
click
.
stop=
"
handleModelSortSubmi
t"
>
保存排序
</el-button>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
...
@@ -267,7 +267,7 @@ const { t } = useI18n() // 国际化
...
@@ -267,7 +267,7 @@ const { t } = useI18n() // 国际化
const
{
push
}
=
useRouter
()
// 路由
const
{
push
}
=
useRouter
()
// 路由
const
userStore
=
useUserStoreWithOut
()
// 用户信息缓存
const
userStore
=
useUserStoreWithOut
()
// 用户信息缓存
const
isModelSorting
=
ref
(
false
)
// 是否正处于排序状态
const
isModelSorting
=
ref
(
false
)
// 是否正处于排序状态
const
tableData
:
any
=
ref
([])
const
tableData
:
any
=
ref
([])
// 模型列表
const
originalData
:
any
=
ref
([])
// 原始数据
const
originalData
:
any
=
ref
([])
// 原始数据
const
isExpand
=
ref
(
false
)
// 是否处于展开状态
const
isExpand
=
ref
(
false
)
// 是否处于展开状态
...
@@ -403,22 +403,27 @@ const isManagerUser = (row: any) => {
...
@@ -403,22 +403,27 @@ const isManagerUser = (row: any) => {
return
row
.
managerUserIds
&&
row
.
managerUserIds
.
includes
(
userId
)
return
row
.
managerUserIds
&&
row
.
managerUserIds
.
includes
(
userId
)
}
}
/*
排序
*/
/*
* 处理模型的排序 *
*/
const
handleSort
=
()
=>
{
const
handle
Model
Sort
=
()
=>
{
// 保存初始数据
// 保存初始数据
originalData
.
value
=
cloneDeep
(
props
.
categoryInfo
.
modelList
)
originalData
.
value
=
cloneDeep
(
props
.
categoryInfo
.
modelList
)
isModelSorting
.
value
=
true
isModelSorting
.
value
=
true
initSort
()
initSort
()
}
}
const
saveSort
=
()
=>
{
/** 处理模型的排序提交 */
// TODO 芋艿:这里需要一个保存分类下模型排序接口
const
handleModelSortSubmit
=
async
()
=>
{
// 保存排序
const
ids
=
tableData
.
value
.
map
((
item
:
any
)
=>
item
.
id
)
await
ModelApi
.
updateModelSortBatch
(
ids
)
// 刷新列表
// 刷新列表
emit
(
'success'
)
isModelSorting
.
value
=
false
isModelSorting
.
value
=
false
message
.
success
(
'排序模型成功'
)
emit
(
'success'
)
}
}
const
cancelSort
=
()
=>
{
/** 处理模型的排序取消 */
const
handleModelSortCancel
=
()
=>
{
// 恢复初始数据
// 恢复初始数据
tableData
.
value
=
cloneDeep
(
originalData
.
value
)
tableData
.
value
=
cloneDeep
(
originalData
.
value
)
isModelSorting
.
value
=
false
isModelSorting
.
value
=
false
...
...
src/views/bpm/model/index.vue
View file @
c3cf479f
...
@@ -188,7 +188,7 @@ const handleCategorySortCancel = () => {
...
@@ -188,7 +188,7 @@ const handleCategorySortCancel = () => {
isCategorySorting
.
value
=
false
isCategorySorting
.
value
=
false
}
}
/**
保存排序
*/
/**
分类排序的保存
*/
const
handleCategorySortSubmit
=
async
()
=>
{
const
handleCategorySortSubmit
=
async
()
=>
{
// 保存排序
// 保存排序
const
ids
=
categoryGroup
.
value
.
map
((
item
:
any
)
=>
item
.
id
)
const
ids
=
categoryGroup
.
value
.
map
((
item
:
any
)
=>
item
.
id
)
...
...
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