From 97405bb73b5e6bb3abd53aa83e01b8a1af4fbb21 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: Thu, 16 Jan 2025 14:21:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=BB=84=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/router/index.js | 6 + .../views/classTask/groupTestPaper/index.vue | 195 ++++++++++++++++++ .../newClassTaskAssign/Right/index.vue | 1 + .../classTask/newClassTaskAssign/index.vue | 4 + .../searchQuestion/index.vue | 10 +- 5 files changed, 212 insertions(+), 4 deletions(-) create mode 100644 src/renderer/src/views/classTask/groupTestPaper/index.vue diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js index 7a14f6e..122e981 100644 --- a/src/renderer/src/router/index.js +++ b/src/renderer/src/router/index.js @@ -90,6 +90,12 @@ export const constantRoutes = [ name: 'questionUpload', meta: { title: '习题上传', showBread: true } }, + { + path: 'groupTestPaper', + component: () => import('@/views/classTask/groupTestPaper/index.vue'), + name: 'groupTestPaper', + meta: { title: '自动组卷', showBread: true } + }, { path: 'aiKolors', component: () => import('@/components/ai-kolors/index.vue'), diff --git a/src/renderer/src/views/classTask/groupTestPaper/index.vue b/src/renderer/src/views/classTask/groupTestPaper/index.vue new file mode 100644 index 0000000..708f9d9 --- /dev/null +++ b/src/renderer/src/views/classTask/groupTestPaper/index.vue @@ -0,0 +1,195 @@ + + + diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue index a1d1282..73106d3 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue @@ -38,6 +38,7 @@ const items = shallowRef([ // { title: 'AI设计作业', description: '通过AI助手,根据课标、教材、考试等分析结果,智能创建作业。', icon: '#icon-jiqiren_o',type:'danger' }, { title: '习题上传', description: '自己上传个人题库。', icon: '#icon-shangchuan',type:'danger' }, { title: '科学实验', description: '学生完成虚拟仿真实验,并提交实验结果。', icon: '#icon-shangchuan',type:'primary' }, + { title: '自主组卷', description: '老师自主选择试题组卷。', icon: '#icon-shangchuan',type:'primary' }, ]); const handleClick = (item) => { diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue index fac6342..531ec85 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue @@ -285,6 +285,10 @@ const handleItemClick = (itemName) => { router.push({ path: '/model/questionUpload', query: { courseObj: JSON.stringify(courseObj) } }); return; } + if(itemName == '自主组卷'){ + router.push({ path: '/model/groupTestPaper', query: { courseObj: JSON.stringify(courseObj) } }); + return; + } currentRow.value.id = 1; // 作业设计 /** diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue index d9b4e4a..21a46dc 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue @@ -85,7 +85,7 @@ @@ -126,7 +126,7 @@ import useUserStore from '@/store/modules/user' import useClassTaskStore from '@/store/modules/classTask' // 定义要发送的emit事件 -let emit = defineEmits(['addQuiz', 'addQuizImgBs64']) +let emit = defineEmits(['addQuiz', 'addQuizImgBs64', "addQuizItem"]) const { proxy } = getCurrentInstance() const userStore = useUserStore().user const { @@ -420,11 +420,13 @@ const getPaginationList = async ( page, limit ) => { /** * 添加资源 - * @param fromsrc - 试题来源 + * @param rw - 试题itemINFO * @param entpcourseworkid */ - const handleClassWorkQuizAdd = (fromsrc, entpcourseworkid) => { + const handleClassWorkQuizAdd = (row, entpcourseworkid) => { emit('addQuiz', entpcourseworkid); + emit('addQuizItem', row); // TODO 暂时使用,后面修改逻辑---添加到 自主组卷 + // var exist = false; // for (var i=0; i< classWorkForm.quizlist.length; i++) { // if (classWorkForm.quizlist[i].id == entpcourseworkid) { From db712d9e1f6bc39ae5125c3b667f566faf5fa1d1 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: Thu, 16 Jan 2025 15:03:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=9A=E7=95=8C=E9=9D=A2UI=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newClassTaskAssign/Right/index.vue | 2 +- .../classTask/newClassTaskAssign/index.vue | 386 ++++++++++-------- 2 files changed, 209 insertions(+), 179 deletions(-) diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue index 73106d3..6b0fa79 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/Right/index.vue @@ -38,7 +38,7 @@ const items = shallowRef([ // { title: 'AI设计作业', description: '通过AI助手,根据课标、教材、考试等分析结果,智能创建作业。', icon: '#icon-jiqiren_o',type:'danger' }, { title: '习题上传', description: '自己上传个人题库。', icon: '#icon-shangchuan',type:'danger' }, { title: '科学实验', description: '学生完成虚拟仿真实验,并提交实验结果。', icon: '#icon-shangchuan',type:'primary' }, - { title: '自主组卷', description: '老师自主选择试题组卷。', icon: '#icon-shangchuan',type:'primary' }, + // { title: '自主组卷', description: '老师自主选择试题组卷。', icon: '#icon-shangchuan',type:'primary' }, ]); const handleClick = (item) => { diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue index 531ec85..a219e01 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue @@ -1,27 +1,25 @@