From d93ed5c5aadcf3d49f824339c26ebfac911be06d Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 07 十一月 2025 14:39:38 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/education/compilequer/index.vue | 120 ++++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 85 insertions(+), 35 deletions(-)
diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index 7d0db6e..f5c3f3f 100644
--- a/src/views/knowledge/education/compilequer/index.vue
+++ b/src/views/knowledge/education/compilequer/index.vue
@@ -206,9 +206,20 @@
</el-select>
</el-form-item>
<el-form-item label="閫傜敤鐤剧梾" prop="region">
- <el-button type="warning" @click="$refs.child.handleAddpatient()"
- >娣诲姞鐤剧梾</el-button
+ <div style="margin-bottom: 10px">
+ <el-button type="warning" @click="$refs.child.handleAddpatient()"
+ >娣诲姞鐤剧梾璇婃柇</el-button
+ >
+ </div>
+ <el-tag
+ v-for="tag in displayedTags"
+ :key="tag.icdid"
+ type="warning"
+ :disable-transitions="false"
>
+ {{ tag.icdname }}
+ </el-tag>
+ <el-tag v-if="hasMore" type="info">+{{ remaining }} more</el-tag>
</el-form-item>
<el-form-item label="閫傜敤闄㈠尯" prop="region">
<el-select
@@ -253,7 +264,7 @@
</el-form-item>
</el-form>
</div>
- <!-- 瀹f暀鍐呭 -->
+ <!-- 瀹f暀鍐呭 -->
<div v-if="Editprogress == 2">
<el-row :gutter="20">
<el-col :span="4">
@@ -292,8 +303,12 @@
<div>
<el-button @click="laststep('ruleForm')">涓婁竴姝�</el-button>
- <el-button type="success" @click="Departmenttreatment('ruleForm')">淇濆瓨</el-button>
- <el-button type="warning" @click="Departmenttreatment('ruleForm')">鍙﹀瓨鏂扮増鏈�</el-button>
+ <el-button type="success" @click="Departmenttreatment('ruleForm')"
+ >淇濆瓨</el-button
+ >
+ <el-button type="warning" @click="Departmenttreatment('ruleForm')"
+ >鍙﹀瓨鏂扮増鏈�</el-button
+ >
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
</div>
</div>
@@ -311,7 +326,7 @@
<script>
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
-import '@wangeditor/editor/dist/css/style.css';
+import "@wangeditor/editor/dist/css/style.css";
import axios from "axios";
import { getToken } from "@/utils/auth";
@@ -322,6 +337,7 @@
addrichText,
getlibraryinfo,
getillnesslist,
+ getillness,
} from "@/api/AiCentre/index";
import OptionalForm from "@/components/OptionalForm";
import { listDept } from "@/api/system/dept";
@@ -333,7 +349,7 @@
components: { OptionalForm, Editor, Toolbar },
data() {
return {
- // 缂栬緫鍣ㄥ疄渚�
+ // 缂栬緫鍣ㄥ疄渚�
editorRef: null,
// 缂栬緫鍣ㄥ唴瀹�
@@ -341,7 +357,7 @@
// 缂栬緫鍣ㄦā寮�
mode: "default",
-
+ fileList: [],
// 宸ュ叿鏍忛厤缃�
toolbarConfig: {
excludeKeys: [
@@ -350,7 +366,7 @@
"uploadVideo",
"emotion",
"codeBlock",
- ]
+ ],
},
// 缂栬緫鍣ㄩ厤缃�
@@ -364,7 +380,7 @@
maxNumberOfFiles: 1,
allowedFileTypes: ["image/*"],
headers: {
- Authorization: "Bearer " + getToken()
+ Authorization: "Bearer " + getToken(),
},
customUpload: async (file, insertFn) => {
try {
@@ -376,17 +392,21 @@
formData,
{
headers: {
- "Content-Type": "multipart/form-data",
- Authorization: "Bearer " + getToken()
- }
+ // "Content-Type": "multipart/form-data",
+ Authorization: "Bearer " + getToken(),
+ },
}
);
if (response.data && response.data.url) {
let imgUrl = response.data.url;
+ // imgUrl = imgUrl.replace(
+ // "http://218.108.11.22:8093/profile-api/upload",
+ // "http://192.88.117.236:8090/prod-api/profile/upload"
+ // );
imgUrl = imgUrl.replace(
- "http://218.108.11.22:8093/profile-api/upload",
- "http://192.168.191.181:8095/profile/upload"
+ "http://m.zjtongde.com:13871/prod-api/profile/upload",
+ "http://192.88.117.236:8090/prod-api/profile/upload"
);
insertFn(imgUrl);
}
@@ -394,13 +414,13 @@
console.error("鍥剧墖涓婁紶澶辫触", error);
this.$message.error("鍥剧墖涓婁紶澶辫触");
}
- }
- }
- }
+ },
+ },
+ },
},
// 涓婁紶閰嶇疆
headers: {
- Authorization: "Bearer " + getToken()
+ Authorization: "Bearer " + getToken(),
},
uploadImgUrlword: process.env.VUE_APP_BASE_API + "/common/uploadShow",
@@ -417,7 +437,7 @@
preachname: "",
preachcontent: "",
isAvailable: "",
- suitway: []
+ suitway: [],
},
// 鍏朵粬鏁版嵁
@@ -430,13 +450,13 @@
variablelist: [
{ variatename: "濮撳悕", variate: "${name}", default: 1 },
{ variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
- { variatename: "鐥呮儏", variate: "${illness}", default: 1 }
+ { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
],
props: {
multiple: true,
value: "deptId",
- label: "deptName"
+ label: "deptName",
},
fileName: "", //鏂囦欢鍚�
inputVisible: false,
@@ -464,11 +484,13 @@
options: [],
optionstag: [],
// 鍐呯綉鐨勯儴鍒嗭紙鏂囦欢锛�
- oldPattern: "http://192.168.191.181:8095/profile/upload",
+ // oldPattern: "http://192.168.191.181:8095/profile/upload",
+ oldPattern: "http://192.88.117.236:8090/prod-api/profile/upload",
// 鍐呯綉鐨勯儴鍒嗭紙鏂囦欢锛�
- oldPatternhtml: "/http:\/\/192\.168\.191\.181:8095\/profile\/upload\//g",
+ oldPatternhtml: "/http:\/\/192\.88\.117\.236:8095\/profile\/upload\//g",
// 澶栫綉閮ㄥ垎锛堟枃浠讹級
- newPattern: "http://218.108.11.22:8093/profile-api/upload",
+ // newPattern: "http://218.108.11.22:8093/profile-api/upload",銆併�佹柊鍗�
+ newPattern: "http://m.zjtongde.com:13871/prod-api/profile/upload",
xjxsoptions: [
{
@@ -492,7 +514,6 @@
},
],
addvalue: "娣诲姞棰樼洰",
-
// 鏌ヨ鍙傛暟
queryParams: {
@@ -527,25 +548,39 @@
// },
content(newVal) {
// 鍐呭鍙樺寲鏃惰Е鍙戯紝鍙互鍦ㄨ繖閲屽鐞嗚嚜鍔ㄤ繚瀛樼瓑閫昏緫
- this.$emit('content-change', newVal)
- }
+ this.$emit("content-change", newVal);
+ },
},
beforeDestroy() {
const editor = this.editor;
if (editor == null) return;
editor.destroy(); // 缁勪欢閿�姣佹椂锛屽強鏃堕攢姣佺紪杈戝櫒
},
+ computed: {
+ displayedTags() {
+ // 杩斿洖鍓�10涓猼ag
+ return this.illnesslist.slice(0, 10);
+ },
+ hasMore() {
+ // 鍒ゆ柇鏄惁鏈夋洿澶氱殑tag
+ return this.illnesslist.length > 10;
+ },
+ remaining() {
+ // 璁$畻鍓╀綑鐨則ag鏁伴噺
+ return this.illnesslist.length - 10;
+ },
+ },
methods: {
onCreated(editor) {
this.editor = Object.seal(editor); // 涓�瀹氳鐢� Object.seal()锛屽惁鍒欎細鎶ラ敊
},
// 缂栬緫鍣ㄥ垱寤哄洖璋�
- handleEditorCreated(editor) {
+ handleEditorCreated(editor) {
this.editorRef = editor;
console.log("缂栬緫鍣ㄥ凡鍒涘缓", editor);
},
- // 閿�姣佺紪杈戝櫒
+ // 閿�姣佺紪杈戝櫒
destroyEditor() {
if (this.editorRef) {
this.editorRef.destroy();
@@ -601,7 +636,7 @@
// ------------------
// let html =
- // '<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/钀ュ吇娉典粙缁�.mp4"></video><p>娴嬭瘯111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p><br></p>';
+ // '<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.88.117.236:8090/prod-api/profile/upload/vadio/钀ュ吇娉典粙缁�.mp4"></video><p>娴嬭瘯111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.88.117.236:8090/prod-api/profile/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p><br></p>';
// // html = html.parserdom(this.oldPattern, this.newPattern);
// html = this.parserdom(html);
// console.log(html, "html");
@@ -616,17 +651,27 @@
var doc = parser.parseFromString(html, "text/html");
// 瀹氫箟瑕佹浛鎹㈢殑鏂版棫URL
- var oldUrlBase = "http://192.168.191.181:8095/profile/upload";
- var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
+ var oldUrlBase = this.oldPattern;
+ // var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
+ var newUrlBase = this.newPattern;
// 鑾峰彇鎵�鏈夌殑video鍏冪礌
var videos = doc.querySelectorAll("video");
+ var images = doc.querySelectorAll("img");
// 閬嶅巻鎵�鏈夌殑video鍏冪礌骞舵浛鎹rc灞炴��
videos.forEach(function (video) {
var src = video.getAttribute("src");
if (src.startsWith(oldUrlBase)) {
video.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
+ }
+ });
+ console.log(images,'images');
+
+ images.forEach(function (img) {
+ var src = img.getAttribute("src");
+ if (src.startsWith(oldUrlBase)) {
+ img.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
}
});
@@ -656,6 +701,10 @@
fileName: this.generateRandomHtmlFilename(),
}).then((res) => {
this.ruleForm.richText = res.msg;
+ this.ruleForm.richText = res.msg.replace(
+ this.oldPattern,
+ this.newPattern
+ );
console.log(this.ruleForm.richText, "this.ruleForm.richText");
// 澶勭悊鍐呯綉html
addrichText({
@@ -1011,7 +1060,8 @@
// },
// 鑾峰彇杩滅▼鍐呭
Getmissioncontent(url) {
- axios.get(url)
+ axios
+ .get(url)
.then((response) => {
this.content = response.data;
})
@@ -1023,7 +1073,7 @@
},
// 鐢熷懡鍛ㄦ湡閽╁瓙
beforeUnmount() {
- this.destroyEditor()
+ this.destroyEditor();
},
};
</script>
--
Gitblit v1.9.3