feat
parent
8ee7b1e51a
commit
9ac539967c
|
|
@ -169,7 +169,7 @@ export default function StaffResumeModal({
|
|||
<Modal
|
||||
open={open}
|
||||
destroyOnHidden
|
||||
title={null}
|
||||
title={'安全评价师简历表'}
|
||||
width={860}
|
||||
loading={detailLoading}
|
||||
className="staff-resume-modal"
|
||||
|
|
@ -184,7 +184,7 @@ export default function StaffResumeModal({
|
|||
]}
|
||||
>
|
||||
<div ref={resumeRef} style={{ background: "#fff", padding: 8 }}>
|
||||
<div className="staff-resume-title">安全评价师简历表</div>
|
||||
|
||||
<table className="staff-resume-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -28,23 +28,6 @@ import {
|
|||
urlRule,
|
||||
} from "~/utils/validators";
|
||||
|
||||
/**
|
||||
* 2026-08-08 新增:业务范围在后端为 varchar(500) 的「逗号分隔字符串」(apply_business_scope),
|
||||
* 而原型要求多选交互,故在页面出入口做数组/字符串互转。
|
||||
* 不做字段名映射,仅做同名字段的值形态转换,保持前后端字段名一致。
|
||||
*/
|
||||
const splitBusinessScope = (value) => {
|
||||
if (Array.isArray(value)) return value;
|
||||
if (!value) return undefined;
|
||||
return String(value)
|
||||
.split(",")
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean);
|
||||
};
|
||||
|
||||
const joinBusinessScope = (value) =>
|
||||
Array.isArray(value) ? value.join(",") : value || undefined;
|
||||
|
||||
/**
|
||||
* 2026-08-08 联系人及电话合并/拆分工具(交互约定见下方说明):
|
||||
* 录入:单输入框,值格式「联系人/电话」,用 / 分隔。
|
||||
|
|
@ -88,11 +71,10 @@ function OrgInfoPage(props) {
|
|||
try {
|
||||
const res = await props.orgInfoGet();
|
||||
if (res?.data?.id) {
|
||||
sessionStorage.setItem("orgInfo", JSON.stringify(res.data));
|
||||
setDetail(res.data);
|
||||
form.setFieldsValue({
|
||||
...res.data,
|
||||
// 2026-08-08 业务范围回填为数组以适配多选控件
|
||||
applyBusinessScope: splitBusinessScope(res.data.applyBusinessScope),
|
||||
// 2026-08-08 联系人及电话:后端 contactName/contactPhone 两列合并为单字段展示
|
||||
contactNamePhone: mergeContactNamePhone(
|
||||
res.data.contactName,
|
||||
|
|
@ -140,8 +122,6 @@ function OrgInfoPage(props) {
|
|||
contactPhone,
|
||||
// 移除仅用于展示的合并字段,避免提交冗余
|
||||
contactNamePhone: undefined,
|
||||
// 2026-08-08 多选业务范围按后端 varchar(500) 约定以逗号拼接提交
|
||||
applyBusinessScope: joinBusinessScope(formValues.applyBusinessScope),
|
||||
infoDisclosureUrl: formValues.infoDisclosureUrl
|
||||
? normalizeUrl(formValues.infoDisclosureUrl)
|
||||
: undefined,
|
||||
|
|
@ -177,12 +157,7 @@ function OrgInfoPage(props) {
|
|||
};
|
||||
return (
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
{/* 2026-08-08 标题对齐原型 institution.html #mod-org-info(副标题按需求移除) */}
|
||||
<span>基础信息管理</span>
|
||||
</div>
|
||||
}
|
||||
title='基础信息管理'
|
||||
extra={
|
||||
hasExistingData &&
|
||||
!editing && (
|
||||
|
|
@ -196,25 +171,10 @@ function OrgInfoPage(props) {
|
|||
)
|
||||
}
|
||||
>
|
||||
{/*
|
||||
2026-08-08 布局对齐原型 institution.html:
|
||||
原型 .form-grid 为两列网格、label 在控件上方(纵向),gap 1rem。
|
||||
此处使用 antd Form layout="vertical" + Row/Col 两列还原,整行字段 span=24。
|
||||
2026-08-08 按原型 .info-card 增加带边框容器并整体居中(border-radius 8px、padding 1.25rem、maxWidth 960px 居中)。
|
||||
*/}
|
||||
<div
|
||||
style={{
|
||||
width: "94%",
|
||||
maxWidth: "100%",
|
||||
margin: "0 auto",
|
||||
border: "1px solid #e2e8f0",
|
||||
borderRadius: 8,
|
||||
padding: "1.25rem",
|
||||
background: "#fff",
|
||||
}}
|
||||
>
|
||||
|
||||
|
||||
<Form form={form} layout="vertical" disabled={!editing}>
|
||||
<Row gutter={[16, 16]}>
|
||||
<Row gutter={16}>
|
||||
{/* 2026-08-08 字段顺序严格对齐原型 institution.html 434-450 行 */}
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
|
|
@ -473,7 +433,7 @@ function OrgInfoPage(props) {
|
|||
*/}
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
name="applyBusinessScope"
|
||||
name="safetyIndustryCategoryCode"
|
||||
label="拟申请的法定安全评价业务范围"
|
||||
rules={[
|
||||
{
|
||||
|
|
@ -537,7 +497,7 @@ function OrgInfoPage(props) {
|
|||
</div>
|
||||
)}
|
||||
</Form>
|
||||
</div>
|
||||
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue