From 90d37e725b0dc1098939818d304dc9e9a168615d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Tue, 29 Oct 2024 16:28:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E4=BD=9C=E4=B8=9A=E6=89=B9=E6=94=B9]=20-?= =?UTF-8?q?=20=E5=AD=A6=E7=94=9F=E7=AD=94=E9=A2=98=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/api/classTask/index.js | 10 ++++++++++ .../container/classTask/item-dialog-score.vue | 17 ++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/api/classTask/index.js b/src/renderer/src/api/classTask/index.js index bf03614..a01867e 100644 --- a/src/renderer/src/api/classTask/index.js +++ b/src/renderer/src/api/classTask/index.js @@ -71,6 +71,16 @@ export function updateClassworkeval(data) { }) } + +// 修改classworkeval +export function updateClassworkevalList(data) { + return request({ + url: '/education/classworkeval/updateList', + method: 'put', + data: data + }) +} + // 修改classworkdata export function updateClassworkdata(data) { return request({ diff --git a/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue b/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue index 044f98e..e00d892 100644 --- a/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue +++ b/src/renderer/src/views/classTask/container/classTask/item-dialog-score.vue @@ -427,7 +427,7 @@ import useUserStore from '@/store/modules/user' import { ref, reactive } from 'vue' // import { Plus } from '@element-plus/icons-vue' import { ElMessageBox, ElMessage } from 'element-plus' -import { updateClassworkeval, updateClassworkdata, getClassworkdata } from '@/api/classTask' +import { updateClassworkeval, updateClassworkdata, getClassworkdata, updateClassworkevalList } from '@/api/classTask' import { getTimeDate } from '@/utils/date' import ReFilePreview from '@/components/refile-preview/index.vue' import { quizStrToList } from '@/utils/comm'; @@ -898,6 +898,21 @@ const onSubmit = () => { // } }) }) + // let queryList = []; + // classWorkFormScore.teacherRating && classWorkFormScore.teacherRating.map((item, index) => { + // const queryParams = { + // id: item.id, + // teacherRating: item.score, // 教师评分 + // rating: classWorkFormScore.rating, // 评价 + // teacherremark: classWorkFormScore.teacherremark, //评分说明 + // timestamp: getTimeDate() // 时间 + // } + // //console.log(queryParams); + // queryList.push(queryParams); + // }) + // //console.log(queryList); + // updateClassworkevalList(queryList).then((res) => { + // }) ElMessage({ type: 'success', message: '提交成功!' From 8f4845a37cd76fd012c26a8c48b58614a5cef6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Thu, 31 Oct 2024 12:33:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E9=80=90=E9=A2=98=E8=AE=B2=E8=A7=A3]=20-?= =?UTF-8?q?=20=E5=85=BC=E5=AE=B9=E5=A1=AB=E7=A9=BA=E8=87=AA=E5=BB=BA?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/classTask/container/classOverview.vue | 8 ++++++-- src/renderer/src/views/classTask/container/quizStats.vue | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/views/classTask/container/classOverview.vue b/src/renderer/src/views/classTask/container/classOverview.vue index 8ce866b..c3992f3 100644 --- a/src/renderer/src/views/classTask/container/classOverview.vue +++ b/src/renderer/src/views/classTask/container/classOverview.vue @@ -147,8 +147,12 @@ const initData = () => { }) } else if (o.worktype == '填空题') { // 填空题 - const regex = /(.*?)/g // 定义正则表达式,匹配 xxx 格式的内容 - children = (o.title||'').match(regex).map((v,i) => { + let title = o.title.replace(/_{3,}/g, '_____'); //将3-10的下划线统一格式为5个 + let regex = /(.*?)/g // 定义正则表达式,匹配 xxx 格式的内容 + if (title.indexOf('_____') != -1) { + regex = /_{5}/g // 定义正则表达式,匹配 xxx 格式的内容 + } + children = (title||'').match(regex).map((v,i) => { const def = `填空项 ${i+1}` //const code = '( )' const code = '(略)', txt=v diff --git a/src/renderer/src/views/classTask/container/quizStats.vue b/src/renderer/src/views/classTask/container/quizStats.vue index cd824c9..da72dcc 100644 --- a/src/renderer/src/views/classTask/container/quizStats.vue +++ b/src/renderer/src/views/classTask/container/quizStats.vue @@ -224,8 +224,13 @@ const initData = () => { }) } else if (o.worktype == '填空题') { // 填空题 - const regex = /(.*?)/g // 定义正则表达式,匹配 xxx 格式的内容 - children = (o.title||'').match(regex).map((v,i) => { + //console.log('填空题->', o.title); + let title = o.title.replace(/_{3,}/g, '_____'); //将3-10的下划线统一格式为5个 + let regex = /(.*?)/g // 定义正则表达式,匹配 xxx 格式的内容 + if (title.indexOf('_____') != -1) { + regex = /_{5}/g // 定义正则表达式,匹配 xxx 格式的内容 + } + children = (title||'').match(regex).map((v,i) => { const def = `填空项 ${i+1}` //const code = '( )' const code = '(略)', txt=v