dev_1.0.1
tangjie 2026-06-30 18:30:30 +08:00
parent 51bea3ca02
commit 62db095eb5
12 changed files with 229 additions and 119 deletions

View File

@ -63,10 +63,16 @@ function EquipInfoPage(props) {
}; };
return ( return (
<PageLayout title="装备信息管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>装备信息管理</span>
<div className="pageLayout-extra">
实现对评价机构内装备信息的维护管理 实现对评价机构内装备信息的维护管理
</p> </div>
</div>
}
>
<Search <Search
form={searchForm} form={searchForm}
options={[ options={[

View File

@ -150,7 +150,16 @@ function OrgInfoPage(props) {
return ( return (
<PageLayout <PageLayout
title="机构信息管理" title={
<div>
<span>机构信息管理</span>
<div
className="pageLayout-extra"
>
新成立或首次使用系统的安全评价机构可通过系统提供的引导页面详细填写机构的基本信息
</div>
</div>
}
extra={ extra={
hasExistingData && hasExistingData &&
!editing && ( !editing && (
@ -484,7 +493,10 @@ function OrgInfoPage(props) {
<Upload <Upload
maxCount={5} maxCount={5}
onPreview={(file) => { onPreview={(file) => {
const isImage = /\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(file.name || file.url || ""); const isImage =
/\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(
file.name || file.url || "",
);
if (isImage) { if (isImage) {
setPreviewImage(file.url || file.thumbUrl); setPreviewImage(file.url || file.thumbUrl);
} else { } else {

View File

@ -138,10 +138,16 @@ function PersonnelChangePage(props) {
} }
return ( return (
<PageLayout title="人员变更管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>人员变更管理</span>
<div className="pageLayout-extra">
机构管理员在人员信息管理页面进行相应的修改操作 机构管理员在人员信息管理页面进行相应的修改操作
</p> </div>
</div>
}
>
<Search <Search
form={searchForm} form={searchForm}
options={[ options={[

View File

@ -110,10 +110,16 @@ function PersonnelInfoPage(props) {
}; };
return ( return (
<PageLayout title="人员信息管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>人员信息管理</span>
<div className="pageLayout-extra">
机构管理员在系统中为本机构的人员进行信息录入包括姓名性别身份证号出生日期等 机构管理员在系统中为本机构的人员进行信息录入包括姓名性别身份证号出生日期等
</p> </div>
</div>
}
>
<Search <Search
form={searchForm} form={searchForm}
options={[ options={[

View File

@ -1,39 +1,66 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Descriptions, Form, message, Modal, Space } from "antd"; import { Button, Descriptions, Form, message, Modal, Table, Upload } from "antd";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder"; import FormBuilder from "zy-react-library/components/FormBuilder";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import PreviewImg from "zy-react-library/components/PreviewImg"; import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
import Search from "zy-react-library/components/Search"; import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
import Table from "zy-react-library/components/Table"; import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
import Upload from "zy-react-library/components/Upload"; import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
import { tools } from "@cqsjjb/jjb-common-lib";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetFile from "zy-react-library/hooks/useGetFile"; import useGetFile from "zy-react-library/hooks/useGetFile";
import useTable from "zy-react-library/hooks/useTable";
import CertPreviewImg, { CertTooltipPreviewImg } from "~/components/CertPreviewImg"; import CertPreviewImg, { CertTooltipPreviewImg } from "~/components/CertPreviewImg";
import { NS_ORG_QUALIFICATION_CERT } from "~/enumerate/namespace"; import { NS_ORG_QUALIFICATION_CERT } from "~/enumerate/namespace";
import { QUALIFICATION_INDUSTRY_OPTIONS } from "~/enumerate/enterpriseOptions"; import { QUALIFICATION_INDUSTRY_OPTIONS } from "~/enumerate/enterpriseOptions";
import { formSelectField } from "~/utils/enterpriseForm"; import { formSelectField } from "~/utils/enterpriseForm";
import { isQualificationEnabled } from "~/api/enterpriseInfo/adapter"; import { isQualificationEnabled } from "~/api/enterpriseInfo/adapter";
import { safeGetFiles, safeListRequest, safeRequest } from "~/utils"; import { safeGetFiles, safeRequest } from "~/utils";
import { toDayjs } from "~/utils/dateFormat"; import { toDayjs } from "~/utils/dateFormat";
import { mockUploadFileList, resolveUploadFileId } from "~/utils/mockUpload"; import { mockUploadFileList, resolveUploadFileId } from "~/utils/mockUpload";
import { dateRangeRule } from "~/utils/validators"; import { dateRangeRule } from "~/utils/validators";
const { router } = tools;
function QualificationCertPage(props) { function QualificationCertPage(props) {
const [addModalOpen, setAddModalOpen] = useState(false); const [addModalOpen, setAddModalOpen] = useState(false);
const [viewModalOpen, setViewModalOpen] = useState(false); const [viewModalOpen, setViewModalOpen] = useState(false);
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [form] = Form.useForm(); const [form] = Form.useForm();
const { tableProps, getData } = useTable(safeListRequest(props.orgQualificationCertList), { const [loading, setLoading] = useState(false);
form, const [dataSource, setDataSource] = useState([]);
transform: (formData) => ({ const [total, setTotal] = useState(0);
...formData,
geValidStartDate: formData.validDate?.[0], const getData = async () => {
leValidEndDate: formData.validDate?.[1], setLoading(true);
}), try {
}); const params = {
...router.query,
current: router.query.current || 1,
pageSize: router.query.pageSize || 10,
};
const res = await props.orgQualificationCertList(params);
if (res?.success !== false) {
setDataSource(res?.data?.records || res?.data || []);
setTotal(res?.data?.total || 0);
}
} catch (err) {
console.warn("[QualificationCert] list failed:", err);
} finally {
setLoading(false);
}
};
const handleReset = (values) => {
router.query = { ...router.query, ...values, current: 1, pageSize: 10 };
getData();
};
useEffect(() => {
form.setFieldsValue(router.query);
getData();
}, []);
const onDelete = (id) => { const onDelete = (id) => {
Modal.confirm({ Modal.confirm({
@ -62,8 +89,7 @@ function QualificationCertPage(props) {
if (res?.success !== false) { if (res?.success !== false) {
message.success("操作成功"); message.success("操作成功");
await getData(); await getData();
} } else {
else {
message.error(res?.message || "操作失败"); message.error(res?.message || "操作失败");
} }
}, },
@ -81,8 +107,7 @@ function QualificationCertPage(props) {
if (res?.success !== false) { if (res?.success !== false) {
message.success("操作成功"); message.success("操作成功");
await getData(); await getData();
} } else {
else {
message.error(res?.message || "操作失败"); message.error(res?.message || "操作失败");
} }
}, },
@ -90,25 +115,41 @@ function QualificationCertPage(props) {
}; };
return ( return (
<PageLayout title="安全评价资质证书管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>安全评价资质证书管理</span>
<div className="pageLayout-extra">
机构需将自身拥有的安全评价资质证书信息录入系统包括资质等级发证机关发证日期有效期等 机构需将自身拥有的安全评价资质证书信息录入系统包括资质等级发证机关发证日期有效期等
</p> </div>
<Search </div>
}
>
<SearchForm
style={{ marginBottom: 24 }}
form={form} form={form}
options={[ loading={loading}
{ name: "likeCertName", label: "证书名称", placeholder: "请输入证书名称" }, formLine={[
{ <Form.Item key="likeCertName" name="likeCertName">
name: "validDate", <ControlWrapper.Input label="证书名称" placeholder="请输入证书名称" allowClear />
label: "证书有效期", </Form.Item>,
render: FORM_ITEM_RENDER_ENUM.DATE_RANGE, <Form.Item key="validDate" name="validDate">
}, <ControlWrapper.DatePicker.RangePicker label="证书有效期" />
</Form.Item>,
]} ]}
onFinish={getData} onReset={handleReset}
onFinish={(values) => {
router.query = {
...router.query,
...values,
current: 1,
pageSize: 10,
};
getData();
}}
/> />
<Table
{...tableProps} <div style={{ marginBottom: 16, display: "flex", justifyContent: "flex-end" }}>
toolBarRender={() => (
<Button <Button
type="primary" type="primary"
icon={<AddIcon />} icon={<AddIcon />}
@ -119,7 +160,10 @@ function QualificationCertPage(props) {
> >
新增证书 新增证书
</Button> </Button>
)} </div>
<Table
rowKey="id"
columns={[ columns={[
{ title: "证照类别", dataIndex: "certType" }, { title: "证照类别", dataIndex: "certType" },
{ title: "证书名称", dataIndex: "certName" }, { title: "证书名称", dataIndex: "certName" },
@ -137,17 +181,15 @@ function QualificationCertPage(props) {
{ {
title: "照片", title: "照片",
width: 100, width: 100,
render: (_, record) => ( render: (_, record) =>
record.certImgFiles?.length record.certImgFiles?.length ? <CertTooltipPreviewImg files={record.certImgFiles} /> : <span></span>,
? <CertTooltipPreviewImg files={record.certImgFiles} />
: <span></span>
),
}, },
{ {
title: "操作", title: "操作",
width: 260, width: 200,
fixed: "right",
render: (_, record) => ( render: (_, record) => (
<Space> <TableAction>
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
@ -178,10 +220,25 @@ function QualificationCertPage(props) {
启用 启用
</Button> </Button>
)} )}
</Space> </TableAction>
), ),
}, },
]} ]}
dataSource={dataSource}
scroll={{ y: props.scrollY }}
loading={loading}
pagination={{
total,
showSizeChanger: true,
showQuickJumper: true,
showTotal: (t) => `${t}`,
current: router.query.current || 1,
pageSize: router.query.pageSize || 10,
onChange: (page, pageSize) => {
router.query = { ...router.query, current: page, pageSize };
getData();
},
}}
/> />
{addModalOpen && ( {addModalOpen && (
@ -259,11 +316,9 @@ function CertFormModal({
if (!cancelled && files.length) { if (!cancelled && files.length) {
form.setFieldValue("certImgs", files); form.setFieldValue("certImgs", files);
} }
} } catch (err) {
catch (err) {
console.warn("[QualificationCert] load detail failed:", err); console.warn("[QualificationCert] load detail failed:", err);
} } finally {
finally {
if (!cancelled) { if (!cancelled) {
setDetailLoading(false); setDetailLoading(false);
} }
@ -295,8 +350,7 @@ function CertFormModal({
handleCancel(); handleCancel();
onSuccess(); onSuccess();
} }
} } finally {
finally {
setSubmitting(false); setSubmitting(false);
} }
}; };
@ -363,11 +417,7 @@ function CertFormModal({
name: "certImgs", name: "certImgs",
label: "证书图片", label: "证书图片",
rules: [{ required: true, message: "请上传证书图片" }], rules: [{ required: true, message: "请上传证书图片" }],
render: ( render: <Upload maxCount={3} />,
<Upload
maxCount={3}
/>
),
}, },
]} ]}
labelCol={{ span: 8 }} labelCol={{ span: 8 }}
@ -407,11 +457,9 @@ function CertViewModal({ open, currentId, requestDetails, onCancel }) {
if (!cancelled && files.length) { if (!cancelled && files.length) {
setInfo((prev) => ({ ...prev, certImgs: files })); setInfo((prev) => ({ ...prev, certImgs: files }));
} }
} } catch (err) {
catch (err) {
console.warn("[QualificationCert] load view failed:", err); console.warn("[QualificationCert] load view failed:", err);
} } finally {
finally {
if (!cancelled) { if (!cancelled) {
setDetailLoading(false); setDetailLoading(false);
} }
@ -452,4 +500,4 @@ function CertViewModal({ open, currentId, requestDetails, onCancel }) {
); );
} }
export default Connect([NS_ORG_QUALIFICATION_CERT], true)(QualificationCertPage); export default Connect([NS_ORG_QUALIFICATION_CERT], true)(AntdTableFuncControl(QualificationCertPage));

View File

@ -49,10 +49,16 @@ function ResignationApplyPage(props) {
}, []); }, []);
return ( return (
<PageLayout title="离职申请管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>离职申请管理</span>
<div className="pageLayout-extra">
机构管理员在人员信息管理页面进行相应的修改操作 机构管理员在人员信息管理页面进行相应的修改操作
</p> </div>
</div>
}
>
<Search <Search
form={searchForm} form={searchForm}
options={[ options={[

View File

@ -26,7 +26,7 @@ function EnterpriseInfo(props) {
} }
if (!ctx?.hasOrg && !onOrgInfoPage) { if (!ctx?.hasOrg && !onOrgInfoPage) {
message.warning("请先完善机构信息"); message.warning("请先完善机构信息");
window.location.replace(ORG_INFO_PAGE_PATH); //window.location.replace(ORG_INFO_PAGE_PATH);
return; return;
} }
setChecking(false); setChecking(false);

View File

@ -50,10 +50,16 @@ function EnterprisePortraitPage() {
}; };
return ( return (
<PageLayout title="企业画像管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>企业画像管理</span>
<div className="pageLayout-extra">
监管端查看企业安全能力画像与综合评级当前为 Mock 数据 监管端查看企业安全能力画像与综合评级当前为 Mock 数据
</p> </div>
</div>
}
>
<Search <Search
form={searchForm} form={searchForm}
options={[ options={[

View File

@ -51,10 +51,16 @@ function EvaluatorInfoPage() {
}; };
return ( return (
<PageLayout title="评价师信息管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>评价师信息管理</span>
<div className="pageLayout-extra">
监管端查看辖区内评价师备案及资质状态当前为 Mock 数据 监管端查看辖区内评价师备案及资质状态当前为 Mock 数据
</p> </div>
</div>
}
>
<Search <Search
form={searchForm} form={searchForm}
options={[ options={[

View File

@ -163,10 +163,16 @@ function OrgAccountPage(props) {
}; };
return ( return (
<PageLayout title="评价机构账号管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>评价机构账号管理</span>
<div className="pageLayout-extra">
监管端维护评价机构开户账号 监管端维护评价机构开户账号
</p> </div>
</div>
}
>
<Search <Search
form={searchForm} form={searchForm}
values={SEARCH_DEFAULT_VALUES} values={SEARCH_DEFAULT_VALUES}

View File

@ -45,10 +45,16 @@ function RegisteredOrgListPage(props) {
}; };
return ( return (
<PageLayout title="已备案机构管理"> <PageLayout
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}> title={
<div>
<span>已备案机构管理</span>
<div className="pageLayout-extra">
监管端查看已备案评价机构及备案详情 监管端查看已备案评价机构及备案详情
</p> </div>
</div>
}
>
<Search <Search
form={searchForm} form={searchForm}
values={SEARCH_DEFAULT_VALUES} values={SEARCH_DEFAULT_VALUES}

View File

@ -1,6 +1,8 @@
.pageLayout-extra { .pageLayout-extra {
margin: 0px 0px 24px;
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
font-size: 14px;
font-weight: 400;
} }
.micro-temp-modal-body { .micro-temp-modal-body {
max-height: 630px; max-height: 630px;