| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目类型" label-width="100px" prop="projectType" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectType" clearable placeholder="请选择" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectType" @change="getChildSelect" clearable placeholder="请选择" style="width: 100%"> |
| | | <el-option v-for="item in dict.type.sys_project_type" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目子类型" label-width="100px" prop="projectSubType" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectSubType" :disabled="projectForm.projectType === ''" clearable placeholder="请选择" style="width: 100%"> |
| | | <el-option v-for="item in projectSubTypeList" :key="item.dictCode + 'zd'" :label="item.dictLabel" |
| | | :value="item.dictValue"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目状态" label-width="100px" prop="projectstatus" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectStatus" clearable placeholder="请选择" @change="handleProjectStatusChange" style="width: 100%"> |
| | |
| | | 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"; |
| | | |
| | | export default { |
| | | name: 'BasicInfo', |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | projectSubTypeList: [], // 项目子类型 |
| | | projectForm: { |
| | | id: '', |
| | | projectName: '', |
| | | projectCode: '', |
| | | projectType: '', |
| | | projectSubType: '', |
| | | projectStatus: 'pendding', |
| | | fundType: '', |
| | | investType: '', |
| | |
| | | this.personList = res.data; |
| | | }) |
| | | } |
| | | 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 |
| | | }) |
| | | } |
| | | this.$emit('updateIsShow', true); |
| | | } else { |
| | | this.projectForm.id = this.$route.query.projectId; |
| | |
| | | localStorage.setItem("projectForm", JSON.stringify(this.projectForm)); |
| | | }, |
| | | methods: { |
| | | getChildSelect(select) { |
| | | this.projectForm.projectSubType = '' |
| | | if (select) { |
| | | getChildList(this.dict.type.sys_project_type.filter(item => item.raw.dictValue === select)[0].raw.dictCode).then(res => { |
| | | this.projectSubTypeList = res.data |
| | | }) |
| | | } |
| | | }, |
| | | // 监听联系人选择事件 |
| | | handleContactChange(userId) { |
| | | if (userId) { |
| | |
| | | this.personList = res.data; |
| | | }) |
| | | } |
| | | 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 |
| | | }) |
| | | } |
| | | this.$emit('updateIsShow', true); |
| | | }); |
| | | }, |