From 4a0e9b0b84c2f3526d85579e218c872d29e770a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Fri, 13 Dec 2024 10:11:33 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=89=B9=E6=94=B9=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/api/classTask/index.js | 8 +++ .../container/classTask/item-dialog-score.vue | 53 +++++++++++++------ 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/src/renderer/src/api/classTask/index.js b/src/renderer/src/api/classTask/index.js index bf03614..4846745 100644 --- a/src/renderer/src/api/classTask/index.js +++ b/src/renderer/src/api/classTask/index.js @@ -71,6 +71,14 @@ export function updateClassworkeval(data) { }) } +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..5e59a17 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'; @@ -882,22 +882,41 @@ const onSubmit = () => { }) // 更新题目批改 - 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) - updateClassworkeval(queryParams).then((res) => { - // if(res.code == 200){ - // 循环提交能干个啥 - // } - }) - }) + const queryList = []; + classWorkFormScore.teacherRating && classWorkFormScore.teacherRating.map((item, index) => { + const queryParams = { + id: item.id, + teacherRating: item.score, // 教师评分 + rating: classWorkFormScore.rating, // 评价 + teacherremark: classWorkFormScore.teacherremark, //评分说明 + timestamp: getTimeDate() // 时间 + } + queryList.push(queryParams) + }) + //console.log('queryList->', queryList) + updateClassworkevalList(queryList).then((res) => { + // if(res.code == 200){ + // 循环提交能干个啥 + // } + }) + + // 更新题目批改 + // 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) + // updateClassworkeval(queryParams).then((res) => { + // // if(res.code == 200){ + // // 循环提交能干个啥 + // // } + // }) + // }) ElMessage({ type: 'success', message: '提交成功!' From 78ecf6ea55b57580efa8ea68e8c333162221b069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Mon, 16 Dec 2024 17:13:56 +0800 Subject: [PATCH 02/10] =?UTF-8?q?[=E6=9F=A5=E8=AF=A2=E8=AF=95=E9=A2=98]=20?= =?UTF-8?q?-=20=E5=8D=95=E5=85=83=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../container/newTask/taskTypeView.vue | 38 ++++++--- .../newClassTaskAssign/myQuestion/index.vue | 23 ++++-- .../questionUpload/quesItem/index.vue | 6 +- .../searchQuestion/index.vue | 78 ++++++++++++------- 4 files changed, 98 insertions(+), 47 deletions(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 0c32397..26db4b8 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -55,6 +55,7 @@
-