Merge remote-tracking branch 'origin/dev' into dev
commit
ad3307f863
|
|
@ -28,6 +28,7 @@
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"antd": "6.5.0",
|
"antd": "6.5.0",
|
||||||
"autofit.js": "^3.2.8",
|
"autofit.js": "^3.2.8",
|
||||||
|
"china-division": "^2.7.0",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"echarts": "^6.0.0",
|
"echarts": "^6.0.0",
|
||||||
"immer": "^11.1.4",
|
"immer": "^11.1.4",
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,9 @@ importers:
|
||||||
autofit.js:
|
autofit.js:
|
||||||
specifier: ^3.2.8
|
specifier: ^3.2.8
|
||||||
version: 3.2.8
|
version: 3.2.8
|
||||||
|
china-division:
|
||||||
|
specifier: ^2.7.0
|
||||||
|
version: 2.7.0
|
||||||
dayjs:
|
dayjs:
|
||||||
specifier: ^1.11.7
|
specifier: ^1.11.7
|
||||||
version: 1.11.21
|
version: 1.11.21
|
||||||
|
|
@ -2839,6 +2842,9 @@ packages:
|
||||||
chardet@0.4.2:
|
chardet@0.4.2:
|
||||||
resolution: {integrity: sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==}
|
resolution: {integrity: sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==}
|
||||||
|
|
||||||
|
china-division@2.7.0:
|
||||||
|
resolution: {integrity: sha512-4uUPAT+1WfqDh5jytq7omdCmHNk3j+k76zEG/2IqaGcYB90c2SwcixttcypdsZ3T/9tN1TTpBDoeZn+Yw/qBEA==}
|
||||||
|
|
||||||
chokidar@3.6.0:
|
chokidar@3.6.0:
|
||||||
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
|
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
|
||||||
engines: {node: '>= 8.10.0'}
|
engines: {node: '>= 8.10.0'}
|
||||||
|
|
@ -9664,6 +9670,8 @@ snapshots:
|
||||||
|
|
||||||
chardet@0.4.2: {}
|
chardet@0.4.2: {}
|
||||||
|
|
||||||
|
china-division@2.7.0: {}
|
||||||
|
|
||||||
chokidar@3.6.0:
|
chokidar@3.6.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
anymatch: 3.1.3
|
anymatch: 3.1.3
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
<% for (const item of $links) { %>
|
<% for (const item of $links) { %>
|
||||||
<link type="text/css" rel="stylesheet" href="<%= item %>"></link>
|
<link type="text/css" rel="stylesheet" href="<%= item %>"></link>
|
||||||
<% } %>
|
<% } %>
|
||||||
<title>大屏</title>
|
<title>注册</title>
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
const APP_ENV = {
|
const APP_ENV = {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,53 @@
|
||||||
/** 企业信息管理模块下拉选项 */
|
/** 企业信息管理模块下拉选项 */
|
||||||
|
import pcaCode from "china-division/dist/pca-code.json";
|
||||||
|
|
||||||
/** 重庆市辖区(区/县) */
|
/** 重庆市辖区(区) */
|
||||||
export const CHONGQING_DISTRICTS = [
|
export const CHONGQING_DISTRICTS = [
|
||||||
"万州区", "涪陵区", "渝中区", "大渡口区", "江北区", "沙坪坝区", "九龙坡区", "南岸区",
|
{ label: "万州区", value: "500101" },
|
||||||
"北碚区", "綦江区", "大足区", "渝北区", "巴南区", "黔江区", "长寿区", "江津区",
|
{ label: "涪陵区", value: "500102" },
|
||||||
"合川区", "永川区", "南川区", "璧山区", "铜梁区", "潼南区", "荣昌区", "开州区",
|
{ label: "渝中区", value: "500103" },
|
||||||
"梁平区", "武隆区", "城口县", "丰都县", "垫江县", "忠县", "云阳县", "奉节县",
|
{ label: "大渡口区", value: "500104" },
|
||||||
"巫山县", "巫溪县", "石柱土家族自治县", "秀山土家族苗族自治县", "酉阳土家族苗族自治县",
|
{ label: "江北区", value: "500105" },
|
||||||
"彭水苗族土家族自治县",
|
{ label: "沙坪坝区", value: "500106" },
|
||||||
].map((label) => ({ label, value: label }));
|
{ label: "九龙坡区", value: "500107" },
|
||||||
|
{ label: "南岸区", value: "500108" },
|
||||||
|
{ label: "北碚区", value: "500109" },
|
||||||
|
{ label: "綦江区", value: "500110" },
|
||||||
|
{ label: "大足区", value: "500111" },
|
||||||
|
{ label: "渝北区", value: "500112" },
|
||||||
|
{ label: "巴南区", value: "500113" },
|
||||||
|
{ label: "黔江区", value: "500114" },
|
||||||
|
{ label: "长寿区", value: "500115" },
|
||||||
|
{ label: "江津区", value: "500116" },
|
||||||
|
{ label: "合川区", value: "500117" },
|
||||||
|
{ label: "永川区", value: "500118" },
|
||||||
|
{ label: "南川区", value: "500119" },
|
||||||
|
{ label: "璧山区", value: "500120" },
|
||||||
|
{ label: "铜梁区", value: "500151" },
|
||||||
|
{ label: "潼南区", value: "500152" },
|
||||||
|
{ label: "荣昌区", value: "500153" },
|
||||||
|
{ label: "开州区", value: "500154" },
|
||||||
|
{ label: "梁平区", value: "500155" },
|
||||||
|
{ label: "武隆区", value: "500156" },
|
||||||
|
];
|
||||||
|
|
||||||
|
/** 全国县级行政区(非重庆时属地可选,已排除重庆) */
|
||||||
|
export const NATIONAL_COUNTIES = (() => {
|
||||||
|
const result = [];
|
||||||
|
pcaCode.forEach((province) => {
|
||||||
|
if (province.code === "50") return;
|
||||||
|
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;
|
||||||
|
})();
|
||||||
|
|
||||||
/** 企业状态 */
|
/** 企业状态 */
|
||||||
export const ENTERPRISE_STATUS_OPTIONS = [
|
export const ENTERPRISE_STATUS_OPTIONS = [
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import {
|
||||||
InputNumber,
|
InputNumber,
|
||||||
DatePicker,
|
DatePicker,
|
||||||
Space,
|
Space,
|
||||||
|
Radio,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import { NS_REGISTER } from "~/enumerate/namespace";
|
import { NS_REGISTER } from "~/enumerate/namespace";
|
||||||
import AttachmentUpload from "~/components/AttachmentUpload";
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
|
|
@ -34,6 +35,7 @@ import {
|
||||||
} from "~/utils/validators";
|
} from "~/utils/validators";
|
||||||
import {
|
import {
|
||||||
CHONGQING_DISTRICTS,
|
CHONGQING_DISTRICTS,
|
||||||
|
NATIONAL_COUNTIES,
|
||||||
ECONOMY_INDUSTRY_OPTIONS,
|
ECONOMY_INDUSTRY_OPTIONS,
|
||||||
ENTERPRISE_SCALE_OPTIONS,
|
ENTERPRISE_SCALE_OPTIONS,
|
||||||
ENTERPRISE_STATUS_OPTIONS,
|
ENTERPRISE_STATUS_OPTIONS,
|
||||||
|
|
@ -52,6 +54,9 @@ const RegisterMore = (props) => {
|
||||||
const [mapPickerVisible, setMapPickerVisible] = useState(false);
|
const [mapPickerVisible, setMapPickerVisible] = useState(false);
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { registerLoading, syncUserToGBSLoading } = register;
|
const { registerLoading, syncUserToGBSLoading } = register;
|
||||||
|
const isChongqing = Form.useWatch("isChongqing", form);
|
||||||
|
const districtOptions =
|
||||||
|
isChongqing === 2 ? NATIONAL_COUNTIES : CHONGQING_DISTRICTS;
|
||||||
const hasRegisterContext = Boolean(
|
const hasRegisterContext = Boolean(
|
||||||
router.query?.account && router.query?.registerUserId,
|
router.query?.account && router.query?.registerUserId,
|
||||||
);
|
);
|
||||||
|
|
@ -61,8 +66,17 @@ const RegisterMore = (props) => {
|
||||||
data: router.query?.account,
|
data: router.query?.account,
|
||||||
});
|
});
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
|
const districtCode = res.data.districtCode;
|
||||||
|
const isChongqing = districtCode
|
||||||
|
? CHONGQING_DISTRICTS.some(
|
||||||
|
(d) => d.value === districtCode || d.label === districtCode,
|
||||||
|
)
|
||||||
|
? 1
|
||||||
|
: 2
|
||||||
|
: 1;
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
...res.data,
|
...res.data,
|
||||||
|
isChongqing,
|
||||||
productionDate: res.data.productionDate
|
productionDate: res.data.productionDate
|
||||||
? dayjs(res.data.productionDate)
|
? dayjs(res.data.productionDate)
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|
@ -182,6 +196,7 @@ const RegisterMore = (props) => {
|
||||||
form={form}
|
form={form}
|
||||||
labelCol={{ span: 10 }}
|
labelCol={{ span: 10 }}
|
||||||
disabled={!hasRegisterContext}
|
disabled={!hasRegisterContext}
|
||||||
|
initialValues={{ isChongqing: 1 }}
|
||||||
>
|
>
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -236,6 +251,24 @@ const RegisterMore = (props) => {
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="safetyIndustryCategoryName" noStyle />
|
<Form.Item name="safetyIndustryCategoryName" noStyle />
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
name="isChongqing"
|
||||||
|
label="是否属于重庆"
|
||||||
|
rules={[{ required: true, message: "请选择是否属于重庆" }]}
|
||||||
|
>
|
||||||
|
<Radio.Group
|
||||||
|
options={[
|
||||||
|
{ label: "是", value: 1 },
|
||||||
|
{ label: "否", value: 2 },
|
||||||
|
]}
|
||||||
|
onChange={() => {
|
||||||
|
form.setFieldValue("districtCode", undefined);
|
||||||
|
form.setFieldValue("districtName", "");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="districtCode"
|
name="districtCode"
|
||||||
|
|
@ -243,11 +276,16 @@ const RegisterMore = (props) => {
|
||||||
rules={[{ required: true, message: "请选择属地" }]}
|
rules={[{ required: true, message: "请选择属地" }]}
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
options={CHONGQING_DISTRICTS}
|
options={districtOptions}
|
||||||
placeholder="请选择属地"
|
placeholder="请选择属地"
|
||||||
allowClear
|
allowClear
|
||||||
|
showSearch
|
||||||
|
optionFilterProp="label"
|
||||||
onChange={(value, option) => {
|
onChange={(value, option) => {
|
||||||
form.setFieldValue("districtName", option?.label || "");
|
form.setFieldValue(
|
||||||
|
"districtName",
|
||||||
|
option?.name || option?.label || "",
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue