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 8796063..c366cf9 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 1facd80..dd17432 100644 --- a/src/renderer/src/store/modules/tool.js +++ b/src/renderer/src/store/modules/tool.js @@ -18,6 +18,7 @@ export const useToolState = defineStore('tool', { showBoardAll: false, // 全屏画板-是否显示 isPdfWin: false, // pdf窗口是否打开 isToolWin: false, // 工具窗口是否打开 + isTaskWin: false, // 批改窗口是否打开 curSubjectNode: { querySearch: {} // 查询资源所需参数 }, diff --git a/src/renderer/src/utils/tool.js b/src/renderer/src/utils/tool.js index 641a45b..d1a2869 100644 --- a/src/renderer/src/utils/tool.js +++ b/src/renderer/src/utils/tool.js @@ -112,6 +112,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': { // 创建-悬浮球 @@ -169,6 +170,36 @@ 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, + width: 1450, + minWidth: 1200, + height: 800, + minHeight: 700, + 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 } @@ -246,6 +277,7 @@ const eventHandles = (type, win) => { if(onClosed) onClosed() // 自定义关闭事件 win = null wins_tool = null + winChild=null }) // 新窗口-创建事件(如:主进程加载远程服务) @@ -304,6 +336,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/classManage/basicGroup.vue b/src/renderer/src/views/classManage/basicGroup.vue index 879385a..a96285b 100644 --- a/src/renderer/src/views/classManage/basicGroup.vue +++ b/src/renderer/src/views/classManage/basicGroup.vue @@ -266,6 +266,9 @@ const btnSave = () => { } //新建小组 const addGroup = () => { + // 做清空处理 + groupForm.groupname = '' + groupForm.orderidx = 0 groupVisible.value = true } const btnGroupSave = () => { diff --git a/src/renderer/src/views/classManage/classInfo.vue b/src/renderer/src/views/classManage/classInfo.vue index 2e8d948..b451e5a 100644 --- a/src/renderer/src/views/classManage/classInfo.vue +++ b/src/renderer/src/views/classManage/classInfo.vue @@ -4,7 +4,7 @@ {{ classInfo.caption }} diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue index 8568c6b..93d1970 100644 --- a/src/renderer/src/views/classTask/classTask.vue +++ b/src/renderer/src/views/classTask/classTask.vue @@ -57,24 +57,28 @@ > - + + + + + 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 @@ -