xiangpei
2025-02-20 9ca1d8a5c10cf277d02445845bd62510bebf6989
项目增加项目子类型字段回显bug
1个文件已修改
21 ■■■■ 已修改文件
src/views/projectEngineering/projectLibrary/component/BasicInfo.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);