From aa6a9968080d44da66994aa6a33711d04329e64d 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: Fri, 27 Sep 2024 11:04:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BD=9C=E4=B8=9A=E6=89=B9?=
=?UTF-8?q?=E6=94=B9=E7=AA=97=E5=8F=A3=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/api/classTask/index.js | 16 +-
src/renderer/src/router/index.js | 5 +
src/renderer/src/store/modules/tool.js | 1 +
src/renderer/src/utils/tool.js | 49 ++
.../src/views/classTask/classTask.vue | 38 +-
.../src/views/classTask/classTaskAssign.vue | 184 +++-
.../classTask/container/item-dialog-score.vue | 18 +-
.../container/newTask/taskTypeView.vue | 604 +++++++-------
.../views/classTask/container/quizStats.vue | 4 +-
.../views/classTask/container/task-item.vue | 38 +-
.../src/views/classTask/newClassTask.vue | 31 +-
.../src/views/classTask/teachClassTask.vue | 785 ++++++++++++++++++
12 files changed, 1370 insertions(+), 403 deletions(-)
create mode 100644 src/renderer/src/views/classTask/teachClassTask.vue
diff --git a/src/renderer/src/api/classTask/index.js b/src/renderer/src/api/classTask/index.js
index 8f8672b..a738cb0 100644
--- a/src/renderer/src/api/classTask/index.js
+++ b/src/renderer/src/api/classTask/index.js
@@ -72,7 +72,21 @@ export function updateClasswork(data) {
})
}
-
+// 删除classworkeval
+export function delClassworkeval(id) {
+ return request({
+ url: '/education/classworkeval/' + id,
+ method: 'delete'
+ })
+}
+// 新增classworkeval
+export function addClassworkeval(data) {
+ return request({
+ url: '/education/classworkeval',
+ method: 'post',
+ data: data
+ })
+}
// 查询evaluationclue列表
export function listEvaluationclue(query) {
diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js
index 2fa6890..13e69b9 100644
--- a/src/renderer/src/router/index.js
+++ b/src/renderer/src/router/index.js
@@ -15,6 +15,11 @@ export const constantRoutes = [
// component: ()=> import('../login/index.vue'),
hidden: true
},
+ {
+ path: '/teachClassTask',
+ component: () => import('@/views/classTask/teachClassTask.vue'),
+ hidden: true
+ },
{
path: '/',
component: Layout,
diff --git a/src/renderer/src/store/modules/tool.js b/src/renderer/src/store/modules/tool.js
index 8c818cd..63615e7 100644
--- a/src/renderer/src/store/modules/tool.js
+++ b/src/renderer/src/store/modules/tool.js
@@ -15,6 +15,7 @@ export const useToolState = defineStore('tool', {
showBoardAll: false, // 全屏画板-是否显示
isPdfWin: false, // pdf窗口是否打开
isToolWin: false, // 工具窗口是否打开
+ isTaskWin: false, // 批改窗口是否打开
curSubjectNode: {
data: {}, // 当前教材节点 (包含当前教材 单元)
querySearch: {} // 查询资源所需参数
diff --git a/src/renderer/src/utils/tool.js b/src/renderer/src/utils/tool.js
index 608ae32..39aa2b6 100644
--- a/src/renderer/src/utils/tool.js
+++ b/src/renderer/src/utils/tool.js
@@ -100,6 +100,7 @@ export function ipcHandle(fn,key, cb) {
*/
let wins_tool = null
let winPdf=null
+let winChild=null
export const createWindow = async (type, data) => {
switch(type) {
case 'tool-sphere': { // 创建-悬浮球
@@ -157,6 +158,32 @@ export const createWindow = async (type, data) => {
winPdf=win
break
}
+ case 'open-taskwin': { //作业批改-web
+ if(winChild){ //判断是否已经打开
+ winChild.focus();
+ return
+ }
+ const option = data.option||{}
+ const defOption = {
+ width: 1280,// 1920,
+ height: 720,// 1080,
+ frame: true, // 要创建无边框窗口
+ // resizable: true, // 禁止窗口大小缩放
+ alwaysOnTop: false, // 窗口是否总是显示在其他窗口之前
+ title:'子窗口',
+ show: false, //创建时窗口不可见
+ maximizable: true,
+ autoHideMenuBar: true,// 自动隐藏菜单栏
+ }
+ data.isConsole = true // 是否开启控制台
+ data.option = {...defOption, ...option}
+ winChild = await toolWindow(data)
+ winChild.type = type // 唯一标识
+ winChild.show()
+ winChild.setFullScreen(false) // 设置窗口为全屏
+ eventHandles(type, winChild) // 事件监听处理
+ return winChild
+ }
default:
break
}
@@ -234,6 +261,7 @@ const eventHandles = (type, win) => {
if(onClosed) onClosed() // 自定义关闭事件
win = null
wins_tool = null
+ winChild=null
})
// 新窗口-创建事件(如:主进程加载远程服务)
@@ -292,6 +320,27 @@ const eventHandles = (type, win) => {
}
publicMethods(on) // 加载公共方法
break}
+ case 'open-taskwin': { // -子窗口
+ // 监听窗口的激活事件
+ win.on('focus', async () => {
+ toolState.isTaskWin=true
+ win&&win.reload(); //刷新该窗口
+ });
+ // 监听窗口关闭事件
+ win.on('closed', function () {
+ console.log('关闭窗口')
+ // 设置状态(再次设置-防止未设置到)
+ if(toolState.isTaskWin) toolState.isTaskWin = false
+ winChild=null
+ win&&win.destroy()
+ });
+ const on = {
+ onClosed: () => {
+ }
+ }
+ publicMethods(on) // 加载公共方法
+ break;
+ }
default:
break
}
diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue
index a296257..b2d9bf1 100644
--- a/src/renderer/src/views/classTask/classTask.vue
+++ b/src/renderer/src/views/classTask/classTask.vue
@@ -64,6 +64,7 @@
+
+
+
+