| | |
| | | title-gutter="8" |
| | | title-scroll |
| | | > |
| | | <ProTabPane :title="`推荐`" :pane-key="HomeOrderType.Recommend"></ProTabPane> |
| | | <ProTabPane :title="`最新`" :pane-key="HomeOrderType.LastShelfTime"></ProTabPane> |
| | | <template #right> |
| | | <Menu> |
| | |
| | | :key="queryState.orderType" |
| | | > |
| | | <template #renderItem="{ item }"> |
| | | <FlexJobCard @click="goFlexJobDetail(item)" :showFooterLeft="false" /> |
| | | <FlexJobCard |
| | | :name="item.name" |
| | | :gender="item.gender" |
| | | :age="item.age" |
| | | :isReal="item.isReal" |
| | | :personalIdentityContent="item.personalIdentityContent" |
| | | :educationalBackgroundContent="item.educationalBackgroundContent" |
| | | :taskCount="item.taskCount" |
| | | :avatar="item.avatar" |
| | | :workExperience="item.workExperience" |
| | | :workSeniority="item.workSeniority" |
| | | @click="goFlexJobDetail(item)" |
| | | :showFooterLeft="false" |
| | | /> |
| | | </template> |
| | | </InfiniteLoading> |
| | | </PageLayoutWithBg> |
| | |
| | | import { ProTabs, ProTabPane, FlexJobCard } from '@12333/components'; |
| | | import { HomeOrderType } from './constants'; |
| | | import { useInfiniteLoading } from '@12333/hooks'; |
| | | import { OrderInputType, Gender } from '@12333/constants'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | import { |
| | | EnumPagedListOrder, |
| | | EnumTaskRecommendStatus, |
| | | EnumTaskReleaseStatus, |
| | | EnumUserGender, |
| | | } from '@12333/constants'; |
| | | import _ from 'lodash'; |
| | | import HomeQueryMenuView from './HomeQueryMenuView.vue'; |
| | | import HomeQueryPositionMenuView from './HomeQueryPositionMenuView.vue'; |
| | | import IconLocaltion from '@/assets/home/icon-localtion.png'; |
| | | import { setLocationCity } from '@/utils'; |
| | | import * as userResumeServices from '@12333/services/apiV2/userResume'; |
| | | |
| | | const { locationCity } = useUser(); |
| | | |
| | | onMounted(async () => { |
| | | try { |
| | | await resetLocation(); |
| | | } catch (error) {} |
| | | }); |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | | const queryMenuState = reactive({ |
| | | gender: '' as any as Gender, |
| | | genderLimit: '' as any as EnumUserGender, |
| | | age: [15, 65], |
| | | identity: '', |
| | | personalIdentityCode: '', |
| | | certificateType: '', |
| | | }); |
| | | |
| | | const queryPositionState = reactive({ |
| | | position: [] as string[], |
| | | userExpectJobs: [] as string[], |
| | | }); |
| | | |
| | | const queryState = reactive({ |
| | |
| | | |
| | | const { infiniteLoadingProps } = useInfiniteLoading( |
| | | ({ pageParam }) => { |
| | | let params: API.GetFlexTaskListInput = { |
| | | let params: API.GetUserResumesQuery = { |
| | | pageModel: { |
| | | rows: 20, |
| | | page: pageParam, |
| | | orderInput: [{ property: 'taskId', order: OrderInputType.Desc }], |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | }, |
| | | userExpectJobs: queryPositionState.userExpectJobs, |
| | | gender: queryMenuState.genderLimit, |
| | | personalIdentityCode: queryMenuState.personalIdentityCode, |
| | | // ageMin: queryMenuState.age[0], |
| | | // ageMax: queryMenuState.age[1], |
| | | userCredentials: queryMenuState.certificateType ? [queryMenuState.certificateType] : null, |
| | | }; |
| | | |
| | | return flexWorkerServices.getFlexTaskWorkerArrangeList(params, { |
| | | return userResumeServices.getUserResumes(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: [ |
| | | 'flexWorkerServices/getFlexTaskByArrange', |
| | | queryState, |
| | | queryMenuState, |
| | | queryPositionState, |
| | | ], |
| | | queryKey: ['userResumeServices/getUserResumes', queryState, queryMenuState, queryPositionState], |
| | | } |
| | | ); |
| | | |
| | |
| | | selectPositionItem.value?.toggle?.(); |
| | | } |
| | | |
| | | function goFlexJobDetail(item: API.GetFlexTaskListOutput) { |
| | | function goFlexJobDetail(item: API.GetUserResumesQueryResultItem) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobDetail}?id=${item.taskId}`, |
| | | url: `${RouterPath.flexJobDetail}?id=${item.id}`, |
| | | }); |
| | | } |
| | | |