dev-tmp1
tangjie 2026-08-11 11:20:20 +08:00
parent 8ee7b1e51a
commit 9ac539967c
2 changed files with 9 additions and 49 deletions

View File

@ -169,7 +169,7 @@ export default function StaffResumeModal({
<Modal <Modal
open={open} open={open}
destroyOnHidden destroyOnHidden
title={null} title={'安全评价师简历表'}
width={860} width={860}
loading={detailLoading} loading={detailLoading}
className="staff-resume-modal" className="staff-resume-modal"
@ -184,7 +184,7 @@ export default function StaffResumeModal({
]} ]}
> >
<div ref={resumeRef} style={{ background: "#fff", padding: 8 }}> <div ref={resumeRef} style={{ background: "#fff", padding: 8 }}>
<div className="staff-resume-title">安全评价师简历表</div>
<table className="staff-resume-table"> <table className="staff-resume-table">
<tbody> <tbody>
<tr> <tr>

View File

@ -28,23 +28,6 @@ import {
urlRule, urlRule,
} from "~/utils/validators"; } 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 联系人及电话合并/拆分工具交互约定见下方说明 * 2026-08-08 联系人及电话合并/拆分工具交互约定见下方说明
* 录入单输入框值格式联系人/电话 / 分隔 * 录入单输入框值格式联系人/电话 / 分隔
@ -88,11 +71,10 @@ function OrgInfoPage(props) {
try { try {
const res = await props.orgInfoGet(); const res = await props.orgInfoGet();
if (res?.data?.id) { if (res?.data?.id) {
sessionStorage.setItem("orgInfo", JSON.stringify(res.data));
setDetail(res.data); setDetail(res.data);
form.setFieldsValue({ form.setFieldsValue({
...res.data, ...res.data,
// 2026-08-08 业务范围回填为数组以适配多选控件
applyBusinessScope: splitBusinessScope(res.data.applyBusinessScope),
// 2026-08-08 联系人及电话:后端 contactName/contactPhone 两列合并为单字段展示 // 2026-08-08 联系人及电话:后端 contactName/contactPhone 两列合并为单字段展示
contactNamePhone: mergeContactNamePhone( contactNamePhone: mergeContactNamePhone(
res.data.contactName, res.data.contactName,
@ -140,8 +122,6 @@ function OrgInfoPage(props) {
contactPhone, contactPhone,
// 移除仅用于展示的合并字段,避免提交冗余 // 移除仅用于展示的合并字段,避免提交冗余
contactNamePhone: undefined, contactNamePhone: undefined,
// 2026-08-08 多选业务范围按后端 varchar(500) 约定以逗号拼接提交
applyBusinessScope: joinBusinessScope(formValues.applyBusinessScope),
infoDisclosureUrl: formValues.infoDisclosureUrl infoDisclosureUrl: formValues.infoDisclosureUrl
? normalizeUrl(formValues.infoDisclosureUrl) ? normalizeUrl(formValues.infoDisclosureUrl)
: undefined, : undefined,
@ -177,12 +157,7 @@ function OrgInfoPage(props) {
}; };
return ( return (
<PageLayout <PageLayout
title={ title='基础信息管理'
<div>
{/* 2026-08-08 标题对齐原型 institution.html #mod-org-info副标题按需求移除 */}
<span>基础信息管理</span>
</div>
}
extra={ extra={
hasExistingData && hasExistingData &&
!editing && ( !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 8pxpadding 1.25remmaxWidth 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}> <Form form={form} layout="vertical" disabled={!editing}>
<Row gutter={[16, 16]}> <Row gutter={16}>
{/* 2026-08-08 字段顺序严格对齐原型 institution.html 434-450 行 */} {/* 2026-08-08 字段顺序严格对齐原型 institution.html 434-450 行 */}
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
@ -473,7 +433,7 @@ function OrgInfoPage(props) {
*/} */}
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
name="applyBusinessScope" name="safetyIndustryCategoryCode"
label="拟申请的法定安全评价业务范围" label="拟申请的法定安全评价业务范围"
rules={[ rules={[
{ {
@ -537,7 +497,7 @@ function OrgInfoPage(props) {
</div> </div>
)} )}
</Form> </Form>
</div>
</PageLayout> </PageLayout>
); );
} }