diff --git a/src/pages/comprehensiveQuery/index.vue b/src/pages/comprehensiveQuery/index.vue index c8f258d..0341868 100644 --- a/src/pages/comprehensiveQuery/index.vue +++ b/src/pages/comprehensiveQuery/index.vue @@ -395,9 +395,10 @@ const onHandleSeniorSearch = () => { const onHandleSearch = () => { queryParams.value.searchType = 3 queryParams.value.keyWord = innerKeyWord.value + queryParams.value.pageNum = 1 getImgListData(true) rightPopupShow.value = false - resetForm() + // resetForm() } // 重置 @@ -506,7 +507,7 @@ const getImgListData = async (isTap = false) => { const res = await getImgListApi(queryParamsNew) // 更新总数 - total.value = res.data.total + total.value = res?.data?.total console.log( '%c🔍 获取照片列表出参 %c', 'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;', diff --git a/src/pages/qualityInspection/upload-record/index.vue b/src/pages/qualityInspection/upload-record/index.vue index 2c156bd..9710adf 100644 --- a/src/pages/qualityInspection/upload-record/index.vue +++ b/src/pages/qualityInspection/upload-record/index.vue @@ -32,6 +32,7 @@ text="修改" type="primary" @tap="onHandleEditRecord(item.id)" + v-if="!isExpire(item.rectDate)" /> @@ -178,6 +179,15 @@ const onHandleViewDetails = (id) => { }) } +const isExpire = (rectDate) => { + const targetDate = new Date(rectDate) + const currentDate = new Date() + // 去掉时间部分,只比较日期 + targetDate.setHours(0, 0, 0, 0) + currentDate.setHours(0, 0, 0, 0) + return targetDate < currentDate +} + // 点击轮播图 const onClickSwiper = (e) => {} diff --git a/src/pages/safetyViolations/upload-record/index.vue b/src/pages/safetyViolations/upload-record/index.vue index 60364f6..b0a3e7b 100644 --- a/src/pages/safetyViolations/upload-record/index.vue +++ b/src/pages/safetyViolations/upload-record/index.vue @@ -32,6 +32,7 @@ text="修改" type="primary" @tap="onHandleEditRecord(item.id)" + v-if="!isExpire(item.rectDate)" /> @@ -185,6 +186,15 @@ const onClickSwiper = (e) => {} // 点击返回顶部 const onHandleBackTop = () => {} + +const isExpire = (rectDate) => { + const targetDate = new Date(rectDate) + const currentDate = new Date() + // 去掉时间部分,只比较日期 + targetDate.setHours(0, 0, 0, 0) + currentDate.setHours(0, 0, 0, 0) + return targetDate < currentDate +}