|
|
|
@ -111,11 +111,17 @@ watch(viewMode, () => {
|
|
|
|
|
layout()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let canloadMore = true
|
|
|
|
|
|
|
|
|
|
useInfiniteScroll(
|
|
|
|
|
el as any,
|
|
|
|
|
() => {
|
|
|
|
|
loading = false
|
|
|
|
|
console.log("加载了000000000000000---------------------------");
|
|
|
|
|
loadMore()
|
|
|
|
|
},
|
|
|
|
|
{ distance: 10, canLoadMore: () => canloadMore },
|
|
|
|
@ -125,13 +131,15 @@ async function featchList() {
|
|
|
|
|
loading = true
|
|
|
|
|
try {
|
|
|
|
|
// const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value })
|
|
|
|
|
console.log("pagination.pageNo------------", pagination.pageNo);
|
|
|
|
|
const result = await dubiousfilelist({ ...pagination, ...sortObj })
|
|
|
|
|
// TODO:测试数据
|
|
|
|
|
// result.data = Array.from({ length: 30 })
|
|
|
|
|
const { data, pageCount } = result
|
|
|
|
|
pagination.pageNo += 1
|
|
|
|
|
// canloadMore = pageCount >= pagination.pageNo && pageCount > 0;
|
|
|
|
|
canloadMore = data.pages >= pagination.pageNo && data.pages > 0;
|
|
|
|
|
console.log("canloadMore------------", canloadMore);
|
|
|
|
|
|
|
|
|
|
return result.data.records
|
|
|
|
|
// const list = data.map((item) => {
|
|
|
|
|
// return {
|
|
|
|
@ -147,12 +155,15 @@ async function featchList() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function loadMore() {
|
|
|
|
|
console.log("执行l------------------------", loading, el.value);
|
|
|
|
|
|
|
|
|
|
console.log("执行l------------------------", loading, el.value, pagination.pageNo);
|
|
|
|
|
if (loading || el.value == null)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
// loading = true
|
|
|
|
|
pagination.pageNo = pagination.pageNo + 1;
|
|
|
|
|
const more = await featchList()
|
|
|
|
|
console.log("more------------------------", more);
|
|
|
|
|
listData.value.push(...more)
|
|
|
|
|
layout()
|
|
|
|
|
}
|
|
|
|
@ -172,11 +183,6 @@ onUpdated(() => {
|
|
|
|
|
layout()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
|
// const list = await featchList()
|
|
|
|
|
// listData.value = list
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let start: { x: number, y: number } | null = null
|
|
|
|
|
let selectionBox: HTMLDivElement | null
|
|
|
|
|
const selectIds = ref<string[]>([])
|
|
|
|
@ -310,7 +316,7 @@ function upHandler(event: MouseEvent) {
|
|
|
|
|
listData.value.map(item => {
|
|
|
|
|
item.checked = false;
|
|
|
|
|
});
|
|
|
|
|
batch.value = false;
|
|
|
|
|
// batch.value = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -353,7 +359,7 @@ function afterLeave() {
|
|
|
|
|
removeListeners()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
onMounted(async() => {
|
|
|
|
|
show.value && addListeners()
|
|
|
|
|
removeDom()
|
|
|
|
|
})
|
|
|
|
@ -491,13 +497,13 @@ function validate(items: any[]) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
function approvalHandler(items?: any) {
|
|
|
|
|
if (batch.value) {
|
|
|
|
|
// if (batch.value) {
|
|
|
|
|
processItems = selectedApproveItems.value
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
// 任务包图片 => 点击 => 通过/不通过按钮
|
|
|
|
|
if (items !== undefined && !(items instanceof PointerEvent))
|
|
|
|
|
processItems = [items]
|
|
|
|
|
|
|
|
|
|
console.log("batch-------------",batch.value,selectedApproveItems.value,processItems);
|
|
|
|
|
const msg = validate(processItems)
|
|
|
|
|
|
|
|
|
|
if (msg !== null) {
|
|
|
|
@ -555,6 +561,7 @@ function reloadList() {
|
|
|
|
|
async function refreshHandler(filtersearchId?: any) {
|
|
|
|
|
// 注释 rao start
|
|
|
|
|
reset()
|
|
|
|
|
pagination.pageNo = 1;
|
|
|
|
|
const list = await featchList()
|
|
|
|
|
listData.value = list
|
|
|
|
|
layout()
|
|
|
|
@ -570,6 +577,7 @@ async function refreshHandler(filtersearchId?: any) {
|
|
|
|
|
useInfiniteScroll(
|
|
|
|
|
el as any,
|
|
|
|
|
() => {
|
|
|
|
|
console.log("加载了333333333333333333333333---------------------------");
|
|
|
|
|
loadMore();
|
|
|
|
|
},
|
|
|
|
|
{ distance: 10, canLoadMore: () => canloadMore }
|
|
|
|
@ -578,6 +586,33 @@ async function refreshHandler(filtersearchId?: any) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
watch(() => show.value,
|
|
|
|
|
async(newVal) => {
|
|
|
|
|
if(show.value) {
|
|
|
|
|
pagination.pageNo = 1;
|
|
|
|
|
const list = await featchList()
|
|
|
|
|
listData.value = list
|
|
|
|
|
console.log("加载了1111111111111---------------------------", listData.value);
|
|
|
|
|
layout()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(() => pagination.pageNo,
|
|
|
|
|
(newVal) => {
|
|
|
|
|
if((newVal == 1 || newVal == 2) && canloadMore) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
console.log("加载了22222222222222222---------------------------", newVal);
|
|
|
|
|
loading = false
|
|
|
|
|
loadMore();
|
|
|
|
|
})
|
|
|
|
|
}, 500)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|