From 138d535e879f18f49ac5961ae6d8a02878e65149 Mon Sep 17 00:00:00 2001 From: GoldenZqqq <1361001127@qq.com> Date: Wed, 20 Nov 2024 11:26:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=91=E8=B5=B7=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2-=E8=BF=9B=E5=85=A5=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=97=B6=E5=B7=A6=E4=BE=A7=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E6=B2=A1=E6=9C=89active=E6=A0=B7=E5=BC=8Fbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/processInstance/create/index.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/views/bpm/processInstance/create/index.vue b/src/views/bpm/processInstance/create/index.vue index 4253448f..a3bf143b 100644 --- a/src/views/bpm/processInstance/create/index.vue +++ b/src/views/bpm/processInstance/create/index.vue @@ -137,12 +137,6 @@ const getCategoryList = async () => { try { // 流程分类 categoryList.value = await CategoryApi.getCategorySimpleList() - // 等待流程定义数据加载完成后再设置默认选中分类 - await nextTick() - // 选中第一个有流程的分类 - if (availableCategories.value.length > 0) { - categoryActive.value = availableCategories.value[0] - } } finally { } } @@ -156,6 +150,11 @@ const getProcessDefinitionList = async () => { }) // 初始化过滤列表为全部流程定义 filteredProcessDefinitionList.value = processDefinitionList.value + + // 在获取完所有数据后,设置第一个有效分类为激活状态 + if (availableCategories.value.length > 0 && !categoryActive.value?.code) { + categoryActive.value = availableCategories.value[0] + } } finally { } }