From 5cbe56d1bfe7d487f156b389569ec05267a11675 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, 20 Nov 2024 15:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/router/index.js | 24 +++--- .../src/views/classTask/newClassTask.vue | 4 - .../newClassTaskAssign/myQuestion/index.vue | 2 +- .../questionUpload/quesItem/index.vue | 82 ++++++++++--------- src/renderer/src/views/model/index.vue | 44 +++++++++- 5 files changed, 100 insertions(+), 56 deletions(-) diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js index 37b099c..4492b0e 100644 --- a/src/renderer/src/router/index.js +++ b/src/renderer/src/router/index.js @@ -81,6 +81,18 @@ export const constantRoutes = [ // }, // ] }, + { + path: 'newClassTaskAssign', + component: () => import('@/views/classTask/newClassTaskAssign/index.vue'), + name: 'newClassTaskAssign', + meta: { title: '作业管理' } + }, + { + path: 'questionUpload', + component: () => import('@/views/classTask/newClassTaskAssign/questionUpload/index.vue'), + name: 'questionUpload', + meta: { title: '习题上传' } + }, ] }, @@ -136,18 +148,6 @@ const dynamicRoutes = [ name: 'classTaskAssign', meta: { title: '作业布置', showBread: true } }, - { - path: 'newClassTaskAssign', - component: () => import('@/views/classTask/newClassTaskAssign/index.vue'), - name: 'newClassTaskAssign', - meta: { title: '新作业管理', showBread: true } - }, - { - path: 'questionUpload', - component: () => import('@/views/classTask/newClassTaskAssign/questionUpload/index.vue'), - name: 'questionUpload', - meta: { title: '新作业管理', showBread: true } - }, { path: 'classTask', component: () => import('@/views/classTask/classTask.vue'), diff --git a/src/renderer/src/views/classTask/newClassTask.vue b/src/renderer/src/views/classTask/newClassTask.vue index a4791a0..349d4f2 100644 --- a/src/renderer/src/views/classTask/newClassTask.vue +++ b/src/renderer/src/views/classTask/newClassTask.vue @@ -16,7 +16,6 @@ 作业设计 - 新版作业管理
返回上页 @@ -81,9 +80,6 @@ const courseObj = reactive({ }) // --------------------------------------------------- -const goToNewClassTaskAssign = () => { - router.push({ path: '/newClassTaskAssign', query: { courseObj: JSON.stringify(courseObj)} }); -} // 查询 const getData = (data) => { diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue index 6ed01aa..f056c9e 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue @@ -196,7 +196,7 @@ onMounted(() => { }) const goToQuestUpload = () => { - router.push({ path: '/questionUpload', query: { courseObj: JSON.stringify(props.bookobj) } }); + router.push({ path: '/model/questionUpload', query: { courseObj: JSON.stringify(props.bookobj) } }); } const initPageParams = () => { diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue index 7a36cb8..9b5416f 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue @@ -36,7 +36,7 @@ - + { workgroup: 0, worktag: '', checkAnswer: [], - evalidArr: props.evalidArr, + // evalidArr: props.evalidArr, + evalidArr: '', timelength: 60, workanswer: '', analyse: '', @@ -1078,7 +1080,8 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{ worktag: tag, workgroup: parseInt(item.workgroup), checkAnswer: selList, - evalidArr: props.evalidArr, + // evalidArr: props.evalidArr, + evalidArr: '', knowledgePointIdArr: knowledgePointIdArr, timelength: 60, workanswer: item.workanswer, @@ -1349,23 +1352,30 @@ const submitForm=(formName) =>{ // } const newWorktag = `(${questForm.worktagYear}•${questForm.worktag})`; - // 格式化[教材id](暂定为workKey这个字段) - let workKey = questForm.evalidArr[0][0].toString(); + //------------------------- + // 章节? 这里版本只需要一个默认选择的章节即可,跟web版逻辑不一样 + // // 格式化[教材id](暂定为workKey这个字段) + // let workKey = questForm.evalidArr[0][0].toString(); // let workKey = ''; // 格式化[单课目] - let len = questForm.evalidArr[0].length; - let evalid = questForm.evalidArr[0][len-1]; - // 格式化[多课目] - let evalids = ''; - questForm.evalidArr.forEach(element => { - let len = element.length; - evalids += `${element[len-1]},`; - }); - evalids = evalids.slice(0, -1); + // let len = questForm.evalidArr[0].length; + // let evalid = questForm.evalidArr[0][len-1]; + // // 格式化[多课目] + // let evalids = ''; + // questForm.evalidArr.forEach(element => { + // let len = element.length; + // evalids += `${element[len-1]},`; + // }); + // evalids = evalids.slice(0, -1); + + // 格式化[教材id](暂定为workKey这个字段) + let workKey = props.bookobj.textbookId; // ? 版本id? 这里 textbookId + let evalids = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId ; // let workKey = ''; // let evalid = '123456'; // let evalids = '123456' + //----------------------end------- // 格式化[知识点] let knowledgePoint = ''; @@ -1400,7 +1410,7 @@ const submitForm=(formName) =>{ entpid: userStore.deptId, entpcourseid: 0, workgroup: questForm.workgroup, // 1:真题 0非真题 - evalid: evalid, // 单元下的课ID + evalid: evalids, // 单元下的课ID evalids: evalids, // 单元下的课ID evalnodeid: knowledgePoint, // 知识点ID集合(逗号分隔) worktype: workType, // 题的类型 存的中文 单选题 多选题 @@ -1584,29 +1594,27 @@ const submitForm=(formName) =>{ } console.log('param', param); - if(questForm.id == 0){ - // 新增 - const res = await addEntpcoursework(param); - param.id = res; - console.log("单题上传", res) - proxy.$modal.msgSuccess("单题上传成功"); - // dlgSingleAdd.open = false; - // getList(); - }else{ - // 纠错更改 - const res = updateEntpcoursework(param); - proxy.$modal.msgSuccess("单题修改成功"); - } + // TODO 待后续在提交新增与修改 + // if(questForm.id == 0){ + // // 新增 + // const res = await addEntpcoursework(param); + // param.id = res; + // console.log("单题上传", res) + // proxy.$modal.msgSuccess("单题上传成功"); + // }else{ + // // 纠错更改 + // const res = updateEntpcoursework(param); + // proxy.$modal.msgSuccess("单题修改成功"); + // } // 上传完成通知父组件(返回当前form内容, [扫描上传]时需以param的数据重新刷新至单题显示) - param.submitIndex = questForm.submitIndex; - param.submitType = questForm.submitType; - emit('submit-exam-single-callback', param); + // param.submitIndex = questForm.submitIndex; + // param.submitType = questForm.submitType; + // emit('submit-exam-single-callback', param); // form表单内容清空 - proxy.reset(); - proxy.resetForm("questFormRef"); - // return; + // proxy.reset(); + // proxy.resetForm("questFormRef"); } else { myMessageShow('失败', '单题上传参数有误', 'error'); return; diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue index a5a5bc2..d515d9c 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -2,7 +2,8 @@
课标研读 - 作业管理 + + 作业管理 教材研读 打开PPTist @@ -12,18 +13,57 @@