diff --git a/src/views/tc/hotContestList/index.vue b/src/views/tc/hotContestList/index.vue index ee728f8..fba4ef1 100644 --- a/src/views/tc/hotContestList/index.vue +++ b/src/views/tc/hotContestList/index.vue @@ -144,26 +144,18 @@ const data = reactive({ const { queryParams } = toRefs(data) /** 检查按钮是否禁用 */ -function isBtnDisabled(row, modelType) { +function isBtnDisabled(row) { let disabled = true - if(row.reportDetails && row.reportDetails.length) { - row.reportDetails.forEach(item => { - if(item.modelType == modelType && item.reportStatus == 1) { - disabled = false - } - }) + if(row.reportDetail && row.reportDetail.reportStatus === 1) { + disabled = false } return disabled } -function isBtnTimer(row, modelType){ +function isBtnTimer(row){ let res = '待更新' - if(row.reportDetails && row.reportDetails.length) { - row.reportDetails.forEach(item => { - if(item.modelType == modelType && item.reportStatus == 1) { - res = timerToStr(item.reportTime, 'HH:mm') + '更新' - } - }) + if(row.reportDetail && row.reportDetail.reportTime) { + res = timerToStr(row.reportDetail.reportTime, 'HH:mm') + '更新' } return res } @@ -214,7 +206,7 @@ function handleJumpLink(row) { /** 查看详情 */ function handleView(row, modelType) { - if (row.reportSatus != 1) { + if (!row.reportDetail || (row.reportDetail && row.reportDetail.reportStatus != 1)) { return } router.push({