From f9902f7a3b79d22bde9f199263ac36de26816470 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 08 五月 2026 14:46:10 +0800
Subject: [PATCH] 测试完成

---
 src/views/outsideChainxjnew.vue |  272 ++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 172 insertions(+), 100 deletions(-)

diff --git a/src/views/outsideChainxjnew.vue b/src/views/outsideChainxjnew.vue
index d61c135..0e45e36 100644
--- a/src/views/outsideChainxjnew.vue
+++ b/src/views/outsideChainxjnew.vue
@@ -1,49 +1,49 @@
 <template>
   <div class="questionnaire">
-    <!-- <div class="CONTENT">
-      <div class="title">鏅畞浜烘皯鍖婚櫌鍖绘姢鐭ヨ瘑瀹f暀</div>
-      <div class="preview-left">
-        <div v-html="richText"></div>
+    <!-- 鍔犺浇鐘舵�� -->
+    <div v-if="loading" class="loading-container">
+      <div class="loading-content">
+        <i class="el-icon-loading loading-icon"></i>
+        <div class="loading-text">瀹f暀鍐呭鍔犺浇涓紝璇风◢鍊�...</div>
       </div>
+    </div>
 
-    </div> -->
-    <div class="CONTENT" >
-      <div class="preview-left">
-        <div class="toptitle">
-          <div class="title">{{ taskname ? taskname : ""+localStorage.getItem("orgname")+"鍖绘姢鐭ヨ瘑瀹f暀" }}</div>
-          <div style="font-size: 22px; margin-bottom: 20px; line-height: 1.5">
+    <!-- 姝e父鍐呭 -->
+    <div v-else>
+      <div class="CONTENT">
+        <div class="preview-left">
+          <div class="toptitle">
+            <div class="title">
+              {{ taskname ? taskname : "鍖绘姢鐭ヨ瘑瀹f暀" }}
+            </div>
+            <div style="font-size: 22px; margin-bottom: 20px; line-height: 1.5">
+              {{
+                kcb
+                  ? kcb
+                  : "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸鍖绘姢浜哄憳锛屼负浜嗘洿濂藉湴浜嗚В鎮ㄧ殑搴峰鎯呭喌锛岃鎮ㄦ娊涓�鐐瑰疂璐垫椂闂达紝瑙傜湅杩欎唤瀹f暀璧勮銆�"
+              }}
+              <!-- 浜茬埍鐨勬偅鑰�/瀹跺睘鎮ㄥソ锛屼负浜嗘洿濂界殑浜嗚В鎮ㄥ嚭闄㈠悗鐨勫悍澶嶆儏鍐碉紝缁欐偍閫傚綋鍙婃椂鐨勫仴搴锋寚瀵硷紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤鍑洪櫌闅忚闂嵎璋冩煡銆� -->
+            </div>
+          </div>
+          <el-divider></el-divider>
+          <div v-html="richText"></div>
+          <div
+            style="
+              text-align: center;
+              padding-top: 50px;
+              font-size: 24px;
+              color: #175997;
+              font-weight: 600;
+              margin-bottom: 10px;
+            "
+          >
             {{
-              kcb
-                ? kcb
-                : "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸"+localStorage.getItem("orgname")+"鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瑙傜湅杩欎唤瀹f暀璧勮銆�"
+              jsy
+                ? jsy
+                : "鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈瀹f暀鍐呭灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒"
             }}
-            <!-- 浜茬埍鐨勬偅鑰�/瀹跺睘鎮ㄥソ锛屼负浜嗘洿濂界殑浜嗚В鎮ㄥ嚭闄㈠悗鐨勫悍澶嶆儏鍐碉紝缁欐偍閫傚綋鍙婃椂鐨勫仴搴锋寚瀵硷紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤鍑洪櫌闅忚闂嵎璋冩煡銆� -->
           </div>
         </div>
-        <el-divider></el-divider>
-        <div v-html="richText"></div>
-        <div
-          style="
-            text-align: center;
-            padding-top: 50px;
-            font-size: 24px;
-            color: #175997;
-            font-weight: 600;
-            margin-bottom: 10px;
-          "
-        >
-        {{
-            jsy
-              ? jsy
-              : "鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈瀹f暀鍐呭灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒"
-          }}        </div>
-        <!-- <div style="font-size: 20px">
-          {{
-            jsy
-              ? jsy
-              : "鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈瀹f暀鍐呭灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒"
-          }}
-        </div> -->
       </div>
     </div>
   </div>
@@ -53,7 +53,7 @@
 import {
   getExternalfollowup,
   Submitaquestionnaire,
-  geturlinfo
+  geturlinfo,
 } from "@/api/AiCentre/index";
 import { getToken } from "@/utils/auth";
 import axios from "axios";
@@ -76,81 +76,92 @@
         question3: "",
       },
       richText: "<p>Hello, <strong>world</strong>!</p>",
-      url:'',
-      taskname:'',
-      kcb:'',
-      jsy:'',
+      url: "",
+      taskname: "",
+      kcb: "",
+      jsy: "",
+      loading: true, // 鏂板锛氬姞杞界姸鎬�
     };
   },
 
   created() {
-    this.getQuestionnaire();
+    this.geturlinfo();
   },
   methods: {
     // 瑙f瀽urlid
     geturlinfo() {
-      // let url = window.location.href;
+      this.loading = true; // 寮�濮嬪姞杞�
       let url = this.$route.query.p;
-      // let url = 'http://218.108.11.22:8093/sf/003';
-      // let urlid = this.extractLastSegmentFromUrl(url);
 
-      geturlinfo( url ).then((res) => {
-       if (res.code==200) {
-         this.getQuestionnaire(res.data.param1,res.data.param2,res.data.param3,res.data.param5,)
-       }
-      });
-    },
-    extractLastSegmentFromUrl(url) {
-    // 鎵惧埌鏈�鍚庝竴涓�'/'鐨勪綅缃�
-    const lastSlashIndex = url.lastIndexOf('/');
-    // 濡傛灉鎵惧埌浜�'/'锛屾埅鍙栧叾鍚庣殑鎵�鏈夊瓧绗�
-    if (lastSlashIndex !== -1) {
-        return url.substring(lastSlashIndex + 1);
-    }
-    // 濡傛灉娌℃湁鎵惧埌'/'锛岃繑鍥炵┖瀛楃涓�
-    return '';
-},
-    // 鑾峰彇鏁版嵁
-    getQuestionnaire(param1,param2,param3) {
-      this.taskid = param1;
-      this.patid = param2;
-      this.taskname = param3;
-      // // let taskid =
-      // //   "OFp7tn/B6x7IzKJetvGWHdSWBj7msRlnlj6am9dyuHTH6sEt4uBbVCUXs5kcF/e4O2W6vqHf2Bz9K3/evbYDmw==";
-      // // let patid =
-      // //   "CVk0j8O86AeCqhV5WPsBBYDg9fec0wDoDlP9imYK4wDBNIkxywZzMJEGlPagOxnq6qr2WYZo0U8MUGWRGnq8ZA==";
-      // this.taskid = this.decrypt(taskid);
-      // this.patid = this.decrypt(patid);
-
-      // // this.$modal.msgSuccess("鐢ㄦ埛id涓�" + this.patid);
-      // // this.$modal.msgSuccess("浠诲姟id涓�" + this.taskid);
-      // let taskids = this.encrypt(this.taskid);
-      // let patids = this.encrypt(this.patid);
-      getExternalfollowup({ param1: this.taskid, param2: this.patid }).then((res) => {
-        if (res.code == 200) {
-          this.url = res.data.script[0].richText;
-          this.jsy = res.data.jsy;
-          this.kcb = res.data.kcb;
-          // 涓存椂鑾峰彇鏁版嵁
-      axios
-        .get(this.url)
-        .then((response) => {
-          console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
-          this.richText = response.data;
-          this.richText = this.addStyleToImages(this.richText);
+      geturlinfo(url)
+        .then((res) => {
+          if (res.code == 200) {
+            this.getQuestionnaire(
+              res.data.param1,
+              res.data.param2,
+              res.data.param3,
+              res.data.param5
+            );
+          } else {
+            this.loading = false; // 鑾峰彇URL淇℃伅澶辫触鏃跺叧闂姞杞�
+          }
         })
-        .catch((error) => {
-          console.error("Failed to fetch file:", error);
+        .catch(() => {
+          this.loading = false; // 鍑洪敊鏃跺叧闂姞杞�
         });
-        }
-      });
-
     },
+
+    // 鑾峰彇鏁版嵁
+    getQuestionnaire(param1, param2, param3) {
+      this.taskid = decodeURIComponent(param1);
+      this.patid = decodeURIComponent(param2);
+      this.taskname = decodeURIComponent(param3);
+
+      getExternalfollowup({ param1: this.taskid, param2: this.patid })
+        .then((res) => {
+          if (res.code == 200) {
+            this.url = res.data.script[0].richText;
+            this.jsy = res.data.jsy;
+            this.kcb = res.data.kcb;
+
+            // 鑾峰彇瀵屾枃鏈唴瀹�
+            axios
+              .get(this.url)
+              .then((response) => {
+                console.log(response.data, "鏁版嵁");
+                this.richText = response.data;
+                this.richText = this.addStyleToImages(this.richText);
+                this.loading = false; // 鏁版嵁鍔犺浇瀹屾垚
+              })
+              .catch((error) => {
+                console.error("Failed to fetch file:", error);
+                this.loading = false; // 鑾峰彇鍐呭澶辫触鏃跺叧闂姞杞�
+              });
+          } else {
+            this.loading = false; // API杩斿洖閿欒鏃跺叧闂姞杞�
+          }
+        })
+        .catch(() => {
+          this.loading = false; // API璋冪敤澶辫触鏃跺叧闂姞杞�
+        });
+    },
+
     addStyleToImages(html) {
-      return html.replace(
+      if (!html) return html;
+
+      // 1. 鍏堜慨澶嶈矾寰�
+      let processedHtml = html.replace(
+        /\/aifollowup\/aifollowup\//g,
+        "/aifollowup/"
+      );
+
+      // 2. 鍐嶄慨澶嶆牱寮�
+      processedHtml = processedHtml.replace(
         /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
         '<img$1style="width:100%;height:auto;"$3>'
       );
+
+      return processedHtml;
     },
     // 鍔犲瘑鍑芥暟
     encrypt(txt) {
@@ -201,7 +212,6 @@
 </script>
 
 <style lang="scss" scoped>
-
 .questionnaire {
   background-image: url("../assets/images/chainbackground1.jpg");
   background-color: #f9f9fb;
@@ -212,6 +222,7 @@
   min-height: 100vh;
   margin: 0;
   padding: 0;
+
   .CONTENT {
     padding-top: 15px;
     padding-bottom: 15px;
@@ -224,16 +235,15 @@
     }
   }
 }
+
 .preview-left {
   margin: 10px;
   margin-bottom: 60px;
   background-color: #fff;
   border-radius: 5px;
-  //   margin: 20px;
   padding: 10px;
   padding-bottom: 100px;
   height: 100%;
-  // background: #ffff;
   border: 1px solid #dcdfe6;
   -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
     0 0 6px 0 rgba(0, 0, 0, 0.04);
@@ -245,4 +255,66 @@
     }
   }
 }
+
+/* 鏂板鍔犺浇鏍峰紡 */
+.loading-container {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: rgba(255, 255, 255, 0.9);
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  z-index: 9999;
+}
+
+.loading-content {
+  text-align: center;
+  padding: 40px 60px;
+  background: #fff;
+  border-radius: 8px;
+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+  border: 1px solid #e4e7ed;
+}
+
+.loading-icon {
+  font-size: 40px;
+  color: #3769f3;
+  margin-bottom: 20px;
+  animation: loading-rotate 1.5s linear infinite;
+  display: block;
+}
+
+.loading-text {
+  font-size: 18px;
+  color: #606266;
+  font-weight: 500;
+  margin-top: 10px;
+}
+
+@keyframes loading-rotate {
+  0% {
+    transform: rotate(0deg);
+  }
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+  .loading-content {
+    padding: 30px 40px;
+  }
+
+  .loading-icon {
+    font-size: 32px;
+  }
+
+  .loading-text {
+    font-size: 16px;
+  }
+}
 </style>

--
Gitblit v1.9.3