From 4879058b6fb8fd51ba2b4d87f241defb7c9f04fc Mon Sep 17 00:00:00 2001 From: WXL (wul) <wl_5969728@163.com> Date: 星期四, 04 九月 2025 11:30:37 +0800 Subject: [PATCH] 测试完成 --- /dev/null | 0 src/views/satisfaction.vue | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++- dist.zip | 0 vue.config.js | 3 src/assets/order/BHostClient.exe | 0 5 files changed, 159 insertions(+), 4 deletions(-) diff --git "a/dist \0502\051.zip" "b/dist \0502\051.zip" deleted file mode 100644 index b17439a..0000000 --- "a/dist \0502\051.zip" +++ /dev/null Binary files differ diff --git a/dist.zip b/dist.zip index 4bef5b1..a84776e 100644 --- a/dist.zip +++ b/dist.zip Binary files differ diff --git a/src/assets/order/BHostClient.exe b/src/assets/order/BHostClient.exe new file mode 100644 index 0000000..db7c9c7 --- /dev/null +++ b/src/assets/order/BHostClient.exe Binary files differ diff --git a/src/views/satisfaction.vue b/src/views/satisfaction.vue index 44b6314..26585af 100644 --- a/src/views/satisfaction.vue +++ b/src/views/satisfaction.vue @@ -1,5 +1,44 @@ <template> <div class="questionnaire" :class="'survey-type-' + surveyType"> + <!-- 鍔犺浇鐘舵�� --> + <div v-if="loading" class="loading-state"> + <div class="loading-spinner"> + <i class="el-icon-loading"></i> + <p>闂嵎鍔犺浇涓�...</p> + </div> + </div> + + <!-- 鏃犳暟鎹姸鎬� --> + <div v-else-if="isEmptyData" class="empty-state"> + <div class="empty-content"> + <i class="el-icon-document" style="font-size: 64px; color: #909399"></i> + <h3>鏆傛棤闂嵎鏁版嵁</h3> + <p>褰撳墠娌℃湁鍙敤鐨勯棶鍗凤紝璇疯仈绯荤鐞嗗憳鎴栫◢鍚庨噸璇�</p> + <el-button + type="primary" + @click="loadSurveyData" + icon="el-icon-refresh" + > + 閲嶆柊鍔犺浇 + </el-button> + </div> + </div> + + <!-- 閿欒鐘舵�� --> + <div v-else-if="hasError" class="error-state"> + <div class="error-content"> + <i class="el-icon-warning" style="font-size: 64px; color: #f56c6c"></i> + <h3>鏁版嵁鍔犺浇澶辫触</h3> + <p>{{ errorMessage }}</p> + <el-button + type="primary" + @click="loadSurveyData" + icon="el-icon-refresh" + > + 閲嶆柊灏濊瘯 + </el-button> + </div> + </div> <div class="CONTENT" v-if="!accomplish"> <div class="preview-left"> <div class="toptitle"> @@ -178,7 +217,10 @@ param5: "", param6: "30001002", }, - + isEmptyData: false, // 鏂板锛氭棤鏁版嵁鐘舵�� + hasError: false, // 鏂板锛氶敊璇姸鎬� + loading: false, // 鏂板锛氬姞杞界姸鎬� + errorMessage: "", // 鏂板锛氶敊璇俊鎭� // 娴嬭瘯鏁版嵁 testData: { 1: { @@ -360,6 +402,10 @@ }, // 鍔犺浇璋冩煡鏁版嵁 loadSurveyData() { + this.loading = true; + this.isEmptyData = false; + this.hasError = false; + this.errorMessage = ""; // 璋冪敤鎺ュ彛鑾峰彇闂嵎鏁版嵁 // 鏍规嵁闂嵎绫诲瀷璁剧疆涓嶅悓鐨勫弬鏁� let encryptedParams = { @@ -385,6 +431,14 @@ if (res.code === 200) { if (res.data.result) { this.accomplish = res.data.result; + return; + } + if ( + !res.data.svyLibTemplateScriptVOS || + res.data.svyLibTemplateScriptVOS.length === 0 + ) { + this.isEmptyData = true; + this.$message.warning("鏆傛棤闂嵎鏁版嵁"); return; } // 澶勭悊鎺ュ彛杩斿洖鐨勬暟鎹� @@ -423,12 +477,20 @@ } } else { // 鎺ュ彛鏃犳暟鎹垨澶辫触锛屼娇鐢ㄦ祴璇曟暟鎹� - this.useTestData(this.surveyType); + // this.useTestData(this.surveyType); } }) .catch(() => { + console.error("鏁版嵁鑾峰彇澶辫触:", error); + this.hasError = true; + this.errorMessage = + error.message || "闂嵎鏁版嵁鍔犺浇澶辫触锛岃妫�鏌ョ綉缁滆繛鎺ュ悗閲嶈瘯"; + this.$message.error("鏁版嵁鍔犺浇澶辫触"); // 鎺ュ彛璋冪敤澶辫触锛屼娇鐢ㄦ祴璇曟暟鎹� - this.useTestData(this.surveyType); + // this.useTestData(this.surveyType); + }) + .finally(() => { + this.loading = false; }); }, handleDeptChange(value) { @@ -840,7 +902,99 @@ } } } +.loading-state { + display: flex; + justify-content: center; + align-items: center; + min-height: 60vh; + padding: 40px; + .loading-spinner { + text-align: center; + + .el-icon-loading { + font-size: 48px; + color: var(--primary-color); + margin-bottom: 16px; + animation: rotating 2s linear infinite; + } + + p { + color: #666; + font-size: 16px; + } + } +} + +.empty-state, +.error-state { + display: flex; + justify-content: center; + align-items: center; + min-height: 60vh; + padding: 40px; + + .empty-content, + .error-content { + text-align: center; + max-width: 400px; + + h3 { + color: #666; + font-size: 20px; + margin: 16px 0 12px; + font-weight: 500; + } + + p { + color: #999; + font-size: 14px; + margin-bottom: 24px; + line-height: 1.6; + } + } +} + +.error-state { + .error-content { + h3 { + color: #f56c6c; + } + } +} + +@keyframes rotating { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +/* 鍝嶅簲寮忚皟鏁� */ +@media (max-width: 768px) { + .loading-state, + .empty-state, + .error-state { + padding: 20px; + min-height: 50vh; + + .el-icon-loading, + .el-icon-document, + .el-icon-warning { + font-size: 40px !important; + } + + h3 { + font-size: 18px !important; + } + + p { + font-size: 13px !important; + } + } +} ::v-deep { .el-checkbox-group { display: flex; diff --git a/vue.config.js b/vue.config.js index 447ffb1..5fab797 100644 --- a/vue.config.js +++ b/vue.config.js @@ -38,7 +38,8 @@ // target: `https://www.health-y.cn/lssf`, // target: `http://10.202.20.185:8095`, // target: `http://192.168.100.195:8095`, - target:`http://localhost:8095`, + // target:`http://localhost:8095`, + target:`http://35z1t16164.qicp.vip`, // target: `http://192.168.100.193:8095`, // target: `http://192.168.101.166:8093`, // target: `http://192.168.191.181:8095`, -- Gitblit v1.9.3