| | |
| | | "ignore": [], |
| | | "include": [] |
| | | }, |
| | | "appid": "wx88251c84f5cd886b", |
| | | "appid": "wxb9e0baf4f87aa0de", |
| | | "projectname": "bMiniApp" |
| | | } |
| | |
| | | import { EnumUserType, EnumClientType } from '@12333/constants'; |
| | | |
| | | export const AppLocalConfig = { |
| | | userType: EnumUserType.Operation, |
| | | userType: EnumUserType.Enterprise, |
| | | clientType: EnumClientType.PcWeb, |
| | | }; |
| | |
| | | </div> |
| | | <div class="reset-localtion" @click="resetLocation">重新定位</div> |
| | | </div> |
| | | <div class="home-banner-wrapper"> |
| | | <!-- <div class="home-banner-wrapper"> |
| | | <nut-swiper :auto-play="3000"> |
| | | <nut-swiper-item v-for="(item, index) in list" :key="index"> |
| | | <img :src="item" class="banner-img" draggable="false" /> |
| | | </nut-swiper-item> |
| | | </nut-swiper> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <ProTabs |
| | | v-model="queryState.orderType" |
| | |
| | | <template> |
| | | <ContentView> |
| | | <div class="workbenches-banner-wrapper"> |
| | | <!-- <div class="workbenches-banner-wrapper"> |
| | | <nut-swiper :auto-play="3000"> |
| | | <nut-swiper-item v-for="(item, index) in list" :key="index"> |
| | | <img :src="item" class="banner-img" draggable="false" /> |
| | | </nut-swiper-item> |
| | | </nut-swiper> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <Cell :show-title="false" class="workbenches-cell"> |
| | | <CellChunk title="任务"> |
| | |
| | | import IconPersonManage from '@/assets/workbenches/icon-person-manage.png'; |
| | | import IconPublishTask from '@/assets/workbenches/icon-publish-task.png'; |
| | | import IconTaskManage from '@/assets/workbenches/icon-task-manage.png'; |
| | | import { useAccessLogin } from '@/hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | 'https://storage.360buyimg.com/jdc-article/fristfabu.jpg', |
| | | ]); |
| | | |
| | | function goPage(routeName: string) { |
| | | const goPage = useAccessLogin((routeName: string) => { |
| | | Taro.navigateTo({ |
| | | url: routeName, |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function goPublishTask() { |
| | | const goPublishTask = () => { |
| | | goPage(RouterPath.publishTask); |
| | | } |
| | | }; |
| | | |
| | | function goPersonManage() { |
| | | goPage(RouterPath.jobApplicationManage); |
| | |
| | | <template> |
| | | <PageLayoutWithBg |
| | | class="jobApplicationManage-page-wrapper" |
| | | :title="'应聘管理'" |
| | | :need-auth="false" |
| | | > |
| | | <PageLayoutWithBg class="jobApplicationManage-page-wrapper" :title="'应聘管理'"> |
| | | <InnerPage></InnerPage> |
| | | </PageLayoutWithBg> |
| | | </template> |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false"> |
| | | <nut-form :model-value="form" ref="formRef" :rules="rules"> |
| | | <nut-form-item label="任务名称:" class="bole-form-item" prop="taskName" label-width="90px"> |
| | | <nut-input v-model="form.taskName" placeholder="请输入任务名称"> </nut-input> |
| | | <nut-form-item label="任务名称:" class="bole-form-item" prop="name" label-width="90px"> |
| | | <nut-input v-model="form.name" placeholder="请输入任务名称"> </nut-input> |
| | | </nut-form-item> |
| | | <nut-form-item |
| | | label="服务费:" |
| | | class="bole-form-item alignTop" |
| | | prop="feeType" |
| | | prop="billingMethod" |
| | | required |
| | | label-width="90px" |
| | | label-position="top" |
| | | > |
| | | <nut-radio-group v-model="form.feeType" direction="horizontal"> |
| | | <BlRadio :label="Number(key)" v-for="(val, key) in FlexTaskFeeTypeEnumText" :key="key">{{ |
| | | <nut-radio-group v-model="form.billingMethod" direction="horizontal"> |
| | | <BlRadio :label="Number(key)" v-for="(val, key) in EnumBillingMethodText" :key="key">{{ |
| | | val |
| | | }}</BlRadio> |
| | | </nut-radio-group> |
| | | </nut-form-item> |
| | | <nut-form-item label=" " class="bole-form-item" prop="fee" label-width="0"> |
| | | <nut-form-item label=" " class="bole-form-item" prop="serviceFee" label-width="0"> |
| | | <div class="bole-form-input-wrapper"> |
| | | <nut-input |
| | | v-model.trim="form.fee" |
| | | v-model.trim="form.serviceFee" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请输入服务费" |
| | | type="text" |
| | | /> |
| | | <div class="form-input-unit">{{ SalaryTimeTypeEnumUnit[form.feeType] }}</div> |
| | | <div class="form-input-unit">{{ BillingMethodEnumUnit[form.billingMethod] }}</div> |
| | | </div> |
| | | </nut-form-item> |
| | | <nut-form-item |
| | |
| | | required |
| | | label-width="90px" |
| | | > |
| | | <nut-radio-group v-model="form.settleType" direction="horizontal"> |
| | | <BlRadio |
| | | :label="Number(key)" |
| | | v-for="(val, key) in FlexTaskSettleTypeEnumText" |
| | | :key="key" |
| | | >{{ val }}</BlRadio |
| | | > |
| | | <nut-radio-group v-model="form.settlementCycle" direction="horizontal"> |
| | | <BlRadio :label="Number(key)" v-for="(val, key) in EnumSettlementCycleText" :key="key">{{ |
| | | val |
| | | }}</BlRadio> |
| | | </nut-radio-group> |
| | | </nut-form-item> |
| | | <nut-form-item label="福利:" class="bole-form-item" prop="settleType" label-width="90px"> |
| | | <nut-form-item label="福利:" class="bole-form-item" prop="benefits" label-width="90px"> |
| | | <ChooseInputWithCheckbox |
| | | v-model="form.listAideIds" |
| | | v-model="form.benefits" |
| | | title="请选择福利" |
| | | :columns="WelfareTypeList" |
| | | placeholder="请选择福利" |
| | |
| | | <nut-form-item |
| | | label="年龄范围:" |
| | | class="bole-form-item" |
| | | prop="minAge" |
| | | prop="ageMinLimit" |
| | | required |
| | | label-width="90px" |
| | | > |
| | | <div class="bole-form-input-wrapper"> |
| | | <NumberInput |
| | | v-model.trim="form.minAge" |
| | | v-model.trim="form.ageMinLimit" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请选择年龄范围" |
| | | :min="1" |
| | | /> |
| | | <div class="form-input-separator">至</div> |
| | | <NumberInput |
| | | v-model.trim="form.maxAge" |
| | | v-model.trim="form.ageMaxLimit" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请选择年龄范围" |
| | | :min="1" |
| | | /> |
| | | </div> |
| | | </nut-form-item> |
| | | <nut-form-item label="性别:" class="bole-form-item" prop="sexType" label-width="90px"> |
| | | <nut-form-item |
| | | label="性别要求:" |
| | | class="bole-form-item" |
| | | prop="genderLimit" |
| | | label-width="90px" |
| | | required |
| | | > |
| | | <ChooseInputWithPicker |
| | | v-model="form.sexType" |
| | | v-model="form.genderLimit" |
| | | placeholder="请选择性别要求" |
| | | :value-enum="GenderText" |
| | | :value-enum="EnumUserGenderText" |
| | | /> |
| | | </nut-form-item> |
| | | <nut-form-item label="资格证书:" class="bole-form-item" prop="settleType" label-width="90px"> |
| | | <nut-form-item |
| | | label="资格证书:" |
| | | class="bole-form-item" |
| | | prop="credentialLimits" |
| | | label-width="90px" |
| | | > |
| | | <ChooseInputWithCheckbox |
| | | v-model="form.listCertionIds" |
| | | v-model="form.credentialLimits" |
| | | title="请选择资格证书" |
| | | :columns="CertificateTypeList" |
| | | placeholder="请选择资格证书" |
| | | /> |
| | | </nut-form-item> |
| | | <nut-form-item label="任务地点" class="bole-form-item" prop="areaList" required> |
| | | <!-- <ChooseLocationInput placeholder="请选择任务所在地" v-model="form.weMapInfo" /> --> |
| | | <ChooseInputWithAreaPicker |
| | | <nut-form-item label="任务地点" class="bole-form-item" prop="weMapInfo" required> |
| | | <ChooseLocationInput placeholder="请选择任务地点" v-model="form.weMapInfo" /> |
| | | <!-- <ChooseInputWithAreaPicker |
| | | :columns="areaTreeList" |
| | | v-model="form.areaList" |
| | | placeholder="请选择所在地区" |
| | | ></ChooseInputWithAreaPicker> |
| | | ></ChooseInputWithAreaPicker> --> |
| | | </nut-form-item> |
| | | <nut-form-item label="详细地址:" class="bole-form-item" prop="address" label-width="90px"> |
| | | <nut-input v-model="form.address" placeholder="请输入详细地址"> </nut-input> |
| | | <nut-form-item |
| | | label="详细地址:" |
| | | class="bole-form-item" |
| | | prop="addressDetail" |
| | | label-width="90px" |
| | | required |
| | | > |
| | | <nut-input v-model="form.addressDetail" placeholder="请输入详细地址"> </nut-input> |
| | | </nut-form-item> |
| | | <nut-form-item |
| | | label="任务开始日期:" |
| | | class="bole-form-item" |
| | | prop="startDate" |
| | | prop="beginTime" |
| | | label-width="90px" |
| | | > |
| | | <ChooseInputWithDatePicker v-model="form.startDate"></ChooseInputWithDatePicker> |
| | | <ChooseInputWithDatePicker v-model="form.beginTime"></ChooseInputWithDatePicker> |
| | | </nut-form-item> |
| | | <nut-form-item label="任务结束日期:" class="bole-form-item" prop="endDate" label-width="90px"> |
| | | <ChooseInputWithDatePicker v-model="form.endDate"></ChooseInputWithDatePicker> |
| | | <nut-form-item label="任务结束日期:" class="bole-form-item" prop="endTime" label-width="90px"> |
| | | <ChooseInputWithDatePicker v-model="form.endTime"></ChooseInputWithDatePicker> |
| | | </nut-form-item> |
| | | </nut-form> |
| | | </ContentScrollView> |
| | |
| | | <script setup lang="ts"> |
| | | import { useUser } from '@/hooks'; |
| | | import { |
| | | FlexTaskSettleTypeEnum, |
| | | FlexTaskSettleTypeEnumText, |
| | | FlexTaskFeeTypeEnum, |
| | | FlexTaskFeeTypeEnumText, |
| | | SalaryTimeTypeEnumUnit, |
| | | CategoryCode, |
| | | EnumBillingMethod, |
| | | EnumSettlementCycle, |
| | | EnumUserGender, |
| | | EnumBillingMethodText, |
| | | EnumUserGenderText, |
| | | EnumSettlementCycleText, |
| | | BillingMethodEnumUnit, |
| | | } from '@12333/constants'; |
| | | import { |
| | | ChooseInputWithPicker, |
| | |
| | | } from '@12333/components'; |
| | | import { FormValidator, Message } from '@12333/utils'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | import * as taskServices from '@12333/services/apiV2/task'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { goBack } from '@/utils'; |
| | | import { Gender, GenderText, SearchType } from '@12333/constants'; |
| | | import { useAllAreaList, useSearchSettingType } from '@12333/hooks'; |
| | | import { useAllAreaList, useDictionaryDataSelect } from '@12333/hooks'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import dayjs from 'dayjs'; |
| | | |
| | |
| | | }); |
| | | |
| | | const { userDetail } = useUser(); |
| | | const { areaTreeList } = useAllAreaList(); |
| | | const { findAreaNameFromCode } = useAllAreaList(); |
| | | const router = Taro.useRouter(); |
| | | const taskId = router.params?.taskId ?? ''; |
| | | const isEdit = !!taskId; |
| | | const isCopy = router.params?.isCopy === 'true'; |
| | | console.log('isCopy: ', router.params?.isCopy); |
| | | |
| | | const WelfareTypeList = ref([]); |
| | | const CertificateTypeList = ref([]); |
| | | const { dictionaryDataList: WelfareTypeList } = useDictionaryDataSelect({ |
| | | categoryCode: CategoryCode.Welfare, |
| | | }); |
| | | const { dictionaryDataList: CertificateTypeList } = useDictionaryDataSelect({ |
| | | categoryCode: CategoryCode.CertificateType, |
| | | }); |
| | | |
| | | const form = reactive({ |
| | | taskName: '', |
| | | feeType: FlexTaskFeeTypeEnum.OfMonth, |
| | | fee: 0, |
| | | settleType: FlexTaskSettleTypeEnum.OfMonth, |
| | | listAideIds: [] as string[], |
| | | minAge: 0, |
| | | maxAge: 0, |
| | | sexType: Gender.Male, |
| | | listCertionIds: [] as string[], |
| | | address: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | areaList: [] as number[], |
| | | name: '', |
| | | billingMethod: EnumBillingMethod.Month, |
| | | serviceFee: '' as any as number, |
| | | settlementCycle: EnumSettlementCycle.Month, |
| | | benefits: [] as string[], |
| | | ageMinLimit: 0, |
| | | ageMaxLimit: 0, |
| | | genderLimit: '' as any as EnumUserGender, |
| | | credentialLimits: [] as string[], |
| | | // address: '', |
| | | beginTime: '', |
| | | endTime: '', |
| | | // areaList: [] as number[], |
| | | |
| | | weMapInfo: {} as WeMapModel, |
| | | addressDetail: '', |
| | | }); |
| | | |
| | | const rules = reactive<FormRules>({ |
| | | taskName: [{ required: true, message: '请输入任务名称' }], |
| | | name: [{ required: true, message: '请输入任务名称' }], |
| | | genderLimit: [{ required: true, message: '请选择性别要求' }], |
| | | addressDetail: [{ required: true, message: '请输入详细地址' }], |
| | | |
| | | // weMapInfo: [ |
| | | // { required: true, message: '请设置工作地点', validator: FormValidator.validatorWeMap }, |
| | | // ], |
| | | areaList: [ |
| | | { required: true, message: '清添加工作地点', validator: FormValidator.validatorArray }, |
| | | weMapInfo: [ |
| | | { required: true, message: '请设置工作地点', validator: FormValidator.validatorWeMap }, |
| | | ], |
| | | // areaList: [ |
| | | // { required: true, message: '请添加工作地点', validator: FormValidator.validatorArray }, |
| | | // ], |
| | | |
| | | minAge: [ |
| | | ageMinLimit: [ |
| | | { |
| | | required: true, |
| | | message: '请输入年龄要求', |
| | | validator: () => { |
| | | if (!form.minAge) { |
| | | if (!form.ageMinLimit) { |
| | | return Promise.reject('请输入年龄要求'); |
| | | } |
| | | if (!form.maxAge) { |
| | | if (!form.ageMaxLimit) { |
| | | return Promise.reject('请输入年龄要求'); |
| | | } |
| | | if (Number(form.maxAge) <= Number(form.minAge)) { |
| | | if (Number(form.ageMaxLimit) <= Number(form.ageMinLimit)) { |
| | | return Promise.reject('最大年龄不能小于最小年龄'); |
| | | } |
| | | return Promise.resolve(true); |
| | |
| | | }, |
| | | ], |
| | | |
| | | startDate: [ |
| | | beginTime: [ |
| | | { |
| | | required: true, |
| | | message: '请选择开始日期', |
| | | }, |
| | | ], |
| | | endDate: [ |
| | | endTime: [ |
| | | { |
| | | required: true, |
| | | message: '请选择结束日期', |
| | | validator(value) { |
| | | if (!value) return Promise.reject('请选择结束日期'); |
| | | if (value <= form.startDate) return Promise.reject('结束日期不能小于开始日期'); |
| | | if (value <= form.beginTime) return Promise.reject('结束日期不能小于开始日期'); |
| | | return Promise.resolve(true); |
| | | }, |
| | | }, |
| | |
| | | data: detail, |
| | | refetch, |
| | | } = useQuery({ |
| | | queryKey: ['flexWorkerServices/getFlexTaskDto', taskId], |
| | | queryKey: ['taskServices/getTaskInfo', taskId], |
| | | queryFn: async () => { |
| | | return await flexWorkerServices.getFlexTaskDto( |
| | | return await taskServices.getTaskInfo( |
| | | { id: taskId }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.GetFlexTaskDtoOutput), |
| | | placeholderData: () => ({} as API.GetTaskInfoQueryResult), |
| | | enabled: isEdit, |
| | | onSuccess(data) { |
| | | form.taskName = data.taskName; |
| | | form.feeType = data.feeType; |
| | | form.fee = data.fee; |
| | | form.settleType = data.settleType; |
| | | form.listAideIds = data.taskWeals?.length > 0 ? data.taskWeals.map((item) => item.id) : []; |
| | | form.minAge = data.minAge; |
| | | form.maxAge = data.maxAge; |
| | | form.sexType = data.sexType; |
| | | form.listCertionIds = data.taskCerts?.length > 0 ? data.taskCerts.map((item) => item.id) : []; |
| | | form.address = data.address; |
| | | form.startDate = dayjs(data.startDate).format('YYYY-MM-DD'); |
| | | form.endDate = dayjs(data.endDate).format('YYYY-MM-DD'); |
| | | form.areaList = [data.provinceId, data.cityId, data.areaId]; |
| | | form.address = data.address; |
| | | form.name = data.name; |
| | | form.billingMethod = data.billingMethod; |
| | | form.serviceFee = data.serviceFee; |
| | | form.settlementCycle = data.settlementCycle; |
| | | form.benefits = (data.benefits ?? []).map((item) => item.code); |
| | | form.ageMinLimit = data.ageMinLimit; |
| | | form.ageMaxLimit = data.ageMaxLimit; |
| | | form.genderLimit = data.genderLimit; |
| | | form.credentialLimits = (data.credentialLimits ?? []).map((item) => item.code); |
| | | form.beginTime = dayjs(data.beginTime).format('YYYY-MM-DD'); |
| | | form.endTime = dayjs(data.endTime).format('YYYY-MM-DD'); |
| | | form.addressDetail = data.addressDetail; |
| | | form.weMapInfo = { |
| | | provinceName: findAreaNameFromCode(data.provinceCode), |
| | | cityName: findAreaNameFromCode(data.cityCode), |
| | | provinceCode: data.provinceCode, |
| | | cityCode: data.cityCode, |
| | | latitude: data.latitude, |
| | | longitude: data.longitude, |
| | | addressName: data.addressName, |
| | | }; |
| | | }, |
| | | }); |
| | | |
| | |
| | | |
| | | async function confirm() { |
| | | try { |
| | | let params: API.AddEidtFlexTaskInput = { |
| | | taskName: form.taskName, |
| | | feeType: form.feeType, |
| | | fee: form.fee, |
| | | settleType: form.settleType, |
| | | listAideIds: form.listAideIds, |
| | | minAge: form.minAge, |
| | | maxAge: form.maxAge, |
| | | sexType: form.sexType, |
| | | listCertionIds: form.listCertionIds, |
| | | address: form.address, |
| | | startDate: form.startDate, |
| | | endDate: form.endDate, |
| | | provinceId: form.areaList[0], |
| | | cityId: form.areaList[1], |
| | | areaId: form.areaList[2], |
| | | let params: API.SaveTaskInfoCommand = { |
| | | name: form.name, |
| | | billingMethod: form.billingMethod, |
| | | serviceFee: form.serviceFee, |
| | | settlementCycle: form.settlementCycle, |
| | | benefits: form.benefits, |
| | | ageMinLimit: form.ageMinLimit, |
| | | ageMaxLimit: form.ageMaxLimit, |
| | | genderLimit: form.genderLimit, |
| | | credentialLimits: form.credentialLimits, |
| | | provinceCode: form.weMapInfo.provinceCode, |
| | | cityCode: form.weMapInfo.cityCode, |
| | | addressName: form.weMapInfo.addressName, |
| | | addressDetail: form.addressDetail, |
| | | longitude: form.weMapInfo.longitude, |
| | | latitude: form.weMapInfo.latitude, |
| | | beginTime: form.beginTime, |
| | | endTime: form.endTime, |
| | | }; |
| | | if (isEdit) { |
| | | params.taskId = taskId; |
| | | params.id = taskId; |
| | | } |
| | | if (isCopy) { |
| | | params.taskId = ''; |
| | | params.id = ''; |
| | | } |
| | | let res = await flexWorkerServices.addEidtFlexTask(params); |
| | | let res = await taskServices.saveTaskInfo(params); |
| | | if (res) { |
| | | Message.success(isEdit ? '编辑成功' : '发布成功', { |
| | | onClosed() { |
| | |
| | | <template> |
| | | <PageLayout class="publishTask-page-wrapper" :title="'发布招聘'" has-border :need-auth="false"> |
| | | <PageLayout class="publishTask-page-wrapper" :title="'发布招聘'" has-border> |
| | | <InnerPage></InnerPage> |
| | | </PageLayout> |
| | | </template> |
| | |
| | | provinceName?: string; |
| | | cityName?: string; |
| | | countyName?: string; |
| | | provinceCode?: number; |
| | | cityCode?: number; |
| | | countyCode?: number; |
| | | provinceCode?: string; |
| | | cityCode?: string; |
| | | countyCode?: string; |
| | | address?: string; |
| | | addressName?: string; |
| | | } |
| | | |
| | | declare const uni = Taro |
| | |
| | | export default defineAppConfig({ |
| | | entryPagePath: 'pages/home/index', |
| | | pages: ['pages/home/index', 'pages/task/task', 'pages/mine/index'], |
| | | requiredPrivateInfos: ['getLocation'], |
| | | requiredPrivateInfos: ['getLocation', 'chooseLocation'], |
| | | permission: { |
| | | 'scope.userLocation': { |
| | | desc: '你的位置信息将用于小程序数据的效果展示', |
| | |
| | | list: cityGroups[key].map((x) => ({ |
| | | name: x.areaName, |
| | | id: x.areaCode, |
| | | parentId: x.parentId, |
| | | parentId: x.parentCode, |
| | | })), |
| | | }); |
| | | } |
| | |
| | | <div class="checkbox-action-sheet"> |
| | | <div class="checkbox-action-sheet-title">{{ title }}</div> |
| | | <nut-checkbox-group v-model="model" :max="max"> |
| | | <nut-checkbox v-for="item in columns" :key="item.id" :label="item.id" icon-size="16"> |
| | | {{ item.name }}</nut-checkbox |
| | | <nut-checkbox v-for="item in columns" :key="item.value" :label="item.value" icon-size="16"> |
| | | {{ item.label }}</nut-checkbox |
| | | > |
| | | </nut-checkbox-group> |
| | | <div class="checkbox-action-sheet-footer"> |
| | |
| | | type Props = { |
| | | max?: number; |
| | | title?: string; |
| | | columns?: API.GetTypeSearchSettingList[]; |
| | | columns?: API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[]; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | |
| | | }); |
| | | |
| | | type Props = { |
| | | columns: API.GetTypeSearchSettingList[]; |
| | | columns: API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[]; |
| | | modelValue: Array<string | number>; |
| | | title?: string; |
| | | max?: number; |
| | |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | const inputValue = computed(() => |
| | | props.modelValue.map((x) => props.columns.find((y) => y.id === x)?.name).join(',') |
| | | props.modelValue.map((x) => props.columns.find((y) => y.value === x)?.label).join(',') |
| | | ); |
| | | |
| | | const emit = defineEmits<{ |
| | |
| | | cityCode: findAreaCodeFromName(cityName), |
| | | countyCode: findAreaCodeFromName(countyName), |
| | | address: res.address, |
| | | addressName: res.name, |
| | | }); |
| | | }, |
| | | }); |
| | |
| | | provinceName?: string; |
| | | cityName?: string; |
| | | countyName?: string; |
| | | provinceCode?: number; |
| | | cityCode?: number; |
| | | countyCode?: number; |
| | | provinceCode?: string; |
| | | cityCode?: string; |
| | | countyCode?: string; |
| | | address?: string; |
| | | addressName?: string; |
| | | } |
| | |
| | | /**用户角色 */ |
| | | Role = 5, |
| | | /**用户信息 */ |
| | | UserInfo = 6, |
| | | User = 6, |
| | | /**企业信息 */ |
| | | Enterprise = 7, |
| | | } |
| | |
| | | AliyunSms = 10, |
| | | } |
| | | |
| | | /** 任务结算状态 */ |
| | | export enum EnumTaskCheckReceiveStatus { |
| | | /**待验收 */ |
| | | Wait = 10, |
| | | /**已验收 */ |
| | | Completed = 30, |
| | | } |
| | | |
| | | /** 任务推荐状态 */ |
| | | export enum EnumTaskRecommendStatus { |
| | | /**未推荐 */ |
| | | No = 10, |
| | | /**已推荐 */ |
| | | Yes = 20, |
| | | } |
| | | |
| | | /** 任务发布状态 */ |
| | | export enum EnumTaskReleaseStatus { |
| | | /**发布中 */ |
| | | InProcess = 20, |
| | | /**已停止 */ |
| | | Stopped = 100, |
| | | } |
| | | |
| | | /** 任务结算状态 */ |
| | | export enum EnumTaskSettlementStatus { |
| | | /**待结算 */ |
| | | Wait = 10, |
| | | /**已结算 */ |
| | | Completed = 30, |
| | | } |
| | | |
| | | /** 任务安排状态 */ |
| | |
| | | } |
| | | |
| | | /** 用户信息状态 */ |
| | | export enum EnumUserInfoStatus { |
| | | export enum EnumUserStatus { |
| | | /**正常 */ |
| | | Normal = 10, |
| | | /**禁用 */ |
| | |
| | | Welfare = '50', |
| | | /**行业类型 */ |
| | | IndustryCategory = '60', |
| | | /**行政地区 */ |
| | | Area = '70', |
| | | } |
| | | |
| | | export enum IdentityCodeEnum { |
| | | /**学生 */ |
| | | Student = '10-10', |
| | | /**非学生 */ |
| | | NotStudent = '10-20', |
| | | } |
| | | |
| | | export enum EducationCodeEnum { |
| | | /**初中以下 */ |
| | | UnderPrimarySchool = '20-10', |
| | | /**初中 */ |
| | | PrimarySchool = '20-20', |
| | | /**高中 */ |
| | | HighSchool = '20-30', |
| | | /**中专 */ |
| | | JuniorCollege = '20-40', |
| | | /**技校 */ |
| | | TechnicalSchool = '20-50', |
| | | /**中职 */ |
| | | JuniorHighSchool = '20-60', |
| | | /**高职 */ |
| | | SeniorHighSchool = '20-70', |
| | | /**本科 */ |
| | | Undergraduate = '20-80', |
| | | /**本科以上 */ |
| | | UndergraduateAndAbove = '20-90', |
| | | } |
| | | |
| | | export enum CertificateTypeCodeEnum { |
| | | /**健康证 */ |
| | | HealthCertificate = '40-10', |
| | | } |
| | | |
| | | export enum WelfareCodeEnum { |
| | | /**包餐 */ |
| | | Meal = '50-10', |
| | | /**包住宿 */ |
| | | Accommodation = '50-20', |
| | | /**交通补贴 */ |
| | | TransportationSubsidies = '50-30', |
| | | /**高温补贴 */ |
| | | HighTemperatureSubsidies = '50-40', |
| | | } |
| | |
| | | export enum TaskStatus { |
| | | All = 0, |
| | | WaitSign = 10, |
| | | Effect = 20, |
| | | Terminated = 30, |
| | | } |
| | | import { EnumBillingMethod, EnumUserGender, EnumSettlementCycle } from './apiEnum'; |
| | | |
| | | export const TaskStatusText = { |
| | | [TaskStatus.All]: '全部', |
| | | [TaskStatus.WaitSign]: '待签约', |
| | | [TaskStatus.Effect]: '生效中', |
| | | [TaskStatus.Terminated]: '已终止', |
| | | export const EnumBillingMethodText = { |
| | | [EnumBillingMethod.Month]: '按月', |
| | | [EnumBillingMethod.Day]: '按日', |
| | | [EnumBillingMethod.Hour]: '按时', |
| | | [EnumBillingMethod.Piece]: '计件', |
| | | }; |
| | | |
| | | export const TaskStatusColor = { |
| | | [TaskStatus.WaitSign]: '#FF7D00', |
| | | [TaskStatus.Effect]: '#3A71FF', |
| | | [TaskStatus.Terminated]: '#9FA4AC', |
| | | export const EnumUserGenderText = { |
| | | [EnumUserGender.Male]: '男', |
| | | [EnumUserGender.Female]: '女', |
| | | }; |
| | | |
| | | export enum FlexTaskFeeTypeEnum { |
| | | /** |
| | | * 按月 |
| | | */ |
| | | OfMonth = 10, |
| | | /** |
| | | * 按日 |
| | | */ |
| | | OfDay = 20, |
| | | /** |
| | | * 按时 |
| | | */ |
| | | OfHour = 30, |
| | | /** |
| | | * 计件 |
| | | */ |
| | | OfCount = 40, |
| | | } |
| | | |
| | | export const FlexTaskFeeTypeEnumText = { |
| | | [FlexTaskFeeTypeEnum.OfMonth]: '按月', |
| | | [FlexTaskFeeTypeEnum.OfDay]: '按日', |
| | | [FlexTaskFeeTypeEnum.OfHour]: '按时', |
| | | [FlexTaskFeeTypeEnum.OfCount]: '计件', |
| | | export const EnumSettlementCycleText = { |
| | | [EnumSettlementCycle.Month]: '月结', |
| | | [EnumSettlementCycle.Week]: '周结', |
| | | [EnumSettlementCycle.Day]: '日结', |
| | | }; |
| | | |
| | | export const SalaryTimeTypeEnumUnit = { |
| | | [FlexTaskFeeTypeEnum.OfMonth]: '元/月', |
| | | [FlexTaskFeeTypeEnum.OfDay]: '元/日', |
| | | [FlexTaskFeeTypeEnum.OfHour]: '元/小时', |
| | | [FlexTaskFeeTypeEnum.OfCount]: '元/件', |
| | | }; |
| | | |
| | | export enum FlexTaskSettleTypeEnum { |
| | | /** |
| | | * 月结 |
| | | */ |
| | | OfMonth = 10, |
| | | /** |
| | | * 周结 |
| | | */ |
| | | OfWeek = 20, |
| | | /** |
| | | * 日结 |
| | | */ |
| | | OfDay = 30, |
| | | } |
| | | |
| | | export const FlexTaskSettleTypeEnumText = { |
| | | [FlexTaskSettleTypeEnum.OfMonth]: '月结', |
| | | [FlexTaskSettleTypeEnum.OfWeek]: '周结', |
| | | [FlexTaskSettleTypeEnum.OfDay]: '日结', |
| | | }; |
| | | |
| | | export enum FlexTaskReleaseStatusEnum { |
| | | /** |
| | | * 发布中 |
| | | */ |
| | | Releasing = 10, |
| | | /** |
| | | * 已停止 |
| | | */ |
| | | Stoping = 20, |
| | | } |
| | | |
| | | export const FlexTaskReleaseStatusEnumText = { |
| | | [FlexTaskReleaseStatusEnum.Releasing]: '发布中', |
| | | [FlexTaskReleaseStatusEnum.Stoping]: '已停止', |
| | | }; |
| | | |
| | | export enum FlexTaskWorkerHireEnum { |
| | | /** |
| | | * 待处理 |
| | | */ |
| | | Wait = 10, |
| | | /** |
| | | * 已录用 |
| | | */ |
| | | Hired = 20, |
| | | /** |
| | | * 已谢绝 |
| | | */ |
| | | Refused = 30, |
| | | } |
| | | |
| | | export const FlexTaskWorkerHireEnumText = { |
| | | [FlexTaskWorkerHireEnum.Wait]: '待处理', |
| | | [FlexTaskWorkerHireEnum.Hired]: '已录用', |
| | | [FlexTaskWorkerHireEnum.Refused]: '已谢绝', |
| | | }; |
| | | |
| | | export enum FlexTaskCheckAcceptStatusEnum { |
| | | /** |
| | | * 待验收 |
| | | */ |
| | | Wait = 10, |
| | | /** |
| | | * 验收通过 |
| | | */ |
| | | Passed = 20, |
| | | /** |
| | | * 验收未通过 |
| | | */ |
| | | Refused = 30, |
| | | } |
| | | |
| | | export const FlexTaskCheckAcceptStatusEnumText = { |
| | | [FlexTaskCheckAcceptStatusEnum.Wait]: '待验收', |
| | | [FlexTaskCheckAcceptStatusEnum.Passed]: '验收通过', |
| | | [FlexTaskCheckAcceptStatusEnum.Refused]: '验收未通过', |
| | | }; |
| | | |
| | | export enum FlexWorkerEleSignEnum { |
| | | /** |
| | | * 待签约 |
| | | */ |
| | | WaitSign = 10, |
| | | /** |
| | | * 已签约 |
| | | */ |
| | | HasSign = 20, |
| | | /** |
| | | * 已解约 |
| | | */ |
| | | CancelSign = 30, |
| | | } |
| | | |
| | | export const FlexWorkerEleSignEnumText = { |
| | | [FlexWorkerEleSignEnum.WaitSign]: '待签约', |
| | | [FlexWorkerEleSignEnum.HasSign]: '已签约', |
| | | [FlexWorkerEleSignEnum.CancelSign]: '已解约', |
| | | }; |
| | | |
| | | export enum UserResumeFreeTimeEnum { |
| | | /** |
| | | * 不限 |
| | | */ |
| | | NoLimit = 1, |
| | | /** |
| | | * 寒暑假 |
| | | */ |
| | | WinterAndSummerVacation = 2, |
| | | /** |
| | | * 节假日 |
| | | */ |
| | | Holiday = 3, |
| | | /** |
| | | * 周六日 |
| | | */ |
| | | Weekend = 4, |
| | | /** |
| | | * 工作日 |
| | | */ |
| | | Weekday = 5, |
| | | } |
| | | |
| | | export const UserResumeFreeTimeEnumText = { |
| | | [UserResumeFreeTimeEnum.NoLimit]: '不限', |
| | | [UserResumeFreeTimeEnum.WinterAndSummerVacation]: '寒暑假', |
| | | [UserResumeFreeTimeEnum.Holiday]: '节假日', |
| | | [UserResumeFreeTimeEnum.Weekend]: '周六日', |
| | | [UserResumeFreeTimeEnum.Weekday]: '工作日', |
| | | }; |
| | | |
| | | export enum UserResumeJobSeekingStatusEnum { |
| | | /** |
| | | * 积极找工作 |
| | | */ |
| | | Activing = 1, |
| | | /** |
| | | * 随便看看 |
| | | */ |
| | | JustLook = 2, |
| | | /** |
| | | * 暂时不找工作 |
| | | */ |
| | | NotLook = 3, |
| | | } |
| | | |
| | | export const UserResumeJobSeekingStatusEnumText = { |
| | | [UserResumeJobSeekingStatusEnum.Activing]: '积极找工作', |
| | | [UserResumeJobSeekingStatusEnum.JustLook]: '随便看看', |
| | | [UserResumeJobSeekingStatusEnum.NotLook]: '暂时不找工作', |
| | | export const BillingMethodEnumUnit = { |
| | | [EnumBillingMethod.Month]: '元/月', |
| | | [EnumBillingMethod.Day]: '元/日', |
| | | [EnumBillingMethod.Hour]: '元/小时', |
| | | [EnumBillingMethod.Piece]: '元/件', |
| | | }; |
| | |
| | | import { flattenAreaTree, formatAreaListToTree } from '@12333/utils'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import { computed, onMounted, onUnmounted, ref } from 'vue'; |
| | | import { AreaType } from '@12333/constants'; |
| | | import { AreaType, CategoryCode } from '@12333/constants'; |
| | | import Taro, { EventChannel } from '@tarojs/taro'; |
| | | import { useDictionaryDataSelect } from './dic'; |
| | | |
| | | export function useArea() { |
| | | // const completeAreaList = ref<API.AreaInfo[]>([]); |
| | | // const completeAreaTree = ref<API.AreaTreeNode[]>([]); |
| | | // const provinceList = ref<API.AreaInfo[]>([]); |
| | | // const areaItemMap = ref<Record<API.AreaInfo['areaCode'], API.AreaInfo>>({}); |
| | | |
| | | const queryClient = useQueryClient(); |
| | | |
| | | const { data: areaStore } = useQuery({ |
| | | queryKey: ['flexWorkerServices/getAreaList'], |
| | | queryFn: async () => { |
| | | return await flexWorkerServices.getAreaList({}, { showLoading: false }); |
| | | }, |
| | | placeholderData: () => [] as API.AreaDto[], |
| | | const { dictionaryDataList } = useDictionaryDataSelect({ |
| | | categoryCode: CategoryCode.Area, |
| | | staleTime: Infinity, |
| | | select(data) { |
| | | const areaItemMap: Record<API.AreaDto['areaCode'], API.AreaDto> = {}; |
| | | data.forEach((item) => { |
| | | areaItemMap[item.areaCode] = item; |
| | | }); |
| | | const completeAreaList = flattenAreaTree([...data]); |
| | | return { |
| | | completeAreaList: completeAreaList, |
| | | completeAreaTree: [...data], |
| | | // cityAreaTree: formatAreaListToTree(completeAreaList, 0, AreaType.City), |
| | | provinceList: [...data], |
| | | areaItemMap: areaItemMap, |
| | | }; |
| | | }, |
| | | all: true, |
| | | maxDeep: AreaType.Area, |
| | | }); |
| | | |
| | | // onMounted(async () => { |
| | | // let data: API.AreaInfo[] = await queryClient.ensureQueryData({ |
| | | // queryKey: ['areaServices/getRegionalManagementList'], |
| | | // }); |
| | | // completeAreaList.value = flattenAreaTree([...data]); |
| | | // completeAreaTree.value = [...data]; |
| | | // provinceList.value = [...data]; |
| | | // setAreaMap([...data]); |
| | | // }); |
| | | const areaList = computed(() => dictionaryDataList.value.map(convertDictionaryToAreaTreeNode)); |
| | | |
| | | // function setAreaMap(areaList: API.AreaInfo[]) { |
| | | // areaList.forEach((item) => { |
| | | // areaItemMap[item.areaCode] = item; |
| | | // }); |
| | | // } |
| | | const areaTree = computed(() => formatAreaListToTree(areaList.value)); |
| | | |
| | | function getAreaFromCompleteAreaList(areaCode: number) { |
| | | return areaStore.value.completeAreaList.find((x) => x.areaCode === areaCode); |
| | | function getAreaFromCompleteAreaList(areaCode: string) { |
| | | return areaList.value.find((x) => x.areaCode === areaCode); |
| | | } |
| | | |
| | | function getAreaByAreaCode(areaCode: number) { |
| | | return areaStore.value.areaItemMap[areaCode]; |
| | | function getAreaByAreaCode(areaCode: string) { |
| | | return areaList.value.find((x) => x.areaCode === areaCode); |
| | | } |
| | | |
| | | return { |
| | | completeAreaList: computed(() => areaStore.value.completeAreaList), |
| | | completeAreaTree: computed(() => areaStore.value.completeAreaTree), |
| | | cityAreaTree: computed(() => |
| | | areaStore.value.completeAreaTree.map((x) => ({ |
| | | ...x, |
| | | children: x.children.map((y) => ({ |
| | | ...y, |
| | | children: undefined, |
| | | })), |
| | | })) |
| | | ), |
| | | provinceList: computed(() => areaStore.value.provinceList), |
| | | areaItemMap: computed(() => areaStore.value.areaItemMap), |
| | | completeAreaList: areaList, |
| | | areaList, |
| | | completeAreaTree: areaTree, |
| | | provinceList: computed(() => areaList.value.filter((x) => x.layer === AreaType.Province)), |
| | | getAreaFromCompleteAreaList, |
| | | getAreaByAreaCode, |
| | | }; |
| | | } |
| | | |
| | | function convertDictionaryToAreaTreeNode( |
| | | item: API.SelectOptionStringGetDictionaryDataSelectQueryResultOption |
| | | ) { |
| | | return { |
| | | children: [], |
| | | areaCode: item.data?.code, |
| | | parentCode: '', |
| | | areaName: item.label, |
| | | layer: Number(item.data?.field4), |
| | | quickQuery: item.data?.field2, |
| | | sort: item.data?.sort, |
| | | id: item.data?.id, |
| | | } as API.AreaTreeNode; |
| | | } |
| | | |
| | | export function useAllAreaList() { |
| | | const { completeAreaTree, provinceList, completeAreaList, cityAreaTree } = useArea(); |
| | | const { areaList } = useArea(); |
| | | |
| | | const findAreaCodeFromName = (areaName: string) => { |
| | | const areaItem = completeAreaList.value.find((x) => x.areaName === areaName); |
| | | return areaItem?.areaCode ?? 0; |
| | | const areaItem = areaList.value.find((x) => x.areaName === areaName); |
| | | return areaItem?.areaCode ?? ''; |
| | | }; |
| | | |
| | | const findAreaNameFromCode = (areaCode: number) => { |
| | | const areaItem = completeAreaList.value.find((x) => x.areaCode === areaCode); |
| | | const findAreaNameFromCode = (areaCode: string) => { |
| | | const areaItem = areaList.value.find((x) => x.areaCode === areaCode); |
| | | return areaItem?.areaName ?? ''; |
| | | }; |
| | | |
| | | const findAreaItemFromCode = (areaCode: number) => { |
| | | const areaItem = completeAreaList.value.find((x) => x.areaCode === areaCode); |
| | | const findAreaItemFromCode = (areaCode: string) => { |
| | | const areaItem = areaList.value.find((x) => x.areaCode === areaCode); |
| | | return areaItem; |
| | | }; |
| | | |
| | | return { |
| | | areaList, |
| | | findAreaCodeFromName, |
| | | findAreaNameFromCode, |
| | | findAreaItemFromCode, |
| | | areaTreeList: completeAreaTree, |
| | | provinceList, |
| | | cityAreaTree, |
| | | }; |
| | | } |
| | | |
| | |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import * as dictionaryServices from '@12333/services/apiV2/dictionary'; |
| | | import { MaybeRef, unref } from 'vue'; |
| | | import { MaybeRef, unref, computed } from 'vue'; |
| | | import { CategoryCode } from '@12333/constants'; |
| | | |
| | | export function useGetDictionaryCategorySelect() { |
| | |
| | | type UseDictionaryDataSelectOptions = { |
| | | categoryId?: MaybeRef<string>; |
| | | categoryCode?: MaybeRef<CategoryCode>; |
| | | parentId?: MaybeRef<string>; |
| | | staleTime?: number; |
| | | /** 关键字 */ |
| | | keywords?: MaybeRef<string>; |
| | | /** 查询所有 */ |
| | | all?: MaybeRef<boolean>; |
| | | maxDeep?: number; |
| | | }; |
| | | |
| | | export function useDictionaryDataSelect({ |
| | | categoryId, |
| | | categoryCode, |
| | | parentId, |
| | | staleTime, |
| | | keywords, |
| | | all, |
| | | maxDeep, |
| | | }: UseDictionaryDataSelectOptions) { |
| | | const { data: dictionaryDataList, refetch } = useQuery({ |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect', categoryId, categoryCode], |
| | | queryFn: async () => { |
| | | let res = await dictionaryServices.getDictionaryDataSelect( |
| | | { |
| | | const params = computed(() => ({ |
| | | categoryId: unref(categoryId), |
| | | categoryCode: unref(categoryCode), |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | | parentId: unref(parentId), |
| | | keywords: unref(keywords), |
| | | all: unref(all), |
| | | maxDeep: maxDeep, |
| | | })); |
| | | const { data: dictionaryDataList, refetch } = useQuery({ |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect', params], |
| | | queryFn: async () => { |
| | | let res = await dictionaryServices.getDictionaryDataSelect(params.value, { |
| | | showLoading: false, |
| | | }); |
| | | return res.map((x) => ({ |
| | | ...x, |
| | | code: x.data?.code ?? '', |
| | | })); |
| | | }, |
| | | placeholderData: () => [] as API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[], |
| | | staleTime, |
| | | }); |
| | | |
| | | function getDictionaryDataNameById(id: string) { |
| | |
| | | }); |
| | | } |
| | | |
| | | function updateDictionaryDataSelect(categoryId?: string) { |
| | | queryClient.invalidateQueries({ |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect'], |
| | | }); |
| | | } |
| | | |
| | | return { |
| | | dictionaryDataList, |
| | | ensureQueryData, |
| | |
| | | getDictionaryDataNameById, |
| | | getDictionaryDataNameByCode, |
| | | getDictionaryDataByCode, |
| | | updateDictionaryDataSelect, |
| | | }; |
| | | } |
| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 删除数据字典类别 DELETE /api/main/dictionary/deleteDictionaryCategory */ |
| | | /** 删除数据字典类别 DELETE /api/flexjob/dictionary/deleteDictionaryCategory */ |
| | | export async function deleteDictionaryCategory( |
| | | body: API.DeleteDictionaryCategoryCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/main/dictionary/deleteDictionaryCategory', { |
| | | return request<number>('/api/flexjob/dictionary/deleteDictionaryCategory', { |
| | | method: 'DELETE', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取数据字典类别分页列表数据 POST /api/main/dictionary/getDictionaryCategories */ |
| | | /** 获取数据字典类别分页列表数据 POST /api/flexjob/dictionary/getDictionaryCategories */ |
| | | export async function getDictionaryCategories( |
| | | body: API.GetDictionaryCategoriesQuery, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.PagedListQueryResultGetDictionaryCategoriesQueryResultItem>( |
| | | '/api/main/dictionary/getDictionaryCategories', |
| | | '/api/flexjob/dictionary/getDictionaryCategories', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 查询数据字典类别选择器数据 GET /api/main/dictionary/getDictionaryCategorySelect */ |
| | | /** 查询数据字典类别选择器数据 GET /api/flexjob/dictionary/getDictionaryCategorySelect */ |
| | | export async function getDictionaryCategorySelect( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetDictionaryCategorySelectParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.SelectOptionGuidGetDictionaryCategorySelectQueryOption[]>( |
| | | '/api/main/dictionary/getDictionaryCategorySelect', |
| | | '/api/flexjob/dictionary/getDictionaryCategorySelect', |
| | | { |
| | | method: 'GET', |
| | | params: { |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 获取数据字典分页列表数据 POST /api/main/dictionary/getDictionaryDatas */ |
| | | /** 获取数据字典分页列表数据 POST /api/flexjob/dictionary/getDictionaryDatas */ |
| | | export async function getDictionaryDatas( |
| | | body: API.GetDictionaryDatasQuery, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.PagedListQueryResultGetDictionaryDatasQueryResultItem>( |
| | | '/api/main/dictionary/getDictionaryDatas', |
| | | '/api/flexjob/dictionary/getDictionaryDatas', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 查询数据字典选择器 GET /api/main/dictionary/getDictionaryDataSelect */ |
| | | /** 查询数据字典选择器 GET /api/flexjob/dictionary/getDictionaryDataSelect */ |
| | | export async function getDictionaryDataSelect( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetDictionaryDataSelectParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[]>( |
| | | '/api/main/dictionary/getDictionaryDataSelect', |
| | | '/api/flexjob/dictionary/getDictionaryDataSelect', |
| | | { |
| | | method: 'GET', |
| | | params: { |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 保存数据字典类别 POST /api/main/dictionary/saveDictionaryCategory */ |
| | | /** 保存数据字典类别 POST /api/flexjob/dictionary/saveDictionaryCategory */ |
| | | export async function saveDictionaryCategory( |
| | | body: API.SaveDictionaryCategoryCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/main/dictionary/saveDictionaryCategory', { |
| | | return request<string>('/api/flexjob/dictionary/saveDictionaryCategory', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 保存数据字典 POST /api/main/dictionary/saveDictionaryData */ |
| | | /** 保存数据字典 POST /api/flexjob/dictionary/saveDictionaryData */ |
| | | export async function saveDictionaryData( |
| | | body: API.SaveDictionaryDataCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/main/dictionary/saveDictionaryData', { |
| | | return request<string>('/api/flexjob/dictionary/saveDictionaryData', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 设置数据字典是否禁用 PUT /api/main/dictionary/setDictionaryDataIsDisabled */ |
| | | /** 设置数据字典是否禁用 PUT /api/flexjob/dictionary/setDictionaryDataIsDisabled */ |
| | | export async function setDictionaryDataIsDisabled( |
| | | body: API.SetDictionaryDataIsDisabledCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/main/dictionary/setDictionaryDataIsDisabled', { |
| | | return request<number>('/api/flexjob/dictionary/setDictionaryDataIsDisabled', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 同步人力资源地区字典数据 POST /api/main/dictionary/syncHumanResourcesAreaDictionaryData */ |
| | | /** 同步人力资源地区字典数据 POST /api/flexjob/dictionary/syncHumanResourcesAreaDictionaryData */ |
| | | export async function syncHumanResourcesAreaDictionaryData( |
| | | body: API.SyncHumanResourcesAreaDictionaryDataCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/main/dictionary/syncHumanResourcesAreaDictionaryData', { |
| | | return request<number>('/api/flexjob/dictionary/syncHumanResourcesAreaDictionaryData', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | /* eslint-disable */ |
| | | // API 更新时间: |
| | | // API 唯一标识: |
| | | import * as userInfo from './userInfo'; |
| | | import * as auth from './auth'; |
| | | import * as dictionary from './dictionary'; |
| | | import * as menu from './menu'; |
| | | import * as resource from './resource'; |
| | | import * as role from './role'; |
| | | 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'; |
| | | export default { |
| | | userInfo, |
| | | auth, |
| | | dictionary, |
| | | menu, |
| | | resource, |
| | | role, |
| | | enterprise, |
| | | task, |
| | | auth, |
| | | user, |
| | | role, |
| | | resource, |
| | | }; |
| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 查询任务详情 GET /api/main/task/getTaskInfo */ |
| | | /** 查询任务详情 GET /api/flexjob/task/getTaskInfo */ |
| | | export async function getTaskInfo( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetTaskInfoParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetTaskInfoQueryResult>('/api/main/task/getTaskInfo', { |
| | | return request<API.GetTaskInfoQueryResult>('/api/flexjob/task/getTaskInfo', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 查询任务分页列表 POST /api/main/task/getTaskInfos */ |
| | | /** 查询任务分页列表 POST /api/flexjob/task/getTaskInfos */ |
| | | export async function getTaskInfos(body: API.GetTaskInfosQuery, options?: API.RequestConfig) { |
| | | return request<API.PagedListQueryResultGetTaskInfosQueryResultItem>( |
| | | '/api/main/task/getTaskInfos', |
| | | '/api/flexjob/task/getTaskInfos', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 保存任务 POST /api/main/task/saveTaskInfo */ |
| | | /** 保存任务 POST /api/flexjob/task/saveTaskInfo */ |
| | | export async function saveTaskInfo(body: API.SaveTaskInfoCommand, options?: API.RequestConfig) { |
| | | return request<string>('/api/main/task/saveTaskInfo', { |
| | | return request<string>('/api/flexjob/task/saveTaskInfo', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置任务是否推荐 PUT /api/flexjob/task/setTaskInfoRecommendStatus */ |
| | | export async function setTaskInfoRecommendStatus( |
| | | body: API.SetTaskInfoRecommendStatusCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/flexjob/task/setTaskInfoRecommendStatus', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置任务发布状态 PUT /api/flexjob/task/setTaskInfoReleaseStatus */ |
| | | export async function setTaskInfoReleaseStatus( |
| | | body: API.SetTaskInfoReleaseStatusCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/flexjob/task/setTaskInfoReleaseStatus', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | interface APIgetUserResumeParams { |
| | | /** 用户Id */ |
| | | userId?: string; |
| | | } |
| | | |
| | | interface DeleteDictionaryCategoryCommand { |
| | | ids: string[]; |
| | | } |
| | |
| | | /**用户角色 */ |
| | | Role = 5, |
| | | /**用户信息 */ |
| | | UserInfo = 6, |
| | | User = 6, |
| | | /**企业信息 */ |
| | | Enterprise = 7, |
| | | } |
| | |
| | | AliyunSms = 10, |
| | | } |
| | | |
| | | enum EnumTaskCheckReceiveStatus { |
| | | /**待验收 */ |
| | | Wait = 10, |
| | | /**已验收 */ |
| | | Completed = 30, |
| | | } |
| | | |
| | | enum EnumTaskRecommendStatus { |
| | | /**未推荐 */ |
| | | No = 10, |
| | | /**已推荐 */ |
| | | Yes = 20, |
| | | } |
| | | |
| | | enum EnumTaskReleaseStatus { |
| | | /**发布中 */ |
| | | InProcess = 20, |
| | | /**已停止 */ |
| | | Stopped = 100, |
| | | } |
| | | |
| | | enum EnumTaskSettlementStatus { |
| | | /**待结算 */ |
| | | Wait = 10, |
| | | /**已结算 */ |
| | | Completed = 30, |
| | | } |
| | | |
| | | enum EnumTaskStatus { |
| | |
| | | Female = 20, |
| | | } |
| | | |
| | | enum EnumUserInfoStatus { |
| | | enum EnumUserStatus { |
| | | /**正常 */ |
| | | Normal = 10, |
| | | /**禁用 */ |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetTaskInfoQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultGetUserResumeQueryResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetUserResumeQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | remark?: string; |
| | | /** 角色 */ |
| | | roles?: GetOperationUserInfosQueryResultItemRole[]; |
| | | status?: EnumUserInfoStatus; |
| | | status?: EnumUserStatus; |
| | | } |
| | | |
| | | interface GetOperationUserInfosQueryResultItemRole { |
| | |
| | | interface GetTaskInfoQueryResult { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 企业Id */ |
| | | enterpriseId?: string; |
| | | /** 企业全称 */ |
| | | enterpriseName?: string; |
| | | /** 在招岗位数量 */ |
| | | taskCount?: number; |
| | | /** 任务名称 */ |
| | | name?: string; |
| | | billingMethod?: EnumBillingMethod; |
| | |
| | | cityCode?: string; |
| | | /** 任务地点所属城市 */ |
| | | cityName?: string; |
| | | /** 任务地点名称 */ |
| | | addressName?: string; |
| | | /** 任务地点详细地址 */ |
| | | address?: string; |
| | | addressDetail?: string; |
| | | /** 经度 */ |
| | | longitude?: number; |
| | | /** 纬度 */ |
| | | latitude?: number; |
| | | /** 任务开始时间 */ |
| | | beginTime?: string; |
| | | /** 任务结束时间 */ |
| | | endTime?: string; |
| | | /** 创建时间 */ |
| | | createdTime?: string; |
| | | /** 是否已收藏 */ |
| | | isCollected?: boolean; |
| | | } |
| | | |
| | | interface GetTaskInfosQuery { |
| | | pageModel?: PagedListQueryPageModel; |
| | | /** 关键字(任务名称) */ |
| | | keywords?: string; |
| | | /** 发布时间 */ |
| | | time?: string; |
| | | /** 发布时间-开始 */ |
| | | beginTime?: string; |
| | | /** 发布时间-结束 */ |
| | | endTime?: string; |
| | | /** 任务地点所属城市编号 */ |
| | | cityCode?: string; |
| | | settlementCycle?: EnumSettlementCycle; |
| | | /** 员工福利 */ |
| | | benefitCodes?: string[]; |
| | | genderLimit?: EnumUserGender; |
| | | status?: EnumTaskStatus; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | recommendStatus?: EnumTaskRecommendStatus; |
| | | } |
| | | |
| | | interface GetTaskInfosQueryResultItem { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 任务名称 */ |
| | | name: string; |
| | | /** 任务单号 */ |
| | |
| | | /** 任务结束时间 */ |
| | | endTime?: string; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | checkReceiveStatus?: EnumTaskCheckReceiveStatus; |
| | | settlementStatus?: EnumTaskSettlementStatus; |
| | | recommendStatus?: EnumTaskRecommendStatus; |
| | | /** 创建时间 */ |
| | | createdTime?: string; |
| | | } |
| | | |
| | | interface GetUserInfoRolesQueryResultItem { |
| | |
| | | /** 是否选中 */ |
| | | isChecked?: boolean; |
| | | } |
| | | |
| | | type GetUserResumeQueryResult = Record<string, any>; |
| | | |
| | | interface PagedListQueryPageModel { |
| | | /** 行数 */ |
| | |
| | | provinceCode: string; |
| | | /** 任务地点所属城市编号 */ |
| | | cityCode: string; |
| | | /** 任务地点名称 */ |
| | | addressName: string; |
| | | /** 任务地点详细地址 */ |
| | | address: string; |
| | | addressDetail: string; |
| | | /** 经度 */ |
| | | longitude?: number; |
| | | /** 纬度 */ |
| | | latitude?: number; |
| | | /** 任务开始时间 */ |
| | | beginTime: string; |
| | | /** 任务结束时间 */ |
| | |
| | | userInfoIds?: string[]; |
| | | } |
| | | |
| | | interface SetTaskInfoRecommendStatusCommand { |
| | | /** Id */ |
| | | ids?: string[]; |
| | | recommendStatus?: EnumTaskRecommendStatus; |
| | | } |
| | | |
| | | interface SetTaskInfoReleaseStatusCommand { |
| | | /** Id */ |
| | | ids?: string[]; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | } |
| | | |
| | | interface SetUserInfoRolesCommand { |
| | | /** 用户Id */ |
| | | userInfoId?: string; |
| | |
| | | interface SetUserInfoStatusCommand { |
| | | /** Id */ |
| | | ids?: string[]; |
| | | status?: EnumUserInfoStatus; |
| | | status?: EnumUserStatus; |
| | | } |
| | | |
| | | type SyncHumanResourcesAreaDictionaryDataCommand = Record<string, any>; |
New file |
| | |
| | | /* eslint-disable */ |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 查询运营端用户分页列表数据 POST /api/user/user/getOperationUserInfos */ |
| | | export async function getOperationUserInfos( |
| | | body: API.GetOperationUserInfosQuery, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.PagedListQueryResultGetOperationUserInfosQueryResultItem>( |
| | | '/api/user/user/getOperationUserInfos', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 查询用户角色列表 GET /api/user/user/getUserInfoRoles */ |
| | | export async function getUserInfoRoles( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserInfoRolesParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserInfoRolesQueryResultItem[]>('/api/user/user/getUserInfoRoles', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 查询用户简历 GET /api/user/user/getUserResume */ |
| | | export async function getUserResume( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserResumeParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserResumeQueryResult>('/api/user/user/getUserResume', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置用户信息角色 PUT /api/user/user/setUserInfoRoles */ |
| | | export async function setUserInfoRoles( |
| | | body: API.SetUserInfoRolesCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/user/user/setUserInfoRoles', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置用户信息状态 PUT /api/user/user/setUserInfoStatus */ |
| | | export async function setUserInfoStatus( |
| | | body: API.SetUserInfoStatusCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/user/user/setUserInfoStatus', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | import { AreaType } from '@12333/constants'; |
| | | |
| | | export interface AreaTreeNode extends API.AreaDto { |
| | | children?: AreaTreeNode[]; |
| | | } |
| | | |
| | | export function formatAreaListToTree( |
| | | areaDataList: API.AreaDto[], |
| | | parentId: number, |
| | | areaDataList: API.AreaTreeNode[], |
| | | parentId = '', |
| | | maxLayer = AreaType.Area |
| | | ) { |
| | | const treeNodeList: API.AreaTreeNode[] = []; |
| | | if (areaDataList.length > 0) { |
| | | areaDataList.forEach((areaData) => { |
| | | const areaTreeNode: API.AreaTreeNode = { ...areaData }; |
| | | if (areaData.parentId === parentId && areaData.layer <= maxLayer) { |
| | | if (areaData.parentCode === parentId && areaData.layer <= maxLayer) { |
| | | const children = formatAreaListToTree(areaDataList, areaData.areaCode, maxLayer); |
| | | areaTreeNode.children = children; |
| | | treeNodeList.push(areaTreeNode); |
| | |
| | | interface SelectOptionGuidGetDictionaryCategorySelectQueryOption{ |
| | | code?:string |
| | | } |
| | | |
| | | interface AreaTreeNode { |
| | | children?: AreaTreeNode[]; |
| | | /** 编码 */ |
| | | areaCode?: string; |
| | | /** 父级编码 */ |
| | | parentCode?: string; |
| | | /** 名称 */ |
| | | areaName?: string; |
| | | /** 1省 2市 3区 4镇 */ |
| | | layer?: number; |
| | | /** 排序 */ |
| | | sort?: number; |
| | | id?: string |
| | | quickQuery?: string |
| | | } |
| | | } |