From aa1f56d5ef2d48b980a2fab3e88379efbe09b0d1 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 26 十二月 2023 17:04:27 +0800
Subject: [PATCH] 评估任务模块新增任务状态管理逻辑

---
 src/composables/formConfirm.js |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/composables/formConfirm.js b/src/composables/formConfirm.js
index dc295d5..0bb274c 100644
--- a/src/composables/formConfirm.js
+++ b/src/composables/formConfirm.js
@@ -1,4 +1,4 @@
-import { defineProps, onActivated, onDeactivated, ref, watch } from 'vue';
+import { defineProps, onActivated, onDeactivated, reactive, ref, watch } from 'vue';
 import { useCloned } from '@vueuse/core';
 import { useMessageBoxTip, useMessageBox } from './messageBox';
 
@@ -92,18 +92,23 @@
   };
 
   // 鎻愪氦琛ㄥ崟
-  const onSubmit = function () {
-    formRef.value.validate((valid) => {
+  const onSubmit = function (messageBox = true) {
+    formRef.value.validate(async (valid) => {
       if (valid) {
-        useMessageBoxTip({
-          confirmMsg: submit.msg,
-          confirmTitle: submit.title,
-          onConfirm: async () => {
-            const res = await submit.do();
-            submited();
-            return res;
-          }
-        });
+        if (messageBox) {
+          useMessageBoxTip({
+            confirmMsg: submit.msg,
+            confirmTitle: submit.title,
+            onConfirm: async () => {
+              const res = await submit.do();
+              submited();
+              return res;
+            }
+          });
+        } else {
+          await submit.do();
+          submited();
+        }
       }
     });
   };

--
Gitblit v1.9.3