feat: 修改查重问题

pull/300/head
raoyongjun 1 year ago
parent 919e159430
commit c3161ac994

@ -226,11 +226,12 @@ export async function queryPageListByCheckNo(params: any): Promise<any> {
headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, headers: { 'Content-Type': ContentTypeEnum.FORM_DATA },
}) })
const { data: { records, pages, total } } = res const { data: { records, pages, total, current } } = res
return { return {
pageCount: pages, pageCount: pages,
data: records, data: records,
total, total,
current,
} }
} }
/** /**

@ -313,7 +313,7 @@ async function featchList(userSearchId?: string) {
}) })
} }
const { data, pageCount, total, current } = result const { data, pageCount, total, current } = result
pagination.pageNo = current pagination.pageNo = current || 1
totalCount.value = total totalCount.value = total
canloadMore = pageCount >= pagination.pageNo && pageCount > 0 canloadMore = pageCount >= pagination.pageNo && pageCount > 0
@ -329,6 +329,7 @@ async function featchList(userSearchId?: string) {
similar: item.similarityscore || -1, similar: item.similarityscore || -1,
imgName: item.imgname, imgName: item.imgname,
states: item.states, states: item.states,
isRepeatHis: item.isRepeatHis,
wide: item.wide, wide: item.wide,
high: item.high, high: item.high,
loadOver: false, loadOver: false,
@ -345,7 +346,7 @@ async function featchList(userSearchId?: string) {
} }
async function loadMore() { async function loadMore() {
// console.log('loading.value', loading.value, el.value) console.log('loadMore加兹安pagination.pageNo----------------', pagination.pageNo)
if (loading.value || el.value == null) if (loading.value || el.value == null)
return return
canloadMore = false canloadMore = false
@ -353,18 +354,19 @@ async function loadMore() {
more.forEach((item) => { more.forEach((item) => {
item.calHeight = 182 * item.high / item.wide item.calHeight = 182 * item.high / item.wide
}) })
console.log('loadMore加载后的pagination.pageNo----------------', pagination.pageNo)
// listData.value.push(...more) // listData.value.push(...more)
if (pagination.pageNo == 1) { if (pagination.pageNo <= 1) {
listData.value = [] listData.value = []
listData.value = listData.value.concat(more) listData.value = listData.value.concat(more)
console.log('listData.value出来了', listData.value) console.log('listData.value首页出来了1111', listData.value)
waterfallRef.value?.resize() waterfallRef.value?.resize()
if (listData.value.length == 0) if (listData.value.length == 0)
waterfallRef.value?.clear() waterfallRef.value?.clear()
} }
else { else {
listData.value = listData.value.concat(more) listData.value = listData.value.concat(more)
console.log('listData.value出来了', listData.value) console.log('listData.value首页出来了2222', listData.value)
waterfallRef.value?.mix() waterfallRef.value?.mix()
} }
} }
@ -427,9 +429,10 @@ async function oneCheck() {
configStore.setTimeNum(calNum.value) configStore.setTimeNum(calNum.value)
if (checkTaskStatus.value === 2 || checkTaskStatus.value === 3) { if (checkTaskStatus.value === 2 || checkTaskStatus.value === 3) {
if (checkTaskStatus.value === 2) if (checkTaskStatus.value === 2)
message.success('任务执行完毕,正在刷新数据...') message.success('任务执行完毕,正在刷新数据22...')
else message.error('查询异常') else message.error('查询异常')
reset()
loadMore()
tasksLoadingModal.closeOnlyModal() tasksLoadingModal.closeOnlyModal()
configStore.setTimeNum(100) configStore.setTimeNum(100)
if (timer.value) if (timer.value)
@ -438,8 +441,8 @@ async function oneCheck() {
setTimeout(() => { setTimeout(() => {
configStore.setTimeNum(0) configStore.setTimeNum(0)
}, 1000) }, 1000)
reset() // reset()
loadMore() // loadMore()
} }
waterfallRef.value?.resize() waterfallRef.value?.resize()
} }
@ -520,6 +523,7 @@ async function commitHandler(settingParam) {
const finalParam = { ...asideVal } const finalParam = { ...asideVal }
finalParam.buessinessno = settingParam.packagename finalParam.buessinessno = settingParam.packagename
finalParam.search_history = settingParam.comparehistory ? 1 : 0 finalParam.search_history = settingParam.comparehistory ? 1 : 0
waterfallRef.value?.resize()
} }
onMounted(() => { onMounted(() => {
@ -672,15 +676,17 @@ function refresh(val?: any) {
checkingTaskModal.closeModal() checkingTaskModal.closeModal()
isRefresh.value = false isRefresh.value = false
if (checkTaskStatus.value === 2) if (checkTaskStatus.value === 2)
message.success('任务执行完毕,正在刷新数据...') message.success('任务执行完毕,正在刷新数据11...')
else message.error('查询异常') else message.error('查询异常')
if (timer.value)
clearInterval(timer.value)
reset() reset()
loadMore() loadMore()
if (timer.value)
clearInterval(timer.value)
// reset()
// loadMore()
configStore.setTimeNum(0) configStore.setTimeNum(0)
} }
waterfallRef.value?.resize()
// else if (checkTaskStatus.value === 1) { // else if (checkTaskStatus.value === 1) {
// return; // return;
// } // }
@ -876,7 +882,19 @@ defineExpose({
src="@/assets/images/task/tag-not-pass.png" src="@/assets/images/task/tag-not-pass.png"
alt="" alt=""
> >
<img
v-if="(item.states != 3 && item.states != 5) && item.isRepeatHis"
class="tag-status"
src="@/assets/images/reset.png"
alt=""
>
<img
v-if="(item.states == 3 || item.states == 5) && item.isRepeatHis"
style="top:35px"
class="tag-status"
src="@/assets/images/reset.png"
alt=""
>
<div v-if="item.similar != -1" class="percent"> <div v-if="item.similar != -1" class="percent">
<SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" /> <SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" />
<div class="val"> <div class="val">
@ -984,7 +1002,19 @@ defineExpose({
src="@/assets/images/task/tag-not-pass.png" src="@/assets/images/task/tag-not-pass.png"
alt="" alt=""
> >
<img
v-if="(item.states != 3 && item.states != 5) && item.isRepeatHis"
class="tag-status"
src="@/assets/images/reset.png"
alt=""
>
<img
v-if="(item.states == 3 || item.states == 5) && item.isRepeatHis"
style="top:35px"
class="tag-status"
src="@/assets/images/reset.png"
alt=""
>
<div v-if="item.similar != -1" class="percent"> <div v-if="item.similar != -1" class="percent">
<SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" /> <SvgIcon size="42" :name="item.similar == 100 ? 'error_tag' : 'tag'" />
<div class="val"> <div class="val">

Loading…
Cancel
Save