diff --git a/src/pages/Container/QualificationReview/ExpertVerification/index.js b/src/pages/Container/QualificationReview/ExpertVerification/index.js index e44bbfd..b22e4c0 100644 --- a/src/pages/Container/QualificationReview/ExpertVerification/index.js +++ b/src/pages/Container/QualificationReview/ExpertVerification/index.js @@ -21,7 +21,8 @@ const { router } = tools; const ExpertVerification = (props) => { const [form] = Form.useForm(); const { qualReview, queryReviewList } = props; - const { qualReviewList, qualReviewTotal, qualReviewLoading } = qualReview || {}; + const { qualReviewList, qualReviewTotal, qualReviewLoading } = + qualReview || {}; const handleSearch = () => { queryReviewList({ @@ -53,10 +54,20 @@ const ExpertVerification = (props) => { fixed: "left", render: (_, __, index) => index + 1, }, - { title: "机构名称", dataIndex: "filingUnitName", width: 220, 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 }, + { + title: "安全评价业务范围", + dataIndex: "businessScope", + width: 180, + ellipsis: true, + }, { title: "确认状态", dataIndex: "filingStatusCode", @@ -73,11 +84,21 @@ const ExpertVerification = (props) => { fixed: "right", render: (_, record) => ( - {record.filingStatusCode === 2 && ( - )} @@ -94,7 +115,11 @@ const ExpertVerification = (props) => { loading={qualReviewLoading} formLine={[ - + , { ); }; -export default Connect([NS_QUAL_REVIEW], true)(AntdTableFuncControl(ExpertVerification)); +export default Connect( + [NS_QUAL_REVIEW], + true, +)(AntdTableFuncControl(ExpertVerification)); diff --git a/src/pages/Container/QualificationReview/QualPublicity/index.js b/src/pages/Container/QualificationReview/QualPublicity/index.js index df10084..3a94f9a 100644 --- a/src/pages/Container/QualificationReview/QualPublicity/index.js +++ b/src/pages/Container/QualificationReview/QualPublicity/index.js @@ -1,5 +1,15 @@ import React, { useState, useEffect } from "react"; -import { Button, Form, Select, Space, Table, Tag, Modal, Input, DatePicker } from "antd"; +import { + Button, + Form, + Select, + Space, + Table, + Tag, + Modal, + Input, + DatePicker, +} from "antd"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm"; import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper"; @@ -58,7 +68,7 @@ const QualPublicity = (props) => { setPublicityTarget(record); setPublicityDept(undefined); setPublicityContent( - "依据《安全评价机构管理规定》等相关法规,经审核,该机构符合安全评价机构资质条件,现予以公示,接受社会监督。" + "依据《安全评价机构管理规定》等相关法规,经审核,该机构符合安全评价机构资质条件,现予以公示,接受社会监督。", ); setPublicityStartDate(null); setPublicityEndDate(null); @@ -106,7 +116,12 @@ const QualPublicity = (props) => { { title: "机构名称", dataIndex: "orgName", width: 220, ellipsis: true }, { title: "机构类型", dataIndex: "orgType", width: 100 }, { title: "证书编号", dataIndex: "certNo", width: 140, ellipsis: true }, - { title: "安全评价业务范围", dataIndex: "businessScope", width: 180, ellipsis: true }, + { + title: "安全评价业务范围", + dataIndex: "businessScope", + width: 180, + ellipsis: true, + }, { title: "审核部门", dataIndex: "reviewDept", width: 120, ellipsis: true }, { title: "审核通过时间", dataIndex: "reviewTime", width: 120 }, { @@ -124,11 +139,21 @@ const QualPublicity = (props) => { fixed: "right", render: (_, record) => ( - {record.status === "pending" && ( - )} @@ -148,7 +173,11 @@ const QualPublicity = (props) => { loading={loading} formLine={[ - + , { footer={
- +
} > @@ -240,7 +271,9 @@ const QualPublicity = (props) => {
机构名称
-
{publicityTarget?.orgName || "—"}
+
+ {publicityTarget?.orgName || "—"} +
公示部门
@@ -263,9 +296,17 @@ const QualPublicity = (props) => { onChange={(e) => setPublicityContent(e.target.value)} />
-
+
-
公示开始时间
+
+ 公示开始时间 +
{ />
-
公示结束时间
+
+ 公示结束时间 +
{ + setLoading(true); + try { + const formData = searchForm.getFieldsValue(); + const res = await queryEnterprisePortraitPage({ ...formData, pageIndex: page, pageSize: size }); + setDataSource(res?.data || []); + setTotal(res?.totalCount || 0); + } + catch { + setDataSource([]); + setTotal(0); + } + finally { + setLoading(false); + } + }; useEffect(() => { - getData(); + fetchData(); }, []); const openProfile = async (id) => { @@ -60,27 +79,41 @@ function EnterprisePortraitPage() {
} > - + + , + + + , + + + , ]} - onFinish={getData} + onFinish={() => fetchData(1, 10)} + style={{ + marginBottom: '16px' + }} /> `共 ${t} 条`, + }} + onChange={(pag) => { + setPageIndex(pag.current); + setPageSize(pag.pageSize); + fetchData(pag.current, pag.pageSize); + }} + scroll={{ y: props.scrollY }} columns={[ { title: "企业名称", dataIndex: "enterpriseName", ellipsis: true }, { title: "项目按时完成", dataIndex: "projectOnTime", width: 120 }, @@ -206,4 +239,4 @@ function EnterprisePortraitPage() { ); } -export default EnterprisePortraitPage; +export default AntdTableFuncControl(EnterprisePortraitPage); diff --git a/src/pages/Container/Supervision/BasicInfo/EvaluatorInfo/index.js b/src/pages/Container/Supervision/BasicInfo/EvaluatorInfo/index.js index 30b9707..f49dcc0 100644 --- a/src/pages/Container/Supervision/BasicInfo/EvaluatorInfo/index.js +++ b/src/pages/Container/Supervision/BasicInfo/EvaluatorInfo/index.js @@ -1,10 +1,10 @@ -import { Button, Descriptions, Form, Modal, Table, Tag, Tooltip } from "antd"; +import { Button, Descriptions, Form, Modal, Tag, Tooltip, Table } from "antd"; +import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd"; import { useEffect, useState } from "react"; +import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; -import Search from "zy-react-library/components/Search"; -import TableList from "zy-react-library/components/Table"; -import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; -import useTable from "zy-react-library/hooks/useTable"; +import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm"; + import { getEvaluatorDetail, queryEvaluatorPage } from "~/mock/regulator/basicInfo"; const YES_NO_OPTIONS = [ @@ -23,17 +23,37 @@ const CERT_STATUS_COLOR = { expired: "error", }; -function EvaluatorInfoPage() { +function EvaluatorInfoPage(props) { const [searchForm] = Form.useForm(); const [viewOpen, setViewOpen] = useState(false); const [detail, setDetail] = useState(null); const [detailLoading, setDetailLoading] = useState(false); const [certPreview, setCertPreview] = useState(null); + const [dataSource, setDataSource] = useState([]); + const [total, setTotal] = useState(0); + const [loading, setLoading] = useState(false); + const [pageIndex, setPageIndex] = useState(1); + const [pageSize, setPageSize] = useState(10); - const { tableProps, getData } = useTable(queryEvaluatorPage, { form: searchForm }); + const fetchData = async (page = 1, size = 10) => { + setLoading(true); + try { + const formData = searchForm.getFieldsValue(); + const res = await queryEvaluatorPage({ ...formData, pageIndex: page, pageSize: size }); + setDataSource(res?.data || []); + setTotal(res?.totalCount || 0); + } + catch { + setDataSource([]); + setTotal(0); + } + finally { + setLoading(false); + } + }; useEffect(() => { - getData(); + fetchData(); }, []); const openDetail = async (id) => { @@ -61,34 +81,47 @@ function EvaluatorInfoPage() { } > - + + , + + + , + + + , + + + , + + + , ]} - onFinish={getData} + onFinish={() => fetchData(1, 10)} + style={{ + marginBottom: '16px' + }} /> - `共 ${t} 条`, + }} + onChange={(pag) => { + setPageIndex(pag.current); + setPageSize(pag.pageSize); + fetchData(pag.current, pag.pageSize); + }} + scroll={{ y: props.scrollY }} columns={[ { title: "机构名称", dataIndex: "orgName", ellipsis: true }, { title: "评价师名称", dataIndex: "evaluatorName", width: 120 }, @@ -209,4 +242,4 @@ function EvaluatorInfoPage() { ); } -export default EvaluatorInfoPage; +export default AntdTableFuncControl(EvaluatorInfoPage);