Skip to content

Commit 5eb4154

Browse files
committed
fix: 解决发起流程页面左侧分类与右侧流程分组顺序不统一问题
1 parent 52a8c46 commit 5eb4154

File tree

1 file changed

+12
-2
lines changed
  • src/views/bpm/processInstance/create

1 file changed

+12
-2
lines changed

src/views/bpm/processInstance/create/index.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
:ref="`category-${categoryCode}`"
4242
>
4343
<h3 class="text-18px font-bold mb-10px mt-5px">
44-
{{ getCategoryName(categoryCode) }}
44+
{{ getCategoryName(categoryCode as any) }}
4545
</h3>
4646
<div class="grid grid-cols-3 gap3">
4747
<el-tooltip
@@ -175,7 +175,17 @@ const handleQuery = () => {
175175
/** 流程定义的分组 */
176176
const processDefinitionGroup: any = computed(() => {
177177
if (!processDefinitionList.value?.length) return {}
178-
return groupBy(filteredProcessDefinitionList.value, 'category')
178+
const grouped = groupBy(filteredProcessDefinitionList.value, 'category')
179+
180+
const orderedGroup = {}
181+
// 按照 categoryList 的顺序重新组织数据
182+
categoryList.value.forEach((category: any) => {
183+
if (grouped[category.code]) {
184+
orderedGroup[category.code] = grouped[category.code]
185+
}
186+
})
187+
188+
return orderedGroup
179189
})
180190
181191
/** 左侧分类切换 */

0 commit comments

Comments
 (0)