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 @@