From 4e2b08ec7c558498592a1e9b32bae8016b0906ac Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期五, 08 八月 2025 10:54:10 +0800
Subject: [PATCH] fix: s
---
packages/services/apiV2/dictionary.ts | 36
packages/constants/task.ts | 214 ----------
apps/bMiniApp/src/pages/workbenches/InnerPage.vue | 13
apps/bMiniApp/src/subpackages/task/publishTask/publishTask.vue | 2
apps/bMiniApp/src/constants/app.ts | 2
apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue | 6
packages/constants/dic.ts | 46 ++
packages/services/apiV2/index.ts | 16
packages/hooks/area.ts | 107 ++---
apps/bMiniApp/src/subpackages/task/publishTask/InnerPage.vue | 247 +++++++-----
apps/cMiniApp/src/app.config.ts | 2
packages/components/src/Input/ChooseInputWithCheckbox.vue | 4
packages/constants/apiEnum.ts | 28 +
apps/bMiniApp/src/pages/home/index.vue | 4
packages/components/src/ActionSheet/CheckboxActionSheet.vue | 6
packages/components/src/Input/ChooseLocationInput.vue | 1
packages/hooks/dic.ts | 42 +
apps/bMiniApp/types/global.d.ts | 7
apps/bMiniApp/project.config.json | 2
packages/services/apiV2/user.ts | 81 ++++
types/api.d.ts | 16
/dev/null | 66 ---
apps/cMiniApp/src/subpackages/city/citySelect/citySelect.vue | 2
packages/utils/area.ts | 10
packages/services/apiV2/task.ts | 42 +
packages/services/apiV2/typings.d.ts | 110 +++++
packages/components/types/global.d.ts | 7
27 files changed, 595 insertions(+), 524 deletions(-)
diff --git a/apps/bMiniApp/project.config.json b/apps/bMiniApp/project.config.json
index b424d15..8c102f7 100644
--- a/apps/bMiniApp/project.config.json
+++ b/apps/bMiniApp/project.config.json
@@ -51,6 +51,6 @@
"ignore": [],
"include": []
},
- "appid": "wx88251c84f5cd886b",
+ "appid": "wxb9e0baf4f87aa0de",
"projectname": "bMiniApp"
}
\ No newline at end of file
diff --git a/apps/bMiniApp/src/constants/app.ts b/apps/bMiniApp/src/constants/app.ts
index bcda41b..cd671f7 100644
--- a/apps/bMiniApp/src/constants/app.ts
+++ b/apps/bMiniApp/src/constants/app.ts
@@ -1,6 +1,6 @@
import { EnumUserType, EnumClientType } from '@12333/constants';
export const AppLocalConfig = {
- userType: EnumUserType.Operation,
+ userType: EnumUserType.Enterprise,
clientType: EnumClientType.PcWeb,
};
diff --git a/apps/bMiniApp/src/pages/home/index.vue b/apps/bMiniApp/src/pages/home/index.vue
index 80b0d24..c62da08 100644
--- a/apps/bMiniApp/src/pages/home/index.vue
+++ b/apps/bMiniApp/src/pages/home/index.vue
@@ -15,13 +15,13 @@
</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"
diff --git a/apps/bMiniApp/src/pages/workbenches/InnerPage.vue b/apps/bMiniApp/src/pages/workbenches/InnerPage.vue
index 22fe2ec..5e34c03 100644
--- a/apps/bMiniApp/src/pages/workbenches/InnerPage.vue
+++ b/apps/bMiniApp/src/pages/workbenches/InnerPage.vue
@@ -1,12 +1,12 @@
<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="浠诲姟">
@@ -47,6 +47,7 @@
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',
@@ -59,15 +60,15 @@
'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);
diff --git a/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue
index ea7e836..ffe2e4a 100644
--- a/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue
+++ b/apps/bMiniApp/src/subpackages/jobApplicationManage/jobApplicationManage/jobApplicationManage.vue
@@ -1,9 +1,5 @@
<template>
- <PageLayoutWithBg
- class="jobApplicationManage-page-wrapper"
- :title="'搴旇仒绠$悊'"
- :need-auth="false"
- >
+ <PageLayoutWithBg class="jobApplicationManage-page-wrapper" :title="'搴旇仒绠$悊'">
<InnerPage></InnerPage>
</PageLayoutWithBg>
</template>
diff --git a/apps/bMiniApp/src/subpackages/task/publishTask/InnerPage.vue b/apps/bMiniApp/src/subpackages/task/publishTask/InnerPage.vue
index caf284e..8e810c9 100644
--- a/apps/bMiniApp/src/subpackages/task/publishTask/InnerPage.vue
+++ b/apps/bMiniApp/src/subpackages/task/publishTask/InnerPage.vue
@@ -1,32 +1,32 @@
<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
@@ -36,18 +36,15 @@
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="璇烽�夋嫨绂忓埄"
@@ -56,62 +53,79 @@
<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>
@@ -124,11 +138,14 @@
<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,
@@ -141,11 +158,11 @@
} 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';
@@ -154,56 +171,63 @@
});
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);
@@ -211,19 +235,19 @@
},
],
- 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);
},
},
@@ -236,32 +260,39 @@
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,
+ };
},
});
@@ -277,30 +308,32 @@
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() {
diff --git a/apps/bMiniApp/src/subpackages/task/publishTask/publishTask.vue b/apps/bMiniApp/src/subpackages/task/publishTask/publishTask.vue
index 7a6f3d4..bc207c6 100644
--- a/apps/bMiniApp/src/subpackages/task/publishTask/publishTask.vue
+++ b/apps/bMiniApp/src/subpackages/task/publishTask/publishTask.vue
@@ -1,5 +1,5 @@
<template>
- <PageLayout class="publishTask-page-wrapper" :title="'鍙戝竷鎷涜仒'" has-border :need-auth="false">
+ <PageLayout class="publishTask-page-wrapper" :title="'鍙戝竷鎷涜仒'" has-border>
<InnerPage></InnerPage>
</PageLayout>
</template>
diff --git a/apps/bMiniApp/types/global.d.ts b/apps/bMiniApp/types/global.d.ts
index 3858762..a60a869 100644
--- a/apps/bMiniApp/types/global.d.ts
+++ b/apps/bMiniApp/types/global.d.ts
@@ -74,10 +74,11 @@
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
\ No newline at end of file
diff --git a/apps/cMiniApp/src/app.config.ts b/apps/cMiniApp/src/app.config.ts
index c605d13..7c84b97 100644
--- a/apps/cMiniApp/src/app.config.ts
+++ b/apps/cMiniApp/src/app.config.ts
@@ -1,7 +1,7 @@
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: '浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭鏁版嵁鐨勬晥鏋滃睍绀�',
diff --git a/apps/cMiniApp/src/subpackages/city/citySelect/citySelect.vue b/apps/cMiniApp/src/subpackages/city/citySelect/citySelect.vue
index f5bd9aa..816aab9 100644
--- a/apps/cMiniApp/src/subpackages/city/citySelect/citySelect.vue
+++ b/apps/cMiniApp/src/subpackages/city/citySelect/citySelect.vue
@@ -54,7 +54,7 @@
list: cityGroups[key].map((x) => ({
name: x.areaName,
id: x.areaCode,
- parentId: x.parentId,
+ parentId: x.parentCode,
})),
});
}
diff --git a/packages/components/src/ActionSheet/CheckboxActionSheet.vue b/packages/components/src/ActionSheet/CheckboxActionSheet.vue
index 4d2ebda..32978d5 100644
--- a/packages/components/src/ActionSheet/CheckboxActionSheet.vue
+++ b/packages/components/src/ActionSheet/CheckboxActionSheet.vue
@@ -2,8 +2,8 @@
<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">
@@ -21,7 +21,7 @@
type Props = {
max?: number;
title?: string;
- columns?: API.GetTypeSearchSettingList[];
+ columns?: API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[];
};
const props = withDefaults(defineProps<Props>(), {});
diff --git a/packages/components/src/Input/ChooseInputWithCheckbox.vue b/packages/components/src/Input/ChooseInputWithCheckbox.vue
index b1ff1a6..2026e90 100644
--- a/packages/components/src/Input/ChooseInputWithCheckbox.vue
+++ b/packages/components/src/Input/ChooseInputWithCheckbox.vue
@@ -15,7 +15,7 @@
});
type Props = {
- columns: API.GetTypeSearchSettingList[];
+ columns: API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[];
modelValue: Array<string | number>;
title?: string;
max?: number;
@@ -23,7 +23,7 @@
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<{
diff --git a/packages/components/src/Input/ChooseLocationInput.vue b/packages/components/src/Input/ChooseLocationInput.vue
index d576d5e..e139c62 100644
--- a/packages/components/src/Input/ChooseLocationInput.vue
+++ b/packages/components/src/Input/ChooseLocationInput.vue
@@ -86,6 +86,7 @@
cityCode: findAreaCodeFromName(cityName),
countyCode: findAreaCodeFromName(countyName),
address: res.address,
+ addressName: res.name,
});
},
});
diff --git a/packages/components/types/global.d.ts b/packages/components/types/global.d.ts
index 0563d9d..e055134 100644
--- a/packages/components/types/global.d.ts
+++ b/packages/components/types/global.d.ts
@@ -24,8 +24,9 @@
provinceName?: string;
cityName?: string;
countyName?: string;
- provinceCode?: number;
- cityCode?: number;
- countyCode?: number;
+ provinceCode?: string;
+ cityCode?: string;
+ countyCode?: string;
address?: string;
+ addressName?: string;
}
\ No newline at end of file
diff --git a/packages/constants/apiEnum.ts b/packages/constants/apiEnum.ts
index 1e227fd..f260f44 100644
--- a/packages/constants/apiEnum.ts
+++ b/packages/constants/apiEnum.ts
@@ -76,7 +76,7 @@
/**鐢ㄦ埛瑙掕壊 */
Role = 5,
/**鐢ㄦ埛淇℃伅 */
- UserInfo = 6,
+ User = 6,
/**浼佷笟淇℃伅 */
Enterprise = 7,
}
@@ -125,12 +125,36 @@
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,
}
/** 浠诲姟瀹夋帓鐘舵�� */
@@ -150,7 +174,7 @@
}
/** 鐢ㄦ埛淇℃伅鐘舵�� */
-export enum EnumUserInfoStatus {
+export enum EnumUserStatus {
/**姝e父 */
Normal = 10,
/**绂佺敤 */
diff --git a/packages/constants/dic.ts b/packages/constants/dic.ts
index 534792d..41e3e90 100644
--- a/packages/constants/dic.ts
+++ b/packages/constants/dic.ts
@@ -11,4 +11,50 @@
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',
}
diff --git a/packages/constants/task.ts b/packages/constants/task.ts
index 742c086..f3552ac 100644
--- a/packages/constants/task.ts
+++ b/packages/constants/task.ts
@@ -1,204 +1,26 @@
-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]: '鍏�/浠�',
};
diff --git a/packages/hooks/area.ts b/packages/hooks/area.ts
index 46668cf..ec57c26 100644
--- a/packages/hooks/area.ts
+++ b/packages/hooks/area.ts
@@ -1,109 +1,80 @@
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,
};
}
diff --git a/packages/hooks/dic.ts b/packages/hooks/dic.ts
index acaf549..bb28a9f 100644
--- a/packages/hooks/dic.ts
+++ b/packages/hooks/dic.ts
@@ -1,6 +1,6 @@
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() {
@@ -50,28 +50,45 @@
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.SelectOptionStringGetDictionaryDataSelectQueryResultOption[],
+ staleTime,
});
function getDictionaryDataNameById(id: string) {
@@ -96,6 +113,12 @@
});
}
+ function updateDictionaryDataSelect(categoryId?: string) {
+ queryClient.invalidateQueries({
+ queryKey: ['dictionaryServices/getDictionaryDataSelect'],
+ });
+ }
+
return {
dictionaryDataList,
ensureQueryData,
@@ -103,5 +126,6 @@
getDictionaryDataNameById,
getDictionaryDataNameByCode,
getDictionaryDataByCode,
+ updateDictionaryDataSelect,
};
}
diff --git a/packages/services/apiV2/dictionary.ts b/packages/services/apiV2/dictionary.ts
index c48fb89..4c74b85 100644
--- a/packages/services/apiV2/dictionary.ts
+++ b/packages/services/apiV2/dictionary.ts
@@ -2,12 +2,12 @@
// @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',
@@ -17,13 +17,13 @@
});
}
-/** 鑾峰彇鏁版嵁瀛楀吀绫诲埆鍒嗛〉鍒楄〃鏁版嵁 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: {
@@ -35,14 +35,14 @@
);
}
-/** 鏌ヨ鏁版嵁瀛楀吀绫诲埆閫夋嫨鍣ㄦ暟鎹� GET /api/main/dictionary/getDictionaryCategorySelect */
+/** 鏌ヨ鏁版嵁瀛楀吀绫诲埆閫夋嫨鍣ㄦ暟鎹� GET /api/flexjob/dictionary/getDictionaryCategorySelect */
export async function getDictionaryCategorySelect(
// 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
params: API.APIgetDictionaryCategorySelectParams,
options?: API.RequestConfig
) {
return request<API.SelectOptionGuidGetDictionaryCategorySelectQueryOption[]>(
- '/api/main/dictionary/getDictionaryCategorySelect',
+ '/api/flexjob/dictionary/getDictionaryCategorySelect',
{
method: 'GET',
params: {
@@ -55,13 +55,13 @@
);
}
-/** 鑾峰彇鏁版嵁瀛楀吀鍒嗛〉鍒楄〃鏁版嵁 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: {
@@ -73,14 +73,14 @@
);
}
-/** 鏌ヨ鏁版嵁瀛楀吀閫夋嫨鍣� GET /api/main/dictionary/getDictionaryDataSelect */
+/** 鏌ヨ鏁版嵁瀛楀吀閫夋嫨鍣� GET /api/flexjob/dictionary/getDictionaryDataSelect */
export async function getDictionaryDataSelect(
// 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
params: API.APIgetDictionaryDataSelectParams,
options?: API.RequestConfig
) {
return request<API.SelectOptionStringGetDictionaryDataSelectQueryResultOption[]>(
- '/api/main/dictionary/getDictionaryDataSelect',
+ '/api/flexjob/dictionary/getDictionaryDataSelect',
{
method: 'GET',
params: {
@@ -91,12 +91,12 @@
);
}
-/** 淇濆瓨鏁版嵁瀛楀吀绫诲埆 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',
@@ -106,12 +106,12 @@
});
}
-/** 淇濆瓨鏁版嵁瀛楀吀 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',
@@ -121,12 +121,12 @@
});
}
-/** 璁剧疆鏁版嵁瀛楀吀鏄惁绂佺敤 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',
@@ -136,12 +136,12 @@
});
}
-/** 鍚屾浜哄姏璧勬簮鍦板尯瀛楀吀鏁版嵁 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',
diff --git a/packages/services/apiV2/index.ts b/packages/services/apiV2/index.ts
index de6fd71..dcda25c 100644
--- a/packages/services/apiV2/index.ts
+++ b/packages/services/apiV2/index.ts
@@ -2,21 +2,21 @@
/* 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,
};
diff --git a/packages/services/apiV2/task.ts b/packages/services/apiV2/task.ts
index 264a625..23c1be7 100644
--- a/packages/services/apiV2/task.ts
+++ b/packages/services/apiV2/task.ts
@@ -2,13 +2,13 @@
// @ts-ignore
import { request } from '@/utils/request';
-/** 鏌ヨ浠诲姟璇︽儏 GET /api/main/task/getTaskInfo */
+/** 鏌ヨ浠诲姟璇︽儏 GET /api/flexjob/task/getTaskInfo */
export async function getTaskInfo(
// 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟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,
@@ -17,10 +17,10 @@
});
}
-/** 鏌ヨ浠诲姟鍒嗛〉鍒楄〃 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: {
@@ -32,9 +32,9 @@
);
}
-/** 淇濆瓨浠诲姟 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',
@@ -43,3 +43,33 @@
...(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 || {}),
+ });
+}
diff --git a/packages/services/apiV2/typings.d.ts b/packages/services/apiV2/typings.d.ts
index f99c072..98a7d82 100644
--- a/packages/services/apiV2/typings.d.ts
+++ b/packages/services/apiV2/typings.d.ts
@@ -105,6 +105,11 @@
clientType?: EnumClientType;
}
+ interface APIgetUserResumeParams {
+ /** 鐢ㄦ埛Id */
+ userId?: string;
+ }
+
interface DeleteDictionaryCategoryCommand {
ids: string[];
}
@@ -192,7 +197,7 @@
/**鐢ㄦ埛瑙掕壊 */
Role = 5,
/**鐢ㄦ埛淇℃伅 */
- UserInfo = 6,
+ User = 6,
/**浼佷笟淇℃伅 */
Enterprise = 7,
}
@@ -237,11 +242,32 @@
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 {
@@ -258,7 +284,7 @@
Female = 20,
}
- enum EnumUserInfoStatus {
+ enum EnumUserStatus {
/**姝e父 */
Normal = 10,
/**绂佺敤 */
@@ -390,6 +416,24 @@
/** 閿欒鐮� */
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;
/** 閿欒淇℃伅 */
@@ -996,7 +1040,7 @@
remark?: string;
/** 瑙掕壊 */
roles?: GetOperationUserInfosQueryResultItemRole[];
- status?: EnumUserInfoStatus;
+ status?: EnumUserStatus;
}
interface GetOperationUserInfosQueryResultItemRole {
@@ -1102,6 +1146,12 @@
interface GetTaskInfoQueryResult {
/** Id */
id?: string;
+ /** 浼佷笟Id */
+ enterpriseId?: string;
+ /** 浼佷笟鍏ㄧО */
+ enterpriseName?: string;
+ /** 鍦ㄦ嫑宀椾綅鏁伴噺 */
+ taskCount?: number;
/** 浠诲姟鍚嶇О */
name?: string;
billingMethod?: EnumBillingMethod;
@@ -1125,27 +1175,46 @@
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;
/** 浠诲姟鍗曞彿 */
@@ -1163,6 +1232,11 @@
/** 浠诲姟缁撴潫鏃堕棿 */
endTime?: string;
releaseStatus?: EnumTaskReleaseStatus;
+ checkReceiveStatus?: EnumTaskCheckReceiveStatus;
+ settlementStatus?: EnumTaskSettlementStatus;
+ recommendStatus?: EnumTaskRecommendStatus;
+ /** 鍒涘缓鏃堕棿 */
+ createdTime?: string;
}
interface GetUserInfoRolesQueryResultItem {
@@ -1175,6 +1249,8 @@
/** 鏄惁閫変腑 */
isChecked?: boolean;
}
+
+ type GetUserResumeQueryResult = Record<string, any>;
interface PagedListQueryPageModel {
/** 琛屾暟 */
@@ -1492,8 +1568,14 @@
provinceCode: string;
/** 浠诲姟鍦扮偣鎵�灞炲煄甯傜紪鍙� */
cityCode: string;
+ /** 浠诲姟鍦扮偣鍚嶇О */
+ addressName: string;
/** 浠诲姟鍦扮偣璇︾粏鍦板潃 */
- address: string;
+ addressDetail: string;
+ /** 缁忓害 */
+ longitude?: number;
+ /** 绾害 */
+ latitude?: number;
/** 浠诲姟寮�濮嬫椂闂� */
beginTime: string;
/** 浠诲姟缁撴潫鏃堕棿 */
@@ -1567,6 +1649,18 @@
userInfoIds?: string[];
}
+ interface SetTaskInfoRecommendStatusCommand {
+ /** Id */
+ ids?: string[];
+ recommendStatus?: EnumTaskRecommendStatus;
+ }
+
+ interface SetTaskInfoReleaseStatusCommand {
+ /** Id */
+ ids?: string[];
+ releaseStatus?: EnumTaskReleaseStatus;
+ }
+
interface SetUserInfoRolesCommand {
/** 鐢ㄦ埛Id */
userInfoId?: string;
@@ -1577,7 +1671,7 @@
interface SetUserInfoStatusCommand {
/** Id */
ids?: string[];
- status?: EnumUserInfoStatus;
+ status?: EnumUserStatus;
}
type SyncHumanResourcesAreaDictionaryDataCommand = Record<string, any>;
diff --git a/packages/services/apiV2/user.ts b/packages/services/apiV2/user.ts
new file mode 100644
index 0000000..a398d43
--- /dev/null
+++ b/packages/services/apiV2/user.ts
@@ -0,0 +1,81 @@
+/* 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(
+ // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟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(
+ // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟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 || {}),
+ });
+}
diff --git a/packages/services/apiV2/userInfo.ts b/packages/services/apiV2/userInfo.ts
deleted file mode 100644
index 4367d18..0000000
--- a/packages/services/apiV2/userInfo.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-/* eslint-disable */
-// @ts-ignore
-import { request } from '@/utils/request';
-
-/** 鏌ヨ杩愯惀绔敤鎴峰垎椤靛垪琛ㄦ暟鎹� POST /api/user/userInfo/getOperationUserInfos */
-export async function getOperationUserInfos(
- body: API.GetOperationUserInfosQuery,
- options?: API.RequestConfig
-) {
- return request<API.PagedListQueryResultGetOperationUserInfosQueryResultItem>(
- '/api/user/userInfo/getOperationUserInfos',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json-patch+json',
- },
- data: body,
- ...(options || {}),
- }
- );
-}
-
-/** 鏌ヨ鐢ㄦ埛瑙掕壊鍒楄〃 GET /api/user/userInfo/getUserInfoRoles */
-export async function getUserInfoRoles(
- // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
- params: API.APIgetUserInfoRolesParams,
- options?: API.RequestConfig
-) {
- return request<API.GetUserInfoRolesQueryResultItem[]>('/api/user/userInfo/getUserInfoRoles', {
- method: 'GET',
- params: {
- ...params,
- },
- ...(options || {}),
- });
-}
-
-/** 璁剧疆鐢ㄦ埛淇℃伅瑙掕壊 PUT /api/user/userInfo/setUserInfoRoles */
-export async function setUserInfoRoles(
- body: API.SetUserInfoRolesCommand,
- options?: API.RequestConfig
-) {
- return request<number>('/api/user/userInfo/setUserInfoRoles', {
- method: 'PUT',
- headers: {
- 'Content-Type': 'application/json-patch+json',
- },
- data: body,
- ...(options || {}),
- });
-}
-
-/** 璁剧疆鐢ㄦ埛淇℃伅鐘舵�� PUT /api/user/userInfo/setUserInfoStatus */
-export async function setUserInfoStatus(
- body: API.SetUserInfoStatusCommand,
- options?: API.RequestConfig
-) {
- return request<number>('/api/user/userInfo/setUserInfoStatus', {
- method: 'PUT',
- headers: {
- 'Content-Type': 'application/json-patch+json',
- },
- data: body,
- ...(options || {}),
- });
-}
diff --git a/packages/utils/area.ts b/packages/utils/area.ts
index 1732267..aa4c806 100644
--- a/packages/utils/area.ts
+++ b/packages/utils/area.ts
@@ -1,19 +1,15 @@
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);
diff --git a/types/api.d.ts b/types/api.d.ts
index 4b3ea80..ac80dc0 100644
--- a/types/api.d.ts
+++ b/types/api.d.ts
@@ -33,4 +33,20 @@
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
+ }
}
--
Gitblit v1.9.1