From 17ce03611f5a845a7a867f96965a587fb63ae71a Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期二, 26 十一月 2024 16:44:40 +0800 Subject: [PATCH] 查看计划项页面 --- src/views/projectPlan/planRecord.vue | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/views/projectPlan/planRecord.vue b/src/views/projectPlan/planRecord.vue index a3ddfbe..3f4c1da 100644 --- a/src/views/projectPlan/planRecord.vue +++ b/src/views/projectPlan/planRecord.vue @@ -25,7 +25,8 @@ <el-table-column fixed="right" label="鎿嶄綔" align="center"> <template slot-scope="scope"> <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button> - <el-button type="danger" size="small">鍒犻櫎</el-button> + <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button> + <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button> </template> </el-table-column> </el-table> @@ -49,7 +50,8 @@ <el-table-column fixed="right" label="鎿嶄綔" align="center"> <template slot-scope="scope"> <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button> - <el-button type="danger" size="small">鍒犻櫎</el-button> + <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button> + <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button> </template> </el-table-column> </el-table> @@ -73,7 +75,8 @@ <el-table-column fixed="right" label="鎿嶄綔" align="center"> <template slot-scope="scope"> <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button> - <el-button type="danger" size="small">鍒犻櫎</el-button> + <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button> + <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button> </template> </el-table-column> </el-table> @@ -86,7 +89,7 @@ </template> <script> -import {addRecord, getPlanRecordList} from "@/api/projectPlan/index"; +import {addRecord, getPlanRecordList, deletePlanRecord} from "@/api/projectPlan/index"; export default { name: "planRecord", @@ -179,7 +182,7 @@ this.search(); }); }, - /** 鏌ョ湅椤圭洰璁″垝椤� */ + /** 淇敼椤圭洰璁″垝椤� */ handlePlanInfo(row) { this.$router.push({ path: '/projectPlan/planInfo', @@ -188,8 +191,22 @@ planInfoData: this.planInfoData } }) + }, + // 鍒犻櫎椤圭洰璁″垝璁板綍 + handleDeletePlanRecord(id) { + deletePlanRecord(id).then(res => { + this.search(); + }); + }, + // 鏌ョ湅椤圭洰璁″垝椤� + handleCheckPlanInfo(row) { + this.$router.push({ + path: '/projectPlan/planInfoCheck', + query: { + data: JSON.stringify(row), + } + }) } - }, created() { this.getPlanInfoData(); -- Gitblit v1.8.0