feat
parent
8c34e650d2
commit
7faefe27eb
|
|
@ -29,6 +29,7 @@
|
||||||
"@rc-component/motion": "^1.0.0",
|
"@rc-component/motion": "^1.0.0",
|
||||||
"@rc-component/util": "^1.11.1",
|
"@rc-component/util": "^1.11.1",
|
||||||
"antd": "^5.29.2",
|
"antd": "^5.29.2",
|
||||||
|
"china-division": "^2.7.0",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"echarts": "^6.1.0",
|
"echarts": "^6.1.0",
|
||||||
"history": "^4.10.1",
|
"history": "^4.10.1",
|
||||||
|
|
|
||||||
1942
pnpm-lock.yaml
1942
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -1,3 +1,4 @@
|
||||||
|
import pcaCode from "china-division/dist/pca-code.json";
|
||||||
/**
|
/**
|
||||||
* 全局常量定义
|
* 全局常量定义
|
||||||
*/
|
*/
|
||||||
|
|
@ -462,3 +463,21 @@ export const ROLE_DEFINITIONS_MAP = ROLE_DEFINITIONS.reduce((acc, cur) => {
|
||||||
acc[cur.value] = cur.name;
|
acc[cur.value] = cur.name;
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
|
|
||||||
|
export const NATIONAL_COUNTIES = (() => {
|
||||||
|
const result = [];
|
||||||
|
pcaCode.forEach((province) => {
|
||||||
|
|
||||||
|
province.children?.forEach((city) => {
|
||||||
|
city.children?.forEach((county) => {
|
||||||
|
result.push({
|
||||||
|
label: `${province.name}/${city.name}/${county.name}`,
|
||||||
|
value: county.code,
|
||||||
|
name: county.name,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
})();
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@ import BaiduMapPicker from "~/components/BaiduMapPicker";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
|
import { NATIONAL_COUNTIES } from "~/enumerate/constant";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CHONGQING_DISTRICTS,
|
|
||||||
ENTERPRISE_SCALE_OPTIONS,
|
ENTERPRISE_SCALE_OPTIONS,
|
||||||
ENTERPRISE_STATUS_OPTIONS,
|
ENTERPRISE_STATUS_OPTIONS,
|
||||||
REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS,
|
REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS,
|
||||||
|
|
@ -218,9 +218,11 @@ function OrgInfoPage(props) {
|
||||||
rules={[{ required: true, message: "请选择属地" }]}
|
rules={[{ required: true, message: "请选择属地" }]}
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
options={CHONGQING_DISTRICTS}
|
options={NATIONAL_COUNTIES}
|
||||||
placeholder="请选择属地"
|
placeholder="请选择属地"
|
||||||
allowClear
|
allowClear
|
||||||
|
showSearch
|
||||||
|
optionFilterProp="label"
|
||||||
onChange={(value, option) => {
|
onChange={(value, option) => {
|
||||||
form.setFieldValue("districtName", option?.label || "");
|
form.setFieldValue("districtName", option?.label || "");
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue