dev_1.2
tangjie 2026-07-31 14:38:29 +08:00
parent 8c34e650d2
commit 7faefe27eb
4 changed files with 985 additions and 985 deletions

View File

@ -29,6 +29,7 @@
"@rc-component/motion": "^1.0.0",
"@rc-component/util": "^1.11.1",
"antd": "^5.29.2",
"china-division": "^2.7.0",
"dayjs": "^1.11.7",
"echarts": "^6.1.0",
"history": "^4.10.1",

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,4 @@
import pcaCode from "china-division/dist/pca-code.json";
/**
* 全局常量定义
*/
@ -461,4 +462,22 @@ export const ROLE_DEFINITIONS = [
export const ROLE_DEFINITIONS_MAP = ROLE_DEFINITIONS.reduce((acc, cur) => {
acc[cur.value] = cur.name;
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;
})();

View File

@ -17,9 +17,9 @@ import BaiduMapPicker from "~/components/BaiduMapPicker";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import { NATIONAL_COUNTIES } from "~/enumerate/constant";
import {
CHONGQING_DISTRICTS,
ENTERPRISE_SCALE_OPTIONS,
ENTERPRISE_STATUS_OPTIONS,
REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS,
@ -218,9 +218,11 @@ function OrgInfoPage(props) {
rules={[{ required: true, message: "请选择属地" }]}
>
<Select
options={CHONGQING_DISTRICTS}
options={NATIONAL_COUNTIES}
placeholder="请选择属地"
allowClear
showSearch
optionFilterProp="label"
onChange={(value, option) => {
form.setFieldValue("districtName", option?.label || "");
}}