Skip to content

Commit 138d535

Browse files
committed
fix: 发起流程页面-进入页面时左侧第一个分类没有active样式bug修复
1 parent 7b8e4ea commit 138d535

File tree

1 file changed

+5
-6
lines changed
  • src/views/bpm/processInstance/create

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ const getCategoryList = async () => {
137137
try {
138138
// 流程分类
139139
categoryList.value = await CategoryApi.getCategorySimpleList()
140-
// 等待流程定义数据加载完成后再设置默认选中分类
141-
await nextTick()
142-
// 选中第一个有流程的分类
143-
if (availableCategories.value.length > 0) {
144-
categoryActive.value = availableCategories.value[0]
145-
}
146140
} finally {
147141
}
148142
}
@@ -156,6 +150,11 @@ const getProcessDefinitionList = async () => {
156150
})
157151
// 初始化过滤列表为全部流程定义
158152
filteredProcessDefinitionList.value = processDefinitionList.value
153+
154+
// 在获取完所有数据后,设置第一个有效分类为激活状态
155+
if (availableCategories.value.length > 0 && !categoryActive.value?.code) {
156+
categoryActive.value = availableCategories.value[0]
157+
}
159158
} finally {
160159
}
161160
}

0 commit comments

Comments
 (0)