From a49ce34b34915aaa940b969fc42ade4845cd2222 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期六, 07 九月 2024 20:05:25 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/education/compilequer/index.vue | 29 +++++++++++++++++++++++++----
1 files changed, 25 insertions(+), 4 deletions(-)
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) => {
--
Gitblit v1.9.3