From 0417817fd8c7b5b79efd721da77f70217cda0201 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 28 十一月 2024 01:33:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/projectManage/plan/planInfo.vue |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/views/projectManage/plan/planInfo.vue b/src/views/projectManage/plan/planInfo.vue
index 3fd438b..9608965 100644
--- a/src/views/projectManage/plan/planInfo.vue
+++ b/src/views/projectManage/plan/planInfo.vue
@@ -7,6 +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; margin-left: 10px">杩斿洖</el-button>
               <el-button type="primary" size="small" @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">
@@ -99,15 +100,13 @@
   methods: {
     // 椤甸潰鍔犺浇
     search() {
-      this.getPlanInfoData(this.planRecordData.id);
+      this.getPlanInfoData(this.planInfoData.id);
     },
     // 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏
     getPlanRecordData() {
       // 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
-      if (this.$route.query.data) {
-        this.planRecordData = JSON.parse(this.$route.query.data)
-      }
-      this.planInfoData = this.$route.query.planInfoData
+      this.planRecordData = this.$route.query.planRecordData
+      this.planInfoData = this.$route.query.data
       this.search();
     },
     // 鑾峰彇椤圭洰璁″垝椤�
@@ -134,12 +133,12 @@
       // 閬嶅巻tableData锛岃幏寰楀�间笉涓虹┖瀛楃涓茬殑琛�
       const validList = this.tableData.filter(item => item.title !== '' || item.startTime !== '' || item.endTime !== '');
       this.addData = {
-        projectPlanRecordId: this.planRecordData.id,
+        projectPlanRecordId: this.planInfoData.id,
         actualInvest: this.actualInvest,
         addList: validList
       }
       addPlanInfo(this.addData).then(response => {
-        this.handlePlanRecord(this.planInfoData)
+        this.handlePlanRecord()
       })
     },
     // 閲嶇疆褰撳墠琛屾暟鎹�
@@ -167,11 +166,11 @@
       });
     },
     /** 杩斿洖椤圭洰璁″垝璁板綍 */
-    handlePlanRecord(planInfoData) {
+    handlePlanRecord() {
       this.$router.push({
-        name: '/projectManage/planRecord',
+        path: '/projectManage/planRecord',
         query: {
-          data: JSON.stringify(planInfoData)
+          data: this.planRecordData
         }
       })
     }

--
Gitblit v1.8.0