From 51461f369f0b0ad1da96346afee5637302f1525b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 18 八月 2026 16:38:47 +0800
Subject: [PATCH] 提交

---
 src/views/outsideChainwtnew.vue |  129 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 114 insertions(+), 15 deletions(-)

diff --git a/src/views/outsideChainwtnew.vue b/src/views/outsideChainwtnew.vue
index 4d5e662..5dd3cb3 100644
--- a/src/views/outsideChainwtnew.vue
+++ b/src/views/outsideChainwtnew.vue
@@ -1,5 +1,15 @@
 <template>
   <div class="questionnaire-optimized">
+    <!-- 鎻愪氦涓殑鍏ㄥ睆鍔犺浇閬僵锛堝ぇ瀛椾綋锛岄�傝�佸寲锛� -->
+    <div v-if="submitting" class="submit-loading-mask">
+      <div class="submit-loading-box">
+        <div class="submit-loading-spinner"></div>
+        <div class="submit-loading-title">闂嵎鎻愪氦涓�</div>
+        <div class="submit-loading-tip">璇风◢鍊欙紝姝e湪涓婁紶鎮ㄧ殑绛旀...</div>
+        <div class="submit-loading-warn">璇蜂笉瑕佸叧闂垨鍒锋柊椤甸潰</div>
+      </div>
+    </div>
+
     <div v-if="loading && !accomplish" class="loading-container">
       <div class="loading-content">
         <i class="el-icon-loading loading-icon"></i>
@@ -317,8 +327,9 @@
               type="primary"
               @click="cache(true)"
               class="submit-button"
+              :loading="submitting"
             >
-              鎻愪氦闂嵎
+              {{ submitting ? "鎻愪氦涓�..." : "鎻愪氦闂嵎" }}
             </el-button>
           </div>
         </div>
@@ -372,6 +383,7 @@
       dialogVisible: false,
       Endornot: true,
       accomplish: false,
+      submitting: false, // 鎻愪氦涓殑鍔犺浇鐘舵��
       dimensionTypes: [
         {
           value: 1,
@@ -662,19 +674,31 @@
       //   }
       // });
       form.serviceSubtaskDetailList = arr;
-      Submitaquestionnaire(form).then((res) => {
-        if (res.code == 200) {
-          if (this.jsy) {
-            this.dialogVisible = true;
+      Submitaquestionnaire(form)
+        .then((res) => {
+          this.submitting = false;
+          if (res.code == 200) {
+            if (this.jsy) {
+              this.dialogVisible = true;
+            }
+            this.accomplish = true;
+            this.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          } else {
+            this.$modal.msgError(res.msg || "鎻愪氦澶辫触锛岃閲嶈瘯");
           }
-          this.accomplish = true;
-          this.$modal.msgSuccess("鎻愪氦鎴愬姛");
-        }
-      });
+        })
+        .catch(() => {
+          this.submitting = false;
+          this.$modal.msgError("鎻愪氦澶辫触锛岃閲嶈瘯");
+        });
     },
     // 缂撳瓨
     cache(subm) {
       console.log("杩涘叆缂撳瓨");
+      // 鎻愪氦鍦烘櫙锛氬紑鍚姞杞界姸鎬侊紝闃叉閲嶅鐐瑰嚮
+      if (subm === true) {
+        this.submitting = true;
+      }
       let form = {
         param1: this.taskid,
         param2: this.patid,
@@ -720,13 +744,26 @@
       });
       form.svyTaskTemplateScriptVOS = arr;
       form.type = 2;
-      Cachequestionnaire(form).then((res) => {
-        if (res.code == 200) {
-          if (subm) {
-            this.submitForm();
+      Cachequestionnaire(form)
+        .then((res) => {
+          if (res.code == 200) {
+            if (subm) {
+              this.submitForm();
+            }
+          } else {
+            // 缂撳瓨澶辫触锛氭仮澶嶆彁浜ょ姸鎬�
+            if (subm) {
+              this.submitting = false;
+              this.$modal.msgError("鎻愪氦澶辫触锛岃閲嶈瘯");
+            }
           }
-        }
-      });
+        })
+        .catch(() => {
+          if (subm) {
+            this.submitting = false;
+            this.$modal.msgError("鎻愪氦澶辫触锛岃閲嶈瘯");
+          }
+        });
     },
     // 鑾峰彇鍙棰樼洰鐨勬纭簭鍙凤紙瑙e喅璺抽鍚庡簭鍙蜂笉杩炵画鐨勯棶棰橈級
     getVisibleQuestionIndex(index) {
@@ -1316,6 +1353,68 @@
   min-height: 70vh;
 }
 
+/* ===== 鎻愪氦涓細閫傝�佸寲鍏ㄥ睆鍔犺浇閬僵 ===== */
+.submit-loading-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.55);
+  z-index: 3000;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding: 20px;
+}
+
+.submit-loading-box {
+  background: #ffffff;
+  border-radius: 20px;
+  padding: 48px 56px;
+  text-align: center;
+  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
+  max-width: 85vw;
+  box-sizing: border-box;
+}
+
+.submit-loading-spinner {
+  width: 72px;
+  height: 72px;
+  margin: 0 auto 24px;
+  border: 8px solid #e8eef5;
+  border-top-color: #175997;
+  border-right-color: #2a77c9;
+  border-radius: 50%;
+  animation: submit-spin 1s linear infinite;
+}
+
+@keyframes submit-spin {
+  to {
+    transform: rotate(360deg);
+  }
+}
+
+.submit-loading-title {
+  font-size: 28px;
+  font-weight: 700;
+  color: #175997;
+  margin-bottom: 14px;
+}
+
+.submit-loading-tip {
+  font-size: 20px;
+  color: #303a47;
+  line-height: 1.6;
+}
+
+.submit-loading-warn {
+  margin-top: 18px;
+  font-size: 17px;
+  color: #e6a23c;
+  font-weight: 500;
+}
+
 .loading-content {
   text-align: center;
   padding: 40px;

--
Gitblit v1.9.3