From eb7828a7adabe105449b6ef0d0188065b6218151 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 26 十一月 2024 20:54:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/projectPlan/planRecord.vue |   47 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/src/views/projectPlan/planRecord.vue b/src/views/projectPlan/planRecord.vue
index a3ddfbe..9ec2764 100644
--- a/src/views/projectPlan/planRecord.vue
+++ b/src/views/projectPlan/planRecord.vue
@@ -7,8 +7,10 @@
         <el-card shadow="hover">
           <el-row :gutter="20">
             <el-col :span="24" class="mb-4">
-              <span>鏈堝害璁″垝</span>
-              <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan">鏂板</el-button>
+              <div style="margin-bottom: 10px">
+                <span style="font-size: 20px; font-weight: bold;">鏈堝害璁″垝</span>
+                <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan">鏂板</el-button>
+              </div>
               <el-table :data="monthRecords" style="width: 100%">
                 <!-- 琛ㄥご -->
                 <el-table-column prop="id" label="搴忓彿" align="center"></el-table-column>
@@ -25,14 +27,17 @@
                 <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>
             </el-col>
             <el-col :span="24" class="mb-4" style="margin-top: 20px">
-              <span>瀛e害璁″垝</span>
-              <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan">鏂板</el-button>
+              <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">鏂板</el-button>
+              </div>
               <el-table  :data="seasonRecords" style="width: 100%">
                 <!-- 琛ㄥご -->
                 <el-table-column prop="id" label="搴忓彿" align="center"></el-table-column>
@@ -49,14 +54,17 @@
                 <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>
             </el-col>
             <el-col :span="24" class="mb-4" style="margin-top: 20px">
-              <span>骞村害璁″垝</span>
-              <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan">鏂板</el-button>
+              <div style="margin-bottom: 10px">
+                <span style="font-size: 20px; font-weight: bold;">骞村害璁″垝</span>
+                <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan">鏂板</el-button>
+              </div>
               <el-table  :data="yearRecords" style="width: 100%">
                 <!-- 琛ㄥご -->
                 <el-table-column prop="id" label="搴忓彿" align="center"></el-table-column>
@@ -73,7 +81,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 +95,7 @@
 </template>
 
 <script>
-import {addRecord, getPlanRecordList} from "@/api/projectPlan/index";
+import {addRecord, getPlanRecordList, deletePlanRecord} from "@/api/projectPlan/index";
 
 export default {
   name: "planRecord",
@@ -179,7 +188,7 @@
         this.search();
       });
     },
-    /** 鏌ョ湅椤圭洰璁″垝椤� */
+    /** 淇敼椤圭洰璁″垝椤� */
     handlePlanInfo(row) {
       this.$router.push({
         path: '/projectPlan/planInfo',
@@ -188,8 +197,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