From e732f79fb39ca207464705308c9ee2deb3a79307 Mon Sep 17 00:00:00 2001
From: hcong <1050828145@qq.com>
Date: 星期二, 03 十二月 2024 11:21:41 +0800
Subject: [PATCH] 后台任务状态实时刷新同步后台更改 1. startTime和endTime对象结构修改 2. runTime根据后端逻辑生成runTime

---
 src/views/fysp/check/components/CompProblemAddOrUpd.vue |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
index 1200e69..0ba0cb8 100644
--- a/src/views/fysp/check/components/CompProblemAddOrUpd.vue
+++ b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
@@ -167,9 +167,7 @@
             <el-button type="primary" @click="onSubmit" v-show="!readonly"
               >淇濆瓨</el-button
             >
-            <el-button @click="onCancel" v-show="!readonly"
-              >鍙栨秷</el-button
-            >
+            <el-button @click="onCancel" v-show="!readonly">鍙栨秷</el-button>
           </el-form-item>
         </el-form>
         <ArbitraryPhoto
@@ -230,7 +228,7 @@
   components: {
     ArbitraryPhoto,
     CompDevicePhoto,
-    CompLedgerPhoto,
+    CompLedgerPhoto
   },
   props: {
     readonly: {
@@ -586,7 +584,8 @@
       return true;
     },
     onCancel() {
-      this.$emit("cancel")
+      this.$emit('cancel');
+      this.$emit('update:visible', false);
     },
     onSubmit() {
       this.$refs.formRef.validate((valid) => {
@@ -628,9 +627,10 @@
               files.forEach((image) => {
                 data.append('images', image);
               });
-              problemApi.updateProblem(data).then((res) => {});
+              problemApi.updateProblem(data).then((res) => {
+                this.$emit('submit', false);
+              });
             });
-            this.$emit('submit', false);
           } else {
             const deepCopySubTask = useCloned(this.subtask).cloned.value;
             const that = this;
@@ -650,9 +650,10 @@
               files.forEach((image) => {
                 data.append('images', image);
               });
-              problemApi.newProblem(data).then((res) => {});
+              problemApi.newProblem(data).then((res) => {
+                this.$emit('submit', true);
+              });
             });
-            this.$emit('submit', true);
           }
         }
       });

--
Gitblit v1.9.3