| | |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in dict.type.sys_cross_domain" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | :value="parseInt(item.value)"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in dict.type.sys_whether_project" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | :value="parseInt(item.value)"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in dict.type.sys_whether_project" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | :value="parseInt(item.value)"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | useEarth: '', |
| | | contentScale: '', |
| | | code: '', |
| | | projectId: '' |
| | | projectId: '', |
| | | }, |
| | | plannedStartDate: '', |
| | | expectedCompletionDate: '', |
| | |
| | | sys_administrative_divisions: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | created() { |
| | | this.investmentForm.projectId = this.$route.query.projectId |
| | | // 从Cookies中获取缓存数据 |
| | | const investmentForm = Cookies.get("investmentForm"); |
| | | const projectForm = Cookies.get("projectForm"); |
| | |
| | | const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; |
| | | |
| | | // 设置investment和projectForm对象 |
| | | this.investmentForm = parsedInvestmentForm || {}; |
| | | this.projectForm = parsedProjectForm || {}; |
| | | if(parsedInvestmentForm) this.investmentForm = parsedInvestmentForm; |
| | | if(parsedProjectForm) this.projectForm = parsedProjectForm; |
| | | |
| | | // 如果projectForm存在id且没有缓存,则调用api |
| | | if (this.projectForm.id && !investmentForm) { |
| | | // 如果路由存在id且没有缓存,视为编辑或查看,调用api |
| | | if (this.investmentForm.projectId && !investmentForm) { |
| | | this.getInvestment(); |
| | | } |
| | | this.investmentForm.constructionLocation = this.projectForm.area; |
| | |
| | | }, |
| | | methods: { |
| | | getInvestment() { |
| | | getProjectInvestmentInfoById(this.investmentForm.id).then(res => { |
| | | getProjectInvestmentInfoById(this.investmentForm.projectId ).then(res => { |
| | | this.investmentForm = res.data; |
| | | }); |
| | | }, |