File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/views/bpm/processInstance/create Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -137,12 +137,6 @@ const getCategoryList = async () => {
137
137
try {
138
138
// 流程分类
139
139
categoryList .value = await CategoryApi .getCategorySimpleList ()
140
- // 等待流程定义数据加载完成后再设置默认选中分类
141
- await nextTick ()
142
- // 选中第一个有流程的分类
143
- if (availableCategories .value .length > 0 ) {
144
- categoryActive .value = availableCategories .value [0 ]
145
- }
146
140
} finally {
147
141
}
148
142
}
@@ -156,6 +150,11 @@ const getProcessDefinitionList = async () => {
156
150
})
157
151
// 初始化过滤列表为全部流程定义
158
152
filteredProcessDefinitionList .value = processDefinitionList .value
153
+
154
+ // 在获取完所有数据后,设置第一个有效分类为激活状态
155
+ if (availableCategories .value .length > 0 && ! categoryActive .value ?.code ) {
156
+ categoryActive .value = availableCategories .value [0 ]
157
+ }
159
158
} finally {
160
159
}
161
160
}
You can’t perform that action at this time.
0 commit comments