From f2138817fdd6e9141c5911514280b8d0b6ca08f1 Mon Sep 17 00:00:00 2001
From: hcong <1050828145@qq.com>
Date: 星期三, 20 十一月 2024 14:48:49 +0800
Subject: [PATCH] 子组件刷新父组件不刷新页面,表单验证,upload组件预览图片,弹窗放在组件内部,bug修复
---
src/views/fysp/task/TaskManage.vue | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/views/fysp/task/TaskManage.vue b/src/views/fysp/task/TaskManage.vue
index 8940905..5685aa5 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>
@@ -93,6 +95,7 @@
<CompDayTask
:day-task="curDayTask"
:mObjList="curMonitorObjList"
+ @submit="handleSubtaskSubmit"
></CompDayTask>
</el-drawer>
<el-dialog
@@ -242,11 +245,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 +296,12 @@
task: encodeURIComponent(JSON.stringify(value))
}
});
+ },
+ handleSubtaskSubmit() {
+ this.subTaskLoading = true;
+ this.$refs.planRef
+ .fetchDayTasks()
+ .finally(() => (this.subTaskLoading = false));
}
},
mounted() {
--
Gitblit v1.9.3