From 682c1f8e896aeb336bd291bde4c5db6d7570cc26 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期四, 20 二月 2025 18:24:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/projectEngineering/projectLibrary/component/BasicInfo.vue | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue index f4b3578..488b476 100644 --- a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue +++ b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue @@ -430,7 +430,8 @@ import {addProject, getProject, updateProject, getProjectCode, editProject} from '@/api/projectEngineering/projectInfo'; import {approvalList} from "@/api/system/dept"; import {getByDept} from "@/api/system/user"; -import {getChildList} from "@/api/system/dict/data"; +import {getChildList, getDicts} from "@/api/system/dict/data"; +import log from "@/views/monitor/job/log"; export default { name: 'BasicInfo', @@ -555,8 +556,13 @@ } if (this.projectForm.projectType) { // 鏍规嵁椤圭洰绫诲瀷鏌ュ瓙绫诲瀷 - getChildList(this.dict.type.sys_project_type.filter(item => item.raw.dictValue === this.projectForm.projectType)[0].raw.dictCode).then(res => { - this.projectSubTypeList = res.data + getDicts("sys_project_type").then(res => { + const projectType = res.data.find(item => item.dictValue === this.projectForm.projectType); + if (projectType) { + getChildList(projectType.dictCode).then(res => { + this.projectSubTypeList = res.data + }) + } }) } this.$emit('updateIsShow', true); @@ -657,8 +663,13 @@ } if (this.projectForm.projectType) { // 鏍规嵁椤圭洰绫诲瀷鏌ュ瓙绫诲瀷 - getChildList(this.dict.type.sys_project_type.filter(item => item.raw.dictValue === this.projectForm.projectType)[0].raw.dictCode).then(res => { - this.projectSubTypeList = res.data + getDicts("sys_project_type").then(res => { + const projectType = res.data.find(item => item.dictValue === this.projectForm.projectType); + if (projectType) { + getChildList(projectType.dictCode).then(res => { + this.projectSubTypeList = res.data + }) + } }) } this.$emit('updateIsShow', true); -- Gitblit v1.8.0