From 5089ecce3d60be0c63358adc644391e31310888d 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: Wed, 25 Sep 2024 11:22:52 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=89=B9=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=E6=9F=A5=E8=AF=A2=E6=8E=92=E5=BA=8F=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/classTask/classTask.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue index 4254de3..a296257 100644 --- a/src/renderer/src/views/classTask/classTask.vue +++ b/src/renderer/src/views/classTask/classTask.vue @@ -142,8 +142,7 @@ const getClassWorkList = () => { edusubject: userStore.edusubject,//学科 deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期 status: '1', // 作业状态:1-已发布 - // orderby: 'concat(deaddate,uniquekey) DESC', - orderby: 'uniquekey DESC', + orderby: "deaddate DESC", pageSize: 100, }).then((response) => { for (var i = 0; i < response.rows.length; i++) { @@ -217,7 +216,7 @@ const getStudentClassWorkData = () => { edusubject: userStore.edusubject,//学科 deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期 status: '1', // 作业状态:1-已发布 - orderby: "uniquekey DESC",// TODO: 这里是否加 deaddate 的排序,后续看 + orderby: "deaddate DESC", pageSize: 1000 }).then((res) => { for (var t = 0; t < classWorkList.value.length; t++) { @@ -374,8 +373,7 @@ const getStudentVisible = async () => { edusubject: userStore.edusubject,//学科 deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期 status: '1', // 作业状态:1-已发布 - // orderby: 'concat(deaddate,uniquekey) DESC', - orderby: 'uniquekey DESC', + orderby: "deaddate DESC", pageSize: 100 }) const curWorkList = response.rows -- 2.44.0.windows.1 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 2/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=89=B9=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 @@ + + + + -- 2.44.0.windows.1 From 065e215a81f5521efb74bfbd7bafd5af1a507730 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:20:48 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0-=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=89=B9=E6=94=B9=E7=95=8C=E9=9D=A2=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/desktop/container/work-trend.vue | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/renderer/src/views/desktop/container/work-trend.vue b/src/renderer/src/views/desktop/container/work-trend.vue index 20d496b..40f5e15 100644 --- a/src/renderer/src/views/desktop/container/work-trend.vue +++ b/src/renderer/src/views/desktop/container/work-trend.vue @@ -28,20 +28,20 @@ -