<template>
|
<LoadingLayout>
|
<!-- <ContentView>
|
<ChunkTitle :title="title" />
|
</ContentView> -->
|
<InfiniteLoading
|
scrollViewClassName="common-infinite-scroll-list"
|
v-bind="infiniteLoadingProps"
|
>
|
<template #renderItem="{ item }">
|
<TaskCheckHistoryCard
|
:avatar="setOSSLink(item.avatar)"
|
:name="item.name"
|
:gender="item.gender"
|
:isReal="item.isReal"
|
:contactPhoneNumber="item.contactPhoneNumber"
|
:type="item.type"
|
:checkTime="item.checkTime"
|
/>
|
</template>
|
</InfiniteLoading>
|
</LoadingLayout>
|
</template>
|
|
<script setup lang="ts">
|
import Taro from '@tarojs/taro';
|
import * as taskCheckReceiveServices from '@12333/services/apiV2/taskCheckReceive';
|
import { useInfiniteLoading } from '@12333/hooks';
|
import { TaskCheckHistoryCard } from '@12333/components';
|
import { EnumTaskUserSubmitCheckHistoryType, WeekCN } from '@12333/constants';
|
import { Message, setOSSLink } from '@12333/utils';
|
import dayjs from 'dayjs';
|
|
defineOptions({
|
name: 'InnerPage',
|
});
|
|
const router = Taro.useRouter();
|
const id = router.params?.id ?? '';
|
const taskInfoUserId = router.params?.taskInfoUserId ?? '';
|
const date = router.params?.date ?? '';
|
|
const title = `${dayjs(date).format('YYYY年MM月DD日')} 星期${WeekCN[dayjs(date).day()]}`;
|
|
const queryState = reactive({
|
type: 0 as any as EnumTaskUserSubmitCheckHistoryType,
|
});
|
|
const { infiniteLoadingProps } = useInfiniteLoading(
|
async ({ pageParam }) => {
|
let params: API.GetCheckReceiveTaskUserSubmitCheckHistoriesQuery = {
|
pageModel: {
|
rows: 20,
|
page: pageParam,
|
},
|
taskInfoId: id,
|
taskInfoUserId: taskInfoUserId,
|
date: dayjs(date).format('YYYY-MM-DD'),
|
};
|
|
if (Number(queryState.type) !== 0) {
|
params.type = queryState.type;
|
}
|
|
let res = await taskCheckReceiveServices.getCheckReceiveTaskUserSubmitCheckHistories(params, {
|
showLoading: false,
|
});
|
return res;
|
},
|
{
|
queryKey: ['taskCheckReceiveServices/getCheckReceiveTaskUserSubmitCheckHistories', queryState],
|
}
|
);
|
</script>
|