diff --git a/components/HiddenInfo/gwj/index.js b/components/HiddenInfo/gwj/index.js index 5873f65..4c6513e 100644 --- a/components/HiddenInfo/gwj/index.js +++ b/components/HiddenInfo/gwj/index.js @@ -33,6 +33,7 @@ function HiddenInfo(props) { }, hiddenConfirmUserCO: {}, hiddenAcceptUserCO: {}, + hiddenInspecCO: {}, hiddenSpecialList: [], hiddenExtensionList: [], }); @@ -41,7 +42,9 @@ function HiddenInfo(props) { const [afterRectificationImageFiles, setAfterRectificationImageFiles] = useState([]); const [rectificationPlanImageFiles, setRectificationPlanImageFiles] = useState([]); const [acceptImageFiles, setAcceptImageFiles] = useState([]); + const [inspectionAcceptImageFiles, setInspectionAcceptImageFiles] = useState([]); const [loading, setLoading] = useState(true); + const { getFile } = useGetFile(); const query = useGetUrlQuery(); const { loading: downloadFileLoading, downloadFile } = useDownloadFile(); @@ -72,7 +75,15 @@ function HiddenInfo(props) { const acceptImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["5"], eqForeignKey: hiddenId || query[hiddenIdKey] }); setAcceptImageFiles(acceptImageFiles); } - } + + if (info.hiddenInspecCO && Object.keys(info.hiddenInspecCO).length > 0) { + const inspectionAcceptImageFiles = await getFile({ + eqType: UPLOAD_FILE_TYPE_ENUM["146"], + eqForeignKey: info.hiddenInspecCO.foreignKey, + }); + setInspectionAcceptImageFiles(inspectionAcceptImageFiles); + } + }; const getData = async () => { request(`/hidden/hidden/${id || query[idKey]}`, "get").then((res) => { @@ -388,19 +399,27 @@ function HiddenInfo(props) { ) : null } - 安全环保验收信息 - + { + (info.hiddenInspecCO && Object.keys(info.hiddenInspecCO).length > 0) + ? ( + <> + 安全环保验收信息 + }, + ]} + /> + + ) + : null + }