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
Unverified
Commit
d052356f
authored
Nov 08, 2024
by
芋道源码
Committed by
GitHub
Nov 08, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #100 from GoldenZqqq/feature/bpm
发起流程页面-修复右侧分类名称都为null的bug
parents
0fae9a4b
1e6762ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
src/views/bpm/processInstance/create/index.vue
+13
-6
No files found.
src/views/bpm/processInstance/create/index.vue
View file @
d052356f
...
...
@@ -36,11 +36,13 @@
<el-scrollbar
ref=
"scrollWrapper"
height=
"700"
>
<div
class=
"mb-20px pl-10px"
v-for=
"(definitions,
titl
e) in processDefinitionGroup"
:key=
"
titl
e"
:ref=
"`category-${
titl
e}`"
v-for=
"(definitions,
categoryCod
e) in processDefinitionGroup"
:key=
"
categoryCod
e"
:ref=
"`category-${
categoryCod
e}`"
>
<h3
class=
"text-18px font-bold mb-10px mt-5px"
>
{{ title }}
</h3>
<h3
class=
"text-18px font-bold mb-10px mt-5px"
>
{{ getCategoryName(categoryCode) }}
</h3>
<div
class=
"grid grid-cols-3 gap3"
>
<el-tooltip
v-for=
"definition in definitions"
...
...
@@ -170,7 +172,7 @@ const handleQuery = () => {
// 流程定义的分组
const
processDefinitionGroup
:
any
=
computed
(()
=>
{
if
(
!
processDefinitionList
.
value
?.
length
)
return
{}
return
groupBy
(
filteredProcessDefinitionList
.
value
,
'category
Name
'
)
return
groupBy
(
filteredProcessDefinitionList
.
value
,
'category'
)
})
// ========== 表单相关 ==========
...
...
@@ -188,7 +190,7 @@ const handleSelect = async (row, formVariables?) => {
// 左侧分类切换
const
handleCategoryClick
=
(
category
)
=>
{
categoryActive
.
value
=
category
const
categoryRef
=
proxy
.
$refs
[
`category-
${
category
.
nam
e
}
`
]
// 获取点击分类对应的 DOM 元素
const
categoryRef
=
proxy
.
$refs
[
`category-
${
category
.
cod
e
}
`
]
// 获取点击分类对应的 DOM 元素
if
(
categoryRef
?.
length
)
{
const
scrollWrapper
=
proxy
.
$refs
.
scrollWrapper
// 获取右侧滚动容器
const
categoryOffsetTop
=
categoryRef
[
0
].
offsetTop
...
...
@@ -198,6 +200,11 @@ const handleCategoryClick = (category) => {
}
}
// 通过分类code获取对应的名称
const
getCategoryName
=
(
categoryCode
)
=>
{
return
categoryList
.
value
?.
find
((
ctg
)
=>
ctg
.
code
===
categoryCode
)?.
name
}
/** 初始化 */
onMounted
(()
=>
{
getList
()
...
...
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