修复赛事状态动态计算:报名结束当天全天显示报名中
- competition/index.vue: 列表页状态动态计算 - competition/list.vue: 添加calculateStatus方法 - order/index.vue: 修复报名结束当天判断逻辑 - schedule/index.vue: 修复标记签到语法错误 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot]
parent
940e2f55e1
commit
c04193bf84
@@ -85,10 +85,10 @@
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="getStatusType(scope.row.status)"
|
||||
:type="getStatusType(calculateStatus(scope.row))"
|
||||
size="small"
|
||||
>
|
||||
{{ getStatusText(scope.row.status) }}
|
||||
{{ getStatusText(calculateStatus(scope.row)) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -1966,7 +1966,7 @@ export default {
|
||||
return 3;
|
||||
}
|
||||
// 报名中
|
||||
if (regStart && regEnd && now >= regStart && now <= regEnd) {
|
||||
if (regStart && regEnd && now >= regStart && now <= new Date(regEnd.getFullYear(), regEnd.getMonth(), regEnd.getDate(), 23, 59, 59)) {
|
||||
return 2;
|
||||
}
|
||||
// 未开始(默认状态)
|
||||
|
||||
@@ -60,10 +60,10 @@
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="getStatusType(scope.row.status)"
|
||||
:type="getStatusType(calculateStatus(scope.row))"
|
||||
size="small"
|
||||
>
|
||||
{{ getStatusText(scope.row.status) }}
|
||||
{{ getStatusText(calculateStatus(scope.row)) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -261,7 +261,7 @@ export default {
|
||||
const compEnd = row.competitionEndTime ? new Date(row.competitionEndTime) : null
|
||||
if (compEnd && now > compEnd) return 4
|
||||
if (compStart && now >= compStart) return 3
|
||||
if (regStart && regEnd && now >= regStart && now <= regEnd) return 2
|
||||
if (regStart && regEnd && now >= regStart && now <= new Date(regEnd.getFullYear(), regEnd.getMonth(), regEnd.getDate(), 23, 59, 59)) return 2
|
||||
return 1
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user