From 7adbf0551f6a6b307e66cdd6537ab45fc5a2bf11 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期五, 29 十一月 2024 04:00:10 +0800 Subject: [PATCH] bug修复和页面查询 --- src/views/projectEngineering/projectLibrary/component/investmentFunds.vue | 71 +++---- src/views/projectEngineering/projectLibrary/index.vue | 43 +++- src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue | 60 +++--- src/views/projectEngineering/projectLibrary/component/BasicInfo.vue | 97 ++++++---- src/views/projectEngineering/projectLibrary/component/legalPerson.vue | 102 ++++++----- src/views/projectEngineering/projectLibrary/component/InvestInfo.vue | 69 +++--- src/views/projectEngineering/projectLibrary/projectDetails.vue | 12 + src/views/projectProcess/index.vue | 2 src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue | 32 +-- src/views/projectManage/plan/planRecord.vue | 2 10 files changed, 263 insertions(+), 227 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue index 1319e34..cd47875 100644 --- a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue +++ b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue @@ -107,7 +107,7 @@ placeholder="璇烽�夋嫨" style="width: 100%" collapse-tags - @change="changeDepartment"> + > <el-option v-for="item in approvalList" :key="item.id" @@ -139,7 +139,6 @@ placeholder="璇烽�夋嫨" style="width: 100%" collapse-tags - @change="changePutUnder" > <el-option v-for="item in dict.type.sys_centralized_management" :key="item.value" :label="item.label" :value="item.value"/> @@ -316,7 +315,11 @@ disabled: { type: Boolean, default: false - } + }, + isShow: { + type: Boolean, + required: true, + }, }, data() { return { @@ -360,8 +363,10 @@ year: '', yearInvestAmount: '', competentDepartmentList: [], - managementCentralizationList: [] + managementCentralizationList: [], }, + subclass: '', + largeCategory: '', approvalList: [], setTime: '', planStartTime: '', @@ -373,8 +378,6 @@ hasMore: true, selectOptions: [], accept: ['pdf', 'docx', 'xlsx', 'jpg', 'jpeg'], - largeCategory: '', - subclass: '', mapCreateInfo: {}, demoFormRef: null, rules: { @@ -392,28 +395,32 @@ }, mounted() { this.projectForm.id = this.$route.query.projectId; - const projectForm = Cookies.get("projectForm"); + const projectForm = localStorage.getItem("projectForm"); + //鍒濆鍖栦富绠¢儴闂ㄤ笅鎷夋 + this.getApprovalList(); if (projectForm) { this.projectForm = JSON.parse(projectForm); + this.$emit('updateIsShow', true); } else { - //鍒濆鍖栦富绠¢儴闂ㄤ笅鎷夋 - this.getApprovalList(); + this.projectForm.id = this.$route.query.projectId; // 鍦ㄧ粍浠跺垱寤烘椂鑾峰彇椤圭洰淇℃伅锛屽鏋� projectId 瀛樺湪 if (this.projectForm.id) { this.getProjectInfo(this.projectForm.id); } else { this.getProjectCodeApi(); + this.$emit('updateIsShow', true); } // this.handleLoadMore(1); } }, beforeDestroy() { - Cookies.set("projectForm", JSON.stringify(this.projectForm)); + localStorage.setItem("projectForm", JSON.stringify(this.projectForm)); }, methods: { getProjectInfo(id) { getProject(id).then(res => { this.projectForm = res.data; + this.$emit('updateIsShow', true); }); }, getApprovalList() { @@ -424,7 +431,7 @@ submit() { this.$refs["projectForm"].validate(valid => { if (valid) { - if (this.projectForm.id != null) { + if (this.projectForm.id) { updateProject(this.projectForm).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); //璺宠浆鍒颁笅涓粍浠� @@ -446,22 +453,23 @@ this.projectForm.projectCode = res.data; }); }, - changeDepartment(val) { - if (!val.length) { - this.largeCategory = ''; - return; - } - const labels = this.approvalList.filter(item => val.includes(item.id)).map(item => item.value); - this.largeCategory = labels.join(','); - }, - changePutUnder(val) { - if (!val.length) { - this.subclass = ''; - return; - } - const labels = this.dict.type.sys_centralized_management.filter(item => val.includes(item.value)).map(item => item.label); - this.subclass = labels.join(','); - }, + // changeDepartment(val) { + // console.log("瑙﹀彂浜嬩欢" + val + this.approvalList) + // if (!val.length) { + // this.largeCategory = ''; + // return; + // } + // const labels = this.approvalList.filter(item => val.includes(item.id)).map(item => item.value); + // this.largeCategory = labels.join(','); + // }, + // changePutUnder(val) { + // if (!val.length) { + // this.subclass = ''; + // return; + // } + // const labels = this.dict.type.sys_centralized_management.filter(item => val.includes(item.value)).map(item => item.label); + // this.subclass = labels.join(','); + // }, async loadDataList(newPage) { try { this.loading = true; @@ -506,22 +514,25 @@ }, watch: { - 'projectForm.managementCentralizationList'(val) { - if (val) { - const labels = this.dict.type.sys_centralized_management - .filter(item => val.includes(item.value)) - .map(item => item.label); - this.subclass = labels.join(','); - } - }, - 'projectForm.competentDepartmentList'(val) { - if (val) { - const labels = this.approvalList - .filter(item => val.includes(item.id)) - .map(item => item.value); - this.largeCategory = labels.join(','); - } - }, + 'projectForm': { + handler(newVal, oldVal) { + setTimeout(() => { + if (newVal.managementCentralizationList) { + const labels = this.dict.type.sys_centralized_management + .filter(item => newVal.managementCentralizationList.includes(item.value)) + .map(item => item.label); + this.subclass = labels.join(','); + } + if (newVal.competentDepartmentList) { + const labels = this.approvalList + .filter(item => newVal.competentDepartmentList.includes(item.id)) + .map(item => item.value); + this.largeCategory = labels.join(','); + } + }, 1000); + }, + deep: true + } } }; </script> diff --git a/src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue b/src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue index de37951..43b95c1 100644 --- a/src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue +++ b/src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue @@ -5,10 +5,10 @@ <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="documentsInfoForm.fileList" + <file-upload v-model="fileList" :fileType="accept" :isShowTip="false"/> - <div v-if="documentsInfoForm.fileList.length === 0" style="color: #a9afbc">鏀寔涓婁紶PDF鏍煎紡鏂囦欢</div> + <div v-if="fileList.length === 0" style="color: #a9afbc">鏀寔涓婁紶PDF鏍煎紡鏂囦欢</div> </div> </el-form-item> </el-col> @@ -19,12 +19,6 @@ <script> -import { - addProjectInvestmentFunding, - editProjectInvestmentFunding, - getProjectInvestmentFundingById -} from "@/api/projectEngineering/projectInvestmentFunding"; -import Cookies from "js-cookie"; import {addDocumentInfo, getDocumentInfoById} from "@/api/projectEngineering/projectInfo"; export default { @@ -38,20 +32,19 @@ data() { return { documentsInfoForm: { - fileList: [], - projectId: '' + // fileList: [], + // projectId: '' }, + fileList: [], projectForm: {}, accept: ['pdf'], }; }, methods: { getDocumentsInfo() { - getDocumentInfoById(this.documentsInfoForm.projectId).then(res => { + getDocumentInfoById(this.$route.query.projectId).then(res => { this.documentsInfoForm = res.data; - if(!this.documentsInfoForm.fileList) { - this.documentsInfoForm.fileList = [] - } + this.fileList = this.documentsInfoForm.fileList }); }, submit() { @@ -59,6 +52,7 @@ this.$message.error("璇峰厛淇濆瓨鎶曡祫绠$悊鍩烘湰淇℃伅") } else { this.documentsInfoForm.projectId = this.projectForm.id; + this.documentsInfoForm.fileList = this.fileList addDocumentInfo(this.documentsInfoForm).then(response => { this.$modal.msgSuccess("鎻愪氦鎴愬姛"); }); @@ -66,25 +60,25 @@ }, }, mounted() { - this.documentsInfoForm.projectId = this.$route.query.projectId; - const documentsInfoForm = Cookies.get("documentsInfoForm"); - const projectForm = Cookies.get("projectForm"); + const documentsInfoForm = localStorage.getItem("documentsInfoForm"); + const projectForm = localStorage.getItem("projectForm"); const parsedDocumentsInfoForm = documentsInfoForm ? JSON.parse(documentsInfoForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; if (parsedDocumentsInfoForm) { this.documentsInfoForm = parsedDocumentsInfoForm + if(this.documentsInfoForm.fileList) this.fileList = this.documentsInfoForm.fileList } if (parsedProjectForm) { this.projectForm = parsedProjectForm } // 濡傛灉璺敱瀛樺湪id涓旀病鏈夌紦瀛�,瑙嗕负缂栬緫鎴栨煡鐪嬶紝璋冪敤api - if (this.documentsInfoForm.projectId && !parsedDocumentsInfoForm) { + if (this.$route.query.projectId && !parsedDocumentsInfoForm) { this.getDocumentsInfo(); } }, beforeDestroy() { - Cookies.set("documentsInfoForm", JSON.stringify(this.documentsInfoForm)); + if(Object.keys(this.documentsInfoForm).length !==0) localStorage.setItem("documentsInfoForm", JSON.stringify(this.documentsInfoForm)); }, }; diff --git a/src/views/projectEngineering/projectLibrary/component/InvestInfo.vue b/src/views/projectEngineering/projectLibrary/component/InvestInfo.vue index beda437..d1f5d7f 100644 --- a/src/views/projectEngineering/projectLibrary/component/InvestInfo.vue +++ b/src/views/projectEngineering/projectLibrary/component/InvestInfo.vue @@ -164,7 +164,6 @@ </template> <script> -import Cookies from "js-cookie"; import { addProjectInvestmentInfo, editProjectInvestmentInfo, @@ -179,28 +178,28 @@ type: Boolean, default: false, required: true - } + }, }, data() { return { projectForm: {}, investmentForm: { - id: '', - beCrossRegion: '', - constructionLocation: '', - detailedAddress: '', - beCompensationProject: '', - compensationReason: '', - plannedStartDate: '', - expectedCompletionDate: '', - nationalIndustryClassification: '', - industryClassification: '', - projectNature: '', - projectAttribute: '', - useEarth: '', - contentScale: '', - code: '', - projectId: '', + // id: '', + // beCrossRegion: '', + // constructionLocation: '', + // detailedAddress: '', + // beCompensationProject: '', + // compensationReason: '', + // plannedStartDate: '', + // expectedCompletionDate: '', + // nationalIndustryClassification: '', + // industryClassification: '', + // projectNature: '', + // projectAttribute: '', + // useEarth: '', + // contentScale: '', + // code: '', + // projectId: '', }, plannedStartDate: '', expectedCompletionDate: '', @@ -213,15 +212,14 @@ }; }, mounted() { - this.investmentForm.projectId = this.$route.query.projectId // 浠嶤ookies涓幏鍙栫紦瀛樻暟鎹� - const investmentForm = Cookies.get("investmentForm"); - const projectForm = Cookies.get("projectForm"); + const investmentForm = localStorage.getItem("investmentForm"); + const projectForm = localStorage.getItem("projectForm"); // 灏濊瘯瑙f瀽JSON鏁版嵁 const parsedInvestmentForm = investmentForm ? JSON.parse(investmentForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; - + console.log(parsedInvestmentForm) // 璁剧疆investment鍜宲rojectForm瀵硅薄 if(parsedInvestmentForm) { this.investmentForm = parsedInvestmentForm; @@ -230,25 +228,28 @@ this.projectForm = parsedProjectForm; } // 濡傛灉璺敱瀛樺湪id涓旀病鏈夌紦瀛橈紝瑙嗕负缂栬緫鎴栨煡鐪嬶紝璋冪敤api - if (this.investmentForm.projectId && !investmentForm) { + if (this.$route.query.projectId && !investmentForm) { this.getInvestment(); + }else { + this.investmentForm.constructionLocation = this.projectForm.area; + this.investmentForm.detailedAddress = this.projectForm.projectAddress; + this.investmentForm.plannedStartDate = this.projectForm.planStartTime; + this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime; } - this.investmentForm.constructionLocation = this.projectForm.area; - this.investmentForm.detailedAddress = this.projectForm.projectAddress; - this.investmentForm.plannedStartDate = this.projectForm.planStartTime; - this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime; }, beforeDestroy() { - Cookies.set("investmentForm", JSON.stringify(this.investmentForm)); + if(Object.keys(this.investmentForm).length !==0) localStorage.setItem("investmentForm", JSON.stringify(this.investmentForm)); }, methods: { getInvestment() { - getProjectInvestmentInfoById(this.investmentForm.projectId ).then(res => { + getProjectInvestmentInfoById(this.$route.query.projectId).then(res => { this.investmentForm = res.data; - this.investmentForm.constructionLocation = this.projectForm.area; - this.investmentForm.detailedAddress = this.projectForm.projectAddress; - this.investmentForm.plannedStartDate = this.projectForm.planStartTime; - this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime; + this.$nextTick(() => { + this.investmentForm.constructionLocation = this.projectForm.area; + this.investmentForm.detailedAddress = this.projectForm.projectAddress; + this.investmentForm.plannedStartDate = this.projectForm.planStartTime; + this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime; + }) }); }, submit() { @@ -256,7 +257,7 @@ this.$message.error("璇峰厛淇濆瓨鎶曡祫绠$悊鍩烘湰淇℃伅") } else { this.investmentForm.projectId = this.projectForm.id; - if (this.investmentForm.id != null) { + if (this.investmentForm.id) { editProjectInvestmentInfo(this.investmentForm).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); //璺宠浆鍒颁笅涓粍浠� diff --git a/src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue b/src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue index 815c2dc..344a6c5 100644 --- a/src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue +++ b/src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue @@ -10,10 +10,10 @@ <el-col :span="20"> <el-form-item label="绗﹀悎琛屼笟鏀跨瓥:" label-width="180px" prop="industryPolicy" style="width: 100%"> <div style="display: flex"> - <file-upload v-model="policyInfoForm.fileList" + <file-upload v-model="fileList" :fileType="accept" :isShowTip="false"/> - <div v-if="policyInfoForm.fileList.length === 0" style="color: #a9afbc; margin-left: 10px"> + <div v-if="fileList.length === 0" style="color: #a9afbc; margin-left: 10px"> 鏀寔涓婁紶PDF鏍煎紡鏂囦欢 </div> </div> @@ -159,7 +159,6 @@ <script> -import Cookies from "js-cookie"; import { addProjectInvestmentPolicyCompliance, editProjectInvestmentPolicyCompliance, @@ -173,25 +172,26 @@ type: Boolean, default: false, required: true - } + }, }, data() { return { policyInfoForm: { - id: '', - projectId: '', - fileList: [], - belongsToIndustryAdjustmentDirectory: null, - belongsToWesternEncouragedDirectory: null, - notBannedOrControlledProject: true, - informationIsTrue: true, - specialPlanningCompliance: '', - energyCheck: null, - annualEnergyConsumption: '', - annualElectricityConsumption: '', - noOnlyCheckType: null, - remarks: '' + // id: '', + // projectId: '', + // fileList: [], + // belongsToIndustryAdjustmentDirectory: null, + // belongsToWesternEncouragedDirectory: null, + // notBannedOrControlledProject: true, + // informationIsTrue: true, + // specialPlanningCompliance: '', + // energyCheck: null, + // annualEnergyConsumption: '', + // annualElectricityConsumption: '', + // noOnlyCheckType: null, + // remarks: '' }, + fileList: [], accept: ['pdf'], rules: { industrialPolicyProhibition: [{required: true, message: '璇烽�夋嫨', trigger: 'change'}], @@ -200,35 +200,36 @@ }; }, mounted() { - this.policyInfoForm.projectId = this.$route.query.projectId; - const policyInfoForm = Cookies.get("policyInfoForm"); - const projectForm = Cookies.get("projectForm"); + const policyInfoForm = localStorage.getItem("policyInfoForm"); + const projectForm = localStorage.getItem("projectForm"); const parsedPolicyInfoForm = policyInfoForm ? JSON.parse(policyInfoForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; if (parsedPolicyInfoForm) { this.policyInfoForm = parsedPolicyInfoForm + if(this.policyInfoForm.fileList) this.fileList = this.policyInfoForm.fileList } if (parsedProjectForm) { this.projectForm = parsedProjectForm } // 濡傛灉璺敱瀛樺湪id涓旀病鏈夌紦瀛�,瑙嗕负缂栬緫鎴栨煡鐪嬶紝璋冪敤api - if (this.policyInfoForm.projectId && !parsedPolicyInfoForm) { + if (this.$route.query.projectId && !parsedPolicyInfoForm) { this.getProjectInvestmentPolicyCompliance(); + } else { + this.policyInfoForm.informationIsTrue= true; + this.policyInfoForm.notBannedOrControlledProject = true; } }, beforeDestroy() { - Cookies.set("policyInfoForm", JSON.stringify(this.policyInfoForm)); + if(Object.keys(this.policyInfoForm).length !==0) localStorage.setItem("policyInfoForm", JSON.stringify(this.policyInfoForm)); }, methods: { getProjectInvestmentPolicyCompliance() { - getProjectInvestmentPolicyComplianceById(this.policyInfoForm.projectId).then(res => { + getProjectInvestmentPolicyComplianceById(this.$route.query.projectId).then(res => { this.policyInfoForm = res.data; - if(!this.policyInfoForm.fileList) { - this.policyInfoForm.fileList = [] - } - this.policyInfoForm.notBannedOrControlledProject =true - this.policyInfoForm.informationIsTrue =true + this.policyInfoForm.notBannedOrControlledProject = true + this.policyInfoForm.informationIsTrue = true + this.fileList =this.policyInfoForm.fileList }); }, submit() { @@ -238,7 +239,8 @@ this.$refs["policyInfoFormRef"].validate(valid => { if (valid) { this.policyInfoForm.projectId = this.projectForm.id; - if (this.policyInfoForm.id != null) { + this.policyInfoForm.fileList = this.fileList + if (this.policyInfoForm.id) { editProjectInvestmentPolicyCompliance(this.policyInfoForm).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); //璺宠浆鍒颁笅涓粍浠� diff --git a/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue b/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue index 6149bb8..7f6ee41 100644 --- a/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue +++ b/src/views/projectEngineering/projectLibrary/component/investmentFunds.vue @@ -205,45 +205,45 @@ type: Boolean, default: false, required: true - } + }, }, data() { return { projectForm: {}, investmentFundsForm: { - id: '', - projectId: '', - totalInvestment: '', - principal: '', - governmentInvestmentTotal: '', - centralInvestmentTotal: '', - centralBudgetInvestment: '', - centralFiscalInvestment: '', - centralSpecialBondInvestment: '', - centralSpecialFundInvestment: '', - provincialInvestmentTotal: '', - provincialBudgetInvestment: '', - provincialFiscalInvestment: '', - provincialSpecialFundInvestment: '', - cityInvestmentTotal: '', - cityBudgetInvestment: '', - cityFiscalInvestment: '', - citySpecialFundInvestment: '', - countyInvestmentTotal: '', - countyBudgetInvestment: '', - countyFiscalInvestment: '', - countySpecialFundInvestment: '', - domesticLoanTotal: '', - bankLoan: '', - foreignInvestmentTotal: '', - enterpriseSelfRaisedTotal: '', - otherInvestmentTotal: '' + // id: '', + // projectId: '', + // totalInvestment: '', + // principal: '', + // governmentInvestmentTotal: '', + // centralInvestmentTotal: '', + // centralBudgetInvestment: '', + // centralFiscalInvestment: '', + // centralSpecialBondInvestment: '', + // centralSpecialFundInvestment: '', + // provincialInvestmentTotal: '', + // provincialBudgetInvestment: '', + // provincialFiscalInvestment: '', + // provincialSpecialFundInvestment: '', + // cityInvestmentTotal: '', + // cityBudgetInvestment: '', + // cityFiscalInvestment: '', + // citySpecialFundInvestment: '', + // countyInvestmentTotal: '', + // countyBudgetInvestment: '', + // countyFiscalInvestment: '', + // countySpecialFundInvestment: '', + // domesticLoanTotal: '', + // bankLoan: '', + // foreignInvestmentTotal: '', + // enterpriseSelfRaisedTotal: '', + // otherInvestmentTotal: '' } }; }, methods: { getInvestmentFunds() { - getProjectInvestmentFundingById(this.investmentFundsForm.projectId ).then(res => { + getProjectInvestmentFundingById(this.$route.query.projectId).then(res => { this.investmentFundsForm = res.data; }); }, @@ -252,7 +252,7 @@ this.$message.error("璇峰厛淇濆瓨鎶曡祫绠$悊鍩烘湰淇℃伅") } else { this.investmentFundsForm.projectId = this.projectForm.id; - if (this.investmentFundsForm.id != null) { + if (this.investmentFundsForm.id) { editProjectInvestmentFunding(this.investmentFundsForm).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); //璺宠浆鍒颁笅涓粍浠� @@ -270,25 +270,24 @@ }, }, mounted() { - this.investmentFundsForm.projectId = this.$route.query.projectId; - const investmentFundsForm = Cookies.get("investmentFundsForm"); - const projectForm = Cookies.get("projectForm"); + const investmentFundsForm = localStorage.getItem("investmentFundsForm"); + const projectForm = localStorage.getItem("projectForm"); const parsedInvestmentFundsForm = investmentFundsForm ? JSON.parse(investmentFundsForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; if (parsedInvestmentFundsForm) { this.investmentFundsForm = parsedInvestmentFundsForm } - if (parsedProjectForm){ + if (parsedProjectForm) { this.projectForm = parsedProjectForm } // 濡傛灉璺敱瀛樺湪id涓旀病鏈夌紦瀛�,瑙嗕负缂栬緫鎴栨煡鐪嬶紝璋冪敤api - if (this.investmentFundsForm.projectId && !parsedInvestmentFundsForm) { + if (this.$route.query.projectId&& !parsedInvestmentFundsForm) { this.getInvestmentFunds(); } }, beforeDestroy() { - Cookies.set("investmentFundsForm", JSON.stringify(this.investmentFundsForm)); + if(Object.keys(this.investmentFundsForm).length !==0) localStorage.setItem("investmentFundsForm", JSON.stringify(this.investmentFundsForm)); }, } </script> diff --git a/src/views/projectEngineering/projectLibrary/component/legalPerson.vue b/src/views/projectEngineering/projectLibrary/component/legalPerson.vue index 219626f..b2ffd25 100644 --- a/src/views/projectEngineering/projectLibrary/component/legalPerson.vue +++ b/src/views/projectEngineering/projectLibrary/component/legalPerson.vue @@ -4,12 +4,13 @@ <el-row :gutter="20"> <el-col :span="6"> <el-form-item label="椤圭洰鎬绘姇棰�" label-width="120px" prop="investmentType" style="width: 100%"> - <el-input v-model="legalPersonForm.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="legalPersonForm.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"> @@ -70,75 +71,84 @@ <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="legalPersonForm.certificateNumber" class="item" clearable 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="legalPersonForm.registeredAddress" class="item" clearable 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="legalPersonForm.registeredCapital" class="item" clearable 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="娉曚汉浠h〃" label-width="120px" prop="investmentType" style="width: 100%"> - <el-input v-model.trim="legalPersonForm.legalRepresentative" class="item" clearable 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="legalPersonForm.fixedPhone" class="item" clearable 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="legalPersonForm.legalPersonIdcard" class="item" clearable 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="legalPersonForm.projectContactPerson" class="item" clearable 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="legalPersonForm.phone" class="item" clearable 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="legalPersonForm.contactIdcard" class="item" clearable 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="legalPersonForm.wechat" class="item" clearable 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="legalPersonForm.contactAddress" class="item" clearable 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="legalPersonForm.postCode" class="item" clearable 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="legalPersonForm.email" class="item" clearable maxlength="255" placeholder="璇疯緭鍏�" /> + <el-input v-model="legalPersonForm.email" class="item" clearable maxlength="255" placeholder="璇疯緭鍏�"/> </el-form-item> </el-col> </el-row> @@ -156,66 +166,66 @@ } from "@/api/projectEngineering/projectUnitRegistrationInfo"; export default { - dicts: ['sys_unit_type','sys_registration_type','sys_holding_situation','sys_license_type'], + dicts: ['sys_unit_type', 'sys_registration_type', 'sys_holding_situation', 'sys_license_type'], name: 'LegalPersonForm', props: { disabled: { type: Boolean, default: false, required: true - } + }, }, data() { return { legalPersonForm: { - id: '', - totalInvestment: '', - projectUnit: '', - projectUnitType: '', - registrationType: '', - holdingSituation: '', - certificateType: '', - certificateNumber: '', - registeredAddress: '', - registeredCapital: '', - projectId: '', - legalRepresentative: '', - fixedPhone: '', - legalPersonIdcard: '', - projectContactPerson: '', - phone: '', - contactIdcard: '', - wechat: '', - contactAddress: '', - postCode: '', - email: '' + // id: '', + // totalInvestment: '', + // projectUnit: '', + // projectUnitType: '', + // registrationType: '', + // holdingSituation: '', + // certificateType: '', + // certificateNumber: '', + // registeredAddress: '', + // registeredCapital: '', + // projectId: '', + // legalRepresentative: '', + // fixedPhone: '', + // legalPersonIdcard: '', + // projectContactPerson: '', + // phone: '', + // contactIdcard: '', + // wechat: '', + // contactAddress: '', + // postCode: '', + // email: '' }, } }, mounted() { - this.legalPersonForm.projectId = this.$route.query.projectId; - const legalPersonForm = Cookies.get("legalPersonForm"); - const projectForm = Cookies.get("projectForm"); + const legalPersonForm = localStorage.getItem("legalPersonForm"); + const projectForm = localStorage.getItem("projectForm"); const parsedLegalPersonForm = legalPersonForm ? JSON.parse(legalPersonForm) : null; const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; if (parsedLegalPersonForm) { this.legalPersonForm = parsedLegalPersonForm } - if (parsedProjectForm){ + if (parsedProjectForm) { this.projectForm = parsedProjectForm } // 濡傛灉璺敱瀛樺湪id涓旀病鏈夌紦瀛�,瑙嗕负缂栬緫鎴栨煡鐪嬶紝璋冪敤api - if (this.legalPersonForm.projectId && !parsedLegalPersonForm) { + if (this.$route.query.projectId && !parsedLegalPersonForm) { this.getProjectUnitRegistrationInfo(); } + }, beforeDestroy() { - Cookies.set("legalPersonForm", JSON.stringify(this.legalPersonForm)); + if(Object.keys(this.legalPersonForm).length !==0) localStorage.setItem("legalPersonForm", JSON.stringify(this.legalPersonForm)); }, methods: { getProjectUnitRegistrationInfo() { - getProjectUnitRegistrationInfoById(this.legalPersonForm.projectId ).then(res => { + getProjectUnitRegistrationInfoById(this.$route.query.projectId).then(res => { this.legalPersonForm = res.data; }); }, @@ -224,7 +234,7 @@ this.$message.error("璇峰厛淇濆瓨鎶曡祫绠$悊鍩烘湰淇℃伅") } else { this.legalPersonForm.projectId = this.projectForm.id; - if (this.legalPersonForm.id != null) { + if (this.legalPersonForm.id) { editProjectUnitRegistrationInfo(this.legalPersonForm).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); //璺宠浆鍒颁笅涓粍浠� diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue index f2db159..5bf5bf6 100644 --- a/src/views/projectEngineering/projectLibrary/index.vue +++ b/src/views/projectEngineering/projectLibrary/index.vue @@ -29,10 +29,10 @@ <el-date-picker style="width: 270px" size="small" - v-model="queryParams[timeRange]" + v-model="timeRange" type="daterange" range-separator="-" - value-format="yyyy-MM-dd" + value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" @change="handleQuery" @@ -192,7 +192,6 @@ <!-- 鍔ㄦ�佸垪 --> <el-table-column v-for="item in columns" - :key="item.id" v-if="item.visible" :prop="item.id" :label="item.label" @@ -216,6 +215,10 @@ <!-- investType鎻掓Ы --> <template v-if="item.slotName === 'investType'"> <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> + </template> + <!-- planStartTime --> + <template v-if="item.slotName === 'planStartTime'"> + {{ scope.row.planStartTime ? scope.row.planStartTime.split('-')[0] + '骞�' : '' }} </template> </template> <!-- 榛樿鏄剧ず --> @@ -279,7 +282,7 @@ dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases', 'sys_funding_type', 'sys_association_status', 'sys_project_status', 'sys_project_code', 'sys_project_tags', 'sys_key_categories', 'sys_project_type'], - name: "projectInfo", + name: "ProjectInfo", components: { FileDialog }, @@ -322,6 +325,8 @@ pageSize: 10, projectName: null, projectCode: null, + projectStartTime: null, + projectEndTime: null, }, moreQueryParams: { projectType: '', // 椤圭洰绫诲瀷 @@ -366,29 +371,32 @@ this.defaultColumns = JSON.parse(JSON.stringify(columns)); this.getList(); }, + beforeDestroy() { + this.removeStore(); + }, methods: { /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { - this.removeCookie(); + this.removeStore(); this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }}); }, handleDetail(row) { - this.removeCookie(); + this.removeStore(); this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }}); }, // 鏂板椤甸潰 add() { - this.removeCookie(); + this.removeStore(); this.$router.push({ path: '/projectEngineering/project/ProjectDetails' }); }, //娓呯悊缂撳瓨 - removeCookie() { - Cookies.remove("projectForm") - Cookies.remove("investmentForm") - Cookies.remove("investmentFundsForm") - Cookies.remove("legalPersonForm") - Cookies.remove("policyInfoForm") - Cookies.remove("documentsInfoForm") + removeStore() { + localStorage.removeItem("projectForm") + localStorage.removeItem("investmentForm") + localStorage.removeItem("investmentFundsForm") + localStorage.removeItem("legalPersonForm") + localStorage.removeItem("policyInfoForm") + localStorage.removeItem("documentsInfoForm") }, // 閲嶇疆鎺掑簭鐨勬柟娉� handleResetSort() { @@ -447,11 +455,16 @@ /** 鏌ヨ椤圭洰绠$悊鍩虹淇℃伅鍒楄〃 */ getList() { this.loading = true; + this.queryParams.projectCategory = this.$route.query.projectCategory; + if(this.timeRange){ + this.queryParams.projectStartTime = this.timeRange[0] + this.queryParams.projectEndTime = this.timeRange[1] + } listProject(this.queryParams).then(response => { this.projectInfoList = response.data; this.total = response.total; + this.loading = false; }); - this.loading = false; }, // 鍙栨秷鎸夐挳 cancel() { diff --git a/src/views/projectEngineering/projectLibrary/projectDetails.vue b/src/views/projectEngineering/projectLibrary/projectDetails.vue index 59ca747..593af4b 100644 --- a/src/views/projectEngineering/projectLibrary/projectDetails.vue +++ b/src/views/projectEngineering/projectLibrary/projectDetails.vue @@ -1,7 +1,7 @@ <template> - <el-card class="card-container"> + <el-card class="card-container" > <div class="flex-container mb-4"> - <el-tabs v-model="currentTab" @tab-click="handleClick"> + <el-tabs v-model="currentTab" @tab-click="handleClick" v-show="isShow"> <el-tab-pane v-for="item in TABS_DATA" :key="item.value" @@ -19,6 +19,8 @@ ref="childRef" :disabled="disabled" @toNext="changeTable" + @updateIsShow="updateIsShow" + :isShow="isShow" class="full-width custom-height" /> <div v-if="!disabled" class="button-container"> @@ -41,6 +43,7 @@ name: 'ProjectDetails', data() { return { + isShow: false, currentTab: '椤圭洰绠$悊鍩虹淇℃伅', disabled: false, projectForm:{}, @@ -81,8 +84,11 @@ }; }, methods: { + updateIsShow(newValue) { + this.isShow = newValue; + }, handleClick(tabTarget) { - this.componentName = this.TABS_DATA[tabTarget.index].componentName; + this.componentName = this.TABS_DATA[tabTarget.index].componentName; }, changeTable(index) { this.componentName = this.TABS_DATA[index].componentName; diff --git a/src/views/projectManage/plan/planRecord.vue b/src/views/projectManage/plan/planRecord.vue index f2022b1..489139f 100644 --- a/src/views/projectManage/plan/planRecord.vue +++ b/src/views/projectManage/plan/planRecord.vue @@ -98,7 +98,7 @@ import {addRecord, getPlanRecordList, deletePlanRecord} from "@/api/projectPlan/index"; export default { - name: "planRecord", + name: "PlanRecord", data() { return { // 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁 diff --git a/src/views/projectProcess/index.vue b/src/views/projectProcess/index.vue index 18f76a8..d83c1cd 100644 --- a/src/views/projectProcess/index.vue +++ b/src/views/projectProcess/index.vue @@ -477,8 +477,8 @@ getProjectProcess(this.queryParams).then(response => { this.projectInfoList = response.data; this.total = response.total; + this.loading = false; }); - this.loading = false; }, // 鍙栨秷鎸夐挳 cancel() { -- Gitblit v1.8.0