feat
parent
51bea3ca02
commit
62db095eb5
|
|
@ -63,10 +63,16 @@ function EquipInfoPage(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<PageLayout title="装备信息管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>装备信息管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
实现对评价机构内装备信息的维护管理。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Search
|
||||
form={searchForm}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -150,7 +150,16 @@ function OrgInfoPage(props) {
|
|||
|
||||
return (
|
||||
<PageLayout
|
||||
title="机构信息管理"
|
||||
title={
|
||||
<div>
|
||||
<span>机构信息管理</span>
|
||||
<div
|
||||
className="pageLayout-extra"
|
||||
>
|
||||
新成立或首次使用系统的安全评价机构,可通过系统提供的引导页面,详细填写机构的基本信息。
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
extra={
|
||||
hasExistingData &&
|
||||
!editing && (
|
||||
|
|
@ -484,7 +493,10 @@ function OrgInfoPage(props) {
|
|||
<Upload
|
||||
maxCount={5}
|
||||
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) {
|
||||
setPreviewImage(file.url || file.thumbUrl);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -138,10 +138,16 @@ function PersonnelChangePage(props) {
|
|||
}
|
||||
|
||||
return (
|
||||
<PageLayout title="人员变更管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>人员变更管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
机构管理员在人员信息管理页面进行相应的修改操作
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Search
|
||||
form={searchForm}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -110,10 +110,16 @@ function PersonnelInfoPage(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<PageLayout title="人员信息管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>人员信息管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
机构管理员在系统中为本机构的人员进行信息录入,包括姓名、性别、身份证号、出生日期等。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Search
|
||||
form={searchForm}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -1,39 +1,66 @@
|
|||
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 FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import Upload from "zy-react-library/components/Upload";
|
||||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
||||
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 useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import CertPreviewImg, { CertTooltipPreviewImg } from "~/components/CertPreviewImg";
|
||||
import { NS_ORG_QUALIFICATION_CERT } from "~/enumerate/namespace";
|
||||
import { QUALIFICATION_INDUSTRY_OPTIONS } from "~/enumerate/enterpriseOptions";
|
||||
import { formSelectField } from "~/utils/enterpriseForm";
|
||||
import { isQualificationEnabled } from "~/api/enterpriseInfo/adapter";
|
||||
import { safeGetFiles, safeListRequest, safeRequest } from "~/utils";
|
||||
import { safeGetFiles, safeRequest } from "~/utils";
|
||||
import { toDayjs } from "~/utils/dateFormat";
|
||||
import { mockUploadFileList, resolveUploadFileId } from "~/utils/mockUpload";
|
||||
import { dateRangeRule } from "~/utils/validators";
|
||||
|
||||
const { router } = tools;
|
||||
|
||||
function QualificationCertPage(props) {
|
||||
const [addModalOpen, setAddModalOpen] = useState(false);
|
||||
const [viewModalOpen, setViewModalOpen] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(safeListRequest(props.orgQualificationCertList), {
|
||||
form,
|
||||
transform: (formData) => ({
|
||||
...formData,
|
||||
geValidStartDate: formData.validDate?.[0],
|
||||
leValidEndDate: formData.validDate?.[1],
|
||||
}),
|
||||
});
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [dataSource, setDataSource] = useState([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
|
||||
const getData = async () => {
|
||||
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) => {
|
||||
Modal.confirm({
|
||||
|
|
@ -62,8 +89,7 @@ function QualificationCertPage(props) {
|
|||
if (res?.success !== false) {
|
||||
message.success("操作成功");
|
||||
await getData();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
message.error(res?.message || "操作失败");
|
||||
}
|
||||
},
|
||||
|
|
@ -81,8 +107,7 @@ function QualificationCertPage(props) {
|
|||
if (res?.success !== false) {
|
||||
message.success("操作成功");
|
||||
await getData();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
message.error(res?.message || "操作失败");
|
||||
}
|
||||
},
|
||||
|
|
@ -90,25 +115,41 @@ function QualificationCertPage(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<PageLayout title="安全评价资质证书管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>安全评价资质证书管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
机构需将自身拥有的安全评价资质证书信息录入系统,包括资质等级、发证机关、发证日期、有效期等。
|
||||
</p>
|
||||
<Search
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<SearchForm
|
||||
style={{ marginBottom: 24 }}
|
||||
form={form}
|
||||
options={[
|
||||
{ name: "likeCertName", label: "证书名称", placeholder: "请输入证书名称" },
|
||||
{
|
||||
name: "validDate",
|
||||
label: "证书有效期",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE_RANGE,
|
||||
},
|
||||
loading={loading}
|
||||
formLine={[
|
||||
<Form.Item key="likeCertName" name="likeCertName">
|
||||
<ControlWrapper.Input label="证书名称" placeholder="请输入证书名称" allowClear />
|
||||
</Form.Item>,
|
||||
<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}
|
||||
toolBarRender={() => (
|
||||
|
||||
<div style={{ marginBottom: 16, display: "flex", justifyContent: "flex-end" }}>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<AddIcon />}
|
||||
|
|
@ -119,7 +160,10 @@ function QualificationCertPage(props) {
|
|||
>
|
||||
新增证书
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Table
|
||||
rowKey="id"
|
||||
columns={[
|
||||
{ title: "证照类别", dataIndex: "certType" },
|
||||
{ title: "证书名称", dataIndex: "certName" },
|
||||
|
|
@ -137,17 +181,15 @@ function QualificationCertPage(props) {
|
|||
{
|
||||
title: "照片",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
record.certImgFiles?.length
|
||||
? <CertTooltipPreviewImg files={record.certImgFiles} />
|
||||
: <span>无</span>
|
||||
),
|
||||
render: (_, record) =>
|
||||
record.certImgFiles?.length ? <CertTooltipPreviewImg files={record.certImgFiles} /> : <span>无</span>,
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 260,
|
||||
width: 200,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<TableAction>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -178,10 +220,25 @@ function QualificationCertPage(props) {
|
|||
启用
|
||||
</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 && (
|
||||
|
|
@ -259,11 +316,9 @@ function CertFormModal({
|
|||
if (!cancelled && files.length) {
|
||||
form.setFieldValue("certImgs", files);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
} catch (err) {
|
||||
console.warn("[QualificationCert] load detail failed:", err);
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
if (!cancelled) {
|
||||
setDetailLoading(false);
|
||||
}
|
||||
|
|
@ -295,8 +350,7 @@ function CertFormModal({
|
|||
handleCancel();
|
||||
onSuccess();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
setSubmitting(false);
|
||||
}
|
||||
};
|
||||
|
|
@ -363,11 +417,7 @@ function CertFormModal({
|
|||
name: "certImgs",
|
||||
label: "证书图片",
|
||||
rules: [{ required: true, message: "请上传证书图片" }],
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={3}
|
||||
/>
|
||||
),
|
||||
render: <Upload maxCount={3} />,
|
||||
},
|
||||
]}
|
||||
labelCol={{ span: 8 }}
|
||||
|
|
@ -407,11 +457,9 @@ function CertViewModal({ open, currentId, requestDetails, onCancel }) {
|
|||
if (!cancelled && files.length) {
|
||||
setInfo((prev) => ({ ...prev, certImgs: files }));
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
} catch (err) {
|
||||
console.warn("[QualificationCert] load view failed:", err);
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
if (!cancelled) {
|
||||
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));
|
||||
|
|
|
|||
|
|
@ -49,10 +49,16 @@ function ResignationApplyPage(props) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<PageLayout title="离职申请管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>离职申请管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
机构管理员在人员信息管理页面进行相应的修改操作
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Search
|
||||
form={searchForm}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ function EnterpriseInfo(props) {
|
|||
}
|
||||
if (!ctx?.hasOrg && !onOrgInfoPage) {
|
||||
message.warning("请先完善机构信息");
|
||||
window.location.replace(ORG_INFO_PAGE_PATH);
|
||||
//window.location.replace(ORG_INFO_PAGE_PATH);
|
||||
return;
|
||||
}
|
||||
setChecking(false);
|
||||
|
|
|
|||
|
|
@ -50,10 +50,16 @@ function EnterprisePortraitPage() {
|
|||
};
|
||||
|
||||
return (
|
||||
<PageLayout title="企业画像管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>企业画像管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
监管端查看企业安全能力画像与综合评级(当前为 Mock 数据)。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Search
|
||||
form={searchForm}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -51,10 +51,16 @@ function EvaluatorInfoPage() {
|
|||
};
|
||||
|
||||
return (
|
||||
<PageLayout title="评价师信息管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>评价师信息管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
监管端查看辖区内评价师备案及资质状态(当前为 Mock 数据)。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Search
|
||||
form={searchForm}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -163,10 +163,16 @@ function OrgAccountPage(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<PageLayout title="评价机构账号管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>评价机构账号管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
监管端维护评价机构开户账号。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Search
|
||||
form={searchForm}
|
||||
values={SEARCH_DEFAULT_VALUES}
|
||||
|
|
|
|||
|
|
@ -45,10 +45,16 @@ function RegisteredOrgListPage(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<PageLayout title="已备案机构管理">
|
||||
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||
<PageLayout
|
||||
title={
|
||||
<div>
|
||||
<span>已备案机构管理</span>
|
||||
<div className="pageLayout-extra">
|
||||
监管端查看已备案评价机构及备案详情。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Search
|
||||
form={searchForm}
|
||||
values={SEARCH_DEFAULT_VALUES}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,19 @@
|
|||
.pageLayout-extra{
|
||||
margin: 0px 0px 24px;
|
||||
.pageLayout-extra {
|
||||
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.micro-temp-modal-body{
|
||||
.micro-temp-modal-body {
|
||||
max-height: 630px;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
body{
|
||||
body {
|
||||
height: 100%;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.micro-temp-layout-container .micro-temp-lay-container-bottom{
|
||||
.micro-temp-layout-container .micro-temp-lay-container-bottom {
|
||||
padding: 10px 24px !important;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
|
|
|||
Loading…
Reference in New Issue