From 548b9c78ca14b5c3812e9958835dedb78d589454 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期五, 14 二月 2025 15:05:51 +0800 Subject: [PATCH] feat: mine --- apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.config.ts | 3 apps/bMiniApp/src/constants/router.ts | 3 apps/bMiniApp/src/pages/workbenches/InnerPage.vue | 6 apps/bMiniApp/project.private.config.json | 7 apps/bMiniApp/src/app.config.ts | 7 apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/InnerPage.vue | 37 +++ apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue | 17 + apps/bMiniApp/src/subpackages/jobApplicationManage/components/SignList.vue | 52 +++++ packages/components/assets/components/icon-more.png | 0 apps/bMiniApp/src/assets/flexJob/icon-localtion.png | 0 apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail.config.ts | 3 packages/components/src/index.ts | 1 apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail.vue | 17 + apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/InnerPage.vue | 79 +++++++ apps/bMiniApp/src/subpackages/jobApplicationManage/components/JobDetail.vue | 80 ++++++++ packages/components/src/Card/JobApplicationCard.vue | 270 +++++++++++++++++++++++++++ 16 files changed, 581 insertions(+), 1 deletions(-) diff --git a/apps/bMiniApp/project.private.config.json b/apps/bMiniApp/project.private.config.json index 3ff7cda..1e75d28 100644 --- a/apps/bMiniApp/project.private.config.json +++ b/apps/bMiniApp/project.private.config.json @@ -35,6 +35,13 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "搴旇仒绠$悊", + "pathName": "subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage", + "query": "", + "launchMode": "default", + "scene": null } ] } diff --git a/apps/bMiniApp/src/app.config.ts b/apps/bMiniApp/src/app.config.ts index 8e23d6e..8169180 100644 --- a/apps/bMiniApp/src/app.config.ts +++ b/apps/bMiniApp/src/app.config.ts @@ -79,6 +79,13 @@ pages: ['publishTask/publishTask'], }, { + root: 'subpackages/jobApplicationManage', + pages: [ + 'jobApplicationManage/jobApplicationManage', + 'jobApplicationDetail/jobApplicationDetail', + ], + }, + { root: 'subpackages/city', pages: ['citySelect/citySelect'], }, diff --git a/apps/bMiniApp/src/assets/flexJob/icon-localtion.png b/apps/bMiniApp/src/assets/flexJob/icon-localtion.png new file mode 100644 index 0000000..71784b5 --- /dev/null +++ b/apps/bMiniApp/src/assets/flexJob/icon-localtion.png Binary files differ diff --git a/apps/bMiniApp/src/constants/router.ts b/apps/bMiniApp/src/constants/router.ts index 330c92a..62a0a9d 100644 --- a/apps/bMiniApp/src/constants/router.ts +++ b/apps/bMiniApp/src/constants/router.ts @@ -29,4 +29,7 @@ mineContactRecord = '/subpackages/mine/mineContactRecord/mineContactRecord', publishTask = '/subpackages/task/publishTask/publishTask', + + jobApplicationManage = '/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage', + jobApplicationDetail = '/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail', } diff --git a/apps/bMiniApp/src/pages/workbenches/InnerPage.vue b/apps/bMiniApp/src/pages/workbenches/InnerPage.vue index c62b8c3..c1ece33 100644 --- a/apps/bMiniApp/src/pages/workbenches/InnerPage.vue +++ b/apps/bMiniApp/src/pages/workbenches/InnerPage.vue @@ -12,7 +12,7 @@ <CellChunk title="浠诲姟"> <div class="workbenches-cell-list"> <TaskDetailWelfareItem :icon="IconPublishTask" text="鍙戝竷浠诲姟" @click="goPublishTask" /> - <TaskDetailWelfareItem :icon="IconPersonManage" text="鐢ㄤ汉绠$悊" /> + <TaskDetailWelfareItem :icon="IconPersonManage" text="鐢ㄤ汉绠$悊" @click="goPersonManage" /> </div> </CellChunk> <CellChunk title="鐢ㄤ汉"> @@ -56,6 +56,10 @@ function goPublishTask() { goPage(RouterPath.publishTask); } + +function goPersonManage() { + goPage(RouterPath.jobApplicationManage); +} </script> <style lang="scss"> diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/components/JobDetail.vue b/apps/bMiniApp/src/subpackages/jobApplicationManage/components/JobDetail.vue new file mode 100644 index 0000000..c2ff4ee --- /dev/null +++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/components/JobDetail.vue @@ -0,0 +1,80 @@ +<template> + <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> + <ContentScrollView style="background-color: transparent"> + <Cell :title="'瀹㈡埧鏈嶅姟鍛�'" titleSize="large"> + <div class="taskDetail-time">2025骞�2鏈�5鏃� 鑷� 2025骞�3鏈�5鏃�</div> + <div class="task-card-welfare-wrapper"> + <div class="task-card-welfare-list"> + <div class="task-card-welfare-list-item">鏃ョ粨</div> + <div class="task-card-welfare-list-item">鐢峰コ涓嶉檺</div> + <div class="task-card-welfare-list-item">鍖呬笁椁�</div> + </div> + <TaskPrice :value="212" /> + </div> + <div class="taskDetail-address-wrapper"> + <div class="taskDetail-address-title-wrapper"> + <img :src="IconLocaltion" class="taskDetail-address-title-icon" /> + <div class="taskDetail-address-title">瀹佹尝鏌忔偊閰掑簵</div> + </div> + <div class="taskDetail-address-info-wrapper"> + <div class="taskDetail-address-info">瀹佹尝甯傞劄宸炲尯涓滈挶婀栧ぇ鍫拌矾188鍙峰畞娉㈡煆鎮﹂厭搴�</div> + <RectRight :size="8" class="taskDetail-address-info-icon" /> + </div> + </div> + </Cell> + <Cell :show-title="false"> + <CellChunk title="绂忓埄淇℃伅"> + <div class="taskDetail-welfare-list"> + <TaskDetailWelfareItem :icon="IconLocaltion" text="楂樻俯琛ヨ创" /> + <TaskDetailWelfareItem :icon="IconLocaltion" text="楂樻俯琛ヨ创" /> + <TaskDetailWelfareItem :icon="IconLocaltion" text="楂樻俯琛ヨ创" /> + <TaskDetailWelfareItem :icon="IconLocaltion" text="楂樻俯琛ヨ创" /> + <TaskDetailWelfareItem :icon="IconLocaltion" text="楂樻俯琛ヨ创" /> + </div> + </CellChunk> + </Cell> + </ContentScrollView> + </LoadingLayout> +</template> + +<script setup lang="ts"> +import { useQuery } from '@tanstack/vue-query'; +import Taro from '@tarojs/taro'; +import * as orderServices from '@12333/services/api/Order'; +import IconLocaltion from '@/assets/flexJob/icon-localtion.png'; +import { TaskPrice, TaskDetailWelfareItem } from '@12333/components'; + +defineOptions({ + name: 'JobDetail', +}); + +// type Props = {}; + +// const props = withDefaults(defineProps<Props>(), {}); +const router = Taro.useRouter(); + +const taskId = router.params?.id ?? ''; + +const { + isLoading, + isError, + data: detail, + refetch, +} = useQuery({ + queryKey: ['orderServices/getOrdeForDetail', taskId], + queryFn: async () => { + return await orderServices.getOrdeForDetail( + { id: taskId }, + { + showLoading: false, + } + ); + }, + placeholderData: () => ({} as API.OrderInfoDto), + onSuccess(data) {}, +}); +</script> + +<style lang="scss"> +@import '@/styles/common.scss'; +</style> diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/components/SignList.vue b/apps/bMiniApp/src/subpackages/jobApplicationManage/components/SignList.vue new file mode 100644 index 0000000..75f5381 --- /dev/null +++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/components/SignList.vue @@ -0,0 +1,52 @@ +<template> + <InfiniteLoading scrollViewClassName="common-infinite-scroll-list" v-bind="infiniteLoadingProps"> + <template #renderItem="{ item }"> + <FlexJobCard> + <template #footerLeft> + <div class="flexJob-card-footer-text">宸插綍鐢�</div> + </template> + <template #footerRight> + <nut-button type="primary">鏌ョ湅璇︽儏</nut-button> + </template> + </FlexJobCard> + </template> + </InfiniteLoading> +</template> + +<script setup lang="ts"> +import { OrderInputType } from '@12333/constants'; +import { useInfiniteLoading } from '@12333/hooks'; +import * as orderServices from '@12333/services/api/Order'; +import { FlexJobCard } from '@12333/components'; + +defineOptions({ + name: 'SignList', +}); + +// type Props = {}; + +// const props = withDefaults(defineProps<Props>(), {}); + +const { infiniteLoadingProps } = useInfiniteLoading( + ({ pageParam }) => { + let params: API.FrontOrderListInput = { + pageModel: { + rows: 20, + page: pageParam, + orderInput: [{ property: 'isRecommend', order: OrderInputType.Desc }], + }, + }; + + return orderServices.getFrontOrderList(params, { + showLoading: false, + }); + }, + { + queryKey: ['orderServices/getFrontOrderList'], + } +); +</script> + +<style lang="scss"> +@import '@/styles/common.scss'; +</style> diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/InnerPage.vue b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/InnerPage.vue new file mode 100644 index 0000000..290a68e --- /dev/null +++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/InnerPage.vue @@ -0,0 +1,37 @@ +<template> + <ProTabs + v-model="tabType" + name="home-tab" + class="home-tabs" + isTransparent + title-gutter="12" + full-height + > + <ProTabPane :title="`鎶ュ悕鍒楄〃`" pane-key="1"> + <SignList></SignList> + </ProTabPane> + <ProTabPane :title="`宀椾綅璇︽儏`" pane-key="2"> + <JobDetail></JobDetail> + </ProTabPane> + </ProTabs> +</template> + +<script setup lang="ts"> +import { ProTabs, ProTabPane } from '@12333/components'; + +import SignList from '../components/SignList.vue'; +import JobDetail from '../components/JobDetail.vue'; + +defineOptions({ + name: 'InnerPage', +}); + +const tabType = ref('1'); +</script> + +<style lang="scss"> +@import '@/styles/common.scss'; + +// .jobApplicationManage-page-wrapper { +// } +</style> diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail.config.ts b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail.config.ts new file mode 100644 index 0000000..305fdb1 --- /dev/null +++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail.config.ts @@ -0,0 +1,3 @@ +export default definePageConfig({ + disableScroll: true, +}); diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail.vue b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail.vue new file mode 100644 index 0000000..181f20a --- /dev/null +++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationDetail/jobApplicationDetail.vue @@ -0,0 +1,17 @@ +<template> + <PageLayoutWithBg class="jobApplicationDetail-page-wrapper" :title="'璇︽儏'"> + <InnerPage></InnerPage> + </PageLayoutWithBg> +</template> + +<script setup lang="ts"> +import InnerPage from './InnerPage.vue'; + +defineOptions({ + name: 'jobApplicationDetail', +}); +</script> + +<style lang="scss"> +@import '@/styles/common.scss'; +</style> diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/InnerPage.vue b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/InnerPage.vue new file mode 100644 index 0000000..daaecd7 --- /dev/null +++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/InnerPage.vue @@ -0,0 +1,79 @@ +<template> + <ProTabs + v-model="queryState.mineHireType" + name="home-tab" + :showPaneContent="false" + class="home-tabs" + isTransparent + title-gutter="12" + title-scroll + > + <ProTabPane :title="`鍙戝竷涓�(${1})`" :pane-key="0"></ProTabPane> + <ProTabPane :title="`宸插仠姝�(${1})`" :pane-key="10"></ProTabPane> + </ProTabs> + <InfiniteLoading + scrollViewClassName="common-infinite-scroll-list home-list" + v-bind="infiniteLoadingProps" + > + <template #renderItem="{ item }"> + <JobApplicationCard @edit="goEdit" @detail="goDetail"> </JobApplicationCard> + </template> + </InfiniteLoading> +</template> + +<script setup lang="ts"> +import { JobApplicationCard, ProTabs, ProTabPane } from '@12333/components'; +import { RouterPath } from '@/constants'; +import { useInfiniteLoading } from '@12333/hooks'; +import { OrderInputType } from '@12333/constants'; +import * as orderServices from '@12333/services/api/Order'; +import { TaskStatus } from '@/constants/task'; +import Taro from '@tarojs/taro'; + +defineOptions({ + name: 'InnerPage', +}); + +const queryState = reactive({ + mineHireType: TaskStatus.All, +}); + +const { infiniteLoadingProps } = useInfiniteLoading( + ({ pageParam }) => { + let params: API.FrontOrderListInput = { + pageModel: { + rows: 20, + page: pageParam, + orderInput: [{ property: 'isRecommend', order: OrderInputType.Desc }], + }, + }; + + return orderServices.getFrontOrderList(params, { + showLoading: false, + }); + }, + { + queryKey: ['orderServices/getFrontOrderList'], + } +); + +function goPage(routeName: string) { + Taro.navigateTo({ + url: routeName, + }); +} + +function goEdit() { + goPage(RouterPath.publishTask); +} +function goDetail() { + goPage(RouterPath.jobApplicationDetail); +} +</script> + +<style lang="scss"> +@import '@/styles/common.scss'; + +// .jobApplicationManage-page-wrapper { +// } +</style> diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.config.ts b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.config.ts new file mode 100644 index 0000000..305fdb1 --- /dev/null +++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.config.ts @@ -0,0 +1,3 @@ +export default definePageConfig({ + disableScroll: true, +}); diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue new file mode 100644 index 0000000..ffe2e4a --- /dev/null +++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue @@ -0,0 +1,17 @@ +<template> + <PageLayoutWithBg class="jobApplicationManage-page-wrapper" :title="'搴旇仒绠$悊'"> + <InnerPage></InnerPage> + </PageLayoutWithBg> +</template> + +<script setup lang="ts"> +import InnerPage from './InnerPage.vue'; + +defineOptions({ + name: 'jobApplicationManage', +}); +</script> + +<style lang="scss"> +@import '@/styles/common.scss'; +</style> diff --git a/packages/components/assets/components/icon-more.png b/packages/components/assets/components/icon-more.png new file mode 100644 index 0000000..18d5d44 --- /dev/null +++ b/packages/components/assets/components/icon-more.png Binary files differ diff --git a/packages/components/src/Card/JobApplicationCard.vue b/packages/components/src/Card/JobApplicationCard.vue new file mode 100644 index 0000000..5800a9e --- /dev/null +++ b/packages/components/src/Card/JobApplicationCard.vue @@ -0,0 +1,270 @@ +<template> + <div class="job-application-card-wrapper"> + <div class="job-application-card-title-wrapper"> + <div class="job-application-card-title">瀹㈡埧鏈嶅姟鍛�</div> + <div class="job-application-card-title-more" @click.stop="handleMore"> + <img :src="IconMore" class="more-btn-icon" /> + </div> + </div> + <div class="job-application-card-line"> + <div class="job-application-card-time">{{ `${'2025骞�2鏈�5鏃�'}鑷�${'2025骞�3鏈�5鏃�'}` }}</div> + <div class="job-application-card-status">{{ '鐢熸晥涓�' }}</div> + </div> + <div class="job-application-card-line"> + <div class="job-application-card-company"> + <div class="job-application-card-company-tag">H</div> + <div class="job-application-card-company-address">瀹佹尝闆疯开妫厭搴�</div> + </div> + <div class="job-application-card-people">{{ `鎶ュ悕浜烘暟锛�${5}` }}</div> + </div> + <div class="job-application-card-line"> + <div class="job-application-card-publish-time">{{ `鍙戝竷鏃ユ湡锛�${'2022骞�12鏈�25鏃�'}` }}</div> + <div class="job-application-card-fee"> + <TaskPrice :value="212" /> + </div> + </div> + </div> +</template> + +<script setup lang="ts"> +import { computed, h } from 'vue'; +import IconMore from '../../assets/components/icon-more.png'; +import { CommonTaskCardProps } from './card'; +import { ActionSheet } from '@nutui/nutui-taro'; +import { Portal } from 'senin-mini/components'; +import { TaskPrice } from '@12333/components'; + +defineOptions({ + name: 'JobApplicationCard', +}); + +enum ManageActions { + Edit = 1, + Detail, + Publish, + Stop, + Copy, + Delete, +} + +enum ResourceStatus { + /** + * 宸查┏鍥� + */ + Reject = -10, + /** + * 鏈彁浜� + */ + Draft = 10, + /** + * 寰呭鏍� + */ + WaitAudit = 20, + /** + * 杩涜涓� + */ + Running = 30, + /** + * 宸蹭笅鏋� + */ + OffShelf = 40, + /** + * 绯荤粺涓嬫灦 + */ + SystemOffShelf = 50, +} + +type Props = CommonTaskCardProps & { + showActions?: boolean; + status?: ResourceStatus; +}; + +const props = withDefaults(defineProps<Props>(), { + showActions: true, +}); + +const emit = defineEmits<{ + (e: 'edit'): void; + (e: 'detail'): void; + (e: 'publish'): void; + (e: 'stop'): void; + (e: 'copy'): void; + (e: 'delete'): void; +}>(); + +const menuList = computed(() => { + let _menuList = []; + if (props.status !== ResourceStatus.WaitAudit) { + _menuList.push({ + name: '缂栬緫', + value: ManageActions.Edit, + }); + } + _menuList.push({ + name: '鏌ョ湅璇︽儏', + value: ManageActions.Detail, + }); + if (props.status === ResourceStatus.OffShelf) { + _menuList.push({ + name: '鍙戝竷', + value: ManageActions.Publish, + }); + } + if (props.status === ResourceStatus.Running) { + _menuList.push({ + name: '鍋滄鍙戝竷', + value: ManageActions.Stop, + }); + } + if (props.status !== ResourceStatus.WaitAudit) { + _menuList.push( + { + name: '澶嶅埗', + value: ManageActions.Copy, + }, + { + name: '鍒犻櫎', + value: ManageActions.Delete, + } + ); + } + + return _menuList; +}); + +function handleMore() { + Portal.add((key) => { + return h( + Portal.Container, + { keyNumber: key, delayOpen: true }, + { + default: ({ open, onClose }) => + // @ts-ignore + h(ActionSheet, { + visible: open.value, + 'onUpdate:visible': () => onClose(), + menuItems: menuList.value, + onChoose: (item) => { + handleEmit(item); + onClose(); + }, + }), + } + ); + }); +} + +function handleEmit(action: { name: string; value: number }) { + switch (action.value) { + case ManageActions.Edit: + emit('edit'); + break; + case ManageActions.Detail: + emit('detail'); + break; + case ManageActions.Publish: + emit('publish'); + break; + case ManageActions.Stop: + emit('stop'); + break; + case ManageActions.Copy: + emit('copy'); + break; + case ManageActions.Delete: + emit('delete'); + break; + } +} +</script> + +<style lang="scss"> +@import '@/styles/common.scss'; + +.job-application-card-wrapper { + padding: 24px 32px; + margin-bottom: 24px; + background-color: #fff; + border-radius: 12px; + + &:last-child { + margin-bottom: 0; + } + + .job-application-card-title-wrapper { + display: flex; + align-items: center; + margin-bottom: 30px; + justify-content: space-between; + + .job-application-card-title { + @include ellipsis; + font-size: 30px; + color: boleGetCssVar('text-color', 'primary'); + line-height: 42px; + font-weight: bold; + } + + .job-application-card-title-more { + flex-shrink: 0; + + .more-btn-icon { + width: 42px; + height: 42px; + } + } + } + + .job-application-card-line { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 24px; + font-size: 24px; + line-height: 32px; + + &:last-child { + margin-bottom: 0; + } + + .job-application-card-time { + color: boleGetCssVar('text-color', 'regular'); + } + + .job-application-card-company { + display: inline-flex; + align-items: center; + + .job-application-card-company-tag { + width: 32px; + height: 32px; + background: #2a9e1b; + margin-right: 8px; + border-radius: 8px; + text-align: center; + line-height: 32px; + color: #fff; + font-size: 22px; + } + + .job-application-card-company-address { + font-size: 22px; + color: boleGetCssVar('text-color', 'regular'); + line-height: 32px; + flex: 1; + min-width: 0; + @include ellipsis; + } + } + + .job-application-card-people { + font-size: 20px; + color: boleGetCssVar('text-color', 'secondary'); + } + + .job-application-card-publish-time { + color: boleGetCssVar('text-color', 'regular'); + } + } +} +</style> diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 5a7567a..2e4af05 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -21,6 +21,7 @@ export { default as Elevator } from './Elevator/Elevator.vue'; export { default as TaskCard } from './Card/TaskCard.vue'; export { default as MineAgreementSignCard } from './Card/MineAgreementSignCard.vue'; +export { default as JobApplicationCard } from './Card/JobApplicationCard.vue'; export { default as MyTaskCard } from './Card/MyTaskCard.vue'; export { default as FlexJobCard } from './Card/FlexJobCard.vue'; export { default as TaskPrice } from './Card/TaskPrice.vue'; -- Gitblit v1.9.1