From 55100215661a2917e41a8f548e059353785881fe Mon Sep 17 00:00:00 2001 From: zdg Date: Tue, 24 Dec 2024 16:06:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8A=E8=AF=BE=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E4=B8=8D=E9=80=89=E7=8F=AD=E7=BA=A7=E5=BC=80=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 + .../src/AixPPTist/src/hooks/useScreening.ts | 4 ++++ .../views/prepare/container/class-start.vue | 18 +++++++++--------- src/renderer/src/views/prepare/index.vue | 6 +++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.env.development b/.env.development index 422cd04..b20e6ac 100644 --- a/.env.development +++ b/.env.development @@ -17,6 +17,7 @@ VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktx VITE_APP_BUILD_BASE_PATH = 'https://file.ysaix.com:7868/' # websocket 地址 +# VITE_APP_WS_URL = 'wss://prev.ysaix.com:7868' VITE_APP_WS_URL = 'wss://file.ysaix.com:7868' # VITE_APP_WS_URL = 'ws://192.168.2.16:7865' diff --git a/src/renderer/src/AixPPTist/src/hooks/useScreening.ts b/src/renderer/src/AixPPTist/src/hooks/useScreening.ts index 979b8c4..4a35762 100644 --- a/src/renderer/src/AixPPTist/src/hooks/useScreening.ts +++ b/src/renderer/src/AixPPTist/src/hooks/useScreening.ts @@ -1,5 +1,6 @@ import { useScreenStore, useSlidesStore, useClasscourseStore } from '../store' import { enterFullscreen, exitFullscreen, isFullscreen } from '../utils/fullscreen' +import { sessionStore } from '@/utils/store' // electron-store 状态管理 import ChatWs from '@/plugins/socket' // 聊天socket export default () => { @@ -25,6 +26,9 @@ export default () => { if (!!classcourse) { //DOTO 有课堂,执行退相关操作 console.log('退出放映状态') ChatWs?.close() // 关闭ws + sessionStore.delete('curr.classcourse') // 清除课堂信息 + sessionStore.delete('curr.resource') // 清除课件信息 + sessionStore.delete('curr.isPublic') // 清除公屏状态 setTimeout(() => { window.close() // 关闭窗口 }, 1000) diff --git a/src/renderer/src/views/prepare/container/class-start.vue b/src/renderer/src/views/prepare/container/class-start.vue index 3edc5d7..fbac0c8 100644 --- a/src/renderer/src/views/prepare/container/class-start.vue +++ b/src/renderer/src/views/prepare/container/class-start.vue @@ -25,9 +25,9 @@ @@ -249,10 +249,10 @@ const getClasscourseList = async type => { // 创建课程 isPublic 公屏上课 const createClasscourse = async (isPublic = false) => { const { classid } = classForm.form - if (!classid) { - ElMessage.warning('请选择班级') - return - } + // if (!classid) { + // ElMessage.warning('请选择班级') + // return + // } dt.loading = true const { entpcourseid, evalid, id, coursetitle } = myClassActive.value // 课件对象 const curDate = commUtil.getDateNow('yyyy-MM-dd') @@ -372,9 +372,9 @@ const openPublicScreen = (classcourse, isPublic) => { createWindow('open-win', { url: '/pptist', // 窗口关闭时,清除缓存 close: () => { - sessionStore.set('curr.resource', null) // 清除缓存 - sessionStore.set('curr.classcourse', null) // 清除缓存 - sessionStore.set('curr.isPublic', null) // 清除缓存 + sessionStore.delete('curr.resource') // 清除缓存 + sessionStore.delete('curr.classcourse') // 清除缓存 + sessionStore.delete('curr.isPublic') // 清除缓存 } }) visible.value = false // 关闭弹窗 diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 7ee3ab0..0403c15 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -497,11 +497,11 @@ export default { createWindow('open-win', { url: '/pptist', // 窗口关闭时,清除缓存 close: () => { - sessionStore.set('curr.resource', null) // 清除缓存 + sessionStore.delete('curr.resource') // 清除缓存 if (type=='edit') { - sessionStore.set('curr.smarttalk', null) // 清除缓存 + sessionStore.delete('curr.smarttalk') // 清除缓存 this.asyncAllFile() // 刷新资源列表 - } else sessionStore.set('curr.classcourse', null) // 清除缓存 + } else sessionStore.delete('curr.classcourse') // 清除缓存 } }) }, From 4b2d13db8e49afdcf34be0dca2635a8312732e05 Mon Sep 17 00:00:00 2001 From: lyc Date: Tue, 24 Dec 2024 17:31:56 +0800 Subject: [PATCH 2/2] edit --- src/renderer/src/views/prepare/container/ai-pptistV2.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/views/prepare/container/ai-pptistV2.vue b/src/renderer/src/views/prepare/container/ai-pptistV2.vue index f199101..56db4e3 100644 --- a/src/renderer/src/views/prepare/container/ai-pptistV2.vue +++ b/src/renderer/src/views/prepare/container/ai-pptistV2.vue @@ -10,7 +10,7 @@
{{ outputText }}
- {{ outputText ? '重新生产' : '生成大纲' }} + {{ outputText ? '重新生成' : '生成大纲' }} 下一步