From b93465309edbcf3de65ee7e59c3a9142a8d37ab5 Mon Sep 17 00:00:00 2001 From: tangjie <122778500@qq.com> Date: Mon, 13 Jul 2026 11:14:27 +0800 Subject: [PATCH] feat --- jjb.config.js | 2 +- .../Supervision/BasicInfo/OrgAccount/index.js | 71 +++++----- .../BasicInfo/RegisteredOrg/Detail/index.js | 117 ++++++++++++--- .../BasicInfo/RegisteredOrg/List/index.js | 14 +- src/utils/regulatorOrgInfo/index.js | 134 +++++++----------- 5 files changed, 202 insertions(+), 136 deletions(-) diff --git a/jjb.config.js b/jjb.config.js index b0e9e8b..61acb0a 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -10,7 +10,7 @@ module.exports = { javaGitBranch: "dev", // 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095) // 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095 - API_HOST: "http://192.168.0.149", + API_HOST: "https://gbs-gateway.qhdsafety.com", }, production: { // 应用后端分支名称,部署上线需要 diff --git a/src/pages/Container/Supervision/BasicInfo/OrgAccount/index.js b/src/pages/Container/Supervision/BasicInfo/OrgAccount/index.js index 1f69938..072e70f 100644 --- a/src/pages/Container/Supervision/BasicInfo/OrgAccount/index.js +++ b/src/pages/Container/Supervision/BasicInfo/OrgAccount/index.js @@ -25,7 +25,6 @@ function OrgAccountPage(props) { const [editOpen, setEditOpen] = useState(false); const [currentId, setCurrentId] = useState(null); const [detail, setDetail] = useState(null); - const [rawDetail, setRawDetail] = useState(null); const [detailLoading, setDetailLoading] = useState(false); const [editLoading, setEditLoading] = useState(false); const [dataSource, setDataSource] = useState([]); @@ -35,7 +34,19 @@ function OrgAccountPage(props) { const getData = async () => { setLoading(true); try { - const params = searchForm.getFieldsValue(); + const raw = searchForm.getFieldsValue(); + const params = { + ...raw, + state: raw.state !== "" && raw.state !== undefined ? Number(raw.state) : undefined, + ...(Array.isArray(raw.openTimeRange) && raw.openTimeRange[0] && raw.openTimeRange[1] + ? { + createTimeStart: raw.openTimeRange[0].format("YYYY-MM-DD"), + createTimeEnd: raw.openTimeRange[1].format("YYYY-MM-DD"), + } + : {}), + }; + delete params.openTimeRange; + Object.keys(params).forEach((k) => { if (params[k] === undefined) delete params[k]; }); const res = await safeListRequest(props.orgAccountList)(params); setDataSource(res?.data || []); setTotal(res?.totalCount || 0); @@ -52,7 +63,6 @@ function OrgAccountPage(props) { setDetailLoading(true); const res = await safeRequest(props.orgAccountGet, { id }); setDetail(res?.data || null); - setRawDetail(res?.raw || null); setDetailLoading(false); return res; }; @@ -76,7 +86,7 @@ function OrgAccountPage(props) { const enabled = isOrgAccountEnabled(record); Modal.confirm({ title: "确认操作", - content: enabled ? `确认禁用「${record.orgName}」账号?` : `确认启用「${record.orgName}」账号?`, + content: enabled ? `确认禁用「${record.unitName}」账号?` : `确认启用「${record.unitName}」账号?`, okText: "确认", cancelText: "取消", onOk: async () => { @@ -99,7 +109,7 @@ function OrgAccountPage(props) {

确认将 - {record.orgName} + {record.unitName} 的密码重置为初始密码?

初始密码:a123456

@@ -124,7 +134,7 @@ function OrgAccountPage(props) {

确认删除 - {record.orgName} + {record.unitName} 的账号?

此操作不可恢复,请谨慎操作。

@@ -150,14 +160,12 @@ function OrgAccountPage(props) { const res = await props.orgAccountModify({ ...values, id: currentId, - raw: rawDetail, }); setEditLoading(false); if (res?.success !== false) { message.success("保存成功"); setEditOpen(false); setCurrentId(null); - setRawDetail(null); editForm.resetFields(); await getData(); } @@ -165,8 +173,8 @@ function OrgAccountPage(props) { }; const columns = [ - { title: "机构名称", dataIndex: "orgName", ellipsis: true }, - { title: "属地", dataIndex: "district", width: 260 }, + { title: "机构名称", dataIndex: "unitName", ellipsis: true }, + { title: "属地", dataIndex: "districtName", width: 260 }, { title: "状态", width: 80, @@ -179,7 +187,7 @@ function OrgAccountPage(props) { { title: "开户时间", dataIndex: "createTime", width: 110 }, { title: "操作", - width: 320, + width: 200, fixed: "right", render: (_, record) => ( @@ -211,10 +219,10 @@ function OrgAccountPage(props) { form={searchForm} loading={loading} formLine={[ - + , - + {CHONGQING_DISTRICTS.map((opt) => ( {opt.label} @@ -222,14 +230,14 @@ function OrgAccountPage(props) { , - + {ORG_ACCOUNT_STATE_OPTIONS.map((opt) => ( {opt.label} ))} , - + , ]} onReset={() => { @@ -265,22 +273,22 @@ function OrgAccountPage(props) { loading={detailLoading} cancelText="关闭" okButtonProps={{ style: { display: "none" } }} - onCancel={() => { setViewOpen(false); setDetail(null); setRawDetail(null); }} + onCancel={() => { setViewOpen(false); setDetail(null); }} > {detail && ( - {detail.orgName} + {detail.unitName} {detail.creditCode} - {detail.regionCountyName} - {detail.safetyIndustryCategory} + {detail.districtName} + {detail.safetyIndustryCategoryName} {detail.businessAddress} - {detail.enterpriseStatus} + {detail.enterpriseStatusName} {detail.longitude}, {detail.latitude} - {detail.principal} + {detail.principalName} {detail.principalPhone} {detail.legalRepresentative} - {detail.legalRepPhone} - {detail.enterpriseScale} + {detail.legalRepresentativePhone} + {detail.enterpriseScaleName} )} @@ -296,7 +304,6 @@ function OrgAccountPage(props) { onCancel={() => { setEditOpen(false); setCurrentId(null); - setRawDetail(null); editForm.resetFields(); }} onOk={onEditSubmit} @@ -304,7 +311,7 @@ function OrgAccountPage(props) {
- + @@ -314,12 +321,12 @@ function OrgAccountPage(props) { - + @@ -329,7 +336,7 @@ function OrgAccountPage(props) { - + @@ -359,12 +366,12 @@ function OrgAccountPage(props) { - + - +