| | |
| | | :key="queryState.mineSignType" |
| | | > |
| | | <template #renderItem="{ item }"> |
| | | <TaskCard> |
| | | <TaskCard @click="goTaskDetail(item)"> |
| | | <template #actions> |
| | | <div class="task-card-actions-text" :style="{ color: TaskStatusColor[10] }"> |
| | | {{ TaskStatusText[10] }} |
| | |
| | | import { TaskStatusText, TaskStatusColor, TaskStatus } from '@/constants'; |
| | | import { useInfiniteLoading } from '@12333/hooks'; |
| | | import { OrderInputType } from '@12333/constants'; |
| | | import * as orderServices from '@12333/services/api/Order'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | |
| | | const { infiniteLoadingProps } = useInfiniteLoading( |
| | | ({ pageParam }) => { |
| | | let params: API.FrontOrderListInput = { |
| | | let params: API.GetFlexTaskListInput = { |
| | | pageModel: { |
| | | rows: 20, |
| | | page: pageParam, |
| | | orderInput: [ |
| | | queryState.mineSignType === TaskStatus.All |
| | | ? { property: 'isRecommend', order: OrderInputType.Desc } |
| | | ? { property: 'creationTime', order: OrderInputType.Desc } |
| | | : { property: 'lastShelfTime', order: OrderInputType.Desc }, |
| | | ], |
| | | }, |
| | | }; |
| | | |
| | | return orderServices.getFrontOrderList(params, { |
| | | return flexWorkerServices.getFlexTaskByArrange(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: ['orderServices/getFrontOrderList', queryState], |
| | | queryKey: ['flexWorkerServices/getFlexTaskByArrange', queryState], |
| | | } |
| | | ); |
| | | |
| | | function goTaskDetail(item: API.GetFlexTaskListOutput) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.taskDetail}?id=${item.id}`, |
| | | }); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |