| | |
| | | }) |
| | | } |
| | | |
| | | // 编辑新增项目 |
| | | export function editProject(data) { |
| | | return request({ |
| | | url: '/project/info/editProject', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | getProject(id).then(res => { |
| | | this.projectForm = res.data; |
| | | this.$emit('updateIsShow', true); |
| | | |
| | | }); |
| | | }, |
| | | getApprovalList() { |
| | |
| | | this.largeCategory = labels.join(','); |
| | | } |
| | | }, 1000); |
| | | this.$emit('basicInfoForm', newVal) |
| | | }, |
| | | deep: true |
| | | } |
| | |
| | | if (this.$route.query.projectId && !parsedDocumentsInfoForm) { |
| | | this.getDocumentsInfo(); |
| | | } |
| | | |
| | | this.documentsInfoForm.projectId = this.projectForm.id; |
| | | }, |
| | | beforeDestroy() { |
| | | if(Object.keys(this.documentsInfoForm).length !==0) localStorage.setItem("documentsInfoForm", JSON.stringify(this.documentsInfoForm)); |
| | | }, |
| | | watch: { |
| | | documentsInfoForm:{ |
| | | deep: true, |
| | | handler(newVal) { |
| | | this.$emit('documentsInfoForm', newVal) |
| | | } |
| | | }, |
| | | fileList: { |
| | | deep: true, |
| | | handler(newVal) { |
| | | this.documentsInfoForm.fileList = newVal |
| | | } |
| | | } |
| | | } |
| | | |
| | | }; |
| | | </script> |
| | |
| | | // 尝试解析JSON数据 |
| | | const parsedInvestmentForm = investmentForm ? JSON.parse(investmentForm) : null; |
| | | const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; |
| | | console.log(parsedInvestmentForm) |
| | | // 设置investment和projectForm对象 |
| | | if(parsedInvestmentForm) { |
| | | this.investmentForm = parsedInvestmentForm; |
| | |
| | | this.investmentForm.plannedStartDate = this.projectForm.planStartTime; |
| | | this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime; |
| | | } |
| | | |
| | | this.investmentForm.projectId = this.projectForm.id; |
| | | }, |
| | | beforeDestroy() { |
| | | if(Object.keys(this.investmentForm).length !==0) localStorage.setItem("investmentForm", JSON.stringify(this.investmentForm)); |
| | |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | investmentForm: { |
| | | deep: true, |
| | | handler(newVal) { |
| | | this.$emit('investInfoForm', newVal) |
| | | } |
| | | } |
| | | } |
| | | |
| | | }; |
| | |
| | | editProjectInvestmentPolicyCompliance, |
| | | getProjectInvestmentPolicyComplianceById |
| | | } from "@/api/projectEngineering/projectInvestmentPolicyCompliance"; |
| | | import {newline} from "js-beautify/js/src/javascript/acorn"; |
| | | |
| | | export default { |
| | | name: 'PolicyComplianceForm', |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | projectForm: {}, |
| | | policyInfoForm: { |
| | | // id: '', |
| | | // projectId: '', |
| | |
| | | this.policyInfoForm.informationIsTrue= true; |
| | | this.policyInfoForm.notBannedOrControlledProject = true; |
| | | } |
| | | |
| | | this.policyInfoForm.projectId = this.projectForm.id; |
| | | }, |
| | | beforeDestroy() { |
| | | if(Object.keys(this.policyInfoForm).length !==0) localStorage.setItem("policyInfoForm", JSON.stringify(this.policyInfoForm)); |
| | |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | policyInfoForm: { |
| | | deep: true, |
| | | handler(newVal) { |
| | | this.$emit('policyInfoForm', newVal) |
| | | } |
| | | }, |
| | | fileList: { |
| | | deep: true, |
| | | handler(newVal) { |
| | | this.policyInfoForm.fileList = newVal |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | editProjectInvestmentFunding, |
| | | getProjectInvestmentFundingById |
| | | } from "@/api/projectEngineering/projectInvestmentFunding"; |
| | | import {editProject} from "@/api/projectEngineering/projectInfo"; |
| | | |
| | | export default { |
| | | name: 'InvestmentFundsForm', |
| | |
| | | if (this.$route.query.projectId&& !parsedInvestmentFundsForm) { |
| | | this.getInvestmentFunds(); |
| | | } |
| | | |
| | | this.investmentFundsForm.projectId = this.projectForm.id; |
| | | }, |
| | | beforeDestroy() { |
| | | if(Object.keys(this.investmentFundsForm).length !==0) localStorage.setItem("investmentFundsForm", JSON.stringify(this.investmentFundsForm)); |
| | | }, |
| | | watch: { |
| | | investmentFundsForm: { |
| | | deep: true, |
| | | handler(newVal) { |
| | | this.$emit('investmentFundsForm', newVal) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | projectForm: {}, |
| | | legalPersonForm: { |
| | | // id: '', |
| | | // totalInvestment: '', |
| | |
| | | this.getProjectUnitRegistrationInfo(); |
| | | } |
| | | |
| | | this.legalPersonForm.projectId = this.projectForm.id; |
| | | }, |
| | | beforeDestroy() { |
| | | if(Object.keys(this.legalPersonForm).length !==0) localStorage.setItem("legalPersonForm", JSON.stringify(this.legalPersonForm)); |
| | |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | legalPersonForm: { |
| | | deep: true, |
| | | handler(newVal) { |
| | | this.$emit('legalPersonForm', newVal) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :disabled="disabled" |
| | | @toNext="changeTable" |
| | | @updateIsShow="updateIsShow" |
| | | @basicInfoForm="basicInfoForm" |
| | | @investInfoForm="investInfoForm" |
| | | @investmentFundsForm="investmentFundsForm" |
| | | @legalPersonForm="legalPersonForm" |
| | | @policyInfoForm="policyInfoForm" |
| | | @documentsInfoForm="documentsInfoForm" |
| | | :isShow="isShow" |
| | | class="full-width custom-height" |
| | | /> |
| | |
| | | @click="submit(0)" |
| | | >草稿</el-button |
| | | > |
| | | <el-button class="save-button" type="primary" @click="submit(1)" |
| | | >保存</el-button |
| | | > |
| | | <!-- <el-button class="save-button" type="primary" @click="submit(1)"--> |
| | | <!-- >保存</el-button>--> |
| | | <el-button class="save-button" type="primary" @click="saveProject" |
| | | >保存</el-button> |
| | | <el-button class="reset-button" @click="reset">重置</el-button> |
| | | <!-- <el-button v-else class="cancel-button" @click="cancel">取消</el-button> --> |
| | | </div> |
| | |
| | | import LegalPerson from "@/views/projectEngineering/projectLibrary/component/legalPerson"; |
| | | import PolicyInfo from "@/views/projectEngineering/projectLibrary/component/PolicyInfo"; |
| | | import DocumentsInfo from "@/views/projectEngineering/projectLibrary/component/DocumentsInfo"; |
| | | import { editProject } from "@/api/projectEngineering/projectInfo"; |
| | | |
| | | export default { |
| | | name: "ProjectDetails", |
| | |
| | | disabled: false, |
| | | projectForm: {}, |
| | | componentName: BasicInfo, |
| | | projectId: null, |
| | | TABS_DATA: [ |
| | | { |
| | | label: "项目管理基础信息", |
| | |
| | | updateIsShow(newValue) { |
| | | this.isShow = newValue; |
| | | }, |
| | | basicInfoForm(data) { |
| | | this.projectForm.projectInfoForm = data; |
| | | this.projectId = data.id; |
| | | }, |
| | | investInfoForm(data) { |
| | | this.projectForm.projectInvestmentInfoForm = data; |
| | | this.projectForm.projectInvestmentInfoForm.projectId = this.projectId; |
| | | }, |
| | | investmentFundsForm(data) { |
| | | this.projectForm.projectInvestmentFundingForm = data; |
| | | this.projectForm.projectInvestmentFundingForm.projectId = this.projectId; |
| | | }, |
| | | documentsInfoForm(data){ |
| | | this.projectForm.documentInfoForm = data; |
| | | this.projectForm.documentInfoForm.projectId = this.projectId; |
| | | }, |
| | | legalPersonForm(data) { |
| | | this.projectForm.projectUnitRegistrationInfoForm = data; |
| | | this.projectForm.projectUnitRegistrationInfoForm.projectId = this.projectId; |
| | | }, |
| | | policyInfoForm(data) { |
| | | this.projectForm.projectInvestmentPolicyComplianceForm = data; |
| | | this.projectForm.projectInvestmentPolicyComplianceForm.projectId = this.projectId; |
| | | }, |
| | | handleClick(tabTarget) { |
| | | this.componentName = this.TABS_DATA[tabTarget.index].componentName; |
| | | |
| | | console.log(this.projectForm); |
| | | }, |
| | | changeTable(index) { |
| | | this.componentName = this.TABS_DATA[index].componentName; |
| | | this.currentTab = this.TABS_DATA[index].value; |
| | | |
| | | }, |
| | | submit(usedStatus) { |
| | | this.$refs.childRef.submit(usedStatus); |
| | |
| | | reset() { |
| | | this.$refs.childRef.reset(); |
| | | }, |
| | | saveProject() { |
| | | editProject(this.projectForm).then((res) => { |
| | | this.$message.success("保存成功"); |
| | | }) |
| | | this.$router.push('/projectEngineering/project/projectLibrary') |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.$route.query.disabled) { |