From bd63da40b4f5a5130bbb73fc654e7aaa25cacce6 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期二, 10 十二月 2024 18:11:15 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/projectManage/plan/planInfo.vue | 47 ++++++++++++++++++++++++++++------------------- 1 files changed, 28 insertions(+), 19 deletions(-) diff --git a/src/views/projectManage/plan/planInfo.vue b/src/views/projectManage/plan/planInfo.vue index 9608965..310c175 100644 --- a/src/views/projectManage/plan/planInfo.vue +++ b/src/views/projectManage/plan/planInfo.vue @@ -1,8 +1,8 @@ <template> <div class="app-container"> <el-container> - <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">椤圭洰鍚嶇О锛歿{ planRecordData.projectName }} {{ planRecordData.planTimeFlag === 0 ? '(鏈堝害璁″垝)' : planRecordData.planTimeFlag === 1 ? '(瀛e害璁″垝)' : '(骞村害璁″垝)' }}</el-header> - <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">椤圭洰浠g爜锛歿{ planRecordData.projectCode }}</h4> + <el-header class="header-title">椤圭洰鍚嶇О锛歿{ planInfoData.projectName }} ({{planInfoData.planTime}} {{ planInfoData.planTimeFlag === 0 ? '鏈堝害璁″垝' : planInfoData.planTimeFlag === 1 ? '瀛e害璁″垝' : '骞村害璁″垝' }})</el-header> + <h4 style="text-align: center">椤圭洰浠g爜锛歿{ planInfoData.projectCode }}</h4> <el-main> <el-card shadow="hover"> <el-row :gutter="20"> @@ -22,17 +22,22 @@ </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="planRecordData.planTimeFlag === 0 ? '鏈堝害' : planRecordData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " width="100" align="center"> + <el-table-column :label="planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " width="100" align="center"> <template #default="scope"> - <span>{{ planRecordData.planTime }}{{ planRecordData.planTimeFlag === 0 ? '鏈堝害' : planRecordData.planTimeFlag === 1 ? '瀛e害' : '骞村害' }}</span> + <span>{{ planInfoData.planTime }}{{ planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' }}</span> </template> </el-table-column> <el-table-column fixed="right" label="鎿嶄綔" align="center"> @@ -45,7 +50,7 @@ </el-table> <div style="display: flex; align-items: center;"> <h1 style="margin: 0;"> - 鎴鏈鍒掕繘搴﹀畬鎴愭姇璧勶紙涓囧厓锛夛細 + 璁″垝鎶曡祫閲戦锛堜竾鍏冿級锛� </h1> <el-input placeholder="璇疯緭鍏ユ姇璧勯噾棰�" @@ -77,7 +82,7 @@ return { loading: true, // 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁 - planRecordData: {}, + projectInfoData: {}, planInfoData: {}, tableData: [ { @@ -96,17 +101,24 @@ } } }, - + created() { + this.getProjectInfoData(); + }, methods: { // 椤甸潰鍔犺浇 search() { this.getPlanInfoData(this.planInfoData.id); }, // 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏 - getPlanRecordData() { + getProjectInfoData() { // 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁 - this.planRecordData = this.$route.query.planRecordData - this.planInfoData = this.$route.query.data + this.projectInfoData = this.$route.query.projectInfoData + this.planInfoData.id = this.$route.query.id; + this.planInfoData.projectName = this.$route.query.projectName; + this.planInfoData.projectCode = this.$route.query.projectCode; + this.planInfoData.planTime = this.$route.query.planTime; + this.planInfoData.planTimeFlag = this.$route.query.planTimeFlag; + this.planInfoData.managerFlag = this.$route.query.managerFlag; this.search(); }, // 鑾峰彇椤圭洰璁″垝椤� @@ -139,6 +151,7 @@ } addPlanInfo(this.addData).then(response => { this.handlePlanRecord() + this.$message.success('涓婃姤鎴愬姛'); }) }, // 閲嶇疆褰撳墠琛屾暟鎹� @@ -159,9 +172,8 @@ }, // 淇濆瓨褰撳墠琛屾暟鎹� handleSave(index) { - this.tableData[index].projectPlanRecordId = this.planRecordData.id; - savePlanInfo(this.tableData[index]).then(response => { - this.search(); + this.tableData[index].projectPlanRecordId = this.projectInfoData.id; + savePlanInfo(this.tableData[index], this.planInfoData.id).then(response => { this.$message.success('淇濆瓨鎴愬姛'); }); }, @@ -170,13 +182,10 @@ this.$router.push({ path: '/projectManage/planRecord', query: { - data: this.planRecordData + data: this.projectInfoData } }) } - }, - created() { - this.getPlanRecordData(); }, }; </script> -- Gitblit v1.8.0