diff --git a/src/pages/Container/QualificationReview/QualPublicity/index.js b/src/pages/Container/QualificationReview/QualPublicity/index.js index 90b0464..2c255de 100644 --- a/src/pages/Container/QualificationReview/QualPublicity/index.js +++ b/src/pages/Container/QualificationReview/QualPublicity/index.js @@ -15,49 +15,23 @@ import SearchForm from "~/components/SearchForm"; import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper"; import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd"; 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 { + REVIEW_BUSINESS_SCOPE_OPTIONS, + REVIEW_UNIT_TYPE_OPTIONS, +} from "../reviewPageQuery"; 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 QualPublicity = (props) => { const [form] = Form.useForm(); - const [loading, setLoading] = useState(false); + const { qualReview, queryReviewList } = props; + const { qualReviewList, qualReviewTotal, qualReviewLoading } = qualReview || {}; const [publicityVisible, setPublicityVisible] = useState(false); const [publicityTarget, setPublicityTarget] = useState(null); const [publicityDept, setPublicityDept] = useState(undefined); @@ -65,6 +39,14 @@ const QualPublicity = (props) => { const [publicityStartDate, setPublicityStartDate] = useState(null); const [publicityEndDate, setPublicityEndDate] = useState(null); + const loadList = () => { + queryReviewList({ + ...router.query, + supervision: true, + applyTypeCode: 1, + }); + }; + const openPublicity = (record) => { setPublicityTarget(record); setPublicityDept(undefined); @@ -87,44 +69,41 @@ const QualPublicity = (props) => { setPublicityVisible(false); }; - const handleSearch = () => { - setLoading(true); - setTimeout(() => setLoading(false), 500); - }; - const handleReset = (values) => { router.query = { ...router.query, ...values, current: 1, - pageSize: 10, + size: 10, }; - handleSearch(); + loadList(); }; useEffect(() => { form.setFieldsValue(router.query); + loadList(); }, []); const columns = [ { title: "序号", - dataIndex: "id", width: 60, fixed: "left", - render: (text, record, index) => index + 1, + render: (_, __, index) => index + 1, }, - { title: "机构名称", dataIndex: "orgName", width: 220, ellipsis: true }, - { title: "机构类型", dataIndex: "orgType", width: 100 }, - { title: "证书编号", dataIndex: "certNo", width: 140, ellipsis: true }, + { title: "机构名称", dataIndex: "filingUnitName", width: 220, ellipsis: true }, + { title: "机构类型", dataIndex: "filingUnitTypeName", width: 100 }, + { title: "证书编号", dataIndex: "filingNo", width: 140, ellipsis: true }, { title: "安全评价业务范围", dataIndex: "businessScope", width: 180, ellipsis: true, render: (_, record) => { - if(Array.isArray(record.businessScope)){ - return record.businessScope.map(item => QUALIFICATION_INDUSTRY_OPTIONS_MAP[item]).join("、"); + if (Array.isArray(record.businessScope)) { + return record.businessScope + .map((item) => QUALIFICATION_INDUSTRY_OPTIONS_MAP[item] || item) + .join("、"); } return record.businessScope || "-"; }, @@ -133,11 +112,11 @@ const QualPublicity = (props) => { { title: "审核通过时间", dataIndex: "reviewTime", width: 120 }, { title: "公示状态", - dataIndex: "status", + dataIndex: "filingStatusCode", width: 100, - render: (status) => { - const config = PUBLICITY_STATUS_MAP[status]; - return config ? {config.label} : status; + render: (_, { filingStatusCode }) => { + const config = REVIEW_STATUS_MAP[filingStatusCode]; + return config ? {config.label} : "--"; }, }, { @@ -149,13 +128,11 @@ const QualPublicity = (props) => { - {record.status === "pending" && ( + {Number(record.filingStatusCode) === 1 && (