From 2801f5c8ceb1b7ddb77e79d757160c5cb89ff067 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期一, 04 八月 2025 17:11:39 +0800
Subject: [PATCH] 个人资料更改

---
 src/views/system/dept/utils/hook.tsx |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/views/system/dept/utils/hook.tsx b/src/views/system/dept/utils/hook.tsx
index 70bc46e..bb68750 100644
--- a/src/views/system/dept/utils/hook.tsx
+++ b/src/views/system/dept/utils/hook.tsx
@@ -231,8 +231,8 @@
           toubiaobaozhengjin: row?.toubiaobaozhengjin ?? null, // 鎶曟爣淇濊瘉閲戯紙鍙�夛級
           lianhetitoubiao: row?.lianhetitoubiao ?? null, // 鑱斿悎浣撴姇鏍囷紙鍙�夛級
           kaibiaofangshi: row?.kaibiaofangshi ?? null, // 寮�鏍囨柟寮忥紙鍙�夛級
-          shifoufenbao: row?.shifoufenbao ?? false, // 鏄惁鍒嗗寘锛堝彲閫夛級
-          shifoutuisongxuanchuan: row?.shifoutuisongxuanchuan ?? true, // 鏄惁鎺ㄩ�佸浼狅紙鍙�夛級
+          shifoufenbao: row?.shifoufenbao ?? "false", // 鏄惁鍒嗗寘锛堝彲閫夛級
+          shifoutuisongxuanchuan: row?.shifoutuisongxuanchuan ?? "true", // 鏄惁鎺ㄩ�佸浼狅紙鍙�夛級
           caigourenmingcheng: row?.caigourenmingcheng ?? null, // 閲囪喘浜哄悕绉帮紙鍙�夛級
           xingzhengquyu: row?.xingzhengquyu.split(",") ?? [], // 琛屾斂鍖哄煙锛堝彲閫夛級
           xingzhengquyuName: row?.xingzhengquyuName ?? null, // 琛屾斂鍖哄煙鍚嶇О锛堝彲閫夛級
@@ -258,9 +258,10 @@
       draggable: true,
       fullscreen: deviceDetection(),
       fullscreenIcon: true,
+      sureBtnLoading: true,
       closeOnClickModal: false,
       contentRenderer: () => h(editForm, { ref: formRef, formInline: null }),
-      beforeSure: (done, { options }) => {
+      beforeSure: (done, { options, closeLoading }) => {
         const FormRef = formRef.value.getRef();
         const curData = cloneDeep(options.props.formInline as FormItemProps);
         async function chores() {
@@ -279,14 +280,14 @@
             done(); // 鍏抽棴寮规
             onSearch(); // 鍒锋柊琛ㄦ牸鏁版嵁
           } else {
+            closeLoading();
             message(res.message, {
               type: "error"
             });
           }
         }
-        FormRef.validate(valid => {
+        FormRef.validate((valid, obj) => {
           if (valid) {
-            console.log("curData", curData);
             // 琛ㄥ崟瑙勫垯鏍¢獙閫氳繃
             if (title === "鏂板") {
               // 瀹為檯寮�鍙戝厛璋冪敤鏂板鎺ュ彛锛屽啀杩涜涓嬮潰鎿嶄綔
@@ -295,6 +296,16 @@
               // 瀹為檯寮�鍙戝厛璋冪敤淇敼鎺ュ彛锛屽啀杩涜涓嬮潰鎿嶄綔
               chores();
             }
+          } else {
+            closeLoading();
+            const fail = [];
+            for (const key in obj) {
+              fail.push(obj[key][0].message);
+            }
+            message(fail[0], {
+              type: "warning"
+            });
+            return false;
           }
         });
       }

--
Gitblit v1.9.1