From e8912594133c047f0f28a4348f1a21476deedd4c Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 23 Oct 2024 16:09:18 +0800 Subject: [PATCH] =?UTF-8?q?ppt=20=E4=B8=8A=E8=AF=BE=20=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E7=8E=A9=E4=BD=9C=E4=B8=9A=20=E6=89=93=E5=BC=80=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=89=B9=E6=94=B9=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/set-homework/index.vue | 3 +- .../src/views/tool/components/homework.vue | 26 +- .../src/views/tool/components/side.vue | 6 +- src/renderer/src/views/tool/createHomework.js | 239 ++++++++++++++++-- 4 files changed, 244 insertions(+), 30 deletions(-) diff --git a/src/renderer/src/components/set-homework/index.vue b/src/renderer/src/components/set-homework/index.vue index 17127b8..08b92a8 100644 --- a/src/renderer/src/components/set-homework/index.vue +++ b/src/renderer/src/components/set-homework/index.vue @@ -259,9 +259,10 @@ const onSubmit = (formEl) => { classworkarray: JSON.stringify(ary) }) .then((res) => { + setLoading.value = false ElMessage.success('操作成功') - emit('on-success', res.data) + emit('on-success', res) cloneDialog(formEl) }) .catch(() => { diff --git a/src/renderer/src/views/tool/components/homework.vue b/src/renderer/src/views/tool/components/homework.vue index 720a905..04505d2 100644 --- a/src/renderer/src/views/tool/components/homework.vue +++ b/src/renderer/src/views/tool/components/homework.vue @@ -85,10 +85,11 @@ import FileImage from '@/components/file-image/index.vue' import { useGetHomework } from '@/hooks/useGetHomework' import { ipcMsgSend, ipcMsgInvoke } from '@/utils/tool' import { useToolState } from '@/store/modules/tool' +import {createWindow} from '@/utils/tool' import Lesson from './lesson.vue'; import { parseCataByNode } from '@/utils/talkFile' import MsgEnum from '@/plugins/imChat/msgEnum' // 消息枚举 -import { createHomework } from '../createHomework' +import { createHomework, getClassWorkList, getStudentClassWorkData } from '../createHomework' import { sessionStore } from '@/utils/store' const route = useRoute(); @@ -111,10 +112,12 @@ const curNode = reactive({ }) const props = defineProps(['curNode']) - +const emit = defineEmits(['closeActive']) const sendHomework = (row,type) => { + + if(type == 'item'){ // 布置推送单个作业 curRow.value = [row] @@ -128,11 +131,28 @@ const sendHomework = (row,type) => { const closeHomework = async() => { ipcMsgSend('tool-sphere:set:ignore', true) } + + // 推送成功 -const successHomework = (data)=>{ +const successHomework = async (data)=>{ + // data.msg // console.log('推送成功', data) // 发送im消息-推送作业(app|平板) // ipcMsgInvoke('im-chat:msg', data, MsgEnum.HEADS.MSG_0016) + + /** + * 推送成功 打开作业批改 + * 2024/10/23 + * 以下两个函数 代码 参照"作业批改" 页面 + */ + let result = await getClassWorkList(data.msg) + result = await getStudentClassWorkData() + localStorage.setItem('teachClassWorkItem', JSON.stringify(result[0])); + toolStore.isTaskWin=true; // 设置打开批改窗口 + emit('closeActive') + createWindow('open-taskwin',{url:'/teachClassTask'}); // 调用新窗口批改页面 + + } // 章节目录change const changeChapter = async (data)=>{ diff --git a/src/renderer/src/views/tool/components/side.vue b/src/renderer/src/views/tool/components/side.vue index 1cb278b..29083db 100644 --- a/src/renderer/src/views/tool/components/side.vue +++ b/src/renderer/src/views/tool/components/side.vue @@ -25,7 +25,7 @@
- + {{activeObj}}
@@ -101,6 +101,10 @@ const clickHandel = (o, e) => { } emit('change', o) } + +const closeActive = () =>{ + isVisible.value = false +}