From 94e609164a91bc0812cb18c911ea925443755146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Fri, 22 Nov 2024 09:41:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E8=8F=81=E4=BC=98?= =?UTF-8?q?=E7=BD=91=E5=A1=AB=E7=A9=BA=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newClassTaskAssign/myQuestion/index.vue | 7 ++++--- .../questionUpload/quesItem/index.vue | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue index 33ce1e6..e915dfa 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/myQuestion/index.vue @@ -120,7 +120,7 @@ import { useRouter, useRoute } from 'vue-router' import { listEntpcoursework } from '@/api/education/entpCourseWork' import { listEvaluationclue } from '@/api/classTask' -import { delEntpcoursework } from "@/api/education/entpCourseWork"; +import { delEntpcoursework, updateEntpcoursework } from "@/api/education/entpCourseWork"; import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue' import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue"; @@ -284,7 +284,7 @@ const t = function(name, time) { edustage: userStore.edustage, // this.userStore.edustage, edusubject: userStore.edusubject, // this.userStore.edusubject, evalid: props.bookobj.levelSecondId, // this.activeParams.lession.id, - + status: "1", orderby: 'concat(worktype,timestamp) DESC', } @@ -424,7 +424,8 @@ const onSubmitExamSingleCallback=(callback) =>{ /** 删除题目按钮操作 */ const handleDelete = async(item, index) => { - await useHandleData(delEntpcoursework, item.id, `确认删除编号为【${index+1}】的题目?` ); + //await useHandleData(delEntpcoursework, item.id, `确认删除编号为【${index+1}】的题目?` ); + await useHandleData(updateEntpcoursework, {id:item.id, status:'0'}, `确认删除编号为【${index+1}】的题目?` ); debounceQueryData(); } 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 cbcb771..856350e 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue @@ -55,6 +55,7 @@ popper-class="my-popper" @change="onchange" style="width:90%" + filterable /> @@ -145,8 +146,7 @@ - + + + - @@ -952,6 +952,7 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{ workAnswerArr.forEach(it => selList.push(it)); } else if( item.worktype == '填空题' || item.worktype == '判断题'){ + item.title = item.title.replace(/
(?: )?<\/div>/g, '_____'); // 处理选项 () workAnswerArr.forEach((it,id)=>{ const s = { @@ -1000,6 +1001,7 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{ const pointArr = item.evalnodeid.split(','); if (curKnowledgePointList.value.length > 0 && pointArr.length > 0) { pointArr.forEach(element => { + element = element.trim(); let point = []; if (getCurKnowledgePointToForm(point, element, curKnowledgePointList.value)) { point = point.reverse(); @@ -1337,8 +1339,10 @@ const submitForm=(formName) =>{ const workType = questForm.worktype.replace('(主观题)', ''); // 需要对题目的单引号(设置字体)进行转义(因查询语句中模糊查询title_like单引号会报错) - const title = questForm.title.replace(/'/g, "\\'"); - console.log(questForm,'???????????????????????') + const title = this.form.title + .replace(/'/g, "\\'") + .replace(/_{3,}/g, "
"); + console.log(questForm,'???????????????????????'); let param = { id: questForm.id, // id thirdid: 0, // 第三方题库id SID -- 2.44.0.windows.1 From 5ac33bd1ca253b668b31eea9ebc4857ba5e9b46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Fri, 22 Nov 2024 09:53:15 +0800 Subject: [PATCH 2/3] 1 --- .../newClassTaskAssign/questionUpload/quesItem/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 856350e..f8e6452 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue @@ -491,7 +491,7 @@ const questForm = reactive({ method: '', submitIndex: 0, // 该题对应原试题集合中的序号([单题上传]时为0, [扫描上传]为集合中的序号) submitType: 0, // 该题的上传方法 - status: 1, // 该题的状态 + status: '1', // 该题的状态 list:[ { text:"" @@ -1339,7 +1339,7 @@ const submitForm=(formName) =>{ const workType = questForm.worktype.replace('(主观题)', ''); // 需要对题目的单引号(设置字体)进行转义(因查询语句中模糊查询title_like单引号会报错) - const title = this.form.title + const title = questForm.title .replace(/'/g, "\\'") .replace(/_{3,}/g, "
"); console.log(questForm,'???????????????????????'); -- 2.44.0.windows.1 From dcd1a3bb05ac7d9736782305b1181ec21f3bdeb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Fri, 22 Nov 2024 09:54:05 +0800 Subject: [PATCH 3/3] 1 --- .../newClassTaskAssign/questionUpload/quesItem/index.vue | 1 - 1 file changed, 1 deletion(-) 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 f8e6452..3e90189 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue @@ -55,7 +55,6 @@ popper-class="my-popper" @change="onchange" style="width:90%" - filterable /> -- 2.44.0.windows.1