From d932dcdf2bc1736d2f03538018db79c925d4fc61 Mon Sep 17 00:00:00 2001 From: lz-ui Date: Fri, 24 Oct 2025 17:35:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=83=AD=E9=97=A8?= =?UTF-8?q?=E8=B5=9B=E4=BA=8B=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tc/hotContestList/index.vue | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) 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({