From a49ce34b34915aaa940b969fc42ade4845cd2222 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期六, 07 九月 2024 20:05:25 +0800
Subject: [PATCH] 测试完成
---
dist.zip | 0
src/views/knowledge/education/compilequer/index.vue | 29 +++++++++++++++++++++++++----
src/views/patient/propaganda/Missioncreation.vue | 14 +++++++-------
3 files changed, 32 insertions(+), 11 deletions(-)
diff --git a/dist .zip b/dist.zip
similarity index 82%
rename from dist .zip
rename to dist.zip
index 3fbdea0..8f383cc 100644
--- a/dist .zip
+++ b/dist.zip
Binary files differ
diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index 34798b9..15295fb 100644
--- a/src/views/knowledge/education/compilequer/index.vue
+++ b/src/views/knowledge/education/compilequer/index.vue
@@ -408,7 +408,7 @@
];
export default {
- name: "Educationinfo",
+ name: "aEducationinfo",
components: { OptionalForm },
data() {
return {
@@ -585,7 +585,7 @@
this.dynamicTags = res.data[0].heLibraryTagList.map(
this.processElement
);
- this.Getmissioncontent(this.ruleForm.richText);
+ this.Getmissioncontent(this.ruleForm.htmlRichText);
if (this.ruleForm.deptNames) {
this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
}
@@ -623,12 +623,13 @@
this.ruleForm.suitway.length != 0
? this.ruleForm.suitway.join(",")
: "";
-
+ this.fileName = this.fileName ? this.fileName : "娴嬭瘯.html";
addrichText({
content: this.content,
- fileName: this.fileName ? this.fileName : "娴嬭瘯.html",
+ fileName: this.ensureHtmlExtension(this.fileName),
}).then((res) => {
this.ruleForm.richText = res.msg;
+ this.ruleForm.htmlRichText = this.replaceIpAndPort(res.msg);
if (this.id) {
this.ruleForm.isoperation = 2;
compilelibrary(this.ruleForm).then((res) => {
@@ -646,6 +647,26 @@
}
});
},
+ replaceIpAndPort(path) {
+ // 姝e垯琛ㄨ揪寮忓尮閰岻P鍦板潃鍜岀鍙�
+ const ipPortRegex = /(\b(?:\d{1,3}\.){3}\d{1,3}(?::\d+)?)/;
+ // 鏇挎崲涓烘寚瀹氱殑IP鍦板潃鍜岀鍙�
+ return path.replace(ipPortRegex, "192.168.191.181:8095");
+ },
+ ensureHtmlExtension(filename) {
+ // 妫�鏌ユ枃浠跺悕鏄惁浠�.mp4缁撳熬
+ if (filename.toLowerCase().endsWith(".mp4")) {
+ // 濡傛灉鏄紝涓嶈繘琛屼换浣曟洿鏀�
+ return filename;
+ }
+ // 鍚﹀垯锛屾鏌ユ槸鍚︿互.html缁撳熬
+ if (!filename.toLowerCase().endsWith(".html")) {
+ // 濡傛灉涓嶆槸锛屾坊鍔�.html鍚庣紑
+ filename += ".html";
+ }
+ return filename;
+ },
+
// 淇濆瓨鐤剧梾
confirmillness(guid) {
this.illnesslist.forEach((item, index) => {
diff --git a/src/views/patient/propaganda/Missioncreation.vue b/src/views/patient/propaganda/Missioncreation.vue
index bf53714..81d336e 100644
--- a/src/views/patient/propaganda/Missioncreation.vue
+++ b/src/views/patient/propaganda/Missioncreation.vue
@@ -437,7 +437,7 @@
<el-dialog title="妯℃澘棰勮" :visible.sync="previewtf" width="60%">
<div class="preview-left">
<!-- 鍗曢�� -->
- <div v-html="richText"></div>
+ <div v-html="htmlRichText"></div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="previewGo">鍓嶅線妯℃澘璇︽儏淇敼</el-button>
@@ -599,7 +599,7 @@
checkboxlist: [],
tableLabel: [],
questionList: [],
- richText: "<p>Hello, <strong>world</strong>!</p>",
+ htmlRichText: "<p>Hello, <strong>world</strong>!</p>",
// 鎮h�呰〃鍗�
tableLabelhz: [
// { label: "搴忓彿", width: "", prop: "patid" },
@@ -899,7 +899,7 @@
selectfn(row, type) {
// 妯℃澘鎯呭喌涓嬭幏鍙栨ā鏉夸俊鎭�
this.libName = row.preachname;
- this.richText = null;
+ this.htmlRichText = null;
this.libId = row.id;
console.log(row, "row");
this.Tasktemplate = row;
@@ -907,13 +907,13 @@
this.previewid = row.svyid;
console.log(this.questionList, "questionList");
// this.Variablehandling(row.svyLibScripts, 1);
- console.log(row.richText);
+ console.log(row.htmlRichText);
axios
- .get(row.richText)
+ .get(row.htmlRichText)
.then((response) => {
console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
- this.richText = response.data;
- this.richText = this.addStyleToImages(this.richText);
+ this.htmlRichText = response.data;
+ this.htmlRichText = this.addStyleToImages(this.htmlRichText);
})
.catch((error) => {
this.$modal.msgError("鑾峰彇瀵屾枃鏈け璐�");
--
Gitblit v1.9.3