From 9a74630e567ca4e08acad9d558264f2337b8d9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Sun, 29 Sep 2024 09:31:16 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E6=89=B9=E9=98=85=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=98=B2=E8=BF=9E=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/classTask/classTask.vue | 16 ++++++++++------ .../src/views/desktop/container/work-trend.vue | 16 +++++++++++----- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue index 8247aed..504d49b 100644 --- a/src/renderer/src/views/classTask/classTask.vue +++ b/src/renderer/src/views/classTask/classTask.vue @@ -377,6 +377,7 @@ const closeDialog = () => { getStudentClassWorkDataPolling() } +const openDialogTime = ref(null);//弹窗 /** * 开启新批改弹窗 * @param item 作业对象 @@ -386,12 +387,15 @@ const onClickItem = (item) => { clearInterval(pollingST.value) // itemDialogRef.value.openDialog(item) - // 新跳转子窗口链接 - // 1、本地缓存item数据,2、打开子窗口 3、子窗口加载item数据 - // localStorage.setItem('teachClassWorkItem', JSON.stringify(item)) - sessionStore.set('teachClassWorkItem', item) - toolState.isTaskWin=true //设置打开批改窗口 - createWindow('open-taskwin',{url:'/teachClassTask'}) + if(openDialogTime.value) return; + clearTimeout(openDialogTime.value) + openDialogTime.value = setTimeout(() => { + openDialogTime.value = null; + toolState.isTaskWin=true; // 设置打开批改窗口 + sessionStore.set('teachClassWorkItem', item); // 缓存点击的item + // 调用新窗口批改页面 + createWindow('open-taskwin',{url:'/teachClassTask'}) + }, 1000) } diff --git a/src/renderer/src/views/desktop/container/work-trend.vue b/src/renderer/src/views/desktop/container/work-trend.vue index 40f5e15..45fc049 100644 --- a/src/renderer/src/views/desktop/container/work-trend.vue +++ b/src/renderer/src/views/desktop/container/work-trend.vue @@ -67,14 +67,20 @@ const getHomework = async () => { loading.value = false } } + +const openDialogTime = ref(null);//弹窗 // 批改作业 const onClickItem = (item) => { console.log('开启弹窗') - // itemDialogRef.value.openDialog(item) - // 调用新窗口批改页面 - sessionStore.set('teachClassWorkItem', item) - toolState.isTaskWin=true //设置打开批改窗口 - createWindow('open-taskwin',{url:'/teachClassTask'}) + if(openDialogTime.value) return; + clearTimeout(openDialogTime.value) + openDialogTime.value = setTimeout(() => { + openDialogTime.value = null; + toolState.isTaskWin=true; // 设置打开批改窗口 + sessionStore.set('teachClassWorkItem', item); // 缓存点击的item + // 调用新窗口批改页面 + createWindow('open-taskwin',{url:'/teachClassTask'}) + }, 1000) } const tagType = (time) => { From 19e385ec2467e5b418899e00b54b1a78f642813a Mon Sep 17 00:00:00 2001 From: lyc Date: Sun, 29 Sep 2024 11:10:28 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E6=96=87=E5=AD=97=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/layout/components/Header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index e85f48f..212df5c 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -153,7 +153,7 @@ function handleCommand(command) { function logout() { const hasClass = sessionStore.has('activeClass.id') - if (hasClass || toolState.isToolWin) return ElMessage.warning('当前正在上课,请先结结束上课') + if (hasClass || toolState.isToolWin) return ElMessage.warning('当前正在上课,请先结束上课') ElMessageBox.confirm('确认退出系统吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', From 61493a7f4efdfbc7389d562529ef041f18764031 Mon Sep 17 00:00:00 2001 From: zdg Date: Sun, 29 Sep 2024 15:13:27 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/prepare/container/class-start.vue | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/renderer/src/views/prepare/container/class-start.vue b/src/renderer/src/views/prepare/container/class-start.vue index 7df6a8f..3d64129 100644 --- a/src/renderer/src/views/prepare/container/class-start.vue +++ b/src/renderer/src/views/prepare/container/class-start.vue @@ -52,7 +52,7 @@
- + @@ -96,7 +96,7 @@ import * as Http_api from '@/api/apiService' // api接口 import useUserStore from "@/store/modules/user" // 状态管理:user import CryptoJS from 'crypto-js' -const baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH +let baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH const userStore = useUserStore() const visible = ref(false) // 是否打开窗口 const myClassActive = ref({}) // 我的课件:准备上课的APT课件 @@ -286,30 +286,30 @@ const getQrUrl = async() => { const { userName, userId } = userStore.user if (!id||!userName) return // 原始方法(需要wx登录) - const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}` - teacherForm.form.qrUrl = baseUrl + qrCodeUrl - // // const baseUrl = 'https://localhost:7860' - // // token跳转 - // const url = `/teaching/classteachingonmobile?classcourseid=${id}` // 跳转移动端-上课 - // let qrCodeUrl = '' // 移动端-二维码地址 - // try { - // // 走后端缓存url - // const res = await Http_api.toLink.setLink(url) // 设置链接-缓存 - // if (res.code == 200) { - // const redisKey = res.data - // const base64Key = CryptoJS.enc.Utf8.parse(redisKey).toString(CryptoJS.enc.Base64) // base64加密 - // const enStrUrl = encodeURIComponent(base64Key) // url转码 - // qrCodeUrl = `?_server=${enStrUrl}` - // teacherForm.form.qrUrl = baseUrl + qrCodeUrl - // } - // } catch (error) { // 异常, 直接加密token - // const jsonStr = JSON.stringify({ url, token: userStore.token }) // json数据:{url, token} - // const key = `Ax19i14Ga6qEDOkGTo` // AES加密-key - // const enStr = CryptoJS.AES.encrypt(jsonStr, key).toString() // AES加密-数据 - // const enStrUrl = encodeURIComponent(enStr) // url转码 - // qrCodeUrl = `?_web=${enStrUrl}` - // } + // const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}` // teacherForm.form.qrUrl = baseUrl + qrCodeUrl + // baseUrl = 'https://localhost:7860' + // token跳转 + const url = `/teaching/classteachingonmobile?classcourseid=${id}` // 跳转移动端-上课 + let qrCodeUrl = '' // 移动端-二维码地址 + try { + // 走后端缓存url + const res = await Http_api.toLink.setLink(url) // 设置链接-缓存 + if (res.code == 200) { + const redisKey = res.data + const base64Key = CryptoJS.enc.Utf8.parse(redisKey).toString(CryptoJS.enc.Base64) // base64加密 + const enStrUrl = encodeURIComponent(base64Key) // url转码 + qrCodeUrl = `${url}&_server=${enStrUrl}` + teacherForm.form.qrUrl = baseUrl + qrCodeUrl + } + } catch (error) { // 异常, 直接加密token + const jsonStr = JSON.stringify({ url, token: userStore.token }) // json数据:{url, token} + const key = `Ax19i14Ga6qEDOkGTo` // AES加密-key + const enStr = CryptoJS.AES.encrypt(jsonStr, key).toString() // AES加密-数据 + const enStrUrl = encodeURIComponent(enStr) // url转码 + qrCodeUrl = `${url}&?_web=${enStrUrl}` + } + teacherForm.form.qrUrl = baseUrl + qrCodeUrl } // 定时器监听 From 17e3ee62df2c9397419baedb128e5b164dface5a Mon Sep 17 00:00:00 2001 From: zdg Date: Sun, 29 Sep 2024 15:35:25 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=8C=E7=BB=B4?= =?UTF-8?q?=E7=A0=81=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/prepare/container/class-start.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/views/prepare/container/class-start.vue b/src/renderer/src/views/prepare/container/class-start.vue index 3d64129..b4c6d7c 100644 --- a/src/renderer/src/views/prepare/container/class-start.vue +++ b/src/renderer/src/views/prepare/container/class-start.vue @@ -290,11 +290,11 @@ const getQrUrl = async() => { // teacherForm.form.qrUrl = baseUrl + qrCodeUrl // baseUrl = 'https://localhost:7860' // token跳转 - const url = `/teaching/classteachingonmobile?classcourseid=${id}` // 跳转移动端-上课 + let url = `teaching/classteachingonmobile?classcourseid=${id}` // 跳转移动端-上课 let qrCodeUrl = '' // 移动端-二维码地址 try { // 走后端缓存url - const res = await Http_api.toLink.setLink(url) // 设置链接-缓存 + const res = await Http_api.toLink.setLink('/' + url) // 设置链接-缓存 if (res.code == 200) { const redisKey = res.data const base64Key = CryptoJS.enc.Utf8.parse(redisKey).toString(CryptoJS.enc.Base64) // base64加密 From b085d96c0e354e58763e147bf6fae390c695ac61 Mon Sep 17 00:00:00 2001 From: lyc Date: Tue, 8 Oct 2024 11:23:16 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/layout/index.vue | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/renderer/src/layout/index.vue b/src/renderer/src/layout/index.vue index 642e362..6536df9 100644 --- a/src/renderer/src/layout/index.vue +++ b/src/renderer/src/layout/index.vue @@ -4,14 +4,14 @@
-