From 43981545c5aefdb4248d89e3121a200d53332c7a Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 22 十月 2024 17:44:21 +0800
Subject: [PATCH] 1. 添加子任务编辑功能(暂存)

---
 src/views/fysp/task/TaskManage.vue |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/views/fysp/task/TaskManage.vue b/src/views/fysp/task/TaskManage.vue
index 8940905..c46b0af 100644
--- a/src/views/fysp/task/TaskManage.vue
+++ b/src/views/fysp/task/TaskManage.vue
@@ -41,6 +41,7 @@
               <el-row>
                 <el-col :span="curSubTaskList ? 16 : 24">
                   <CompMonitorPlan
+                    ref="planRef"
                     :task="curTask.data"
                     @date-change="onDateChange"
                   ></CompMonitorPlan>
@@ -52,6 +53,7 @@
                     :loading="subTaskLoading"
                     height="56vh"
                     @add="subTaskDrawer = true"
+                    @submit="handleSubtaskSubmit"
                   ></CompSubTaskList>
                 </el-col>
               </el-row>
@@ -242,11 +244,11 @@
       this.sideLoading = false;
       this.mainLoading = true;
       this.curSubTaskList = undefined;
+      this.curTask = task;
       taskApi
         .fetchMonitorObjectVersion(task.data.tguid)
         .then((res) => {
           this.curMonitorObjList = res;
-          this.curTask = task;
         })
         .finally(() => {
           this.mainLoading = false;
@@ -293,6 +295,12 @@
           task: encodeURIComponent(JSON.stringify(value))
         }
       });
+    },
+    handleSubtaskSubmit() {
+      this.subTaskLoading = true;
+      this.$refs.planRef
+        .fetchDayTasks()
+        .finally(() => (this.subTaskLoading = false));
     }
   },
   mounted() {

--
Gitblit v1.9.3