From 6ae0fcef149ddbe614746023a58a3885b3ac4bde Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 25 三月 2025 11:31:04 +0800
Subject: [PATCH] Merge branch 'dev'

---
 src/views/projectManage/plan/planInfo.vue |   69 ++++++++++++++++++++++++----------
 1 files changed, 49 insertions(+), 20 deletions(-)

diff --git a/src/views/projectManage/plan/planInfo.vue b/src/views/projectManage/plan/planInfo.vue
index bf620a5..789eaf3 100644
--- a/src/views/projectManage/plan/planInfo.vue
+++ b/src/views/projectManage/plan/planInfo.vue
@@ -7,8 +7,13 @@
         <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; margin-left: 10px">杩斿洖</el-button>
-              <el-button type="primary" size="small" @click="handleAdd" style="float: right; margin-bottom: 10px">鏂板</el-button>
+              <el-button
+                type="text"
+                size="medium"
+                icon="el-icon-plus"
+                @click="handleAdd"
+                style="float: right;
+                margin-bottom: 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">
                   <template #default="scope">
@@ -22,12 +27,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="medium"
+                                    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="medium" 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">
@@ -37,15 +47,27 @@
                 </el-table-column>
                 <el-table-column fixed="right" label="鎿嶄綔" align="center">
                   <template #default="scope">
-                    <el-button size="small" @click="handleSave(scope.$index)">淇濆瓨</el-button>
-                    <el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button>
-                    <el-button size="small" type="danger" @click="handleDelete(scope.$index)">鍒犻櫎</el-button>
+                    <el-button
+                      size="medium"
+                      type="text"
+                      icon="el-icon-check"
+                      @click="handleSave(scope.$index)">淇濆瓨</el-button>
+                    <el-button
+                      size="medium"
+                      type="text"
+                      icon="el-icon-refresh-left"
+                      @click="handleReset(scope.$index)">閲嶇疆</el-button>
+                    <el-button
+                      size="medium"
+                      type="text"
+                      icon="el-icon-delete"
+                      @click="handleDelete(scope.$index)">鍒犻櫎</el-button>
                   </template>
                 </el-table-column>
               </el-table>
               <div style="display: flex; align-items: center;">
                 <h1 style="margin: 0;">
-                  鎴鏈鍒掕繘搴﹀畬鎴愭姇璧勶紙涓囧厓锛夛細
+                  璁″垝鎶曡祫閲戦锛堜竾鍏冿級锛�
                 </h1>
                 <el-input
                   placeholder="璇疯緭鍏ユ姇璧勯噾棰�"
@@ -57,8 +79,16 @@
                 </el-input>
               </div>
               <div style="display: flex; justify-content: center; align-items: center; margin-top: 20px">
-                <el-button type="primary" size="small" @click="handleSubmit">涓婃姤</el-button>
-                <el-button type="primary" size="small" @click="handleResetAll">閲嶇疆</el-button>
+                <el-button
+                  type="text"
+                  size="medium"
+                  icon="el-icon-upload2"
+                  @click="handleSubmit">涓婃姤</el-button>
+                <el-button
+                  type="text"
+                  size="medium"
+                  icon="el-icon-refresh-left"
+                  @click="handleResetAll">閲嶇疆</el-button>
               </div>
             </el-col>
           </el-row>
@@ -72,7 +102,7 @@
 import { getPlanInfoData, addPlanInfo, savePlanInfo } from "@/api/projectPlan/index";
 
 export default {
-  name: "PlanInfo",
+  name: "planInfo",
   data() {
     return {
       loading: true,
@@ -96,7 +126,9 @@
       }
     }
   },
-
+  created() {
+    this.getProjectInfoData();
+  },
   methods: {
     // 椤甸潰鍔犺浇
     search() {
@@ -105,8 +137,8 @@
     // 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏
     getProjectInfoData() {
       // 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
-      this.projectInfoData = this.$route.query.projectInfoData
-      this.planInfoData = this.$route.query.data
+      this.projectInfoData = JSON.parse(this.$route.query.projectInfoData)
+      this.planInfoData = JSON.parse(this.$route.query.data)
       this.search();
     },
     // 鑾峰彇椤圭洰璁″垝椤�
@@ -139,6 +171,7 @@
       }
       addPlanInfo(this.addData).then(response => {
         this.handlePlanRecord()
+        this.$message.success('涓婃姤鎴愬姛');
       })
     },
     // 閲嶇疆褰撳墠琛屾暟鎹�
@@ -160,8 +193,7 @@
     // 淇濆瓨褰撳墠琛屾暟鎹�
     handleSave(index) {
       this.tableData[index].projectPlanRecordId = this.projectInfoData.id;
-      savePlanInfo(this.tableData[index]).then(response => {
-        this.search();
+      savePlanInfo(this.tableData[index], this.planInfoData.id).then(response => {
         this.$message.success('淇濆瓨鎴愬姛');
       });
     },
@@ -170,13 +202,10 @@
       this.$router.push({
         path: '/projectManage/planRecord',
         query: {
-          data: this.projectInfoData
+          data: JSON.stringify(this.projectInfoData)
         }
       })
     }
-  },
-  created() {
-    this.getProjectInfoData();
   },
 };
 </script>

--
Gitblit v1.8.0