From df84893509dff5181894ab20e08d4d2206dbe965 Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 2 Aug 2024 10:01:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=B8=83=E7=BD=AE=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/teaching/classwork.js | 9 ++ .../src/components/move-file/index.vue | 6 + .../views/prepare/container/set-homework.vue | 110 ++++++++++++++---- src/renderer/src/views/prepare/index.vue | 9 +- 4 files changed, 106 insertions(+), 28 deletions(-) diff --git a/src/renderer/src/api/teaching/classwork.js b/src/renderer/src/api/teaching/classwork.js index caeea2d..db353f3 100644 --- a/src/renderer/src/api/teaching/classwork.js +++ b/src/renderer/src/api/teaching/classwork.js @@ -16,4 +16,13 @@ export function listEntpcourse(query) { method: 'get', params: query }) +} + +// 布置作业 +export function saveByClassWorkArray(data) { + return request({ + url: '/education/classwork/saveByClassWorkArray', + method: 'post', + data: data + }) } \ No newline at end of file diff --git a/src/renderer/src/components/move-file/index.vue b/src/renderer/src/components/move-file/index.vue index c53f726..ebf1524 100644 --- a/src/renderer/src/components/move-file/index.vue +++ b/src/renderer/src/components/move-file/index.vue @@ -158,6 +158,12 @@ const getSubject = async () => { curBookId.value = subjectList.value[0].id } +const isHaveUnit = (id) => { + return evaluationList.value.some(item => { + return item.rootid == id + }) +} + const getTreeData = () => { //数据过滤 let upData = transData(volumeOne.value) diff --git a/src/renderer/src/views/prepare/container/set-homework.vue b/src/renderer/src/views/prepare/container/set-homework.vue index e23f526..94bd531 100644 --- a/src/renderer/src/views/prepare/container/set-homework.vue +++ b/src/renderer/src/views/prepare/container/set-homework.vue @@ -11,26 +11,28 @@
- + + + - - {{ tag.name }} - - + + {{ tag.name }} + + - + 必做 选做 - - + + @@ -41,7 +43,7 @@ diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 86093b6..53ed049 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -67,7 +67,7 @@ @on-set="openSet" @on-delhomework="delhomework" > - +