From c3161ac994eaae70e2bb9d83992a06adb5214887 Mon Sep 17 00:00:00 2001 From: raoyongjun <2641346316@qq.com> Date: Tue, 7 May 2024 10:46:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E6=9F=A5=E9=87=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home/main.ts | 3 +- src/views/home/content/Content.vue | 60 ++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/src/api/home/main.ts b/src/api/home/main.ts index 618ab9b..92ca9e5 100644 --- a/src/api/home/main.ts +++ b/src/api/home/main.ts @@ -226,11 +226,12 @@ export async function queryPageListByCheckNo(params: any): Promise { headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) - const { data: { records, pages, total } } = res + const { data: { records, pages, total, current } } = res return { pageCount: pages, data: records, total, + current, } } /** diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index 0e1efd6..4847d7b 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -313,7 +313,7 @@ async function featchList(userSearchId?: string) { }) } const { data, pageCount, total, current } = result - pagination.pageNo = current + pagination.pageNo = current || 1 totalCount.value = total canloadMore = pageCount >= pagination.pageNo && pageCount > 0 @@ -329,6 +329,7 @@ async function featchList(userSearchId?: string) { similar: item.similarityscore || -1, imgName: item.imgname, states: item.states, + isRepeatHis: item.isRepeatHis, wide: item.wide, high: item.high, loadOver: false, @@ -345,7 +346,7 @@ async function featchList(userSearchId?: string) { } async function loadMore() { - // console.log('loading.value加兹安', loading.value, el.value) + console.log('loadMore加兹安pagination.pageNo----------------', pagination.pageNo) if (loading.value || el.value == null) return canloadMore = false @@ -353,18 +354,19 @@ async function loadMore() { more.forEach((item) => { item.calHeight = 182 * item.high / item.wide }) + console.log('loadMore加载后的pagination.pageNo----------------', pagination.pageNo) // listData.value.push(...more) - if (pagination.pageNo == 1) { + if (pagination.pageNo <= 1) { listData.value = [] listData.value = listData.value.concat(more) - console.log('listData.value出来了', listData.value) + console.log('listData.value首页出来了1111', listData.value) waterfallRef.value?.resize() if (listData.value.length == 0) waterfallRef.value?.clear() } else { listData.value = listData.value.concat(more) - console.log('listData.value出来了', listData.value) + console.log('listData.value首页出来了2222', listData.value) waterfallRef.value?.mix() } } @@ -427,9 +429,10 @@ async function oneCheck() { configStore.setTimeNum(calNum.value) if (checkTaskStatus.value === 2 || checkTaskStatus.value === 3) { if (checkTaskStatus.value === 2) - message.success('任务执行完毕,正在刷新数据...') + message.success('任务执行完毕,正在刷新数据22...') else message.error('查询异常') - + reset() + loadMore() tasksLoadingModal.closeOnlyModal() configStore.setTimeNum(100) if (timer.value) @@ -438,8 +441,8 @@ async function oneCheck() { setTimeout(() => { configStore.setTimeNum(0) }, 1000) - reset() - loadMore() + // reset() + // loadMore() } waterfallRef.value?.resize() } @@ -520,6 +523,7 @@ async function commitHandler(settingParam) { const finalParam = { ...asideVal } finalParam.buessinessno = settingParam.packagename finalParam.search_history = settingParam.comparehistory ? 1 : 0 + waterfallRef.value?.resize() } onMounted(() => { @@ -672,15 +676,17 @@ function refresh(val?: any) { checkingTaskModal.closeModal() isRefresh.value = false if (checkTaskStatus.value === 2) - message.success('任务执行完毕,正在刷新数据...') + message.success('任务执行完毕,正在刷新数据11...') else message.error('查询异常') - - if (timer.value) - clearInterval(timer.value) reset() loadMore() + if (timer.value) + clearInterval(timer.value) + // reset() + // loadMore() configStore.setTimeNum(0) } + waterfallRef.value?.resize() // else if (checkTaskStatus.value === 1) { // return; // } @@ -876,7 +882,19 @@ defineExpose({ src="@/assets/images/task/tag-not-pass.png" alt="" > - + +
@@ -984,7 +1002,19 @@ defineExpose({ src="@/assets/images/task/tag-not-pass.png" alt="" > - + +