From 69b01c1de544bdaedfa12aaf13600239dabbcb3c Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 29 十一月 2024 16:51:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/projectEngineering/projectLibrary/index.vue | 11 src/views/projectManage/plan/planInfo.vue | 14 src/views/projectManage/progress/progressRecord.vue | 76 ++- src/views/projectManage/plan/index.vue | 1 src/views/projectEngineering/projectLibrary/list.js | 174 ++++---- src/views/projectEngineering/projectLibrary/component/FileDialog.vue | 53 -- src/views/projectEngineering/projectLibrary/component/BasicInfo.vue | 2 src/views/projectManage/plan/planInfoCheck.vue | 18 src/api/projectManage/progress/index.js | 9 src/views/projectEngineering/projectLibrary/projectDetails.vue | 5 src/views/projectManage/progress/index.vue | 58 -- src/views/components/projectOverview.vue | 654 +++++++++++++++++++----------------- src/views/projectManage/plan/planRecord.vue | 3 13 files changed, 542 insertions(+), 536 deletions(-) diff --git a/src/api/projectManage/progress/index.js b/src/api/projectManage/progress/index.js index ade3e9b..63e83f8 100644 --- a/src/api/projectManage/progress/index.js +++ b/src/api/projectManage/progress/index.js @@ -50,6 +50,15 @@ }) } +// 瀹℃壒 +export function examine(data) { + return request({ + url: '/api/project-plan-progress-report/examine', + method: 'post', + data: data + }) +} + // 淇濆瓨绔e伐鎶ュ憡銆佹儏鍐佃鏄庨檮浠� export function saveProjectProgressFileLists(data) { return request({ diff --git a/src/views/components/projectOverview.vue b/src/views/components/projectOverview.vue index 3bda1ba..77f5e12 100644 --- a/src/views/components/projectOverview.vue +++ b/src/views/components/projectOverview.vue @@ -1,339 +1,373 @@ <template> - <div class="overview-bottom"> - <div class="abnormal" @click="showAbnormal"> - <div style="margin-bottom: 30px">寮傚父椤圭洰鎯呭喌缁熻</div> - <div> - <div class="abnormal-center"> - 娴佺▼寮傚父椤圭洰锛�<span - style="font-size: 16px; font-weight: 700" - >{{ - countExceptionProjectData.processExceptionProject - }}</span - > - </div> - <div class="abnormal-center"> - 璧勯噾寮傚父椤圭洰锛�<span - style="font-size: 16px; font-weight: 700" - >0</span - > - </div> - <div class="abnormal-center"> - 杩涘害寮傚父椤圭洰锛�<span - style="font-size: 16px; font-weight: 700" - >0</span - > - </div> - </div> - <div class="abnormal-img"></div> + <div class="overview-bottom"> + <div class="abnormal" @click="showAbnormal"> + <div style="margin-bottom: 30px">寮傚父椤圭洰鎯呭喌缁熻</div> + <div> + <div class="abnormal-center"> + 娴佺▼寮傚父椤圭洰锛�<span + style="font-size: 16px; font-weight: 700" + >{{ + countExceptionProjectData.processExceptionProject + }}</span + > </div> - <div class="overview-div custom-min-width"> - <div - v-for="i in calculation" - :key="i.text" - :style="setbcStyle(i.text)" - class="listings" - @click="showDetail(i.text)" - > - <div :style="setTextStyle(i.text)" class="title"> - {{ i.text }} - </div> - <div class="conter"> - <div :style="setTextColor(i.text)" class="mun"> - {{ i.mun }} - </div> - <div class="statistics"> - <div>{{ i.statistics }}</div> - <div :style="setTextColor(i.text)"> - {{ i.statisticsMun - }}<span style="font-size: 18px">浜�</span> - </div> - </div> - </div> - </div> - <!-- <div class="listings"> - <div class="title"> - 鍌� - </div> - <div class="conter"> - <div class="mun">44</div> - <div class="statistics"> - <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> - <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> - </div> - </div> - </div> - <div class="listings"> - <div class="title"> - 鍌� - </div> - <div class="conter"> - <div class="mun">44</div> - <div class="statistics"> - <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> - <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> - </div> - </div> - </div> - <div class="listings"> - <div class="title"> - 鍌� - </div> - <div class="conter"> - <div class="mun">44</div> - <div class="statistics"> - <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> - <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> - </div> - </div> - </div> - <div class="listings"> - <div class="title"> - 鍌� - </div> - <div class="conter"> - <div class="mun">44</div> - <div class="statistics"> - <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> - <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> - </div> - </div> - </div> - <div class="listings"> - <div class="title"> - 鍌� - </div> - <div class="conter"> - <div class="mun">44</div> - <div class="statistics"> - <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> - <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> - </div> - </div> - </div> - <div class="listings"> - <div class="title"> - 鍌� - </div> - <div class="conter"> - <div class="mun">44</div> - <div class="statistics"> - <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> - <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> - </div> - </div> - </div> - <div class="listings"> - <div class="title active"> - 鍌� - </div> - <div class="conter"> - <div class="mun">44</div> - <div class="statistics"> - <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> - <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> - </div> - </div> - </div> --> + <div class="abnormal-center"> + 璧勯噾寮傚父椤圭洰锛�<span + style="font-size: 16px; font-weight: 700" + >0</span + > </div> + <div class="abnormal-center"> + 杩涘害寮傚父椤圭洰锛�<span + style="font-size: 16px; font-weight: 700" + >0</span + > + </div> + </div> + <div class="abnormal-img"></div> </div> + <div class="overview-div custom-min-width"> + <div + v-for="i in calculation" + :key="i.text" + :style="setbcStyle(i.text)" + class="listings" + @click="showDetail(i.text)" + > + <div :style="setTextStyle(i.text)" class="title"> + {{ i.text }} + </div> + <div class="conter"> + <div :style="setTextColor(i.text)" class="mun"> + {{ i.mun }} + </div> + <div class="statistics"> + <div>{{ i.statistics }}</div> + <div :style="setTextColor(i.text)"> + {{ + i.statisticsMun + }}<span style="font-size: 18px">浜�</span> + </div> + </div> + </div> + </div> + <!-- <div class="listings"> + <div class="title"> + 鍌� + </div> + <div class="conter"> + <div class="mun">44</div> + <div class="statistics"> + <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> + <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> + </div> + </div> + </div> + <div class="listings"> + <div class="title"> + 鍌� + </div> + <div class="conter"> + <div class="mun">44</div> + <div class="statistics"> + <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> + <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> + </div> + </div> + </div> + <div class="listings"> + <div class="title"> + 鍌� + </div> + <div class="conter"> + <div class="mun">44</div> + <div class="statistics"> + <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> + <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> + </div> + </div> + </div> + <div class="listings"> + <div class="title"> + 鍌� + </div> + <div class="conter"> + <div class="mun">44</div> + <div class="statistics"> + <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> + <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> + </div> + </div> + </div> + <div class="listings"> + <div class="title"> + 鍌� + </div> + <div class="conter"> + <div class="mun">44</div> + <div class="statistics"> + <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> + <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> + </div> + </div> + </div> + <div class="listings"> + <div class="title"> + 鍌� + </div> + <div class="conter"> + <div class="mun">44</div> + <div class="statistics"> + <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> + <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> + </div> + </div> + </div> + <div class="listings"> + <div class="title active"> + 鍌� + </div> + <div class="conter"> + <div class="mun">44</div> + <div class="statistics"> + <div>鍌ㄥ椤圭洰鏁伴噺缁熻</div> + <div class="statistics-mun">1233<span style="font-size: 18px;">浜�</span></div> + </div> + </div> + </div> --> + </div> + </div> </template> -<script > +<script> export default { - name: "Index", - data() { - return {} + name: "Index", + data() { + return {} + }, + props: { + calculation: Array, + countExceptionProjectData: Object, + }, + watch: { + // calculation: { + // handler(val) { + // console.log("11111" + val); + + // }, + // }, + // countExceptionProjectData: { + // handler(val) { + // console.log("22222" + val); + + // }, + // }, + }, + methods: { + setTextStyle(text) { + if (text === '鍌�') return 'background-color:#3369FF'; + if (text === '寤�') return 'background-color:#64ADFD'; + if (text === '鐪�') return 'background-color:#FF5E57'; + if (text === '甯�') return 'background-color:#FFA83F'; + if (text === '鏂�') return 'background-color:#5DD1E5'; + if (text === '绔�') return 'background-color:#576BF5'; + if (text === '鍘�') return 'background-color:#3369FF'; + if (text === '鏅�') return 'background-color:#64ADFD'; + return ''; }, - props: { - calculation: Array, - countExceptionProjectData: Object, + + setTextColor(text) { + if (text === '鍌�') return 'color:#3369FF'; + if (text === '寤�') return 'color:#64ADFD'; + if (text === '鐪�') return 'color:#FF5E57'; + if (text === '甯�') return 'color:#FFA83F'; + if (text === '鏂�') return 'color:#5DD1E5'; + if (text === '绔�') return 'color:#576BF5'; + if (text === '鍘�') return 'color:#3369FF'; + if (text === '鏅�') return 'color:#64ADFD'; + return ''; }, - watch: { - // calculation: { - // handler(val) { - // console.log("11111" + val); - // }, - // }, - // countExceptionProjectData: { - // handler(val) { - // console.log("22222" + val); - - // }, - // }, + setbcStyle(text) { + if (text === '鍌�') return 'background-color:#EAF0FF'; + if (text === '寤�') return 'background-color:#EFF7FF'; + if (text === '鐪�') return 'background-color:#FEEEED'; + if (text === '甯�') return 'background-color:#FFF6EB'; + if (text === '鏂�') return 'background-color:#EEFAFC'; + if (text === '绔�') return 'background-color:#EEF0FE'; + if (text === '鍘�') return 'background-color:#EAF0FF'; + if (text === '鏅�') return 'background-color:#EFF7FF'; + return ''; }, - methods: { - setTextStyle(text) { - if (text === '鍌�') return 'background-color:#3369FF'; - if (text === '寤�') return 'background-color:#64ADFD'; - if (text === '鐪�') return 'background-color:#FF5E57'; - if (text === '甯�') return 'background-color:#FFA83F'; - if (text === '鏂�') return 'background-color:#5DD1E5'; - if (text === '绔�') return 'background-color:#576BF5'; - if (text === '鍘�') return 'background-color:#3369FF'; - if (text === '鏅�') return 'background-color:#64ADFD'; - return ''; - }, + // 璺宠浆鍒板紓甯搁」鐩� + showAbnormal() { + console.log('璺宠浆寮傚父椤圭洰'); + this.$router.push({ + path: 'projectEngineering/project/abnormalProject' + }); + }, - setTextColor(text) { - if (text === '鍌�') return 'color:#3369FF'; - if (text === '寤�') return 'color:#64ADFD'; - if (text === '鐪�') return 'color:#FF5E57'; - if (text === '甯�') return 'color:#FFA83F'; - if (text === '鏂�') return 'color:#5DD1E5'; - if (text === '绔�') return 'color:#576BF5'; - if (text === '鍘�') return 'color:#3369FF'; - if (text === '鏅�') return 'color:#64ADFD'; - return ''; - }, - - setbcStyle(text) { - if (text === '鍌�') return 'background-color:#EAF0FF'; - if (text === '寤�') return 'background-color:#EFF7FF'; - if (text === '鐪�') return 'background-color:#FEEEED'; - if (text === '甯�') return 'background-color:#FFF6EB'; - if (text === '鏂�') return 'background-color:#EEFAFC'; - if (text === '绔�') return 'background-color:#EEF0FE'; - if (text === '鍘�') return 'background-color:#EAF0FF'; - if (text === '鏅�') return 'background-color:#EFF7FF'; - return ''; - }, - // 璺宠浆鍒板紓甯搁」鐩� - showAbnormal() { - console.log('璺宠浆寮傚父椤圭洰'); - this.$router.push({ - path: 'projectEngineering/project/abnormalProject' - }); - }, - - // 璺宠浆鍒板搴旂殑椤圭洰搴� - showDetail(text) { - console.log('璺宠浆鍒板搴旂殑椤圭洰搴�', text); - switch (text) { - case '鍌�': - this.$router.push({ - path: '/projectEngineering/project/reserveProjects', - query: { - projectCategory: '1' - } - }); - break; - case '鏂�': - this.$router.push({ - path: '/projectEngineering/project/previousProjects', - query: { - projectCategory: '2' - } - }); - break; - case '寤�': - this.$router.push({ - path: '/projectEngineering/project/implementationProject', - query: { - projectCategory: '3' - } - }); - break; - case '绔�': - this.$router.push({ - path: '/projectEngineering/project/completedProjects', - query: { - projectCategory: '4' - } - }); - break; - default: - break; + // 璺宠浆鍒板搴旂殑椤圭洰搴� + showDetail(text) { + console.log('璺宠浆鍒板搴旂殑椤圭洰搴�', text); + switch (text) { + case '鍌�': + this.$router.push({ + path: '/projectEngineering/project/reserveProjects', + query: { + projectCategory: '1' } - } + }); + break; + case '鏂�': + this.$router.push({ + path: '/projectEngineering/project/previousProjects', + query: { + projectCategory: '2' + } + }); + break; + case '寤�': + this.$router.push({ + path: '/projectEngineering/project/implementationProject', + query: { + projectCategory: '3' + } + }); + break; + case '绔�': + this.$router.push({ + path: '/projectEngineering/project/completedProjects', + query: { + projectCategory: '4' + } + }); + break; + case '鐪�': + this.$router.push({ + path: '/projectEngineering/project/projectLibrary', + query: { + importanceType: 'provincial_key' + } + }); + break; + case '鍘�': + this.$router.push({ + path: '/projectEngineering/project/projectLibrary', + query: { + importanceType: 'shehong_key' + } + }); + break; + case '甯�': + this.$router.push({ + path: '/projectEngineering/project/projectLibrary', + query: { + importanceType: 'suining_key' + } + }); + break; + case '鏅�': + this.$router.push({ + path: '/projectEngineering/project/projectLibrary', + query: { + importanceType: 'normal' + } + }); + break; + default: + break; + } } + } } </script> <style lang="scss" scoped> .overview-bottom { - display: flex; - justify-content: space-between; + display: flex; + justify-content: space-between; - .abnormal { - position: relative; - width: 25%; - min-width: 342px; - height: 200px; - background-image: url(../../assets/images/b.png); - background-size: 100% auto; - border-radius: 6px; - font-size: 16px; - color: #ffffff; - padding: 20px 0 0 20px; + .abnormal { + position: relative; + width: 25%; + min-width: 342px; + height: 200px; + background-image: url(../../assets/images/b.png); + background-size: 100% auto; + border-radius: 6px; + font-size: 16px; + color: #ffffff; + padding: 20px 0 0 20px; - .abnormal-center { - margin-bottom: 15px; - } - - .abnormal-img { - position: absolute; - right: 50px; - bottom: 20px; - width: 100px; - height: 100px; - background-image: url(../../assets/images/c.png); - } + .abnormal-center { + margin-bottom: 15px; } - .custom-min-width { - min-width: 1250px; - width: 1250px; + .abnormal-img { + position: absolute; + right: 50px; + bottom: 20px; + width: 100px; + height: 100px; + background-image: url(../../assets/images/c.png); } + } - .listings { - width: 300px; - height: 90px; - border-radius: 6px; - display: flex; - align-items: center; - - .title { - width: 45px; - height: 45px; - font-size: 24px; - border-radius: 8px; - line-height: 45px; - text-align: center; - margin-left: 15px; - color: #ffffff; - } - - .active { - background-color: #3369ff; - } - - .conter { - margin-left: 10px; - - .mun { - font-size: 30px; - line-height: 32px; - } - - .statistics { - width: 200px; - display: flex; - justify-content: space-between; - align-items: center; - - // .statistics-mun { - // // color: #3369FF; - // } - } - } - } -} -.overview-div { + .custom-min-width { min-width: 1250px; width: 1250px; - gap: 10px; - flex-wrap: wrap; + } + + .listings { + width: 300px; + height: 90px; + border-radius: 6px; display: flex; - margin-left: 10px; + align-items: center; + + .title { + width: 45px; + height: 45px; + font-size: 24px; + border-radius: 8px; + line-height: 45px; + text-align: center; + margin-left: 15px; + color: #ffffff; + } + + .active { + background-color: #3369ff; + } + + .conter { + margin-left: 10px; + + .mun { + font-size: 30px; + line-height: 32px; + } + + .statistics { + width: 200px; + display: flex; + justify-content: space-between; + align-items: center; + + // .statistics-mun { + // // color: #3369FF; + // } + } + } + } +} + +.overview-div { + min-width: 1250px; + width: 1250px; + gap: 10px; + flex-wrap: wrap; + display: flex; + margin-left: 10px; } </style> diff --git a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue index cd47875..7b6c23b 100644 --- a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue +++ b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue @@ -508,7 +508,7 @@ this.$message.success('鑾峰彇鍦板潃鎴愬姛'); this.dialogMap = false; } else { - this.$message.error('鑾峰彇鍧愭爣澶辫触'); + this.$message.error('璇峰厛鐐瑰嚮鍦板浘閫夋嫨鍦板潃'); } }, diff --git a/src/views/projectEngineering/projectLibrary/component/FileDialog.vue b/src/views/projectEngineering/projectLibrary/component/FileDialog.vue index 357d39e..aee768c 100644 --- a/src/views/projectEngineering/projectLibrary/component/FileDialog.vue +++ b/src/views/projectEngineering/projectLibrary/component/FileDialog.vue @@ -77,6 +77,7 @@ }, data() { return { + queryParams: {}, uploadRef: null, targetColumn: [], accept: `.zip`, @@ -108,49 +109,7 @@ } }, handleDownloadFile() { - // fetch(`${process.env.VITE_APP_BASE_API}/project/info/export/template`, { - // method: 'GET', - // headers: self.upload.headers - // }) - // .then(response => response.blob()) - // .then(blob => { - // const url = window.URL.createObjectURL(blob); - // const a = document.createElement('a'); - // a.style.display = 'none'; - // a.href = url; - // a.download = `椤圭洰鏂囦欢妯℃澘_${new Date().getTime()}.zip`; - // document.body.appendChild(a); - // a.click(); - // window.URL.revokeObjectURL(url); - // }) - // .catch(error => { - // console.error('鏂囦欢涓嬭浇澶辫触:', error); - // }); - - const url = process.env.VUE_APP_BASE_API + '/project/info/export/template'; - axios.post(url, [], { // 鍙戦�佷竴涓┖鏁扮粍鑰屼笉鏄┖瀵硅薄 - responseType: 'blob', // 鍛婅瘔axios鏈熸湜鏈嶅姟鍣ㄨ繑鍥炵殑鏄痓lob绫诲瀷 - headers: { - 'Content-Type': 'application/json', - Authorization: "Bearer " + getToken() - } - }) - .then(response => { - // 澶勭悊鏂囦欢涓嬭浇 - const blob = new Blob([response.data], { type: 'application/zip' }); // 鎸囧畾MIME绫诲瀷涓簔ip - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.style.display = 'none'; - a.href = url; - a.download = `椤圭洰鏂囦欢妯℃澘_${new Date().getTime()}.zip`; - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); - window.URL.revokeObjectURL(url); - }) - .catch(error => { - console.error('There was an error!', error); - }); + this.download('/project/info/export/template', {}, `椤圭洰鏂囦欢妯℃澘_${new Date().getTime()}.zip`) }, submitFileForm() { if (this.uploadRef) { @@ -161,15 +120,17 @@ this.$emit('fileDialogCancel'); }, handleDownloadTargetList() { - console.log('瀵煎嚭鐩爣鍒楄〃鍐呭', this.currentColumns); - this.targetColumn = this.currentColumns.filter(item => item.visible); + this.queryParams.fieldList = this.currentColumns.filter(item => item.visible).map(item =>item.id); + this.queryParams.requireFile = false; + this.download('project/info/export', { + ...this.queryParams + }, `椤圭洰搴�${new Date().getTime()}.xlsx`) } }, mounted() { this.uploadRef = this.$refs.uploadRef; }, created() { - this.isFileDialogVisible = this.fileDialogVisible; } }; diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue index 1a6a439..6abcd02 100644 --- a/src/views/projectEngineering/projectLibrary/index.vue +++ b/src/views/projectEngineering/projectLibrary/index.vue @@ -227,6 +227,10 @@ <template v-if="item.slotName === 'investType'"> <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> </template> + <!-- investType鎻掓Ы --> + <template v-if="item.slotName === 'importanceType'"> + <dict-tag :options="dict.type.sys_key_categories" :value="scope.row.importanceType"/> + </template> <!-- planStartTime --> <template v-if="item.slotName === 'planStartTime'"> {{ scope.row.planStartTime ? scope.row.planStartTime.split('-')[0] + '骞�' : '' }} @@ -366,6 +370,7 @@ }; }, created() { + this.queryParams.importanceType = this.$route.query.importanceType; const projectCategory = this.$route.query.projectCategory; if (!projectCategory || projectCategory === '1') { this.isReserve = true; @@ -394,7 +399,7 @@ }, handleDetail(row) { this.removeStore(); - this.$router.push({path: '/projectEngineering/project/ProjectDetails', query: {projectId: row.id}}); + this.$router.push({path: '/projectEngineering/project/ProjectDetails', query: {projectId: row.id,disabled: 'true' }}); }, // 鏂板椤甸潰 add() { @@ -544,8 +549,8 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎椤圭洰绠$悊鍩虹淇℃伅缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function () { - return delInfo(ids); + this.$modal.confirm('鏄惁纭鍒犻櫎椤圭洰:"' + row.projectName + '"鐨勬暟鎹」锛�').then(function () { + return delProject(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); diff --git a/src/views/projectEngineering/projectLibrary/list.js b/src/views/projectEngineering/projectLibrary/list.js index d187287..0da3a9a 100644 --- a/src/views/projectEngineering/projectLibrary/list.js +++ b/src/views/projectEngineering/projectLibrary/list.js @@ -19,7 +19,7 @@ {id: 'area', label: '琛屾斂鍖哄垝', visible: false}, {id: 'managementCentralizationList', label: '绠$悊褰掑彛', visible: false}, {id: 'projectApprovalType', label: '椤圭洰瀹℃壒绫诲瀷', visible: false}, - {id: 'importanceType', label: '閲嶇偣鍒嗙被', visible: false}, + {id: 'importanceType', label: '閲嶇偣鍒嗙被', slotName: 'importanceType', visible: false}, {id: 'setTime', label: '绔嬮」鏃堕棿', visible: false}, {id: 'planCompleteTime', label: '璁″垝绔e伐鏃堕棿', visible: false}, {id: 'winUnit', label: '涓爣鍗曚綅', visible: false}, @@ -87,90 +87,90 @@ {id: 'otherInvestmentTotal', label: '鍏朵粬鎶曡祫', visible: false} ]; export const currentRest = [ - { id: 'projectName', label: '椤圭洰鍚嶇О', visible: true }, - { id: 'projectOwnerUnit', label: '涓氫富鍗曚綅', visible: true }, - { id: 'projectColorCode', label: '椤圭洰鐮�', slotName: 'projectColorCode', visible: true }, - { id: 'projectCode', label: '椤圭洰浠g爜', visible: true }, - { id: 'projectType', label: '椤圭洰绫诲瀷', slotName: 'projectType', visible: true }, - { id: 'projectPhase', label: '椤圭洰闃舵', visible: true }, - { id: 'totalInvestment', label: '鎬绘姇璧勯', visible: true }, - { id: 'yearInvestAmount', label: '鏈勾璁″垝鎶曡祫', visible: true }, - { id: 'planStartTime', label: '椤圭洰骞翠唤', slotName: 'planStartTime', visible: true }, - { id: 'projectStatus', label: '椤圭洰鐘舵��', slotName: 'projectStatus', visible: true }, - { id: 'investType', label: '鎶曡祫绫诲埆', slotName: 'investType', visible: true }, - { id: 'content', label: '寤鸿鍐呭', visible: false }, - { id: 'fundType', label: '璧勯噾绫诲瀷', visible: false }, - { id: 'projectContactPerson', label: '椤圭洰鑱旂郴浜�', visible: false }, - { id: 'contact', label: '鑱旂郴鏂瑰紡', visible: false }, - { id: 'engineeringIdList', label: '鍏宠仈宸ョ▼', visible: false }, - { id: 'competentDepartmentList', label: '涓荤閮ㄩ棬', visible: false }, - { id: 'area', label: '琛屾斂鍖哄垝', visible: false }, - { id: 'managementCentralizationList', label: '绠$悊褰掑彛', visible: false }, - { id: 'projectApprovalType', label: '椤圭洰瀹℃壒绫诲瀷', visible: false }, - { id: 'importanceType', label: '閲嶇偣鍒嗙被', visible: false }, - { id: 'setTime', label: '绔嬮」鏃堕棿', visible: false }, - { id: 'planCompleteTime', label: '璁″垝绔e伐鏃堕棿', visible: false }, - { id: 'winUnit', label: '涓爣鍗曚綅', visible: false }, - { id: 'winAmount', label: '涓爣閲戦', visible: false }, - { id: 'winTime', label: '涓爣鏃堕棿', visible: false }, - { id: 'year', label: '骞村害鎶曡祫璁″垝', visible: false }, - { id: 'address', label: '椤圭洰鍦板潃', visible: false }, - { id: 'projectBudget', label: '椤圭洰棰勭畻', visible: false }, - { id: 'beCrossRegion', label: '寤鸿鍦扮偣鏄惁璺ㄥ煙', visible: false }, - { id: 'constructionLocation', label: '椤圭洰寤鸿鍦扮偣', visible: false }, - { id: 'detailedAddress', label: '寤鸿璇︾粏鍦板潃', visible: false }, - { id: 'beCompensationProject', label: '鏄惁鏄ˉ鐮侀」鐩�', visible: false }, - { id: 'compensationReason', label: '琛ョ爜鍘熷洜', visible: false }, - { id: 'plannedStartDate', label: '璁″垝寮�宸ユ椂闂�', visible: false }, - { id: 'expectedCompletionDate', label: '鎷熷缓鎴愭椂闂�', visible: false }, - { id: 'nationalIndustryClassification', label: '鍥介檯琛屼笟鍒嗙被', visible: false }, - { id: 'industryClassification', label: '鎵�灞炶涓氬垎绫�', visible: false }, - { id: 'projectNature', label: '椤圭洰寤烘垚鎬ц川', visible: false }, - { id: 'projectAttribute', label: '椤圭洰灞炴��', visible: false }, - { id: 'useEarth', label: '鏄惁浣跨敤鍦熷湴', visible: false }, - { id: 'contentScale', label: '涓昏寤鸿鍐呭鍙婅妯�', visible: false }, - { id: 'code', label: '寤虹骞冲彴浠g爜', visible: false }, - { id: 'projectUnit', label: '椤圭洰鍗曚綅', visible: false }, - { id: 'projectUnitType', label: '椤圭洰鍗曚綅绫诲瀷', visible: false }, - { id: 'registrationType', label: '鐧昏娉ㄥ唽绫诲瀷', visible: false }, - { id: 'holdingSituation', label: '鎺ц偂鎯呭喌', visible: false }, - { id: 'certificateType', label: '璇佺収绫诲瀷', visible: false }, - { id: 'certificateNumber', label: '璇佷欢鍙风爜', visible: false }, - { id: 'registeredAddress', label: '娉ㄥ唽鍦板潃', visible: false }, - { id: 'registeredCapital', label: '娉ㄥ唽璧勯噾', visible: false }, - { id: 'legal_representative', label: '娉曚汉浠h〃', visible: false }, - { id: 'fixedPhone', label: '鍥哄畾鐢佃瘽', visible: false }, - { id: 'legalPersonIdcard', label: '娉曚汉韬唤璇佸彿', visible: false }, - { id: 'projectContactPerson', label: '椤圭洰鑱旂郴浜�', visible: false }, - { id: 'phone', label: '绉诲姩鐢佃瘽', visible: false }, - { id: 'contactIdcard', label: '鑱旂郴浜鸿韩浠借瘉鍙�', visible: false }, - { id: 'wechat', label: '寰俊鍙�', visible: false }, - { id: 'contactAddress', label: '鑱旂郴浜洪�氳鍦板潃', visible: false }, - { id: 'postCode', label: '閭斂缂栫爜', visible: false }, - { id: 'email', label: '鐢靛瓙閭', visible: false }, - { id: 'totalInvestment', label: '椤圭洰鎬绘姇璧勯', visible: false }, - { id: 'principal', label: '椤圭洰鏈噾', visible: false }, - { id: 'governmentInvestmentTotal', label: '鏀垮簻鎶曡祫', visible: false }, - { id: 'centralInvestmentTotal', label: '涓ぎ鎶曡祫', visible: false }, - { id: 'centralBudgetInvestment', label: '涓ぎ棰勭畻鎶曡祫', visible: false }, - { id: 'centralFiscalInvestment', label: '涓ぎ璐㈡斂', visible: false }, - { id: 'centralSpecialBondInvestment', label: '涓ぎ涓撻」鍊哄埜绛归泦鐨勪笓椤瑰缓璁捐祫閲�', visible: false }, - { id: 'centralSpecialFundInvestment', label: '涓ぎ涓撻」寤鸿鍩洪噾', visible: false }, - { id: 'provincialInvestmentTotal', label: '鐪佺骇鎶曡祫', visible: false }, - { id: 'provincialBudgetInvestment', label: '鐪侀绠楀唴鎶曡祫', visible: false }, - { id: 'provincialFiscalInvestment', label: '鐪佽储鏀挎�у缓璁炬姇璧�', visible: false }, - { id: 'provincialSpecialFundInvestment', label: '鐪佷笓椤瑰缓璁捐祫閲�', visible: false }, - { id: 'cityInvestmentTotal', label: '甯�(宸�)鎶曡祫', visible: false }, - { id: 'cityBudgetInvestment', label: '甯�(宸�)棰勭畻鍐呮姇璧�', visible: false }, - { id: 'cityFiscalInvestment', label: '甯�(宸�)璐㈡斂鎬ф姇璧�', visible: false }, - { id: 'citySpecialFundInvestment', label: '甯�(宸�)涓撻」璧勯噾', visible: false }, - { id: 'countyInvestmentTotal', label: '鍘�(甯傘�佸尯)鎶曡祫', visible: false }, - { id: 'countyBudgetInvestment', label: '鍖�(鍘�)棰勭畻鍐呮姇璧�', visible: false }, - { id: 'countyFiscalInvestment', label: '鍖猴紙鍘匡級璐㈡斂鎬у缓璁捐祫閲�', visible: false }, - { id: 'countySpecialFundInvestment', label: '鍖�(鍘�)涓撻」璧勯噾', visible: false }, - { id: 'domesticLoanTotal', label: '鍥藉唴璐锋', visible: false }, - { id: 'bankLoan', label: '閾惰璐锋', visible: false }, - { id: 'foreignInvestmentTotal', label: '澶栧晢鎶曡祫', visible: false }, - { id: 'enterpriseSelfRaisedTotal', label: '浼佷笟鑷', visible: false }, - { id: 'otherInvestmentTotal', label: '鍏朵粬鎶曡祫', visible: false } + {id: 'projectName', label: '椤圭洰鍚嶇О', visible: true}, + {id: 'projectOwnerUnit', label: '涓氫富鍗曚綅', visible: true}, + {id: 'projectColorCode', label: '椤圭洰鐮�', slotName: 'projectColorCode', visible: true}, + {id: 'projectCode', label: '椤圭洰浠g爜', visible: true}, + {id: 'projectType', label: '椤圭洰绫诲瀷', slotName: 'projectType', visible: true}, + {id: 'projectPhase', label: '椤圭洰闃舵', visible: true}, + {id: 'totalInvestment', label: '鎬绘姇璧勯', visible: true}, + {id: 'yearInvestAmount', label: '鏈勾璁″垝鎶曡祫', visible: true}, + {id: 'planStartTime', label: '椤圭洰骞翠唤', slotName: 'planStartTime', visible: true}, + {id: 'projectStatus', label: '椤圭洰鐘舵��', slotName: 'projectStatus', visible: true}, + {id: 'investType', label: '鎶曡祫绫诲埆', slotName: 'investType', visible: true}, + {id: 'content', label: '寤鸿鍐呭', visible: false}, + {id: 'fundType', label: '璧勯噾绫诲瀷', visible: false}, + {id: 'projectContactPerson', label: '椤圭洰鑱旂郴浜�', visible: false}, + {id: 'contact', label: '鑱旂郴鏂瑰紡', visible: false}, + {id: 'engineeringIdList', label: '鍏宠仈宸ョ▼', visible: false}, + {id: 'competentDepartmentList', label: '涓荤閮ㄩ棬', visible: false}, + {id: 'area', label: '琛屾斂鍖哄垝', visible: false}, + {id: 'managementCentralizationList', label: '绠$悊褰掑彛', visible: false}, + {id: 'projectApprovalType', label: '椤圭洰瀹℃壒绫诲瀷', visible: false}, + {id: 'importanceType', label: '閲嶇偣鍒嗙被', slotName: 'importanceType', visible: false}, + {id: 'setTime', label: '绔嬮」鏃堕棿', visible: false}, + {id: 'planCompleteTime', label: '璁″垝绔e伐鏃堕棿', visible: false}, + {id: 'winUnit', label: '涓爣鍗曚綅', visible: false}, + {id: 'winAmount', label: '涓爣閲戦', visible: false}, + {id: 'winTime', label: '涓爣鏃堕棿', visible: false}, + {id: 'year', label: '骞村害鎶曡祫璁″垝', visible: false}, + {id: 'address', label: '椤圭洰鍦板潃', visible: false}, + {id: 'projectBudget', label: '椤圭洰棰勭畻', visible: false}, + {id: 'beCrossRegion', label: '寤鸿鍦扮偣鏄惁璺ㄥ煙', visible: false}, + {id: 'constructionLocation', label: '椤圭洰寤鸿鍦扮偣', visible: false}, + {id: 'detailedAddress', label: '寤鸿璇︾粏鍦板潃', visible: false}, + {id: 'beCompensationProject', label: '鏄惁鏄ˉ鐮侀」鐩�', visible: false}, + {id: 'compensationReason', label: '琛ョ爜鍘熷洜', visible: false}, + {id: 'plannedStartDate', label: '璁″垝寮�宸ユ椂闂�', visible: false}, + {id: 'expectedCompletionDate', label: '鎷熷缓鎴愭椂闂�', visible: false}, + {id: 'nationalIndustryClassification', label: '鍥介檯琛屼笟鍒嗙被', visible: false}, + {id: 'industryClassification', label: '鎵�灞炶涓氬垎绫�', visible: false}, + {id: 'projectNature', label: '椤圭洰寤烘垚鎬ц川', visible: false}, + {id: 'projectAttribute', label: '椤圭洰灞炴��', visible: false}, + {id: 'useEarth', label: '鏄惁浣跨敤鍦熷湴', visible: false}, + {id: 'contentScale', label: '涓昏寤鸿鍐呭鍙婅妯�', visible: false}, + {id: 'code', label: '寤虹骞冲彴浠g爜', visible: false}, + {id: 'projectUnit', label: '椤圭洰鍗曚綅', visible: false}, + {id: 'projectUnitType', label: '椤圭洰鍗曚綅绫诲瀷', visible: false}, + {id: 'registrationType', label: '鐧昏娉ㄥ唽绫诲瀷', visible: false}, + {id: 'holdingSituation', label: '鎺ц偂鎯呭喌', visible: false}, + {id: 'certificateType', label: '璇佺収绫诲瀷', visible: false}, + {id: 'certificateNumber', label: '璇佷欢鍙风爜', visible: false}, + {id: 'registeredAddress', label: '娉ㄥ唽鍦板潃', visible: false}, + {id: 'registeredCapital', label: '娉ㄥ唽璧勯噾', visible: false}, + {id: 'legal_representative', label: '娉曚汉浠h〃', visible: false}, + {id: 'fixedPhone', label: '鍥哄畾鐢佃瘽', visible: false}, + {id: 'legalPersonIdcard', label: '娉曚汉韬唤璇佸彿', visible: false}, + {id: 'projectContactPerson', label: '椤圭洰鑱旂郴浜�', visible: false}, + {id: 'phone', label: '绉诲姩鐢佃瘽', visible: false}, + {id: 'contactIdcard', label: '鑱旂郴浜鸿韩浠借瘉鍙�', visible: false}, + {id: 'wechat', label: '寰俊鍙�', visible: false}, + {id: 'contactAddress', label: '鑱旂郴浜洪�氳鍦板潃', visible: false}, + {id: 'postCode', label: '閭斂缂栫爜', visible: false}, + {id: 'email', label: '鐢靛瓙閭', visible: false}, + {id: 'totalInvestment', label: '椤圭洰鎬绘姇璧勯', visible: false}, + {id: 'principal', label: '椤圭洰鏈噾', visible: false}, + {id: 'governmentInvestmentTotal', label: '鏀垮簻鎶曡祫', visible: false}, + {id: 'centralInvestmentTotal', label: '涓ぎ鎶曡祫', visible: false}, + {id: 'centralBudgetInvestment', label: '涓ぎ棰勭畻鎶曡祫', visible: false}, + {id: 'centralFiscalInvestment', label: '涓ぎ璐㈡斂', visible: false}, + {id: 'centralSpecialBondInvestment', label: '涓ぎ涓撻」鍊哄埜绛归泦鐨勪笓椤瑰缓璁捐祫閲�', visible: false}, + {id: 'centralSpecialFundInvestment', label: '涓ぎ涓撻」寤鸿鍩洪噾', visible: false}, + {id: 'provincialInvestmentTotal', label: '鐪佺骇鎶曡祫', visible: false}, + {id: 'provincialBudgetInvestment', label: '鐪侀绠楀唴鎶曡祫', visible: false}, + {id: 'provincialFiscalInvestment', label: '鐪佽储鏀挎�у缓璁炬姇璧�', visible: false}, + {id: 'provincialSpecialFundInvestment', label: '鐪佷笓椤瑰缓璁捐祫閲�', visible: false}, + {id: 'cityInvestmentTotal', label: '甯�(宸�)鎶曡祫', visible: false}, + {id: 'cityBudgetInvestment', label: '甯�(宸�)棰勭畻鍐呮姇璧�', visible: false}, + {id: 'cityFiscalInvestment', label: '甯�(宸�)璐㈡斂鎬ф姇璧�', visible: false}, + {id: 'citySpecialFundInvestment', label: '甯�(宸�)涓撻」璧勯噾', visible: false}, + {id: 'countyInvestmentTotal', label: '鍘�(甯傘�佸尯)鎶曡祫', visible: false}, + {id: 'countyBudgetInvestment', label: '鍖�(鍘�)棰勭畻鍐呮姇璧�', visible: false}, + {id: 'countyFiscalInvestment', label: '鍖猴紙鍘匡級璐㈡斂鎬у缓璁捐祫閲�', visible: false}, + {id: 'countySpecialFundInvestment', label: '鍖�(鍘�)涓撻」璧勯噾', visible: false}, + {id: 'domesticLoanTotal', label: '鍥藉唴璐锋', visible: false}, + {id: 'bankLoan', label: '閾惰璐锋', visible: false}, + {id: 'foreignInvestmentTotal', label: '澶栧晢鎶曡祫', visible: false}, + {id: 'enterpriseSelfRaisedTotal', label: '浼佷笟鑷', visible: false}, + {id: 'otherInvestmentTotal', label: '鍏朵粬鎶曡祫', visible: false} ]; diff --git a/src/views/projectEngineering/projectLibrary/projectDetails.vue b/src/views/projectEngineering/projectLibrary/projectDetails.vue index 593af4b..6494775 100644 --- a/src/views/projectEngineering/projectLibrary/projectDetails.vue +++ b/src/views/projectEngineering/projectLibrary/projectDetails.vue @@ -101,6 +101,11 @@ this.$refs.childRef.reset(); }, }, + mounted() { + if(this.$route.query.disabled){ + this.disabled = true + } + } }; </script> diff --git a/src/views/projectManage/plan/index.vue b/src/views/projectManage/plan/index.vue index ac6e35f..b4b6913 100644 --- a/src/views/projectManage/plan/index.vue +++ b/src/views/projectManage/plan/index.vue @@ -301,7 +301,6 @@ } }) }) - } } }; diff --git a/src/views/projectManage/plan/planInfo.vue b/src/views/projectManage/plan/planInfo.vue index bf620a5..47f9ae0 100644 --- a/src/views/projectManage/plan/planInfo.vue +++ b/src/views/projectManage/plan/planInfo.vue @@ -22,12 +22,17 @@ </el-table-column> <el-table-column prop="startTime" label="璁″垝寮�濮嬫椂闂�" width="160" align="center"> <template #default="scope"> - <el-date-picker v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" /> + <el-date-picker v-model="scope.row.startTime" + type="date" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 130px" + value-format="yyyy-MM-dd HH:mm:ss"/> </template> </el-table-column> <el-table-column prop="endTime" label="璁″垝瀹屾垚鏃堕棿" width="160" align="center"> <template #default="scope"> - <el-date-picker v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" /> + <el-date-picker v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" value-format="yyyy-MM-dd HH:mm:ss"/> </template> </el-table-column> <el-table-column :label="planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " width="100" align="center"> @@ -45,7 +50,7 @@ </el-table> <div style="display: flex; align-items: center;"> <h1 style="margin: 0;"> - 鎴鏈鍒掕繘搴﹀畬鎴愭姇璧勶紙涓囧厓锛夛細 + 璁″垝鎶曡祫閲戦锛堜竾鍏冿級锛� </h1> <el-input placeholder="璇疯緭鍏ユ姇璧勯噾棰�" @@ -72,7 +77,7 @@ import { getPlanInfoData, addPlanInfo, savePlanInfo } from "@/api/projectPlan/index"; export default { - name: "PlanInfo", + name: "planInfo", data() { return { loading: true, @@ -139,6 +144,7 @@ } addPlanInfo(this.addData).then(response => { this.handlePlanRecord() + this.$message.success('涓婃姤鎴愬姛'); }) }, // 閲嶇疆褰撳墠琛屾暟鎹� diff --git a/src/views/projectManage/plan/planInfoCheck.vue b/src/views/projectManage/plan/planInfoCheck.vue index 0a3ed72..60dc8fd 100644 --- a/src/views/projectManage/plan/planInfoCheck.vue +++ b/src/views/projectManage/plan/planInfoCheck.vue @@ -7,7 +7,7 @@ <el-card shadow="hover"> <el-row :gutter="20"> <el-col :span="24" class="mb-4"> - <el-button type="primary" size="small" @click="handlePlanRecord" style="float: right; margin-bottom: 10px;">杩斿洖</el-button> + <el-button type="primary" size="small" @click="handlePlanRecord" style="float: right; margin-bottom: 10px; margin-left: 10px">杩斿洖</el-button> <!--椤圭洰璁″垝椤�--> <el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px"> <el-table-column prop="index" label="搴忓彿" width="50" align="center"> @@ -112,13 +112,11 @@ <el-input type="textarea" v-model="scope.row.manageApprovalReply" placeholder="璇疯緭鍏�" rows="3" /> </template> </el-table-column> - <el-table-column fixed="right" label="鎿嶄綔" align="center"> - <template #default="scope" v-if="!projectInfoData.managerFlag"> - <el-button size="small" @click="handleReply(scope.$index)">鍥炲</el-button> - <el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button> - </template> - <template v-if="projectInfoData.managerFlag" #default="scope"> - <el-button size="small" @click="handleSave(scope.$index)">淇濆瓨</el-button> + <el-table-column fixed="right" label="鎿嶄綔" align="center" width="200"> + <template #default="scope"> + <el-button v-show="!projectInfoData.managerFlag" size="small" @click="handleReply(scope.$index)">鍥炲</el-button> + <el-button v-show="!projectInfoData.managerFlag" size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button> + <el-button v-show="projectInfoData.managerFlag" size="small" @click="handleSave(scope.$index)">淇濆瓨</el-button> </template> </el-table-column> </el-table> @@ -163,7 +161,7 @@ import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog, replyExamine, saveExamine } from "@/api/projectPlan/index"; export default { - name: "PlanInfoCheck", + name: "planInfoCheck", data() { return { loading: true, @@ -258,7 +256,7 @@ }, /** 杩斿洖椤圭洰璁″垝璁板綍 */ handlePlanRecord() { - this.$router.push({ + this.$router.replace({ path: '/projectManage/planRecord', query: { data: this.projectInfoData diff --git a/src/views/projectManage/plan/planRecord.vue b/src/views/projectManage/plan/planRecord.vue index dc9e845..ed81999 100644 --- a/src/views/projectManage/plan/planRecord.vue +++ b/src/views/projectManage/plan/planRecord.vue @@ -41,7 +41,7 @@ <el-col :span="24" class="mb-4" style="margin-top: 20px"> <div style="margin-bottom: 10px"> <span style="font-size: 20px; font-weight: bold;">瀛e害璁″垝</span> - <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan" v-show="!projectInfoData.managerFlag">鏌ョ湅</el-button> + <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan" v-show="!projectInfoData.managerFlag">鏂板</el-button> </div> <el-table :data="seasonRecords" border stripe style="width: 100%; margin-bottom: 20px"> <!-- 琛ㄥご --> @@ -220,7 +220,6 @@ }, // 鏌ョ湅椤圭洰璁″垝椤� handleCheckPlanInfo(row) { - console.log(this.projectInfoData); this.$router.push({ path: '/projectManage/planInfoCheck', query: { diff --git a/src/views/projectManage/progress/index.vue b/src/views/projectManage/progress/index.vue index 514064a..1e85d12 100644 --- a/src/views/projectManage/progress/index.vue +++ b/src/views/projectManage/progress/index.vue @@ -189,7 +189,7 @@ </template> <script> -import { getList, getRecord, delRecord, addRecord, updateRecord } from "@/api/projectPlan/index"; +import { getList, getManagerFlag } from "@/api/projectPlan/index"; export default { name: "Index", @@ -280,46 +280,7 @@ this.open = true; this.title = "娣诲姞椤圭洰璁″垝璁板綍"; }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getRecord(id).then(response => { - this.form = response.data; - this.open = true; - this.title = "淇敼椤圭洰璁″垝璁板綍"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateRecord(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - addRecord(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎椤圭洰璁″垝璁板綍缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { - return delRecord(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { this.download('plan/record/export', { @@ -328,11 +289,16 @@ }, /** 鏌ョ湅椤圭洰璁″垝璁板綍 */ handlePlanRecord(row) { - this.$router.push({ - path: '/projectManage/progressRecord', - query: { - data: JSON.stringify(row) - } + // 鑾峰緱涓荤鏍囧織 + getManagerFlag(row.id).then(res => { + this.managerFlag = res.data; + row.managerFlag = this.managerFlag; + this.$router.push({ + path: '/projectManage/progressRecord', + query: { + data: row + } + }) }) } } diff --git a/src/views/projectManage/progress/progressRecord.vue b/src/views/projectManage/progress/progressRecord.vue index 566a7e9..c07558c 100644 --- a/src/views/projectManage/progress/progressRecord.vue +++ b/src/views/projectManage/progress/progressRecord.vue @@ -31,8 +31,9 @@ <el-table-column prop="endTime" label="璁″垝瀹屾垚鏃堕棿" align="center" /> <el-table-column fixed="right" label="鎿嶄綔" align="center"> <template slot-scope="scope"> - <el-button type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">杩涘害涓婃姤</el-button> - <el-button type="primary" size="small" @click="handleCheckProgress(scope.row)">鏌ョ湅</el-button> + <el-button v-if="!projectInfoData.managerFlag" type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">杩涘害涓婃姤</el-button> + <el-button v-if="!projectInfoData.managerFlag" type="primary" size="small" @click="handleCheckProgress(scope.row)">鏌ョ湅</el-button> + <el-button v-if="projectInfoData.managerFlag" type="primary" size="small" @click="handleCheckProgress(scope.row)">瀹℃牳</el-button> </template> </el-table-column> </el-table> @@ -59,8 +60,9 @@ <el-table-column prop="endTime" label="璁″垝瀹屾垚鏃堕棿" align="center" /> <el-table-column fixed="right" label="鎿嶄綔" align="center"> <template slot-scope="scope"> - <el-button type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">杩涘害涓婃姤</el-button> - <el-button type="primary" size="small" @click="handleCheckProgress(scope.row)">鏌ョ湅</el-button> + <el-button v-if="!projectInfoData.managerFlag" type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">杩涘害涓婃姤</el-button> + <el-button v-if="!projectInfoData.managerFlag" type="primary" size="small" @click="handleCheckProgress(scope.row)">鏌ョ湅</el-button> + <el-button v-if="projectInfoData.managerFlag" type="primary" size="small" @click="handleCheckProgress(scope.row)">瀹℃牳</el-button> </template> </el-table-column> </el-table> @@ -87,8 +89,9 @@ <el-table-column prop="endTime" label="璁″垝瀹屾垚鏃堕棿" align="center" /> <el-table-column fixed="right" label="鎿嶄綔" align="center"> <template slot-scope="scope"> - <el-button type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">杩涘害涓婃姤</el-button> - <el-button type="primary" size="small" @click="handleCheckProgress(scope.row)">鏌ョ湅</el-button> + <el-button v-if="!projectInfoData.managerFlag" type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">杩涘害涓婃姤</el-button> + <el-button v-if="!projectInfoData.managerFlag" type="primary" size="small" @click="handleCheckProgress(scope.row)">鏌ョ湅</el-button> + <el-button v-if="projectInfoData.managerFlag" type="primary" size="small" @click="handleCheckProgress(scope.row)">瀹℃牳</el-button> </template> </el-table-column> </el-table> @@ -130,42 +133,57 @@ <el-date-picker v-model="progressReportData.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" readonly/> </el-form-item> <el-form-item label="瀹為檯瀹屾垚鏃堕棿锛�" :label-width="formLabelWidth"> - <el-date-picker v-model="progressReportData.actualStartTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" :readonly="checkFlag"/> + <el-date-picker v-model="progressReportData.actualStartTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" :readonly="checkFlag && projectInfoData.managerFlag"/> 鑷� - <el-date-picker v-model="progressReportData.actualEndTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" :readonly="checkFlag"/> + <el-date-picker v-model="progressReportData.actualEndTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" :readonly="checkFlag && projectInfoData.managerFlag"/> </el-form-item> <el-form-item label="杩涘害鎯呭喌锛�" :label-width="formLabelWidth"> - <el-input type="textarea" v-model="progressReportData.progressStatus" placeholder="璇疯緭鍏�" rows="3" :readonly="checkFlag" /> + <el-input type="textarea" v-model="progressReportData.progressStatus" placeholder="璇疯緭鍏�" rows="3" :readonly="checkFlag && projectInfoData.managerFlag" /> </el-form-item> - <el-form-item prop="fileList" label="宸ョ▼杩涘害闄勪欢锛�" :label-width="formLabelWidth"> + <el-form-item label="宸ョ▼杩涘害闄勪欢锛�" :label-width="formLabelWidth"> <file-upload v-model="progressReportData.fileList" :fileType="accept" :isShowTip="false"/> </el-form-item> <el-form-item label="鎴鏈姤鍛婂畬鎴愭姇璧勶細" :label-width="formLabelWidth"> - <el-input v-model="progressReportData.actualInvest" type="number" :readonly="checkFlag" /> + <el-input v-model="progressReportData.actualInvest" type="number" :readonly="checkFlag && projectInfoData.managerFlag" /> </el-form-item> <el-form-item label="涓婄骇瀹℃牳锛�" :label-width="formLabelWidth"> - <el-input :value="progressReportData.departmentExamine === 0 ? '鍚屾剰' : progressReportData.departmentExamine === 1 ? '椹冲洖' : '鏈鏍�'" readonly /> + <el-input v-if="!projectInfoData.managerFlag" :value="progressReportData.departmentExamine === 0 ? '鍚屾剰' : progressReportData.departmentExamine === 1 ? '椹冲洖' : '鏈鏍�'" readonly /> + <el-select v-if="projectInfoData.managerFlag" v-model="progressReportData.departmentExamine" placeholder="璇烽�夋嫨" size="small" clearable> + <el-option label="鍚屾剰" :value="0"></el-option> + <el-option label="椹冲洖" :value="1"></el-option> + <el-option label="璇烽�夋嫨" :value="null"></el-option> + </el-select> </el-form-item> <el-form-item label="涓婄骇鎵瑰锛�" :label-width="formLabelWidth"> - <el-input v-model="progressReportData.departmentApproval" readonly /> + <el-input v-if="!projectInfoData.managerFlag" v-model="progressReportData.departmentApproval" readonly /> + <el-input v-if="projectInfoData.managerFlag" v-model="progressReportData.departmentApproval" /> </el-form-item> <el-form-item label="涓婄骇鎵瑰鍥炲锛�" :label-width="formLabelWidth"> - <el-input type="textarea" v-model="progressReportData.departmentApprovalReply" placeholder="璇疯緭鍏�" rows="3" :readonly="checkFlag" /> + <el-input v-if="!projectInfoData.managerFlag" type="textarea" v-model="progressReportData.departmentApprovalReply" placeholder="璇疯緭鍏�" rows="3" /> + <el-input v-if="projectInfoData.managerFlag" type="textarea" v-model="progressReportData.departmentApprovalReply" placeholder="璇疯緭鍏�" rows="3" :readonly="checkFlag" /> </el-form-item> <el-form-item label="涓荤閮ㄩ棬瀹℃牳锛�" :label-width="formLabelWidth"> - <el-input :value="progressReportData.manageExamine === 0 ? '鍚屾剰' : progressReportData.manageExamine === 1 ? '椹冲洖' : '鏈鏍�'" readonly /> + <el-input v-if="!projectInfoData.managerFlag" :value="progressReportData.manageExamine === 0 ? '鍚屾剰' : progressReportData.manageExamine === 1 ? '椹冲洖' : '鏈鏍�'" readonly /> + <el-select v-if="projectInfoData.managerFlag" v-model="progressReportData.manageExamine" placeholder="璇烽�夋嫨" size="small" clearable> + <el-option label="璇烽�夋嫨" :value="null"></el-option> + <el-option label="鍚屾剰" :value="0"></el-option> + <el-option label="椹冲洖" :value="1"></el-option> + </el-select> </el-form-item> <el-form-item label="涓荤閮ㄩ棬瀹℃牳鎵瑰锛�" :label-width="formLabelWidth"> - <el-input v-model="progressReportData.manageApproval" readonly /> + <el-input v-if="!projectInfoData.managerFlag" v-model="progressReportData.manageApproval" readonly /> + <el-input v-if="projectInfoData.managerFlag" v-model="progressReportData.manageApproval" /> </el-form-item> <el-form-item label="涓荤閮ㄩ棬鎵瑰鍥炲锛�" :label-width="formLabelWidth"> - <el-input type="textarea" v-model="progressReportData.manageApprovalReply" placeholder="璇疯緭鍏�" rows="3" :readonly="checkFlag" /> + <el-input v-if="!projectInfoData.managerFlag" type="textarea" v-model="progressReportData.manageApprovalReply" placeholder="璇疯緭鍏�" rows="3" /> + <el-input v-if="projectInfoData.managerFlag" type="textarea" v-model="progressReportData.manageApprovalReply" placeholder="璇疯緭鍏�" rows="3" :readonly="checkFlag" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="handleRecordSubmit" v-if="!checkFlag">涓� 鎶�</el-button> + <el-button type="primary" @click="handleRecordSubmit" v-if="!checkFlag && !projectInfoData.managerFlag">涓� 鎶�</el-button> + <el-button type="primary" @click="handleExamine" v-if="projectInfoData.managerFlag">瀹� 鎵�</el-button> <el-button @click="handleCancel">鍙� 娑�</el-button> </div> </el-dialog> @@ -176,11 +194,11 @@ </template> <script> -import { getProgressInfoList, getProgressReport, recordSubmit, saveProjectProgressFileLists, getProjectProgressForm } from "@/api/projectManage/progress/index"; +import { getProgressInfoList, getProgressReport, recordSubmit, saveProjectProgressFileLists, getProjectProgressForm, examine } from "@/api/projectManage/progress/index"; import progressRecord from "./progressRecord.vue"; export default { - name: "ProgressRecord", + name: "progressRecord", computed: { progressRecord() { return progressRecord @@ -215,16 +233,14 @@ }, methods: { search() { - this.getProjectInfoData() this.getProjectProgressForm(this.projectInfoData.id); + this.getProgressInfoList(this.projectInfoData.id); }, // 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏 getProjectInfoData() { // 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁 - if (this.$route.query.data) { - this.projectInfoData = JSON.parse(this.$route.query.data); - this.getProgressInfoList(this.projectInfoData.id); - } + this.projectInfoData = this.$route.query.data; + this.search(); }, getProjectProgressForm(id) { getProjectProgressForm(id).then(res => { @@ -254,6 +270,14 @@ this.search(); }) }, + // 瀹℃壒 + handleExamine() { + examine(this.progressReportData).then(res => { + this.dialogFormVisible = false; + this.$message.success('瀹℃壒鎴愬姛'); + this.search(); + }) + }, // 鏌ョ湅杩涘害 handleCheckProgress(row) { this.dialogFormVisible = true; @@ -278,7 +302,7 @@ } }, created() { - this.search(); + this.getProjectInfoData() }, }; </script> -- Gitblit v1.8.0