From a1002a1f400802e009bce6737f037e939a53a24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Thu, 17 Oct 2024 10:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=B8=83=E7=BD=AE=EF=BC=9A?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=80=BB=E8=BE=91=E6=94=B9=E4=B8=BAusegetHom?= =?UTF-8?q?ework=E9=87=8C=E9=9D=A2=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=B0=E5=BD=95=E6=9F=A5=E7=9C=8B=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E7=9A=84=E6=89=B9?= =?UTF-8?q?=E9=98=85=E8=AF=A6=E6=83=85=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/hooks/useClassTask.js | 2 +- src/renderer/src/hooks/useGetHomework.js | 21 +- .../src/views/classTask/classTaskAssign.vue | 813 +++++------------- 3 files changed, 257 insertions(+), 579 deletions(-) diff --git a/src/renderer/src/hooks/useClassTask.js b/src/renderer/src/hooks/useClassTask.js index 45760ad..85966bb 100644 --- a/src/renderer/src/hooks/useClassTask.js +++ b/src/renderer/src/hooks/useClassTask.js @@ -35,7 +35,7 @@ export const editListItem = (row, courseObj) => { fileHomeworkList: [],// 设计中的常规作业list whiteboardObj: '',// 设计中的课堂展示对象 }; - + console.log('编辑的行', row); //重新更新[新任务]中右侧列表数据 var listCourseWork = []; diff --git a/src/renderer/src/hooks/useGetHomework.js b/src/renderer/src/hooks/useGetHomework.js index c122d9f..e07a2de 100644 --- a/src/renderer/src/hooks/useGetHomework.js +++ b/src/renderer/src/hooks/useGetHomework.js @@ -71,6 +71,7 @@ const getHomeWorkList = async () => { return await homeworklist({ entpcourseid: chapterId, edituserid: userStore.user.userId, + orderby: "timestamp DESC", pageSize: 100, status: '10' }).then((res) => { @@ -79,7 +80,25 @@ const getHomeWorkList = async () => { for (var i = 0; i < res.rows.length; i++) { res.rows[i].taskconfig = [] - // 找child + // 处理任务类型的UI + // if (res.rows[i].worktype == '学习目标定位') { + // res.rows[i].workclass = 'success'; + // res.rows[i].workcodesList = JSON.parse(res.rows[i].workcodes); + // } else + // 课标研读 目标设定 教材研读 框架梳理 学科定位 TODO 后续接入在添加 + if (res.rows[i].worktype == '课堂展示') { + res.rows[i].workclass = 'primary'; + } else if (res.rows[i].worktype == '框架梳理') { + res.rows[i].workclass = 'warning'; + } else if (res.rows[i].worktype == '常规作业') { + res.rows[i].workclass = 'info'; + } else if (res.rows[i].worktype == '习题训练') { + res.rows[i].workclass = 'danger'; + } else { + res.rows[i].workclass = 'primary'; + } + + // 找child for (var j = 0; j < res.rows.length; j++) { if (res.rows[j].parentid == res.rows[i].id) { var ss = [] diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue index 4816e4f..184eb2a 100644 --- a/src/renderer/src/views/classTask/classTaskAssign.vue +++ b/src/renderer/src/views/classTask/classTaskAssign.vue @@ -36,6 +36,7 @@
- 编辑 + 编辑
查看详情 @@ -75,10 +76,10 @@
- 编辑 + 编辑
- 查看详情 + 查看详情
@@ -92,10 +93,15 @@ + + +
@@ -197,8 +203,6 @@