From 171dc72ee75ba72d2115376ff0611eaf540f889d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Wed, 25 Dec 2024 10:33:20 +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=E6=9B=BF=E6=8D=A2=E8=87=AA=E5=8A=A8=E6=89=B9=E6=94=B9?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/api/classTask/index.js | 9 +++++++++ .../classTask/container/classTask/item-dialog-score.vue | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/api/classTask/index.js b/src/renderer/src/api/classTask/index.js index bf03614..845469b 100644 --- a/src/renderer/src/api/classTask/index.js +++ b/src/renderer/src/api/classTask/index.js @@ -80,6 +80,15 @@ export function updateClassworkdata(data) { }) } +// 批阅后, 待所有学生都批改完成后自动结束当前作业为[已完成] +export function updateClassWorkDataAutoFinish(data) { + return request({ + url: '/education/classworkdata/updAutoFinish', + method: 'put', + data: data + }) +} + // 修改classwork export function updateClasswork(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 79a062e..6a19908 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 @@ -435,7 +435,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, getClassworkdata, updateClassWorkDataAutoFinish } from '@/api/classTask' import { getTimeDate } from '@/utils/date' import ReFilePreview from '@/components/refile-preview/index.vue' import { quizStrToList } from '@/utils/comm'; @@ -890,7 +890,7 @@ const onSubmit = () => { updatedate: getTimeDate(),// = year+'-'+month+'-'+day+' '+hh+':'+mm; }; // 更新作业批改状态 - updateClassworkdata(formd).then(res => { + updateClassWorkDataAutoFinish(formd).then(res => { }) // 更新题目批改 From 53ff508635b97cab961b03f427e9ad7caba50149 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Wed, 25 Dec 2024 12:04:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=AB=E6=A0=BC=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../src/components/grid-pic/index.vue | 26 ++++++++++++------- src/renderer/src/views/prepare/index.vue | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 9c9774e..f27fc00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win-ws", - "version": "2.5.8", + "version": "2.5.9", "description": "", "main": "./out/main/index.js", "author": "上海交大重庆人工智能研究院", diff --git a/src/renderer/src/components/grid-pic/index.vue b/src/renderer/src/components/grid-pic/index.vue index 9725af6..40fdd26 100644 --- a/src/renderer/src/components/grid-pic/index.vue +++ b/src/renderer/src/components/grid-pic/index.vue @@ -53,7 +53,7 @@ const props = defineProps({ showToolbar: { type: Boolean, - default: true + default: false } }) // 获取图片样式 @@ -149,20 +149,26 @@ addPic(src) } // 添加图片 - const addPic = (src) => { - if (gridPicList.value.length >= 9) { + const addPic = (data) => { + let list = Array.isArray(data)?data:[data] + if (gridPicList.value.length + list.length > 9) { console.log("超出九个图片") emits('outIndex') return } - if (!src) { - console.log("图片链接不能为空") - return; + let listArr = []; + for (let i = 0; i < list.length; i++) { + let src = list[i] + if (!src) { + console.log("图片链接不能为空") + return; + } + listArr.push({ + src: src, + backgroundColor: getRandomColor() + }) } - gridPicList.value.push({ - src: src, - backgroundColor: getRandomColor() - }) + gridPicList.value.push(...listArr) inputValue.value = '' } // 清空图片 diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 7ee3ab0..38a6e34 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -10,7 +10,7 @@ 新建文枢课件 AI一键生成 - 打开宫格 + 导入PPT