From a7a0b7a266fd3df381ab8f2b6dcf098ef9076533 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期三, 30 七月 2025 10:51:26 +0800 Subject: [PATCH] 1111 --- src/views/doctor/checkAll/index.vue | 54 ++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue index fe2bf91..1d5cb4d 100644 --- a/src/views/doctor/checkAll/index.vue +++ b/src/views/doctor/checkAll/index.vue @@ -2542,14 +2542,26 @@ }, getConfigKey() { - getconfigKey("sfkqtwbg").then((res) => { + // 浣跨敤姝g‘鐨� getConfigKey 鍑芥暟锛堥渶瑕佸弬鏁帮級 + getConfigKey("sfkqtwbg").then((res) => { this.msgtuwen = res.msg; + }).catch((error) => { + console.warn("鑾峰彇閰嶇疆椤� sfkqtwbg 澶辫触:", error); + this.msgtuwen = ""; // 璁剧疆榛樿鍊� }); - getconfigKey("sfkqjqwz").then((res) => { + + getConfigKey("sfkqjqwz").then((res) => { this.msgjianqian = res.msg; + }).catch((error) => { + console.warn("鑾峰彇閰嶇疆椤� sfkqjqwz 澶辫触:", error); + this.msgjianqian = ""; // 璁剧疆榛樿鍊� }); - getconfigKey("kcf").then((res) => { + + getConfigKey("kcf").then((res) => { this.msgkcf = res.msg; + }).catch((error) => { + console.warn("鑾峰彇閰嶇疆椤� kcf 澶辫触:", error); + this.msgkcf = ""; // 璁剧疆榛樿鍊� }); }, @@ -2582,6 +2594,7 @@ yichangjieguo() { this.loading = true; + this.isLoading = true; this.status1 = 0; getConfigKey("kzycxmsfzk").then((res) => { this.shouldExpand = res.msg; @@ -2592,11 +2605,20 @@ this.expends = []; } }); - yichang({ - tjNum: this.tjNumber, - }) - .then((res) => { - this.yichangList = res.data; + return new Promise((resolve, reject) => { + yichang({ + tjNum: this.tjNumber, + }).then((res) => { + const data = res.data; + + if (!data || data.length === 0) { + this.$message.warning("鏆傛棤寮傚父鎶ュ憡"); + this.loading = false; + this.isLoading = false; // 鍏抽棴鏁翠綋鍔犺浇妗� + resolve(); // 杩斿洖 Promise锛屼絾涓嶇户缁悗缁�昏緫 + return; + } + this.yichangList = data; this.yichangList.forEach((item) => { item.sone.forEach((soneItem) => { if ( @@ -2610,24 +2632,32 @@ if (!this.yichangList) { this.$message.warning("鏆傛棤寮傚父鎶ュ憡"); } + resolve(); // 鎴愬姛瀹屾垚 // 杩欓噷涔熷彲浠ユ牴鎹畇houldExpand鍐嶈皟鐢ㄤ竴娆etExpends锛岀‘淇濇暟鎹凡鍔犺浇 if (this.shouldExpand === "Y" || this.shouldExpand === "y") { this.getExpends(); } else { this.expends = []; } - }) + }); + }) .catch((error) => { this.isLoading = false; + this.loading = false; console.error("鑾峰彇寮傚父缁撴灉澶辫触:", error); this.$message.error("鑾峰彇寮傚父缁撴灉澶辫触"); + reject(error); // 杩斿洖閿欒 }) .finally(() => { - this.isLoading = false; - this.loading = false; + // 鍙湪娌℃湁鎻愬墠杩斿洖鐨勬儏鍐典笅鍏抽棴鍔犺浇妗� + if (this.isLoading) { + this.isLoading = false; + } + if (this.loading) { + this.loading = false; + } }); }, - fuchaxiangmu() { this.loading = true; -- Gitblit v1.8.0