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
caa31a67
authored
Nov 19, 2024
by
GoldenZqqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 发起流程页面-左侧分类列表只展示有流程的分类
parent
5f2e23f4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
+2
-0
src/views/bpm/processInstance/create/index.vue
+21
-4
No files found.
src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
View file @
caa31a67
...
@@ -162,9 +162,11 @@ const getApprovalDetail = async (row: any) => {
...
@@ -162,9 +162,11 @@ const getApprovalDetail = async (row: any) => {
startUserSelectTasks
.
value
=
data
.
activityNodes
?.
filter
(
startUserSelectTasks
.
value
=
data
.
activityNodes
?.
filter
(
(
node
:
ApprovalNodeInfo
)
=>
CandidateStrategy
.
START_USER_SELECT
===
node
.
candidateStrategy
(
node
:
ApprovalNodeInfo
)
=>
CandidateStrategy
.
START_USER_SELECT
===
node
.
candidateStrategy
)
)
if
(
startUserSelectTasks
.
value
?.
length
>
0
)
{
for
(
const
node
of
startUserSelectTasks
.
value
)
{
for
(
const
node
of
startUserSelectTasks
.
value
)
{
startUserSelectAssignees
.
value
[
node
.
id
]
=
[]
startUserSelectAssignees
.
value
[
node
.
id
]
=
[]
}
}
}
// 获取审批节点,显示 Timeline 的数据
// 获取审批节点,显示 Timeline 的数据
activityNodes
.
value
=
data
.
activityNodes
activityNodes
.
value
=
data
.
activityNodes
...
...
src/views/bpm/processInstance/create/index.vue
View file @
caa31a67
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<el-col
:span=
"5"
>
<el-col
:span=
"5"
>
<div
class=
"flex flex-col"
>
<div
class=
"flex flex-col"
>
<div
<div
v-for=
"category in
categoryList
"
v-for=
"category in
availableCategories
"
:key=
"category.code"
:key=
"category.code"
class=
"flex items-center p-10px cursor-pointer text-14px rounded-md"
class=
"flex items-center p-10px cursor-pointer text-14px rounded-md"
:class=
"categoryActive.code === category.code ? 'text-#3e7bff bg-#e8eeff' : ''"
:class=
"categoryActive.code === category.code ? 'text-#3e7bff bg-#e8eeff' : ''"
...
@@ -137,9 +137,11 @@ const getCategoryList = async () => {
...
@@ -137,9 +137,11 @@ const getCategoryList = async () => {
try
{
try
{
// 流程分类
// 流程分类
categoryList
.
value
=
await
CategoryApi
.
getCategorySimpleList
()
categoryList
.
value
=
await
CategoryApi
.
getCategorySimpleList
()
// 选中首个分类
// 等待流程定义数据加载完成后再设置默认选中分类
if
(
categoryList
.
value
.
length
>
0
)
{
await
nextTick
()
categoryActive
.
value
=
categoryList
.
value
[
0
]
// 选中第一个有流程的分类
if
(
availableCategories
.
value
.
length
>
0
)
{
categoryActive
.
value
=
availableCategories
.
value
[
0
]
}
}
}
finally
{
}
finally
{
}
}
...
@@ -261,6 +263,21 @@ const handleScroll = (e) => {
...
@@ -261,6 +263,21 @@ const handleScroll = (e) => {
onMounted
(()
=>
{
onMounted
(()
=>
{
getList
()
getList
()
})
})
/** 过滤出有流程的分类列表 */
const
availableCategories
=
computed
(()
=>
{
if
(
!
categoryList
.
value
?.
length
||
!
processDefinitionGroup
.
value
)
{
return
[]
}
// 获取所有有流程的分类代码
const
availableCategoryCodes
=
Object
.
keys
(
processDefinitionGroup
.
value
)
// 过滤出有流程的分类
return
categoryList
.
value
.
filter
(
category
=>
availableCategoryCodes
.
includes
(
category
.
code
)
)
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
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