src/api/projectEngineering/projectInfo.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/FileUpload/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectEngineering/projectLibrary/component/investmentFunds.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectEngineering/projectLibrary/component/legalPerson.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectEngineering/projectLibrary/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectEngineering/projectLibrary/projectDetails.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/projectEngineering/projectInfo.js
@@ -17,6 +17,13 @@ }) } // 查询相关文件 export function getDocumentInfoById(id) { return request({ url: '/project/info/document/' + id, method: 'get' }) } // 新增项目管理基础信息 export function addProject(data) { return request({ @@ -25,6 +32,14 @@ data: data }) } // 新增相关文件 export function addDocumentInfo(data) { return request({ url: '/project/info/document', method: 'post', data: data }) } // 修改项目管理基础信息 export function updateProject(data) { src/components/FileUpload/index.vue
@@ -56,7 +56,7 @@ // 大小限制(MB) fileSize: { type: Number, default: 5, default: 20, }, // 文件类型, 例如['png', 'jpg', 'jpeg'] fileType: { src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue
@@ -1,14 +1,14 @@ <template> <div class="policy-info"> <el-form ref="demoFormRef" :disabled="disabled" :model="fileIdList" class="dialog_form"> <el-form ref="demoFormRef" :disabled="disabled" :model="documentsInfoForm" class="dialog_form"> <el-row :gutter="0"> <el-col :span="20"> <el-form-item label="附件:" label-width="100px" prop="appendix" style="width: 100%"> <div style="display: flex;gap: 10px"> <file-upload v-model="documentsInfoList" <file-upload v-model="documentsInfoForm.fileList" :fileType="accept" :isShowTip="false"/> <div v-if="documentsInfoList.length === 0" style="color: #a9afbc">支持上传PDF格式文件</div> <div v-if="documentsInfoForm.fileList.length === 0" style="color: #a9afbc">支持上传PDF格式文件</div> </div> </el-form-item> </el-col> @@ -18,6 +18,14 @@ </template> <script> import { addProjectInvestmentFunding, editProjectInvestmentFunding, getProjectInvestmentFundingById } from "@/api/projectEngineering/projectInvestmentFunding"; import Cookies from "js-cookie"; import {addDocumentInfo, getDocumentInfoById} from "@/api/projectEngineering/projectInfo"; export default { props: { @@ -29,36 +37,56 @@ }, data() { return { fileIdList: [], documentsInfoList: [], accept: ['pdf', 'docx', 'xlsx', 'jpg','jpeg'], documentsInfoForm: { fileList: [], projectId: '' }, projectForm: {}, accept: ['pdf'], }; }, watch: { // 监听 documentsInfoList 的变化,并更新 fileIdList documentsInfoList(newVal) { this.fileIdList = newVal.map(item => item.fileId); methods: { getDocumentsInfo() { getDocumentInfoById(this.documentsInfoForm.projectId).then(res => { this.documentsInfoForm = res.data; if(!this.documentsInfoForm.fileList) { this.documentsInfoForm.fileList = [] } }); }, submit() { if (!this.projectForm.id) { this.$message.error("请先保存投资管理基本信息") } else { this.documentsInfoForm.projectId = this.projectForm.id; addDocumentInfo(this.documentsInfoForm).then(response => { this.$modal.msgSuccess("提交成功"); }); } }, }, mounted() { this.documentsInfoForm.projectId = this.$route.query.projectId; const documentsInfoForm = Cookies.get("documentsInfoForm"); const projectForm = Cookies.get("projectForm"); const parsedDocumentsInfoForm = documentsInfoForm ? JSON.parse(documentsInfoForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; if (parsedDocumentsInfoForm) { this.documentsInfoForm = parsedDocumentsInfoForm } if (parsedProjectForm) { this.projectForm = parsedProjectForm } // 如果路由存在id且没有缓存,视为编辑或查看,调用api if (this.documentsInfoForm.projectId && !parsedDocumentsInfoForm) { this.getDocumentsInfo(); } }, methods: { submit() { console.log("文件submit") }, handleRemove(file) { if (file) { this.fileIdList = this.documentsInfoList.map(item => item.fileId); localStorage.setItem('fileIdList', JSON.stringify(file)); } }, handleAdd(file) { if (file && file.length > 0) { localStorage.setItem('fileIdList', JSON.stringify(file)); } } beforeDestroy() { Cookies.set("documentsInfoForm", JSON.stringify(this.documentsInfoForm)); }, mounted() { } }; </script> src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue
@@ -1,30 +1,31 @@ <template> <div class="policy-info"> <el-form ref="demoFormRef" ref="policyInfoFormRef" :disabled="disabled" :model="investmentProjectPolicyComplianceDTO" :model="policyInfoForm" :rules="rules" > <el-row :gutter="0"> <el-col :span="20"> <el-form-item label="符合行业政策:" label-width="180px" prop="industryPolicy" style="width: 100%"> <div style="display: flex"> <file-upload v-model="fileList" <file-upload v-model="policyInfoForm.fileList" :fileType="accept" :isShowTip="false"/> <div v-if="fileList.length === 0" style="color: #a9afbc; margin-left: 10px"> 支持下载PDF格式文件 <div v-if="policyInfoForm.fileList.length === 0" style="color: #a9afbc; margin-left: 10px"> 支持上传PDF格式文件 </div> </div> </el-form-item> </el-col> <el-col :span="20"> <el-form-item class="custom-form-item" label=" " label-position="right" label-width="180px" style="width: 100%; margin-top: -20px"> <el-form-item class="custom-form-item" label=" " label-position="right" label-width="180px" style="width: 100%; margin-top: -20px"> <div class="input-row policy-items"> <el-radio-group v-model="investmentProjectPolicyComplianceDTO.belongsToIndustryAdjustmentDirectory" class="radio-item"> <el-radio size="large" style="margin-bottom: 25px" :label="true">属于《产业结构调整指导目录》下的项目 </el-radio> <el-radio-group v-model="policyInfoForm.belongsToIndustryAdjustmentDirectory" class="radio-item"> <el-radio size="large" style="margin-bottom: 25px" :label="true">属于《产业结构调整指导目录》下的项目</el-radio> <el-radio size="large" :label="false">属于未列入《产业结构调整指导目录》的允许类项目</el-radio> </el-radio-group> </div> @@ -32,10 +33,11 @@ </el-col> <el-col :span="20"> <el-form-item class="custom-form-item" label=" " label-width="180px" style="width: 100%; margin-top: -20px; height: 50px"> <el-form-item class="custom-form-item" label=" " label-width="180px" style="width: 100%; margin-top: -20px; height: 50px"> <div class="input-row policy-items"> <el-checkbox v-model="investmentProjectPolicyComplianceDTO.belongsToWesternEncouragedDirectory" v-model="policyInfoForm.belongsToWesternEncouragedDirectory" label="属于《西部地区鼓励类产业目录》的项目" size="large" style="margin-right: 70px" @@ -44,10 +46,11 @@ </el-form-item> </el-col> <el-col :span="20"> <el-form-item class="custom-form-item" label=" " label-width="180px" style="width: 100%; margin-top: -20px; height: 30px"> <el-form-item class="custom-form-item" label=" " label-width="180px" style="width: 100%; margin-top: -20px; height: 30px"> <div class="input-row policy-items" style="height: 52px"> <el-checkbox v-model="investmentProjectPolicyComplianceDTO.notBannedOrControlledProject" v-model="policyInfoForm.notBannedOrControlledProject" disabled label="不属于产业政策禁止投资建设或实行核准、审批管理的项目" size="large" @@ -58,11 +61,12 @@ </el-form-item> </el-col> <el-col :span="20"> <el-form-item class="custom-form-item" label="填报信息真实" label-width="180px" style="width: 100%; margin-top: 20px"> <el-form-item class="custom-form-item" label="填报信息真实" label-width="180px" style="width: 100%; margin-top: 20px"> <div class="policy-items"> <div style="color: #a9afbc">备案者承诺:</div> <el-checkbox v-model="investmentProjectPolicyComplianceDTO.informationIsTrue" v-model="policyInfoForm.informationIsTrue" disabled label="所提供的备案信息是真实、准确、完整和有效的,无隐瞒、虚假和重大造漏之处,对备案项目信息的真实性负责" size="large" @@ -76,7 +80,7 @@ <el-form-item label="专项规划符合情况:" label-width="180px" prop="specialPlanningCompliance" style="width: 100%"> <div class="input-row"> <el-input v-model.trim="investmentProjectPolicyComplianceDTO.specialPlanningCompliance" v-model.trim="policyInfoForm.specialPlanningCompliance" class="input-item" maxlength="200" placeholder="请输入" @@ -88,20 +92,23 @@ <el-col :span="20"> <el-form-item label="项目能耗情况:" label-width="180px" prop="projectEnergyConsumption" style="width: 100%"> <div class="policy-items" style="height: 320px"> <div style="line-height: 20px;color: #a9afbc"> <div style="line-height: 20px;color: #a9afbc"> 年综合能源消费量不满1000吨标准煤,且年电力消耗量不满500万千瓦时的图定资产投资项目、以及用能工艺简单、节能潜力小的行业(按照国家发改要指定并公布的具体行业目录)的因定资产投资项目应按照相关节能标准、规范建设,不再单独进行节能审查。 </div> <div style="display: flex;width: 100%;"> <el-radio-group v-model="investmentProjectPolicyComplianceDTO.energyCheck" style="display: flex;flex-direction: column;margin-top: 10px"> <el-radio size="large" style="margin-bottom: 20px" :label="true"> 需进行节能审查的项目,不在填报《项目能源消费情况表》 </el-radio> <el-radio size="large" style="margin-bottom: 10px" :label="false"> 不单独进行节能审查的项目,需填报《项目能源消费情况表》 </el-radio> <el-radio-group v-model="policyInfoForm.energyCheck" style="display: flex;flex-direction: column;margin-top: 10px"> <el-radio size="large" style="margin-bottom: 20px" :label="true"> 需进行节能审查的项目,不在填报《项目能源消费情况表》 </el-radio> <el-radio size="large" style="margin-bottom: 10px" :label="false"> 不单独进行节能审查的项目,需填报《项目能源消费情况表》 </el-radio> </el-radio-group> </div> <div style="display: flex;gap: 2px"> <div style="width: 160px">1.项目年综合能源消费量:</div> <el-input style="width: 300px" v-model.trim="investmentProjectPolicyComplianceDTO.annualEnergyConsumption" v-model.trim="policyInfoForm.annualEnergyConsumption" maxlength="255" placeholder="请输入" ></el-input> @@ -111,7 +118,7 @@ <div style="width: 160px">2.项目年电力消耗量:</div> <el-input style="width: 300px" v-model.trim="investmentProjectPolicyComplianceDTO.annualElectricityConsumption" v-model.trim="policyInfoForm.annualElectricityConsumption" maxlength="255" placeholder="请输入" ></el-input> @@ -119,7 +126,7 @@ </div> <div style="line-height: 20px;color: #a9afbc;margin-top: 5px">不再单独进行节能审查的类型如下:</div> <div class="input-row"> <el-radio-group v-model="investmentProjectPolicyComplianceDTO.noOnlyCheckType" class="radio-item"> <el-radio-group v-model="policyInfoForm.noOnlyCheckType" class="radio-item"> <el-radio size="large" :label="1"> 年综合能源消费量不满1000吨标准煤且年电力消费量不满500万千瓦时的固定资产投资项目 </el-radio> @@ -135,7 +142,7 @@ <el-form-item label="备注:" label-width="180px" prop="remark" style="width: 100%"> <div class="input-row"> <el-input v-model.trim="investmentProjectPolicyComplianceDTO.remark" v-model.trim="policyInfoForm.remarks" class="item" clearable maxlength="255" @@ -152,6 +159,13 @@ <script> import Cookies from "js-cookie"; import { addProjectInvestmentPolicyCompliance, editProjectInvestmentPolicyCompliance, getProjectInvestmentPolicyComplianceById } from "@/api/projectEngineering/projectInvestmentPolicyCompliance"; export default { name: 'PolicyComplianceForm', props: { @@ -163,10 +177,12 @@ }, data() { return { investmentProjectPolicyComplianceDTO: { fileIdList: [], policyInfoForm: { id: '', projectId: '', fileList: [], belongsToIndustryAdjustmentDirectory: null, belongsToWesternEncouragedDirectory: false, belongsToWesternEncouragedDirectory: null, notBannedOrControlledProject: true, informationIsTrue: true, specialPlanningCompliance: '', @@ -174,42 +190,73 @@ annualEnergyConsumption: '', annualElectricityConsumption: '', noOnlyCheckType: null, remark: '' remarks: '' }, fileList: [], accept: ['pdf'], rules: { industrialPolicyProhibition: [{ required: true, message: '请选择', trigger: 'change' }], reportedInformation: [{ required: true, message: '请选择', trigger: 'change' }] industrialPolicyProhibition: [{required: true, message: '请选择', trigger: 'change'}], reportedInformation: [{required: true, message: '请选择', trigger: 'change'}] } }; }, watch: { fileList: { deep: true, handler(newFileList) { if (newFileList) { this.investmentProjectPolicyComplianceDTO.fileIdList = newFileList.map(item => item.fileId); mounted() { this.policyInfoForm.projectId = this.$route.query.projectId; const policyInfoForm = Cookies.get("policyInfoForm"); const projectForm = Cookies.get("projectForm"); const parsedPolicyInfoForm = policyInfoForm ? JSON.parse(policyInfoForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; if (parsedPolicyInfoForm) { this.policyInfoForm = parsedPolicyInfoForm } if (parsedProjectForm) { this.projectForm = parsedProjectForm } // 如果路由存在id且没有缓存,视为编辑或查看,调用api if (this.policyInfoForm.projectId && !parsedPolicyInfoForm) { this.getProjectInvestmentPolicyCompliance(); } }, beforeDestroy() { Cookies.set("policyInfoForm", JSON.stringify(this.policyInfoForm)); }, methods: { getProjectInvestmentPolicyCompliance() { getProjectInvestmentPolicyComplianceById(this.policyInfoForm.projectId).then(res => { this.policyInfoForm = res.data; if(!this.policyInfoForm.fileList) { this.policyInfoForm.fileList = [] } this.policyInfoForm.notBannedOrControlledProject =true this.policyInfoForm.informationIsTrue =true }); }, submit() { if (!this.projectForm.id) { this.$message.error("请先保存投资管理基本信息") } else { this.$refs["policyInfoFormRef"].validate(valid => { if (valid) { this.policyInfoForm.projectId = this.projectForm.id; if (this.policyInfoForm.id != null) { editProjectInvestmentPolicyCompliance(this.policyInfoForm).then(response => { this.$modal.msgSuccess("修改成功"); //跳转到下个组件 this.$emit('toNext', 5); }); } else { addProjectInvestmentPolicyCompliance(this.policyInfoForm).then(response => { this.$modal.msgSuccess("新增成功"); this.policyInfoForm.id = response.data //跳转到下个组件 this.$emit('toNext', 5); }); } } }); } } }, methods: { submit() { console.log("政策submit") }, handleRemove(file) { if (file) { this.investmentProjectPolicyComplianceDTO.fileIdList = this.fileList.map(item => item.fileId); localStorage.setItem('fileList', JSON.stringify(file)); } }, handleAdd(file) { if (file) { localStorage.setItem('fileList', JSON.stringify(file)); } } } }; </script> src/views/projectEngineering/projectLibrary/component/investmentFunds.vue
@@ -243,7 +243,7 @@ }, methods: { getInvestmentFunds() { getProjectInvestmentFundingById(this.investmentForm.projectId ).then(res => { getProjectInvestmentFundingById(this.investmentFundsForm.projectId ).then(res => { this.investmentFundsForm = res.data; }); }, @@ -270,20 +270,20 @@ }, }, mounted() { this.investmentFundsForm.id = this.$route.query.projectId; this.investmentFundsForm.projectId = this.$route.query.projectId; const investmentFundsForm = Cookies.get("investmentFundsForm"); const projectForm = Cookies.get("projectForm"); const parsedInvestmentForm = investmentFundsForm ? JSON.parse(investmentFundsForm) : null; const parsedInvestmentFundsForm = investmentFundsForm ? JSON.parse(investmentFundsForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; if (parsedInvestmentForm) { this.investmentFundsForm = parsedInvestmentForm if (parsedInvestmentFundsForm) { this.investmentFundsForm = parsedInvestmentFundsForm } if (parsedProjectForm){ this.projectForm = parsedProjectForm } // 如果路由存在id且没有缓存,视为编辑或查看,调用api if (this.investmentFundsForm.projectId && !parsedInvestmentForm) { if (this.investmentFundsForm.projectId && !parsedInvestmentFundsForm) { this.getInvestmentFunds(); } }, src/views/projectEngineering/projectLibrary/component/legalPerson.vue
@@ -1,21 +1,21 @@ <template> <div class="basic-info"> <el-form ref="demoFormRef" :disabled="disabled" :model="legalPerson" class="dialog_form"> <el-form ref="demoFormRef" :disabled="disabled" :model="legalPersonForm" class="dialog_form"> <el-row :gutter="20"> <el-col :span="6"> <el-form-item label="项目总投额" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model="legalPerson.totalInvestment" class="item" clearable maxlength="255" placeholder="请输入" /> <el-input v-model="legalPersonForm.totalInvestment" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="项目单位" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model="legalPerson.projectUnit" class="item" clearable maxlength="255" placeholder="请输入" /> <el-input v-model="legalPersonForm.projectUnit" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="项目单位类型" label-width="120px" prop="projectType" style="width: 100%"> <el-select v-model="legalPerson.projectUnitType" v-model="legalPersonForm.projectUnitType" clearable placeholder="请选择" style="width: 100%" @@ -30,7 +30,7 @@ <el-col :span="6"> <el-form-item label="登记注册类型" label-width="120px" prop="projectType" style="width: 100%"> <el-select v-model="legalPerson.registrationType" v-model="legalPersonForm.registrationType" clearable placeholder="请选择" style="width: 100%" @@ -43,7 +43,7 @@ <el-col :span="6"> <el-form-item label="控股情况" label-width="120px" prop="projectType" style="width: 100%"> <el-select v-model="legalPerson.holdingSituation" v-model="legalPersonForm.holdingSituation" clearable placeholder="请选择" style="width: 100%" @@ -56,7 +56,7 @@ <el-col :span="6"> <el-form-item label="证照类型" label-width="120px" prop="projectstatus" style="width: 100%"> <el-select v-model="legalPerson.certificateType" v-model="legalPersonForm.certificateType" clearable placeholder="请选择" style="width: 100%" @@ -70,75 +70,75 @@ <el-row :gutter="20"> <el-col :span="6"> <el-form-item label="证件号码" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model.trim="legalPerson.certificateNumber" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.certificateNumber" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="注册地址" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model.trim="legalPerson.registeredAddress" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.registeredAddress" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="注册资金" label-width="120px" prop="projectType" style="width: 100%"> <el-input v-model.trim="legalPerson.registeredCapital" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.registeredCapital" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> </el-row> <el-row :gutter="20"> <el-col :span="6"> <el-form-item label="法人代表" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model.trim="legalPerson.legal_representative" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.legalRepresentative" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="固定电话" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model.trim="legalPerson.fixedPhone" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.fixedPhone" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="法人身份证号" label-width="120px" prop="projectType" style="width: 100%"> <el-input v-model.trim="legalPerson.legalPersonIdcard" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.legalPersonIdcard" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> </el-row> <el-row :gutter="20"> <el-col :span="6"> <el-form-item label="项目联系人" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model.trim="legalPerson.projectContactPerson" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.projectContactPerson" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="移动电话" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model.trim="legalPerson.phone" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.phone" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="联系人身份证号" label-width="120px" prop="projectType" style="width: 100%"> <el-input v-model.trim="legalPerson.contactIdcard" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.contactIdcard" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> </el-row> <el-row :gutter="20"> <el-col :span="6"> <el-form-item label="微信号" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model.trim="legalPerson.wechat" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.wechat" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="联系人通讯地址" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model.trim="legalPerson.contactAddress" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.contactAddress" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="邮政编码" label-width="120px" prop="projectType" style="width: 100%"> <el-input v-model.trim="legalPerson.postCode" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model.trim="legalPersonForm.postCode" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> </el-row> <el-row :gutter="20"> <el-col :span="6"> <el-form-item label="电子邮箱" label-width="120px" prop="investmentType" style="width: 100%"> <el-input v-model="legalPerson.email" class="item" clearable disabled maxlength="255" placeholder="请输入" /> <el-input v-model="legalPersonForm.email" class="item" clearable maxlength="255" placeholder="请输入" /> </el-form-item> </el-col> </el-row> @@ -147,6 +147,13 @@ </template> <script> import Cookies from "js-cookie"; import { addProjectUnitRegistrationInfo, editProjectUnitRegistrationInfo, getProjectUnitRegistrationInfoById } from "@/api/projectEngineering/projectUnitRegistrationInfo"; export default { dicts: ['sys_unit_type','sys_registration_type','sys_holding_situation','sys_license_type'], @@ -160,7 +167,8 @@ }, data() { return { legalPerson: { legalPersonForm: { id: '', totalInvestment: '', projectUnit: '', projectUnitType: '', @@ -171,7 +179,7 @@ registeredAddress: '', registeredCapital: '', projectId: '', legal_representative: '', legalRepresentative: '', fixedPhone: '', legalPersonIdcard: '', projectContactPerson: '', @@ -184,12 +192,53 @@ }, } }, created() { mounted() { this.legalPersonForm.projectId = this.$route.query.projectId; const legalPersonForm = Cookies.get("legalPersonForm"); const projectForm = Cookies.get("projectForm"); const parsedLegalPersonForm = legalPersonForm ? JSON.parse(legalPersonForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; if (parsedLegalPersonForm) { this.legalPersonForm = parsedLegalPersonForm } if (parsedProjectForm){ this.projectForm = parsedProjectForm } // 如果路由存在id且没有缓存,视为编辑或查看,调用api if (this.legalPersonForm.projectId && !parsedLegalPersonForm) { this.getProjectUnitRegistrationInfo(); } }, beforeDestroy() { Cookies.set("legalPersonForm", JSON.stringify(this.legalPersonForm)); }, methods: { getProjectUnitRegistrationInfo() { getProjectUnitRegistrationInfoById(this.legalPersonForm.projectId ).then(res => { this.legalPersonForm = res.data; }); }, submit() { console.log("法人submit") if (!this.projectForm.id) { this.$message.error("请先保存投资管理基本信息") } else { this.legalPersonForm.projectId = this.projectForm.id; if (this.legalPersonForm.id != null) { editProjectUnitRegistrationInfo(this.legalPersonForm).then(response => { this.$modal.msgSuccess("修改成功"); //跳转到下个组件 this.$emit('toNext', 4); }); } else { addProjectUnitRegistrationInfo(this.legalPersonForm).then(response => { this.$modal.msgSuccess("新增成功"); this.legalPersonForm.id = response.data //跳转到下个组件 this.$emit('toNext', 4); }); } } }, } } src/views/projectEngineering/projectLibrary/index.vue
@@ -385,6 +385,10 @@ removeCookie() { Cookies.remove("projectForm") Cookies.remove("investmentForm") Cookies.remove("investmentFundsForm") Cookies.remove("legalPersonForm") Cookies.remove("policyInfoForm") Cookies.remove("documentsInfoForm") }, // 重置排序的方法 handleResetSort() { src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -95,10 +95,6 @@ this.$refs.childRef.reset(); }, }, created() { console.log("sss") }, }; </script>