| | |
| | | "EmptyTextEditorItem": true, |
| | | "EnterpriseConfigureType": true, |
| | | "EnterpriseConfigureTypeText": true, |
| | | "EnumBillingMethod": true, |
| | | "EnumClientType": true, |
| | | "EnumClientTypeText": true, |
| | | "EnumMenuType": true, |
| | |
| | | "EnumRoleWebApiDataPower": true, |
| | | "EnumRoleWebApiDataPowerText": true, |
| | | "EnumRoleWebApiDataPowerTextForFilter": true, |
| | | "EnumSettlementCycle": true, |
| | | "EnumSmsAccess": true, |
| | | "EnumSmsAccessText": true, |
| | | "EnumTaskReleaseStatus": true, |
| | | "EnumTaskStatus": true, |
| | | "EnumUserGender": true, |
| | | "EnumUserInfoStatus": true, |
| | | "EnumUserInfoStatusText": true, |
| | | "EnumUserType": true, |
| | |
| | | "triggerRef": true, |
| | | "unref": true, |
| | | "useAccess": true, |
| | | "useAllAreaList": true, |
| | | "useAllRoleList": true, |
| | | "useArea": true, |
| | | "useAreaByCascader": true, |
| | | "useAttrs": true, |
| | | "useClearSubModule": true, |
| | | "useCopyToClipboard": true, |
| | |
| | | const EmptyTextEditorItem: typeof import('./src/constants/editor')['EmptyTextEditorItem'] |
| | | const EnterpriseConfigureType: typeof import('./src/constants/enterprise')['EnterpriseConfigureType'] |
| | | const EnterpriseConfigureTypeText: typeof import('./src/constants/enterprise')['EnterpriseConfigureTypeText'] |
| | | const EnumBillingMethod: typeof import('./src/constants/apiEnum')['EnumBillingMethod'] |
| | | const EnumClientType: typeof import('./src/constants/apiEnum')['EnumClientType'] |
| | | const EnumClientTypeText: typeof import('./src/constants/apiEnumText')['EnumClientTypeText'] |
| | | const EnumMenuType: typeof import('./src/constants/apiEnum')['EnumMenuType'] |
| | |
| | | const EnumRoleWebApiDataPower: typeof import('./src/constants/apiEnum')['EnumRoleWebApiDataPower'] |
| | | const EnumRoleWebApiDataPowerText: typeof import('./src/constants/apiEnumText')['EnumRoleWebApiDataPowerText'] |
| | | const EnumRoleWebApiDataPowerTextForFilter: typeof import('./src/constants/apiEnumText')['EnumRoleWebApiDataPowerTextForFilter'] |
| | | const EnumSettlementCycle: typeof import('./src/constants/apiEnum')['EnumSettlementCycle'] |
| | | const EnumSmsAccess: typeof import('./src/constants/apiEnum')['EnumSmsAccess'] |
| | | const EnumSmsAccessText: typeof import('./src/constants/enterprise')['EnumSmsAccessText'] |
| | | const EnumTaskReleaseStatus: typeof import('./src/constants/apiEnum')['EnumTaskReleaseStatus'] |
| | | const EnumTaskStatus: typeof import('./src/constants/apiEnum')['EnumTaskStatus'] |
| | | const EnumUserGender: typeof import('./src/constants/apiEnum')['EnumUserGender'] |
| | | const EnumUserInfoStatus: typeof import('./src/constants/apiEnum')['EnumUserInfoStatus'] |
| | | const EnumUserInfoStatusText: typeof import('./src/constants/user')['EnumUserInfoStatusText'] |
| | | const EnumUserType: typeof import('./src/constants/apiEnum')['EnumUserType'] |
| | |
| | | const triggerRef: typeof import('vue')['triggerRef'] |
| | | const unref: typeof import('vue')['unref'] |
| | | const useAccess: typeof import('./src/hooks/useAccess')['useAccess'] |
| | | const useAllAreaList: typeof import('./src/hooks/dic')['useAllAreaList'] |
| | | const useAllRoleList: typeof import('./src/hooks/useUser')['useAllRoleList'] |
| | | const useArea: typeof import('./src/hooks/dic')['useArea'] |
| | | const useAreaByCascader: typeof import('./src/hooks/dic')['useAreaByCascader'] |
| | | const useAttrs: typeof import('vue')['useAttrs'] |
| | | const useClearSubModule: typeof import('./src/hooks/useAccess')['useClearSubModule'] |
| | | const useCopyToClipboard: typeof import('./src/hooks/useCopyToClipboard')['useCopyToClipboard'] |
| | |
| | | export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' |
| | | import('vue') |
| | | // @ts-ignore |
| | | export type { EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumRealAccess, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumSmsAccess, EnumUserInfoStatus, EnumUserType, EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumRealAccess, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumSmsAccess, EnumUserInfoStatus, EnumUserType } from './src/constants/apiEnum' |
| | | export type { EnumBillingMethod, EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumRealAccess, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumSettlementCycle, EnumSmsAccess, EnumTaskReleaseStatus, EnumTaskStatus, EnumUserGender, EnumUserInfoStatus, EnumUserType, EnumBillingMethod, EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumRealAccess, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumSettlementCycle, EnumSmsAccess, EnumTaskReleaseStatus, EnumTaskStatus, EnumUserGender, EnumUserInfoStatus, EnumUserType } from './src/constants/apiEnum' |
| | | import('./src/constants/apiEnum') |
| | | // @ts-ignore |
| | | export type { FlexWorkerEleSignEnum, FlexTaskWorkerHireEnum, FlexWorkerEleSignEnum, FlexTaskWorkerHireEnum } from './src/constants/cPerson' |
| | |
| | | readonly EmptyTextEditorItem: UnwrapRef<typeof import('./src/constants/editor')['EmptyTextEditorItem']> |
| | | readonly EnterpriseConfigureType: UnwrapRef<typeof import('./src/constants/enterprise')['EnterpriseConfigureType']> |
| | | readonly EnterpriseConfigureTypeText: UnwrapRef<typeof import('./src/constants/enterprise')['EnterpriseConfigureTypeText']> |
| | | readonly EnumBillingMethod: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumBillingMethod']> |
| | | readonly EnumClientType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumClientType']> |
| | | readonly EnumClientTypeText: UnwrapRef<typeof import('./src/constants/apiEnumText')['EnumClientTypeText']> |
| | | readonly EnumMenuType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumMenuType']> |
| | |
| | | readonly EnumRoleWebApiDataPower: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumRoleWebApiDataPower']> |
| | | readonly EnumRoleWebApiDataPowerText: UnwrapRef<typeof import('./src/constants/apiEnumText')['EnumRoleWebApiDataPowerText']> |
| | | readonly EnumRoleWebApiDataPowerTextForFilter: UnwrapRef<typeof import('./src/constants/apiEnumText')['EnumRoleWebApiDataPowerTextForFilter']> |
| | | readonly EnumSettlementCycle: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumSettlementCycle']> |
| | | readonly EnumSmsAccess: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumSmsAccess']> |
| | | readonly EnumSmsAccessText: UnwrapRef<typeof import('./src/constants/enterprise')['EnumSmsAccessText']> |
| | | readonly EnumTaskReleaseStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumTaskReleaseStatus']> |
| | | readonly EnumTaskStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumTaskStatus']> |
| | | readonly EnumUserGender: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumUserGender']> |
| | | readonly EnumUserInfoStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumUserInfoStatus']> |
| | | readonly EnumUserInfoStatusText: UnwrapRef<typeof import('./src/constants/user')['EnumUserInfoStatusText']> |
| | | readonly EnumUserType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumUserType']> |
| | |
| | | readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']> |
| | | readonly unref: UnwrapRef<typeof import('vue')['unref']> |
| | | readonly useAccess: UnwrapRef<typeof import('./src/hooks/useAccess')['useAccess']> |
| | | readonly useAllAreaList: UnwrapRef<typeof import('./src/hooks/dic')['useAllAreaList']> |
| | | readonly useAllRoleList: UnwrapRef<typeof import('./src/hooks/useUser')['useAllRoleList']> |
| | | readonly useArea: UnwrapRef<typeof import('./src/hooks/dic')['useArea']> |
| | | readonly useAreaByCascader: UnwrapRef<typeof import('./src/hooks/dic')['useAreaByCascader']> |
| | | readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']> |
| | | readonly useClearSubModule: UnwrapRef<typeof import('./src/hooks/useAccess')['useClearSubModule']> |
| | | readonly useCopyToClipboard: UnwrapRef<typeof import('./src/hooks/useCopyToClipboard')['useCopyToClipboard']> |
| | |
| | | }); |
| | | |
| | | type Props = { |
| | | areaList: number[]; |
| | | areaList: string[]; |
| | | areaListPlaceholder?: string; |
| | | disabled?: boolean; |
| | | layer?: AreaType; |
| | |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:areaList', val: number[]): void; |
| | | (e: 'update:areaList', val: string[]): void; |
| | | }>(); |
| | | |
| | | const { areaList: innerAreaList } = useVModels(props, emit); |
| | |
| | | /* eslint-disable */ |
| | | // @ts-ignore |
| | | |
| | | /** 计费方式 */ |
| | | export enum EnumBillingMethod { |
| | | /**按月 */ |
| | | Month = 10, |
| | | /**按天 */ |
| | | Day = 20, |
| | | /**按时 */ |
| | | Hour = 30, |
| | | /**计件 */ |
| | | Piece = 40, |
| | | } |
| | | |
| | | /** 客户端类型 */ |
| | | export enum EnumClientType { |
| | | /**电脑网页 */ |
| | |
| | | export enum EnumResourceController { |
| | | /**数据字典 */ |
| | | Dictionary = 0, |
| | | /**任务 */ |
| | | Task = 1, |
| | | /**用户认证 */ |
| | | Auth = 1, |
| | | Auth = 2, |
| | | /**用户菜单 */ |
| | | Menu = 2, |
| | | Menu = 3, |
| | | /**用户资源 */ |
| | | Resource = 3, |
| | | Resource = 4, |
| | | /**用户角色 */ |
| | | Role = 4, |
| | | Role = 5, |
| | | /**用户信息 */ |
| | | UserInfo = 5, |
| | | UserInfo = 6, |
| | | /**企业信息 */ |
| | | Enterprise = 6, |
| | | Enterprise = 7, |
| | | } |
| | | |
| | | /** 资源请求方式 */ |
| | |
| | | All = 999, |
| | | } |
| | | |
| | | /** 结算周期 */ |
| | | export enum EnumSettlementCycle { |
| | | /**月结 */ |
| | | Month = 10, |
| | | /**周结 */ |
| | | Week = 20, |
| | | /**日结 */ |
| | | Day = 30, |
| | | } |
| | | |
| | | /** 短信通道 */ |
| | | export enum EnumSmsAccess { |
| | | /**阿里云短信 */ |
| | | AliyunSms = 10, |
| | | } |
| | | |
| | | /** 任务发布状态 */ |
| | | export enum EnumTaskReleaseStatus { |
| | | /**发布中 */ |
| | | InProcess = 20, |
| | | /**已停止 */ |
| | | Stopped = 100, |
| | | } |
| | | |
| | | /** 任务安排状态 */ |
| | | export enum EnumTaskStatus { |
| | | /**待安排 */ |
| | | Wait = 10, |
| | | /**已安排 */ |
| | | Complete = 20, |
| | | } |
| | | |
| | | /** 用户性别 */ |
| | | export enum EnumUserGender { |
| | | /**男 */ |
| | | Male = 10, |
| | | /**女 */ |
| | | Female = 20, |
| | | } |
| | | |
| | | /** 用户信息状态 */ |
| | | export enum EnumUserInfoStatus { |
| | | /**正常 */ |
| | |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import * as dictionaryServices from '@/services/api/dictionary'; |
| | | import { formatAreaListToTree } from '@/utils'; |
| | | import { CascaderProps } from 'element-plus'; |
| | | |
| | | export function useGetDictionaryCategorySelect() { |
| | | const { data: dictionaryCategoryList, refetch } = useQuery({ |
| | |
| | | } |
| | | |
| | | function getDictionaryCategoryById(id: string) { |
| | | return dictionaryCategoryList.value.find((x) => x.value === id); |
| | | return dictionaryCategoryList.value.find((x) => x.data?.id === id); |
| | | } |
| | | |
| | | function getDictionaryCategoryByCode(code: string) { |
| | | return dictionaryCategoryList.value.find((x) => x.code === code); |
| | | return dictionaryCategoryList.value.find((x) => x.data?.code === code); |
| | | } |
| | | |
| | | function getDictionaryCategoryNameByCode(code: string) { |
| | |
| | | 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 params = computed(() => ({ |
| | | categoryId: unref(categoryId), |
| | | categoryCode: unref(categoryCode), |
| | | parentId: unref(parentId), |
| | | keywords: unref(keywords), |
| | | all: unref(all), |
| | | maxDeep: maxDeep, |
| | | })); |
| | | const { data: dictionaryDataList, refetch } = useQuery({ |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect', categoryId, categoryCode], |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect', params], |
| | | queryFn: async () => { |
| | | let res = await dictionaryServices.getDictionaryDataSelect( |
| | | { |
| | | categoryId: unref(categoryId), |
| | | categoryCode: unref(categoryCode), |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | | let res = await dictionaryServices.getDictionaryDataSelect(params.value, { |
| | | showLoading: false, |
| | | }); |
| | | return res.map((x) => ({ |
| | | ...x, |
| | | code: x.data?.code ?? '', |
| | | })); |
| | | }, |
| | | placeholderData: () => [] as API.SelectOptionGuidGetDictionaryDataSelectQueryResultOption[], |
| | | placeholderData: () => [] as API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[], |
| | | staleTime, |
| | | }); |
| | | |
| | | function getDictionaryDataNameById(id: string) { |
| | | return dictionaryDataList.value?.find((x) => x.value === id)?.label; |
| | | return dictionaryDataList.value?.find((x) => x.data?.id === id)?.label; |
| | | } |
| | | |
| | | function getDictionaryDataByCode(code: string) { |
| | | return dictionaryDataList.value?.find((x) => x.code === code); |
| | | return dictionaryDataList.value?.find((x) => x.data?.code === code); |
| | | } |
| | | |
| | | function getDictionaryDataNameByCode(code: string) { |
| | |
| | | |
| | | function ensureQueryData() { |
| | | return queryClient.ensureQueryData< |
| | | API.SelectOptionGuidGetDictionaryDataSelectQueryResultOption[] |
| | | API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[] |
| | | >({ |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect'], |
| | | }); |
| | |
| | | |
| | | function updateDictionaryDataSelect(categoryId?: string) { |
| | | queryClient.invalidateQueries({ |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect', categoryId], |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect'], |
| | | }); |
| | | } |
| | | |
| | |
| | | updateDictionaryDataSelect, |
| | | }; |
| | | } |
| | | |
| | | export function useArea() { |
| | | const queryClient = useQueryClient(); |
| | | |
| | | function getAreaList(parentId = '') { |
| | | const params = { |
| | | categoryCode: CategoryCode.Area, |
| | | parentId: parentId, |
| | | }; |
| | | return queryClient.fetchQuery({ |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect', params], |
| | | queryFn: async () => { |
| | | let res = await dictionaryServices.getDictionaryDataSelect(params, { showLoading: false }); |
| | | return res.map(convertDictionaryToAreaTreeNode); |
| | | }, |
| | | staleTime: Infinity, |
| | | }); |
| | | } |
| | | |
| | | return { getAreaList }; |
| | | } |
| | | |
| | | function convertDictionaryToAreaTreeNode( |
| | | item: API.SelectOptionStringGetDictionaryDataSelectQueryResultOption |
| | | ) { |
| | | return { |
| | | children: [], |
| | | areaCode: item.data?.code, |
| | | parentCode: '', |
| | | areaName: item.label, |
| | | layer: Number(item.data?.field4), |
| | | sort: item.data?.sort, |
| | | id: item.data?.id, |
| | | } as API.AreaTreeNode; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @description 暂时无法使用 |
| | | */ |
| | | export function useAllAreaList() { |
| | | const { dictionaryDataList } = useDictionaryDataSelect({ |
| | | categoryCode: CategoryCode.Area, |
| | | staleTime: Infinity, |
| | | all: true, |
| | | maxDeep: AreaType.Area, |
| | | }); |
| | | |
| | | const areaList = computed(() => dictionaryDataList.value.map(convertDictionaryToAreaTreeNode)); |
| | | |
| | | const areaTreeProps = { |
| | | children: 'children', |
| | | label: 'areaName', |
| | | value: 'areaCode', |
| | | }; |
| | | |
| | | const areaTree = computed(() => formatAreaListToTree(areaList.value)); |
| | | |
| | | const findAreaCodeFromName = (areaName: string) => { |
| | | const areaItem = areaList.value.find((x) => x.areaName === areaName); |
| | | return areaItem?.areaCode ?? ''; |
| | | }; |
| | | |
| | | const findAreaNameFromCode = (areaCode: string) => { |
| | | const areaItem = areaList.value.find((x) => x.areaCode === areaCode); |
| | | return areaItem?.areaName ?? ''; |
| | | }; |
| | | |
| | | const findAreaItemFromCode = (areaCode: string) => { |
| | | const areaItem = areaList.value.find((x) => x.areaCode === areaCode); |
| | | return areaItem; |
| | | }; |
| | | |
| | | return { |
| | | areaList, |
| | | areaTree, |
| | | areaTreeProps, |
| | | findAreaCodeFromName, |
| | | findAreaNameFromCode, |
| | | findAreaItemFromCode, |
| | | }; |
| | | } |
| | | |
| | | type UseAreaByCascaderOptions = { |
| | | layer?: AreaType; |
| | | }; |
| | | |
| | | /** |
| | | * @description 联级选择中使用 |
| | | */ |
| | | export function useAreaByCascader(options: UseAreaByCascaderOptions = {}) { |
| | | const { layer = AreaType.Area } = options; |
| | | |
| | | const { getAreaList } = useArea(); |
| | | |
| | | return computed(() => ({ |
| | | props: { |
| | | label: 'areaName', |
| | | value: 'areaCode', |
| | | lazy: true, |
| | | async lazyLoad(node, resolve) { |
| | | const { level, data } = node; |
| | | const areas = (await getAreaList((data as API.AreaTreeNode).id)) as any[]; |
| | | |
| | | return resolve( |
| | | areas.map((x) => ({ |
| | | ...x, |
| | | leaf: x.layer >= layer, |
| | | })) |
| | | ); |
| | | }, |
| | | } as CascaderProps, |
| | | })); |
| | | } |
| | |
| | | params: API.APIgetDictionaryDataSelectParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.SelectOptionGuidGetDictionaryDataSelectQueryResultOption[]>( |
| | | return request<API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[]>( |
| | | '/api/main/dictionary/getDictionaryDataSelect', |
| | | { |
| | | method: 'GET', |
| | |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 同步人力资源地区字典数据 POST /api/main/dictionary/syncHumanResourcesAreaDictionaryData */ |
| | | export async function syncHumanResourcesAreaDictionaryData( |
| | | body: API.SyncHumanResourcesAreaDictionaryDataCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/main/dictionary/syncHumanResourcesAreaDictionaryData', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | import * as resource from './resource'; |
| | | import * as role from './role'; |
| | | import * as enterprise from './enterprise'; |
| | | import * as task from './task'; |
| | | export default { |
| | | userInfo, |
| | | auth, |
| | |
| | | resource, |
| | | role, |
| | | enterprise, |
| | | task, |
| | | }; |
New file |
| | |
| | | /* eslint-disable */ |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 查询任务详情 GET /api/main/task/getTaskInfo */ |
| | | export async function getTaskInfo( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetTaskInfoParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetTaskInfoQueryResult>('/api/main/task/getTaskInfo', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 查询任务分页列表 POST /api/main/task/getTaskInfos */ |
| | | export async function getTaskInfos(body: API.GetTaskInfosQuery, options?: API.RequestConfig) { |
| | | return request<API.PagedListQueryResultGetTaskInfosQueryResultItem>( |
| | | '/api/main/task/getTaskInfos', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 保存任务 POST /api/main/task/saveTaskInfo */ |
| | | export async function saveTaskInfo(body: API.SaveTaskInfoCommand, options?: API.RequestConfig) { |
| | | return request<string>('/api/main/task/saveTaskInfo', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | categoryCode?: string; |
| | | /** 上级Id */ |
| | | parentId?: string; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | /** 查询所有 */ |
| | | all?: boolean; |
| | | /** 最大深度 */ |
| | | maxDeep?: number; |
| | | } |
| | | |
| | | interface APIgetEnterpriseElectronSignSettingParams { |
| | |
| | | roleId?: string; |
| | | } |
| | | |
| | | interface APIgetTaskInfoParams { |
| | | /** Id */ |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetUserInfoRolesParams { |
| | | /** 用户Id */ |
| | | userInfoId?: string; |
| | |
| | | |
| | | interface DeleteRoleCommand { |
| | | ids: string[]; |
| | | } |
| | | |
| | | interface DictionaryDataQueryModel { |
| | | /** 编号 */ |
| | | code?: string; |
| | | /** 名称 */ |
| | | name?: string; |
| | | } |
| | | |
| | | enum EnumBillingMethod { |
| | | /**按月 */ |
| | | Month = 10, |
| | | /**按天 */ |
| | | Day = 20, |
| | | /**按时 */ |
| | | Hour = 30, |
| | | /**计件 */ |
| | | Piece = 40, |
| | | } |
| | | |
| | | enum EnumClientType { |
| | |
| | | enum EnumResourceController { |
| | | /**数据字典 */ |
| | | Dictionary = 0, |
| | | /**任务 */ |
| | | Task = 1, |
| | | /**用户认证 */ |
| | | Auth = 1, |
| | | Auth = 2, |
| | | /**用户菜单 */ |
| | | Menu = 2, |
| | | Menu = 3, |
| | | /**用户资源 */ |
| | | Resource = 3, |
| | | Resource = 4, |
| | | /**用户角色 */ |
| | | Role = 4, |
| | | Role = 5, |
| | | /**用户信息 */ |
| | | UserInfo = 5, |
| | | UserInfo = 6, |
| | | /**企业信息 */ |
| | | Enterprise = 6, |
| | | Enterprise = 7, |
| | | } |
| | | |
| | | enum EnumResourceMethod { |
| | |
| | | All = 999, |
| | | } |
| | | |
| | | enum EnumSettlementCycle { |
| | | /**月结 */ |
| | | Month = 10, |
| | | /**周结 */ |
| | | Week = 20, |
| | | /**日结 */ |
| | | Day = 30, |
| | | } |
| | | |
| | | enum EnumSmsAccess { |
| | | /**阿里云短信 */ |
| | | AliyunSms = 10, |
| | | } |
| | | |
| | | enum EnumTaskReleaseStatus { |
| | | /**发布中 */ |
| | | InProcess = 20, |
| | | /**已停止 */ |
| | | Stopped = 100, |
| | | } |
| | | |
| | | enum EnumTaskStatus { |
| | | /**待安排 */ |
| | | Wait = 10, |
| | | /**已安排 */ |
| | | Complete = 20, |
| | | } |
| | | |
| | | enum EnumUserGender { |
| | | /**男 */ |
| | | Male = 10, |
| | | /**女 */ |
| | | Female = 20, |
| | | } |
| | | |
| | | enum EnumUserInfoStatus { |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetRoleQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultGetTaskInfoQueryResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetTaskInfoQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultListSelectOptionGuidGetDictionaryDataSelectQueryResultOption { |
| | | interface FriendlyResultListSelectOptionStringGetDictionaryDataSelectQueryResultOption { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | /** 数据 */ |
| | | data?: SelectOptionGuidGetDictionaryDataSelectQueryResultOption[]; |
| | | data?: SelectOptionStringGetDictionaryDataSelectQueryResultOption[]; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | 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; |
| | |
| | | categoryId?: string; |
| | | /** 类别编号(Id/编号二选一) */ |
| | | categoryCode?: string; |
| | | /** 上级Id */ |
| | | parentId?: string; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | } |
| | |
| | | legalPerson?: string; |
| | | /** 法人身份证号 */ |
| | | legalIdentity?: string; |
| | | /** 所在省份Id */ |
| | | provinceId?: string; |
| | | /** 所在省份编号 */ |
| | | provinceCode?: string; |
| | | /** 所在省份 */ |
| | | provinceContent?: string; |
| | | /** 所在城市Id */ |
| | | cityId?: string; |
| | | /** 所在城市编号 */ |
| | | cityCode?: string; |
| | | /** 所在城市 */ |
| | | cityContent?: string; |
| | | /** 所属行业Id */ |
| | | industryTypeId?: string; |
| | | /** 所属行业编号 */ |
| | | industryTypeCode?: string; |
| | | /** 所属行业 */ |
| | | industryTypeContent?: string; |
| | | /** 主营业务 */ |
| | |
| | | isChecked?: boolean; |
| | | } |
| | | |
| | | interface GetTaskInfoQueryResult { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 任务名称 */ |
| | | name?: string; |
| | | billingMethod?: EnumBillingMethod; |
| | | /** 服务费 */ |
| | | serviceFee?: number; |
| | | settlementCycle?: EnumSettlementCycle; |
| | | /** 福利 */ |
| | | benefits?: DictionaryDataQueryModel[]; |
| | | /** 年龄范围最小 */ |
| | | ageMinLimit?: number; |
| | | /** 年龄范围大 */ |
| | | ageMaxLimit?: number; |
| | | genderLimit?: EnumUserGender; |
| | | /** 资格证书类型 */ |
| | | credentialLimits?: DictionaryDataQueryModel[]; |
| | | /** 任务地点所属省份编号 */ |
| | | provinceCode?: string; |
| | | /** 任务地点所属省份 */ |
| | | provinceName?: string; |
| | | /** 任务地点所属城市编号 */ |
| | | cityCode?: string; |
| | | /** 任务地点所属城市 */ |
| | | cityName?: string; |
| | | /** 任务地点详细地址 */ |
| | | address?: string; |
| | | /** 任务开始时间 */ |
| | | beginTime?: string; |
| | | /** 任务结束时间 */ |
| | | endTime?: string; |
| | | /** 创建时间 */ |
| | | createdTime?: string; |
| | | } |
| | | |
| | | interface GetTaskInfosQuery { |
| | | pageModel?: PagedListQueryPageModel; |
| | | /** 关键字(任务名称) */ |
| | | keywords?: string; |
| | | /** 发布时间 */ |
| | | time?: string; |
| | | status?: EnumTaskStatus; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | } |
| | | |
| | | interface GetTaskInfosQueryResultItem { |
| | | /** 任务名称 */ |
| | | name: string; |
| | | /** 任务单号 */ |
| | | code?: string; |
| | | billingMethod?: EnumBillingMethod; |
| | | /** 服务费 */ |
| | | serviceFee?: number; |
| | | settlementCycle?: EnumSettlementCycle; |
| | | genderLimit?: EnumUserGender; |
| | | /** 报名人数 */ |
| | | userCount?: number; |
| | | status?: EnumTaskStatus; |
| | | /** 任务开始时间 */ |
| | | beginTime?: string; |
| | | /** 任务结束时间 */ |
| | | endTime?: string; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | } |
| | | |
| | | interface GetUserInfoRolesQueryResultItem { |
| | | /** 角色Id */ |
| | | id?: string; |
| | |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetRolesQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultGetTaskInfosQueryResultItem { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetTaskInfosQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultPageModel { |
| | |
| | | legalPerson?: string; |
| | | /** 法人身份证号 */ |
| | | legalIdentity?: string; |
| | | /** 所在省份Id */ |
| | | provinceId?: string; |
| | | /** 所在城市Id */ |
| | | cityId?: string; |
| | | /** 所属行业Id */ |
| | | industryTypeId?: string; |
| | | /** 所在省份编号 */ |
| | | provinceCode?: string; |
| | | /** 所在城市编号 */ |
| | | cityCode?: string; |
| | | /** 所属行业编号 */ |
| | | industryTypeCode?: string; |
| | | /** 主营业务 */ |
| | | mainBusiness?: string; |
| | | /** 联系人 */ |
| | |
| | | resources?: GetRoleQueryResultResource[]; |
| | | } |
| | | |
| | | interface SaveTaskInfoCommand { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 任务名称 */ |
| | | name: string; |
| | | billingMethod: EnumBillingMethod; |
| | | /** 服务费 */ |
| | | serviceFee: number; |
| | | settlementCycle: EnumSettlementCycle; |
| | | /** 福利编号 */ |
| | | benefits?: string[]; |
| | | /** 年龄范围最小 */ |
| | | ageMinLimit: number; |
| | | /** 年龄范围大 */ |
| | | ageMaxLimit: number; |
| | | genderLimit: EnumUserGender; |
| | | /** 资格证书类型编号 */ |
| | | credentialLimits?: string[]; |
| | | /** 任务地点所属省份编号 */ |
| | | provinceCode: string; |
| | | /** 任务地点所属城市编号 */ |
| | | cityCode: string; |
| | | /** 任务地点详细地址 */ |
| | | address: string; |
| | | /** 任务开始时间 */ |
| | | beginTime: string; |
| | | /** 任务结束时间 */ |
| | | endTime: string; |
| | | } |
| | | |
| | | interface SelectOptionGuidGetDictionaryCategorySelectQueryOption { |
| | | /** 值 */ |
| | | value?: string; |
| | |
| | | data?: any; |
| | | } |
| | | |
| | | interface SelectOptionGuidGetDictionaryDataSelectQueryResultOption { |
| | | interface SelectOptionStringGetDictionaryDataSelectQueryResultOption { |
| | | /** 值 */ |
| | | value?: string; |
| | | /** 标签 */ |
| | |
| | | ids?: string[]; |
| | | status?: EnumUserInfoStatus; |
| | | } |
| | | |
| | | type SyncHumanResourcesAreaDictionaryDataCommand = Record<string, any>; |
| | | } |
| | |
| | | import { AreaType } from '@/constants'; |
| | | import _ from 'lodash'; |
| | | |
| | | export interface AreaTreeNode extends API.AreaDto { |
| | | children?: AreaTreeNode[]; |
| | | } |
| | | // type formatAreaListToTreeOptions = { |
| | | // parentId?: string; |
| | | // maxLayer?: number; |
| | | // }; |
| | | |
| | | export function formatAreaListToTree( |
| | | areaDataList: API.AreaDto[], |
| | | parentId: number, |
| | | areaDataList: API.AreaTreeNode[], |
| | | parentId = '', |
| | | maxLayer = AreaType.Area |
| | | ) { |
| | | const treeNodeList: API.AreaTreeNode[] = []; |
| | |
| | | export default defineComponent({ |
| | | name: 'AddOrEditEnterprise', |
| | | beforeRouteEnter(to) { |
| | | to.meta.title = to.params.id ? '编辑' : '新增'; |
| | | to.meta.title = to.params.id ? '编辑企业' : '新增企业'; |
| | | setPageTitle(to.meta.title as string); |
| | | }, |
| | | }); |
| | |
| | | /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <!-- <ProFormColItem :span="8"> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 |
| | | label="所在地区:" |
| | | prop="areaList" |
| | |
| | | <ProFromAddressSelectV2 |
| | | v-model:areaList="form.areaList" |
| | | areaListPlaceholder="请选择" |
| | | :layer="AreaType.City" |
| | | /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> --> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="8"> |
| | | <ProFormItemV2 label="所属行业:" prop="industryTypeId"> |
| | | <ProFormSelect |
| | | v-model="form.industryTypeId" |
| | | v-model="form.industryTypeCode" |
| | | placeholder="请选择所属行业" |
| | | :value-enum="dictionaryDataList" |
| | | clearable |
| | |
| | | import { validateFormList, filterCN } from '@/utils'; |
| | | import { Message, BoleRegExp } from '@bole-core/core'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { AreaType } from '@/constants'; |
| | | |
| | | defineOptions({ name: 'AddOrEditEnterpriseView' }); |
| | | |
| | |
| | | legalPerson: '', |
| | | legalIdentity: '', |
| | | societyCreditCode: '', |
| | | industryTypeId: '', |
| | | industryTypeCode: '', |
| | | mainBusiness: '', |
| | | areaList: [130000, 131000] as number[], |
| | | areaList: [] as string[], |
| | | contacts: '', |
| | | contactPhoneNumber: '', |
| | | contactEmail: '', |
| | |
| | | form.legalPerson = data.legalPerson; |
| | | form.legalIdentity = data.legalIdentity; |
| | | form.societyCreditCode = data.societyCreditCode; |
| | | form.industryTypeId = data.industryTypeId; |
| | | form.industryTypeCode = data.industryTypeCode; |
| | | form.mainBusiness = data.mainBusiness; |
| | | form.contacts = data.contacts; |
| | | form.contactPhoneNumber = data.contactPhoneNumber; |
| | | form.contactEmail = data.contactEmail; |
| | | form.userName = data.userName; |
| | | form.areaList = [data.provinceCode, data.cityCode].filter(Boolean); |
| | | }, |
| | | enabled: computed(() => !!id), |
| | | }); |
| | |
| | | |
| | | async function handleCreateOrEditFlexEnterprise() { |
| | | try { |
| | | console.log('form.areaList: ', form.areaList); |
| | | let params: API.SaveEnterpriseCommand = { |
| | | enterpriseName: form.enterpriseName, |
| | | legalPerson: form.legalPerson, |
| | | legalIdentity: form.legalIdentity, |
| | | societyCreditCode: form.societyCreditCode, |
| | | provinceId: '', |
| | | cityId: '', |
| | | industryTypeId: form.industryTypeId, |
| | | provinceCode: form.areaList[0], |
| | | cityCode: form.areaList[1], |
| | | industryTypeCode: form.industryTypeCode, |
| | | mainBusiness: form.mainBusiness, |
| | | contacts: form.contacts, |
| | | contactPhoneNumber: form.contactPhoneNumber, |
| | |
| | | }, |
| | | userType: extraParamState.userType, |
| | | clientType: extraParamState.clientType, |
| | | keywords: extraParamState.queryCondition, |
| | | }; |
| | | let res = await roleServices.getRoles(params, { |
| | | showLoading: !state.loading, |
| | |
| | | detail: detail, |
| | | }); |
| | | } else { |
| | | handleAdd(); |
| | | handleAdd({ |
| | | userType: extraParamState.userType, |
| | | clientType: extraParamState.clientType, |
| | | }); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | |
| | | field1?:string |
| | | } |
| | | |
| | | interface SelectOptionGuidGetDictionaryCategorySelectQueryOption{ |
| | | interface SelectOptionStringGetDictionaryDataSelectQueryResultOption{ |
| | | fieldNamesMap?: SelectQueryResultOptionGuidGetDictionaryCategorySelectQueryOptionMap; |
| | | code?:string |
| | | } |
| | | |
| | | interface SelectOptionGuidGetDictionaryDataSelectQueryResultOption{ |
| | | interface SelectOptionGuidGetDictionaryCategorySelectQueryOption{ |
| | | code?:string |
| | | } |
| | | |
| | | interface AreaTreeNode { |
| | | children?: AreaTreeNode[]; |
| | | /** 编码 */ |
| | | areaCode?: string; |
| | | /** 父级编码 */ |
| | | parentCode?: string; |
| | | /** 名称 */ |
| | | areaName?: string; |
| | | /** 1省 2市 3区 4镇 */ |
| | | layer?: number; |
| | | /** 排序 */ |
| | | sort?: number; |
| | | id?: string |
| | | } |
| | | |
| | | } |