| | |
| | | <template> |
| | | <div class="job-application-card-wrapper"> |
| | | <div class="job-application-card-title-wrapper"> |
| | | <div class="job-application-card-title">客房服务员</div> |
| | | <TaskPrice :value="212" v-if="mode === 'taskManage'" /> |
| | | <div class="job-application-card-title">{{ taskName }}</div> |
| | | <TaskPrice :value="fee" :unit="unit" v-if="mode === 'taskManage'" /> |
| | | <div v-else 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" v-if="mode === 'normal'">{{ '生效中' }}</div> |
| | | <div class="job-application-card-time"> |
| | | {{ |
| | | `${dayjs(startDate).format('YYYY年MM月DD日')}至${dayjs(endDate).format('YYYY年MM月DD日')}` |
| | | }} |
| | | </div> |
| | | <div class="job-application-card-status" v-if="mode === 'normal'"> |
| | | {{ FlexTaskReleaseStatusEnumText[releaseStatus] }} |
| | | </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 class="job-application-card-company-address">{{ address }}</div> |
| | | </div> |
| | | <div class="job-application-card-people" v-if="mode === 'normal'">{{ `报名人数:${5}` }}</div> |
| | | <div class="job-application-card-people" v-if="mode === 'normal'"> |
| | | {{ `报名人数:${applyWorkerCount}` }} |
| | | </div> |
| | | </div> |
| | | <div class="job-application-card-line"> |
| | | <div class="job-application-card-publish-time">{{ `发布日期:${'2022年12月25日'}` }}</div> |
| | | <div class="job-application-card-publish-time"> |
| | | {{ `发布日期:${dayjs(creationTime).format('YYYY-MM-DD')}` }} |
| | | </div> |
| | | <slot name="footer-actions"> |
| | | <div class="job-application-card-fee"> |
| | | <TaskPrice :value="212" /> |
| | | <TaskPrice :value="fee" :unit="unit" /> |
| | | </div> |
| | | </slot> |
| | | </div> |
| | |
| | | import { ActionSheet } from '@nutui/nutui-taro'; |
| | | import { Portal } from 'senin-mini/components'; |
| | | import { TaskPrice } from '@12333/components'; |
| | | import dayjs from 'dayjs'; |
| | | |
| | | defineOptions({ |
| | | name: 'JobApplicationCard', |
| | |
| | | Delete, |
| | | } |
| | | |
| | | enum ResourceStatus { |
| | | enum FlexTaskReleaseStatusEnum { |
| | | /** |
| | | * 已驳回 |
| | | * 发布中 |
| | | */ |
| | | Reject = -10, |
| | | Releasing = 10, |
| | | /** |
| | | * 未提交 |
| | | * 已停止 |
| | | */ |
| | | Draft = 10, |
| | | /** |
| | | * 待审核 |
| | | */ |
| | | WaitAudit = 20, |
| | | /** |
| | | * 进行中 |
| | | */ |
| | | Running = 30, |
| | | /** |
| | | * 已下架 |
| | | */ |
| | | OffShelf = 40, |
| | | /** |
| | | * 系统下架 |
| | | */ |
| | | SystemOffShelf = 50, |
| | | Stoping = 20, |
| | | } |
| | | |
| | | const FlexTaskReleaseStatusEnumText = { |
| | | [FlexTaskReleaseStatusEnum.Releasing]: '发布中', |
| | | [FlexTaskReleaseStatusEnum.Stoping]: '已停止', |
| | | }; |
| | | |
| | | type Props = CommonTaskCardProps & { |
| | | showActions?: boolean; |
| | | status?: ResourceStatus; |
| | | status?: FlexTaskReleaseStatusEnum; |
| | | mode?: 'taskManage' | 'normal'; |
| | | |
| | | taskName?: string; |
| | | startDate?: string; |
| | | endDate?: string; |
| | | address?: string; |
| | | creationTime?: string; |
| | | fee?: number; |
| | | applyWorkerCount?: number; |
| | | unit?: string; |
| | | releaseStatus?: API.FlexTaskReleaseStatusEnum; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | |
| | | |
| | | const menuList = computed(() => { |
| | | let _menuList = []; |
| | | if (props.status !== ResourceStatus.WaitAudit) { |
| | | _menuList.push({ |
| | | _menuList.push( |
| | | { |
| | | name: '编辑', |
| | | value: ManageActions.Edit, |
| | | }); |
| | | } |
| | | _menuList.push({ |
| | | name: '查看详情', |
| | | value: ManageActions.Detail, |
| | | }); |
| | | if (props.status === ResourceStatus.OffShelf) { |
| | | }, |
| | | { |
| | | name: '查看详情', |
| | | value: ManageActions.Detail, |
| | | } |
| | | ); |
| | | if (props.releaseStatus === FlexTaskReleaseStatusEnum.Stoping) { |
| | | _menuList.push({ |
| | | name: '发布', |
| | | value: ManageActions.Publish, |
| | | }); |
| | | } |
| | | if (props.status === ResourceStatus.Running) { |
| | | if (props.releaseStatus === FlexTaskReleaseStatusEnum.Releasing) { |
| | | _menuList.push({ |
| | | name: '停止发布', |
| | | value: ManageActions.Stop, |
| | | }); |
| | | } |
| | | if (props.status !== ResourceStatus.WaitAudit) { |
| | | _menuList.push( |
| | | { |
| | | name: '复制', |
| | | value: ManageActions.Copy, |
| | | }, |
| | | { |
| | | name: '删除', |
| | | value: ManageActions.Delete, |
| | | } |
| | | ); |
| | | } |
| | | _menuList.push( |
| | | { |
| | | name: '复制', |
| | | value: ManageActions.Copy, |
| | | }, |
| | | { |
| | | name: '删除', |
| | | value: ManageActions.Delete, |
| | | } |
| | | ); |
| | | |
| | | return _menuList; |
| | | }); |