| | |
| | | "miniprogram": { |
| | | "list": [ |
| | | { |
| | | "name": "公司详情", |
| | | "pathName": "subpackages/task/companyDetail/companyDetail", |
| | | "query": "id=f775538f-985c-4d51-7985-08ddd5c71bbf", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | | { |
| | | "name": "任务详情", |
| | | "pathName": "subpackages/task/taskDetail/taskDetail", |
| | | "query": "id=04c75425-e783-4dbf-0f16-08ddd626b756", |
| | |
| | | import { EnumUserType, EnumClientType } from '@12333/constants'; |
| | | |
| | | export const AppLocalConfig = { |
| | | userType: EnumUserType.Operation, |
| | | userType: EnumUserType.Enterprise, |
| | | clientType: EnumClientType.PcWeb, |
| | | }; |
| | |
| | | <PageLayoutWithBg class="companyDetail-page-wrapper" title="公司详情" :need-auth="false"> |
| | | <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> |
| | | <ContentView> |
| | | <CompanyDesc style="background-color: #fff" :showArrow="false"></CompanyDesc> |
| | | <CompanyDesc |
| | | style="background-color: #fff" |
| | | :showArrow="false" |
| | | :enterpriseName="enterpriseDetail?.enterpriseName ?? ''" |
| | | :taskCount="enterpriseDetail?.taskCount ?? 0" |
| | | ></CompanyDesc> |
| | | </ContentView> |
| | | <ProTabs |
| | | v-model="tab" |
| | |
| | | <CompanyTaskList /> |
| | | </ProTabPane> |
| | | <ProTabPane :title="`企业信息`" pane-key="2"> |
| | | <CompanyInfo /> |
| | | <CompanyInfo :enterpriseId="enterpriseId" /> |
| | | </ProTabPane> |
| | | </ProTabs> |
| | | </LoadingLayout> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import Taro from '@tarojs/taro'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | import CompanyDesc from '../components/CompanyDesc.vue'; |
| | | import CompanyTaskList from '../components/CompanyTaskList.vue'; |
| | | import CompanyInfo from '../components/CompanyInfo.vue'; |
| | | import { ProTabs, ProTabPane } from '@12333/components'; |
| | | import { useEnterpriseDetail } from '@12333/hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'companyDetail', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | const companyId = router.params?.id ?? ''; |
| | | const enterpriseId = router.params?.id ?? ''; |
| | | |
| | | const tab = ref('1'); |
| | | |
| | | const { |
| | | isLoading, |
| | | isError, |
| | | data: detail, |
| | | refetch, |
| | | } = useQuery({ |
| | | queryKey: ['flexWorkerServices/getOrdeForDetail', companyId], |
| | | queryFn: async () => { |
| | | return await flexWorkerServices.getOrdeForDetail( |
| | | { id: companyId }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.OrderInfoDto), |
| | | }); |
| | | const { isLoading, isError, enterpriseDetail, refetch } = useEnterpriseDetail({ id: enterpriseId }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | </style> |
| | |
| | | <div class="taskDetail-company-title">{{ enterpriseName }}</div> |
| | | <RectRight v-if="showArrow" :size="8" class="taskDetail-company-arrow" /> |
| | | </div> |
| | | <div class="taskDetail-company-info"> |
| | | <div class="taskDetail-company-info" v-if="isCertified"> |
| | | <img :src="IconSafe" class="safe-company-info-icon" /> |
| | | <div class="taskDetail-company-info-text">已认证 | {{ taskCount }}个岗位在招</div> |
| | | </div> |
| | | <div class="taskDetail-company-info" v-else> |
| | | <div class="taskDetail-company-info-text danger">未认证</div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | type Props = { |
| | | showArrow?: boolean; |
| | | isCertified?: boolean; |
| | | enterpriseName?: string; |
| | | taskCount?: number; |
| | | /** |
| | |
| | | flex: 1; |
| | | min-width: 0; |
| | | @include ellipsis; |
| | | |
| | | &.danger { |
| | | color: boleGetCssVar('color', 'danger'); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <div v-if="isCertified" class="companyInfo-info-wrapper"> |
| | | <div class="companyInfo-info-item"> |
| | | <div class="companyInfo-info-item-label">企业名称</div> |
| | | <div class="companyInfo-info-item-content">江西君润商务服务有限公司</div> |
| | | <div class="companyInfo-info-item-content">{{ enterpriseDetail.enterpriseName }}</div> |
| | | </div> |
| | | <div class="companyInfo-info-item"> |
| | | <div class="companyInfo-info-item-label">统一社会信用代码</div> |
| | | <div class="companyInfo-info-item-content">420902197910211010</div> |
| | | <div class="companyInfo-info-item-content">{{ enterpriseDetail.societyCreditCode }}</div> |
| | | </div> |
| | | <div class="companyInfo-info-item"> |
| | | <div class="companyInfo-info-item-label">注册资本</div> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import IconNoCertified from '@/assets/task/icon-no-certified.png'; |
| | | import { useEnterpriseDetail } from '@12333/hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'CompanyInfo', |
| | | }); |
| | | |
| | | const isCertified = ref(true); |
| | | type Props = { |
| | | enterpriseId?: string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | /** |
| | | * TODO 企业是否认证 注册资本 |
| | | */ |
| | | const isCertified = ref(false); |
| | | |
| | | const { enterpriseDetail } = useEnterpriseDetail({ id: toRef(props, 'enterpriseId') }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | |
| | | <template> |
| | | <InfiniteLoading scrollViewClassName="common-infinite-scroll-list" v-bind="infiniteLoadingProps"> |
| | | <template #renderItem="{ item }"> |
| | | <TaskCard @click="goTaskDetail(item)" /> |
| | | <TaskCard @click="goTaskDetail(item)" v-bind="item" /> |
| | | </template> |
| | | </InfiniteLoading> |
| | | </template> |
| | |
| | | |
| | | const { queryState, infiniteLoadingProps } = useTaskList(); |
| | | |
| | | function goTaskDetail(item: API.GetFlexTaskListOutput) { |
| | | function goTaskDetail(item: API.GetTaskInfosQueryResultItem) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.taskDetail}?id=${item.id}`, |
| | | }); |
| | |
| | | <TaskDetailWelfareItem |
| | | v-for="benefit in detail.benefits" |
| | | :key="benefit.benefitCode" |
| | | :icon="IconAttentioActive" |
| | | :icon="setOSSLink(benefit.benefitField2)" |
| | | :text="benefit.benefitContent" |
| | | /> |
| | | </div> |
| | |
| | | import './taskDetail.scss'; |
| | | import CompanyDesc from '../components/CompanyDesc.vue'; |
| | | import dayjs from 'dayjs'; |
| | | import { TaskUtils, toThousand } from '@12333/utils'; |
| | | import { TaskUtils, toThousand, setOSSLink } from '@12333/utils'; |
| | | import { |
| | | EnumSettlementCycleText, |
| | | BillingMethodEnumUnit, |
| | |
| | | }); |
| | | |
| | | const goCompanyDetail = useAccessLogin(() => { |
| | | if (detail.value.enterpriseId) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.companyDetail}?id=${taskId}`, |
| | | url: `${RouterPath.companyDetail}?id=${detail.value.enterpriseId}`, |
| | | }); |
| | | } |
| | | }); |
| | | </script> |
| | |
| | | AliyunSms = 10, |
| | | } |
| | | |
| | | /** 短信模板类型 */ |
| | | export enum EnumSmsTemplateType { |
| | | /**登录 */ |
| | | Login = 0, |
| | | /**注册 */ |
| | | Register = 1, |
| | | /**修改密码 */ |
| | | UpdatePassword = 2, |
| | | /**绑定手机号码 */ |
| | | BindPhoneNumber = 3, |
| | | /**修改手机号码 */ |
| | | UpdatePhoneNumber = 4, |
| | | } |
| | | |
| | | /** 任务结算状态 */ |
| | | export enum EnumTaskCheckReceiveStatus { |
| | | /**待验收 */ |
New file |
| | |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import * as enterpriseServices from '@12333/services/apiV2/enterprise'; |
| | | import { MaybeRef, unref } from 'vue'; |
| | | |
| | | type UseEnterpriseDetailOptions = { |
| | | id: MaybeRef<string>; |
| | | }; |
| | | |
| | | export function useEnterpriseDetail({ id }: UseEnterpriseDetailOptions) { |
| | | const { data, refetch, isLoading, isError } = useQuery({ |
| | | queryKey: ['enterpriseServices/getEnterprise', id], |
| | | queryFn: async () => { |
| | | return await enterpriseServices.getEnterprise( |
| | | { id: unref(id) }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.GetEnterpriseQueryResult), |
| | | }); |
| | | |
| | | return { |
| | | enterpriseDetail: data, |
| | | refetch, |
| | | isLoading, |
| | | isError, |
| | | }; |
| | | } |
| | |
| | | export * from './dic'; |
| | | export * from './setting'; |
| | | export * from './identify'; |
| | | export * from './enterprise'; |
| | |
| | | |
| | | /** 密码登录 POST /api/user/auth/passwordLogin */ |
| | | export async function passwordLogin(body: API.PasswordLoginCommand, options?: API.RequestConfig) { |
| | | return request<API.PasswordLoginCommandCallback>('/api/user/auth/passwordLogin', { |
| | | return request<API.LoginCommandCallback>('/api/user/auth/passwordLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 发送验证码 POST /api/user/auth/sendVerifyCode */ |
| | | export async function sendVerifyCode(body: API.SendVerifyCodeCommand, options?: API.RequestConfig) { |
| | | return request<string>('/api/user/auth/sendVerifyCode', { |
| | | /** 发送登录或注册短信 POST /api/user/auth/sendLoginOrRegisterVerifyCode */ |
| | | export async function sendLoginOrRegisterVerifyCode( |
| | | body: API.SendLoginOrRegisterVerifyCodeCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/auth/sendLoginOrRegisterVerifyCode', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 短信登录 POST /api/user/auth/smsLogin */ |
| | | export async function smsLogin(body: API.SmsLoginCommand, options?: API.RequestConfig) { |
| | | return request<API.LoginCommandCallback>('/api/user/auth/smsLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | /* eslint-disable */ |
| | | // API 更新时间: |
| | | // API 唯一标识: |
| | | import * as dictionary from './dictionary'; |
| | | import * as menu from './menu'; |
| | | import * as enterprise from './enterprise'; |
| | | import * as task from './task'; |
| | | import * as auth from './auth'; |
| | | import * as user from './user'; |
| | | import * as role from './role'; |
| | | import * as resource from './resource'; |
| | | import * as user from './user'; |
| | | import * as dictionary from './dictionary'; |
| | | import * as auth from './auth'; |
| | | import * as task from './task'; |
| | | import * as enterprise from './enterprise'; |
| | | import * as role from './role'; |
| | | import * as menu from './menu'; |
| | | export default { |
| | | dictionary, |
| | | menu, |
| | | enterprise, |
| | | task, |
| | | auth, |
| | | user, |
| | | role, |
| | | resource, |
| | | user, |
| | | dictionary, |
| | | auth, |
| | | task, |
| | | enterprise, |
| | | role, |
| | | menu, |
| | | }; |
| | |
| | | |
| | | /** 查询任务分页列表 POST /api/flexjob/task/getTaskInfos */ |
| | | export async function getTaskInfos(body: API.GetTaskInfosQuery, options?: API.RequestConfig) { |
| | | return request<API.PagedListQueryResultGetTaskInfosQueryResultItem>( |
| | | '/api/flexjob/task/getTaskInfos', |
| | | { |
| | | return request<API.GetTaskInfosQueryResult>('/api/flexjob/task/getTaskInfos', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | }); |
| | | } |
| | | |
| | | /** 保存任务 POST /api/flexjob/task/saveTaskInfo */ |
| | |
| | | AliyunSms = 10, |
| | | } |
| | | |
| | | enum EnumSmsTemplateType { |
| | | /**登录 */ |
| | | Login = 0, |
| | | /**注册 */ |
| | | Register = 1, |
| | | /**修改密码 */ |
| | | UpdatePassword = 2, |
| | | /**绑定手机号码 */ |
| | | BindPhoneNumber = 3, |
| | | /**修改手机号码 */ |
| | | UpdatePhoneNumber = 4, |
| | | } |
| | | |
| | | enum EnumTaskCheckReceiveStatus { |
| | | /**待验收 */ |
| | | Wait = 10, |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetTaskInfoQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultGetTaskInfosQueryResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetTaskInfosQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultLoginCommandCallback { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: LoginCommandCallback; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPagedListQueryResultGetDictionaryCategoriesQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PagedListQueryResultGetRolesQueryResultItem; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPagedListQueryResultGetTaskInfosQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PagedListQueryResultGetTaskInfosQueryResultItem; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPasswordLoginCommandCallback { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PasswordLoginCommandCallback; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | /** 企业Id */ |
| | | enterpriseId?: string; |
| | | /** 企业全称 */ |
| | | enterpriseName?: string; |
| | | enterpriseEnterpriseName?: string; |
| | | /** 在招岗位数量 */ |
| | | taskCount?: number; |
| | | /** 任务名称 */ |
| | |
| | | interface GetTaskInfoQueryResultBenefit { |
| | | /** 福利编号 */ |
| | | benefitCode?: string; |
| | | /** 福利 */ |
| | | /** 福利图标 */ |
| | | benefitField2?: string; |
| | | /** 福利名称 */ |
| | | benefitContent?: string; |
| | | } |
| | | |
| | |
| | | pageModel?: PagedListQueryPageModel; |
| | | /** 关键字(任务名称) */ |
| | | keywords?: string; |
| | | /** 企业Id */ |
| | | enterpriseId?: string; |
| | | /** 发布时间-开始 */ |
| | | beginTime?: string; |
| | | /** 发布时间-结束 */ |
| | |
| | | status?: EnumTaskStatus; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | recommendStatus?: EnumTaskRecommendStatus; |
| | | } |
| | | |
| | | interface GetTaskInfosQueryResult { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetTaskInfosQueryResultItem[]; |
| | | count?: GetTaskInfosQueryResultCount; |
| | | } |
| | | |
| | | interface GetTaskInfosQueryResultCount { |
| | | /** 待安排数量 */ |
| | | waitAssignCount?: number; |
| | | /** 已安排数量 */ |
| | | completedAssignCount?: number; |
| | | /** 发布中数量 */ |
| | | inProcessReleaseCount?: number; |
| | | /** 已停止数量 */ |
| | | stoppedReleaseCount?: number; |
| | | } |
| | | |
| | | interface GetTaskInfosQueryResultItem { |
| | |
| | | |
| | | type GetUserResumeQueryResult = Record<string, any>; |
| | | |
| | | interface LoginCommandCallback { |
| | | /** 用户访问令牌 */ |
| | | accessToken?: string; |
| | | /** 刷新令牌 */ |
| | | refreshToken?: string; |
| | | } |
| | | |
| | | interface PagedListQueryPageModel { |
| | | /** 行数 */ |
| | | rows?: number; |
| | |
| | | data?: GetRolesQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultGetTaskInfosQueryResultItem { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetTaskInfosQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultPageModel { |
| | | /** 行数 */ |
| | | rows?: number; |
| | |
| | | password: string; |
| | | type?: EnumUserType; |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | interface PasswordLoginCommandCallback { |
| | | /** 用户访问令牌 */ |
| | | accessToken?: string; |
| | | /** 刷新令牌 */ |
| | | refreshToken?: string; |
| | | } |
| | | |
| | | interface SaveDictionaryCategoryCommand { |
| | |
| | | data?: any; |
| | | } |
| | | |
| | | interface SendVerifyCodeCommand { |
| | | interface SendLoginOrRegisterVerifyCodeCommand { |
| | | /** 手机号码 */ |
| | | phoneNumber?: string; |
| | | templateCode?: EnumSmsTemplateType; |
| | | phoneNumber: string; |
| | | } |
| | | |
| | | interface SetDictionaryDataIsDisabledCommand { |
| | |
| | | status?: EnumUserStatus; |
| | | } |
| | | |
| | | interface SmsLoginCommand { |
| | | /** 手机号码 */ |
| | | phoneNumber: string; |
| | | /** 验证码 */ |
| | | verifyCode: string; |
| | | type?: EnumUserType; |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | type SyncHumanResourcesAreaDictionaryDataCommand = Record<string, any>; |
| | | } |
| | |
| | | id?: string |
| | | quickQuery?: string |
| | | } |
| | | |
| | | interface GetTaskInfoQueryResult{ |
| | | enterpriseName?:string |
| | | } |
| | | } |