HiddenInfo补全 安全环保验收信息

master
LiuJiaNan 2025-11-19 17:38:25 +08:00
parent 90ec073f01
commit dee87f2e6d
1 changed files with 33 additions and 14 deletions

View File

@ -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)
? (
<>
<Divider orientation="left">安全环保验收信息</Divider>
<Descriptions
bordered
column={1}
labelStyle={{ width: 200 }}
items={[
{ label: "验收人", children: "todo" },
{ label: "验收时间", children: "todo" },
{ label: "是否合格", children: "todo" },
{ label: "验收描述", children: "todo" },
{ label: "验收图片", children: "todo" },
{ label: "验收人", children: info.hiddenInspecCO.finalCheckOr },
{ label: "验收时间", children: info.hiddenInspecCO.finalCheckTime },
{ label: "是否合格", children: info.hiddenInspecCO.finalCheck === 1 ? "合格" : "不合格" },
{ label: "验收描述", children: info.hiddenInspecCO.finalCheckDesc },
{ label: "验收图片", children: <PreviewImg files={inspectionAcceptImageFiles} /> },
]}
/>
</>
)
: null
}
</div>
</Spin>
</div>