diff --git a/src/layout/components/ESignatureDialog.vue b/src/layout/components/ESignatureDialog.vue
index 9343561..53795ce 100644
--- a/src/layout/components/ESignatureDialog.vue
+++ b/src/layout/components/ESignatureDialog.vue
@@ -96,7 +96,7 @@ export default {
// 设置画笔样式
this.ctx.strokeStyle = "#000000";
- this.ctx.lineWidth = 2;
+ this.ctx.lineWidth = 8;
this.ctx.lineCap = "round";
this.ctx.lineJoin = "round";
diff --git a/src/layout/components/SystemSettingDialog.vue b/src/layout/components/SystemSettingDialog.vue
index 2ccdf65..fcff424 100644
--- a/src/layout/components/SystemSettingDialog.vue
+++ b/src/layout/components/SystemSettingDialog.vue
@@ -29,8 +29,8 @@
-->
- Ctrl+Enter发送
- Enter发送
+ Ctrl+Enter发送
+ Enter发送
@@ -173,7 +173,7 @@ export default {
cacheAuthorized: false,
basicForm: {
notification: true,
- sendKey: "enter",
+ sendKey: "Ctrl+Enter",
videoPath: "",
cachePath: "",
},
@@ -215,6 +215,7 @@ export default {
const defaultPath = this.getDefaultPath();
if (savedSettings) {
const settings = JSON.parse(savedSettings);
+ let needSave = false;
// 合并保存的设置到表单
if (settings.basicForm) {
this.basicForm = { ...this.basicForm, ...settings.basicForm };
@@ -225,6 +226,11 @@ export default {
if (!this.basicForm.cachePath) {
this.basicForm.cachePath = defaultPath;
}
+ // 如果没有保存发送键设置,使用默认值 Ctrl+Enter
+ if (!this.basicForm.sendKey) {
+ this.basicForm.sendKey = "Ctrl+Enter";
+ needSave = true;
+ }
}
if (settings.audioForm) {
this.audioForm = { ...this.audioForm, ...settings.audioForm };
@@ -232,10 +238,20 @@ export default {
if (settings.otherForm) {
this.otherForm = { ...this.otherForm, ...settings.otherForm };
}
+ // 迁移逻辑:如果设置中没有版本标记,说明是旧版本,更新发送键为新默认值
+ if (!settings.version) {
+ this.basicForm.sendKey = "Ctrl+Enter";
+ needSave = true;
+ }
+ if (needSave) {
+ this.saveSettings();
+ }
} else {
- // 如果没有保存的设置,使用默认路径
+ // 如果没有保存的设置,使用默认值并保存
this.basicForm.videoPath = defaultPath;
this.basicForm.cachePath = defaultPath;
+ this.basicForm.sendKey = "Ctrl+Enter";
+ this.saveSettings();
}
} catch (e) {
console.error("加载系统设置失败:", e);
@@ -245,11 +261,16 @@ export default {
saveSettings() {
try {
const settings = {
+ version: "1.0",
basicForm: { ...this.basicForm },
audioForm: { ...this.audioForm },
otherForm: { ...this.otherForm },
};
localStorage.setItem(SYSTEM_SETTINGS_KEY, JSON.stringify(settings));
+ const event = new CustomEvent('systemSettingsChanged', {
+ detail: { settings }
+ });
+ window.dispatchEvent(event);
} catch (e) {
console.error("保存系统设置失败:", e);
}
@@ -400,7 +421,7 @@ export default {
this.cacheAuthorized = false;
this.basicForm = {
notification: true,
- sendKey: "enter",
+ sendKey: "Ctrl+Enter",
videoPath: defaultPath,
cachePath: defaultPath,
};
diff --git a/src/views/knowledge/index.vue b/src/views/knowledge/index.vue
index 5d7b617..c8a03b8 100644
--- a/src/views/knowledge/index.vue
+++ b/src/views/knowledge/index.vue
@@ -171,7 +171,7 @@
v-show="queryRightParams.total > 0"
:total="queryRightParams.total"
:page.sync="queryRightParams.page"
- :limit.sync="queryRightParams.pageSize"
+ :limit.sync="queryRightParams.size"
@pagination="getKnowledgeList"
/>
@@ -343,7 +343,7 @@ export default {
cate_id: 0,
is_mine: "-1",
page: 1,
- pageSize: 10,
+ size: 10,
total: 0,
},
// 知识库右侧-列表
@@ -572,32 +572,121 @@ export default {
? row.file_name.split(".").pop().toLowerCase()
: "";
if (videoTypes.includes(fileType)) {
- // 视频:新窗口铺满全屏播放
- const videoUrl = this.getFullFilePath(row.file_path);
- const html = `
-
-
-
-
- ${row.title || "视频播放"}
-
-
-
-
-
- `;
- const blob = new Blob([html], { type: "text/html;charset=utf-8" });
- const blobUrl = URL.createObjectURL(blob);
- postKnowledgePlay({ knowledge_id: row.id });
- window.open(blobUrl, "_blank");
+ postKnowledgePlay({ knowledge_id: row.id }).then((res) => {
+ if (res.code === 200) {
+ // 视频:使用新窗口播放,支持流媒体
+ const videoUrl = this.getFullFilePath(row.file_path);
+ // 创建视频播放页面(支持大文件流媒体)
+ this.createVideoPlayer(videoUrl, row.title || "视频播放");
+ }
+ })
} else {
postKnowledgePlay({ knowledge_id: row.id }).then((res) => {
- window.open(this.getFullFilePath(row.file_path), "_blank");
- });
+ if (res.code === 200) {
+ window.open(this.getFullFilePath(row.file_path), "_blank");
+ }
+ })
+ }
+ },
+ // 创建视频播放器(支持大文件流媒体播放)
+ createVideoPlayer(videoUrl, title) {
+ try {
+ // 检查浏览器是否支持流媒体
+ const supportsStreaming = this.checkStreamingSupport();
+
+ if (supportsStreaming) {
+ // 方式一:直接打开视频URL(支持流媒体)
+ // 创建一个带有视频标签的页面,使用流式加载
+ const playerWindow = window.open("", "_blank");
+ if (playerWindow) {
+ playerWindow.document.write(`
+
+
+
+
+
+ ${title}
+
+
+
+
+
+