工作台作业:逻辑更改

This commit is contained in:
白了个白 2024-11-06 09:56:43 +08:00
parent a918aa18e9
commit 201b10a91e
1 changed files with 8 additions and 5 deletions

View File

@ -14,8 +14,9 @@
<div class="class-left flex"> <div class="class-left flex">
<div class="class-name flex"> <div class="class-name flex">
<span class="name">{{ item.uniquekey }}</span> <span class="name">{{ item.uniquekey }}</span>
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{ <!-- <el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已批改' : '待批改' }}</el-tag> getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已批改' : '待批改' }}</el-tag> -->
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">待批改</el-tag>
<el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag> <el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag>
</div> </div>
<div class="class-time">{{ item.classcaption }} | 截止时间{{ item.deaddate }} </div> <div class="class-time">{{ item.classcaption }} | 截止时间{{ item.deaddate }} </div>
@ -53,8 +54,9 @@ const getHomework = async () => {
try { try {
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'deaddate DESC', pageSize: 500 }) const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'deaddate DESC', pageSize: 500 })
// //
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate) // //homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate) //
// homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) // // homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) //
homeworkList.value = rows || [];
homeworkList.value.forEach((item) => { homeworkList.value.forEach((item) => {
// UI // UI
if (item.worktype == '学习目标定位') { if (item.worktype == '学习目标定位') {
@ -101,7 +103,8 @@ const onClickItem = (item) => {
} }
const tagType = (time) => { const tagType = (time) => {
return getCurrentTime('YYYY-MM-DD HH:mm') > time ? 'info' : 'warning' return 'warning';
//return getCurrentTime('YYYY-MM-DD HH:mm') > time ? 'info' : 'warning'
} }