工作台作业:逻辑更改
This commit is contained in:
parent
a918aa18e9
commit
201b10a91e
|
@ -14,9 +14,10 @@
|
|||
<div class="class-left flex">
|
||||
<div class="class-name flex">
|
||||
<span class="name">{{ item.uniquekey }}</span>
|
||||
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
|
||||
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已批改' : '待批改' }}</el-tag>
|
||||
<el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag>
|
||||
<!-- <el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
|
||||
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>
|
||||
</div>
|
||||
<div class="class-time">{{ item.classcaption }} | 截止时间:{{ item.deaddate }} </div>
|
||||
</div>
|
||||
|
@ -53,8 +54,9 @@ const getHomework = async () => {
|
|||
try {
|
||||
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 || [];
|
||||
homeworkList.value.forEach((item) => {
|
||||
// 处理任务类型的UI
|
||||
if (item.worktype == '学习目标定位') {
|
||||
|
@ -101,7 +103,8 @@ const onClickItem = (item) => {
|
|||
}
|
||||
|
||||
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'
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue