From 1e78fbfb63e192c5284b19bba161ea12e80a7d92 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 04 七月 2024 16:30:04 +0800
Subject: [PATCH] 测试完成

---
 src/views/outsideChainxj.vue |   56 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/views/outsideChainxj.vue b/src/views/outsideChainxj.vue
index 0e19559..75e80ad 100644
--- a/src/views/outsideChainxj.vue
+++ b/src/views/outsideChainxj.vue
@@ -4,34 +4,7 @@
       <div class="title">鏆戞湡涓�鍙峰鏁�</div>
       <div class="preview-left">
         <!-- 鍗曢�� -->
-        <div
-          class="topic-dev"
-          v-for="(item, index) in questionList"
-          :key="item.aaa"
-        >
-          <div class="dev-text">
-            {{ index + 1 }}銆�<span>{{ item.questionText }}</span>
-          </div>
-
-          <div class="dev-xx" v-if="item.valueType == 1">
-            <el-radio-group v-model="item.asrtext">
-              <el-radio
-                v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
-                :key="items.id"
-                :label="items.targetvalue"
-                >{{ items.targetvalue }}</el-radio
-              >
-            </el-radio-group>
-          </div>
-          <div v-else>
-            <el-input
-              type="textarea"
-              placeholder="璇疯緭鍏ュ唴瀹�"
-              v-model.sync="item.asrtext"
-              :rows="2"
-            />
-          </div>
-        </div>
+        <div v-html="richText"></div>
       </div>
       <el-form :model="formData" label-width="80px">
         <el-form-item>
@@ -47,6 +20,8 @@
   getExternalfollowup,
   SetsaveQuestionAnswer,
 } from "@/api/AiCentre/index";
+import { getToken } from "@/utils/auth";
+import axios from "axios";
 import JSEncrypt from "jsencrypt";
 export default {
   data() {
@@ -65,6 +40,7 @@
         question2: "",
         question3: "",
       },
+      richText: "<p>Hello, <strong>world</strong>!</p>",
     };
   },
 
@@ -92,6 +68,26 @@
           this.questionList = res.rows;
         }
       });
+      // 涓存椂鑾峰彇鏁版嵁
+      axios
+        .get("http://localhost:8089/profile/upload/show/娴嬭瘯/娴嬭瘯.html")
+        .then((response) => {
+          console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
+          this.richText = response.data;
+          //   this.richText =
+          //     '<p>This is an image: <img src="https://example.com/image.jpg"></p>';
+          // })
+          this.richText = this.addStyleToImages(this.richText);
+        })
+        .catch((error) => {
+          console.error("Failed to fetch file:", error);
+        });
+    },
+    addStyleToImages(html) {
+      return html.replace(
+        /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
+        '<img$1style="width:100%;height:auto;"$3>'
+      );
     },
     // 鍔犲瘑鍑芥暟
     encrypt(txt) {
@@ -181,5 +177,9 @@
       margin-bottom: 10px;
     }
   }
+  img {
+    width: 80vw !important;
+    height: 20vh !important;
+  }
 }
 </style>

--
Gitblit v1.9.3