feat
parent
744093c82f
commit
d642995237
|
|
@ -15,49 +15,23 @@ import SearchForm from "~/components/SearchForm";
|
||||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||||
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { PUBLICITY_STATUS_MAP } from "~/enumerate/constant";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||||
|
import { REVIEW_STATUS_MAP } from "~/enumerate/constant";
|
||||||
import { QUALIFICATION_INDUSTRY_OPTIONS_MAP } from "~/enumerate/enterpriseOptions";
|
import { QUALIFICATION_INDUSTRY_OPTIONS_MAP } from "~/enumerate/enterpriseOptions";
|
||||||
|
import {
|
||||||
|
REVIEW_BUSINESS_SCOPE_OPTIONS,
|
||||||
|
REVIEW_UNIT_TYPE_OPTIONS,
|
||||||
|
} from "../reviewPageQuery";
|
||||||
|
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
|
|
||||||
const MOCK_DATA = [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
orgName: "重庆安评技术研究院有限公司",
|
|
||||||
orgType: "本地机构",
|
|
||||||
certNo: "API-2026-001",
|
|
||||||
businessScope: "化工, 石油加工",
|
|
||||||
reviewDept: "市应急管理局",
|
|
||||||
reviewTime: "2026-06-20",
|
|
||||||
status: "pending",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
orgName: "重庆恒安安全评价有限公司",
|
|
||||||
orgType: "本地机构",
|
|
||||||
certNo: "API-2025-032",
|
|
||||||
businessScope: "化工",
|
|
||||||
reviewDept: "市应急管理局",
|
|
||||||
reviewTime: "2026-05-15",
|
|
||||||
status: "published",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
orgName: "北京中安评价中心(重庆分公司)",
|
|
||||||
orgType: "异地机构",
|
|
||||||
certNo: "API-2026-015",
|
|
||||||
businessScope: "矿山, 建筑施工",
|
|
||||||
reviewDept: "市应急管理局",
|
|
||||||
reviewTime: "2026-06-18",
|
|
||||||
status: "pending",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
||||||
const QualPublicity = (props) => {
|
const QualPublicity = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [loading, setLoading] = useState(false);
|
const { qualReview, queryReviewList } = props;
|
||||||
|
const { qualReviewList, qualReviewTotal, qualReviewLoading } = qualReview || {};
|
||||||
const [publicityVisible, setPublicityVisible] = useState(false);
|
const [publicityVisible, setPublicityVisible] = useState(false);
|
||||||
const [publicityTarget, setPublicityTarget] = useState(null);
|
const [publicityTarget, setPublicityTarget] = useState(null);
|
||||||
const [publicityDept, setPublicityDept] = useState(undefined);
|
const [publicityDept, setPublicityDept] = useState(undefined);
|
||||||
|
|
@ -65,6 +39,14 @@ const QualPublicity = (props) => {
|
||||||
const [publicityStartDate, setPublicityStartDate] = useState(null);
|
const [publicityStartDate, setPublicityStartDate] = useState(null);
|
||||||
const [publicityEndDate, setPublicityEndDate] = useState(null);
|
const [publicityEndDate, setPublicityEndDate] = useState(null);
|
||||||
|
|
||||||
|
const loadList = () => {
|
||||||
|
queryReviewList({
|
||||||
|
...router.query,
|
||||||
|
supervision: true,
|
||||||
|
applyTypeCode: 1,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const openPublicity = (record) => {
|
const openPublicity = (record) => {
|
||||||
setPublicityTarget(record);
|
setPublicityTarget(record);
|
||||||
setPublicityDept(undefined);
|
setPublicityDept(undefined);
|
||||||
|
|
@ -87,36 +69,31 @@ const QualPublicity = (props) => {
|
||||||
setPublicityVisible(false);
|
setPublicityVisible(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSearch = () => {
|
|
||||||
setLoading(true);
|
|
||||||
setTimeout(() => setLoading(false), 500);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleReset = (values) => {
|
const handleReset = (values) => {
|
||||||
router.query = {
|
router.query = {
|
||||||
...router.query,
|
...router.query,
|
||||||
...values,
|
...values,
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
size: 10,
|
||||||
};
|
};
|
||||||
handleSearch();
|
loadList();
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.setFieldsValue(router.query);
|
form.setFieldsValue(router.query);
|
||||||
|
loadList();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
dataIndex: "id",
|
|
||||||
width: 60,
|
width: 60,
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
render: (text, record, index) => index + 1,
|
render: (_, __, index) => index + 1,
|
||||||
},
|
},
|
||||||
{ title: "机构名称", dataIndex: "orgName", width: 220, ellipsis: true },
|
{ title: "机构名称", dataIndex: "filingUnitName", width: 220, ellipsis: true },
|
||||||
{ title: "机构类型", dataIndex: "orgType", width: 100 },
|
{ title: "机构类型", dataIndex: "filingUnitTypeName", width: 100 },
|
||||||
{ title: "证书编号", dataIndex: "certNo", width: 140, ellipsis: true },
|
{ title: "证书编号", dataIndex: "filingNo", width: 140, ellipsis: true },
|
||||||
{
|
{
|
||||||
title: "安全评价业务范围",
|
title: "安全评价业务范围",
|
||||||
dataIndex: "businessScope",
|
dataIndex: "businessScope",
|
||||||
|
|
@ -124,7 +101,9 @@ const QualPublicity = (props) => {
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
if (Array.isArray(record.businessScope)) {
|
if (Array.isArray(record.businessScope)) {
|
||||||
return record.businessScope.map(item => QUALIFICATION_INDUSTRY_OPTIONS_MAP[item]).join("、");
|
return record.businessScope
|
||||||
|
.map((item) => QUALIFICATION_INDUSTRY_OPTIONS_MAP[item] || item)
|
||||||
|
.join("、");
|
||||||
}
|
}
|
||||||
return record.businessScope || "-";
|
return record.businessScope || "-";
|
||||||
},
|
},
|
||||||
|
|
@ -133,11 +112,11 @@ const QualPublicity = (props) => {
|
||||||
{ title: "审核通过时间", dataIndex: "reviewTime", width: 120 },
|
{ title: "审核通过时间", dataIndex: "reviewTime", width: 120 },
|
||||||
{
|
{
|
||||||
title: "公示状态",
|
title: "公示状态",
|
||||||
dataIndex: "status",
|
dataIndex: "filingStatusCode",
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (status) => {
|
render: (_, { filingStatusCode }) => {
|
||||||
const config = PUBLICITY_STATUS_MAP[status];
|
const config = REVIEW_STATUS_MAP[filingStatusCode];
|
||||||
return config ? <Tag color={config.color}>{config.label}</Tag> : status;
|
return config ? <Tag color={config.color}>{config.label}</Tag> : "--";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -149,13 +128,11 @@ const QualPublicity = (props) => {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => {
|
onClick={() => props.history.push(`FilingDetail?id=${record.id}`)}
|
||||||
// props.history.push(`FilingDetail?id=${record.id}`)
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
{record.status === "pending" && (
|
{Number(record.filingStatusCode) === 1 && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -177,48 +154,41 @@ const QualPublicity = (props) => {
|
||||||
<SearchForm
|
<SearchForm
|
||||||
style={{ marginBottom: 24 }}
|
style={{ marginBottom: 24 }}
|
||||||
form={form}
|
form={form}
|
||||||
loading={loading}
|
loading={qualReviewLoading}
|
||||||
formLine={[
|
formLine={[
|
||||||
<Form.Item key="orgName" name="orgName">
|
<Form.Item key="filingUnitName" name="filingUnitName">
|
||||||
<ControlWrapper.Input
|
<ControlWrapper.Input label="机构名称" placeholder="请输入" allowClear />
|
||||||
label="机构名称"
|
|
||||||
placeholder="请输入"
|
|
||||||
allowClear
|
|
||||||
/>
|
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item key="orgType" name="orgType">
|
<Form.Item key="filingUnitTypeName" name="filingUnitTypeName">
|
||||||
<ControlWrapper.Select
|
<ControlWrapper.Select
|
||||||
label="机构类型"
|
label="机构类型"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
>
|
options={REVIEW_UNIT_TYPE_OPTIONS}
|
||||||
<Select.Option value="本地机构">本地机构</Select.Option>
|
/>
|
||||||
<Select.Option value="异地机构">异地机构</Select.Option>
|
|
||||||
</ControlWrapper.Select>
|
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item key="businessScope" name="businessScope">
|
<Form.Item key="businessScope" name="businessScope">
|
||||||
<ControlWrapper.Select
|
<ControlWrapper.Select
|
||||||
label="安全评价业务范围"
|
label="安全评价业务范围"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
allowClear
|
allowClear
|
||||||
|
showSearch
|
||||||
|
optionFilterProp="label"
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
>
|
options={REVIEW_BUSINESS_SCOPE_OPTIONS}
|
||||||
<Select.Option value="石油加工">石油加工</Select.Option>
|
/>
|
||||||
<Select.Option value="化工">化工</Select.Option>
|
|
||||||
<Select.Option value="矿山">矿山</Select.Option>
|
|
||||||
<Select.Option value="建筑施工">建筑施工</Select.Option>
|
|
||||||
</ControlWrapper.Select>
|
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item key="status" name="status">
|
<Form.Item key="filingStatusCode" name="filingStatusCode">
|
||||||
<ControlWrapper.Select
|
<ControlWrapper.Select
|
||||||
label="公示状态"
|
label="公示状态"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
>
|
>
|
||||||
<Select.Option value="pending">待公示</Select.Option>
|
<Select.Option value={1}>审核通过</Select.Option>
|
||||||
<Select.Option value="published">已公示</Select.Option>
|
<Select.Option value={2}>审核中</Select.Option>
|
||||||
|
<Select.Option value={3}>打回</Select.Option>
|
||||||
</ControlWrapper.Select>
|
</ControlWrapper.Select>
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
]}
|
]}
|
||||||
|
|
@ -228,32 +198,32 @@ const QualPublicity = (props) => {
|
||||||
...router.query,
|
...router.query,
|
||||||
...values,
|
...values,
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
size: 10,
|
||||||
};
|
};
|
||||||
handleSearch();
|
loadList();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={MOCK_DATA}
|
dataSource={Array.isArray(qualReviewList) ? qualReviewList : []}
|
||||||
scroll={{ y: props.scrollY }}
|
scroll={{ y: props.scrollY }}
|
||||||
loading={loading}
|
loading={qualReviewLoading}
|
||||||
pagination={{
|
pagination={{
|
||||||
total: MOCK_DATA.length,
|
total: qualReviewTotal,
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
current: router.query.current,
|
current: router.query.current || 1,
|
||||||
pageSize: router.query.pageSize,
|
pageSize: router.query.size || 10,
|
||||||
onChange: (page, pageSize) => {
|
onChange: (page, pageSize) => {
|
||||||
router.query = {
|
router.query = {
|
||||||
...router.query,
|
...router.query,
|
||||||
current: page,
|
current: page,
|
||||||
pageSize,
|
size: pageSize,
|
||||||
};
|
};
|
||||||
handleSearch();
|
loadList();
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -279,7 +249,7 @@ const QualPublicity = (props) => {
|
||||||
<div>
|
<div>
|
||||||
<div style={{ fontSize: "0.8rem", marginBottom: 4 }}>机构名称</div>
|
<div style={{ fontSize: "0.8rem", marginBottom: 4 }}>机构名称</div>
|
||||||
<div style={{ fontSize: "0.88rem", fontWeight: 500 }}>
|
<div style={{ fontSize: "0.88rem", fontWeight: 500 }}>
|
||||||
{publicityTarget?.orgName || "—"}
|
{publicityTarget?.filingUnitName || "-"}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -339,4 +309,4 @@ const QualPublicity = (props) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AntdTableFuncControl(QualPublicity);
|
export default Connect([NS_QUAL_REVIEW], true)(AntdTableFuncControl(QualPublicity));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue