From 1e6762ea69e90392627b9c7f03167cebf2a543b7 Mon Sep 17 00:00:00 2001 From: GoldenZqqq <1361001127@qq.com> Date: Fri, 8 Nov 2024 13:21:57 +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-=E4=BF=AE=E5=A4=8D=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=90=8D=E7=A7=B0=E9=83=BD=E4=B8=BAnull?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/processInstance/create/index.vue | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/views/bpm/processInstance/create/index.vue b/src/views/bpm/processInstance/create/index.vue index 80291678..3d863c61 100644 --- a/src/views/bpm/processInstance/create/index.vue +++ b/src/views/bpm/processInstance/create/index.vue @@ -36,11 +36,13 @@
-

{{ title }}

+

+ {{ getCategoryName(categoryCode) }} +

{ // 流程定义的分组 const processDefinitionGroup: any = computed(() => { if (!processDefinitionList.value?.length) return {} - return groupBy(filteredProcessDefinitionList.value, 'categoryName') + 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.name}`] // 获取点击分类对应的 DOM 元素 + const categoryRef = proxy.$refs[`category-${category.code}`] // 获取点击分类对应的 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()