|
|
|
@ -10,6 +10,7 @@ import { UPLOAD_FILE_TYPE_ENUM } from "../../../enum/uploadFile/gwj";
|
|
|
|
import useGetFile from "../../../hooks/useGetFile";
|
|
|
|
import useGetFile from "../../../hooks/useGetFile";
|
|
|
|
import { getLabelName } from "../../../utils";
|
|
|
|
import { getLabelName } from "../../../utils";
|
|
|
|
import { HIDDEN_SOURCE_ENUM, HIDDEN_STATE_ENUM } from "../../../enum/hidden/gwj";
|
|
|
|
import { HIDDEN_SOURCE_ENUM, HIDDEN_STATE_ENUM } from "../../../enum/hidden/gwj";
|
|
|
|
|
|
|
|
import useGetUrlQuery from "../../../hooks/useGetUrlQuery";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 隐患查看组件(港务局版本)
|
|
|
|
* 隐患查看组件(港务局版本)
|
|
|
|
@ -39,29 +40,27 @@ function HiddenInfo(props) {
|
|
|
|
const [rectificationPlanImageFiles, setRectificationPlanImageFiles] = useState([]);
|
|
|
|
const [rectificationPlanImageFiles, setRectificationPlanImageFiles] = useState([]);
|
|
|
|
const [acceptImageFiles, setAcceptImageFiles] = useState([]);
|
|
|
|
const [acceptImageFiles, setAcceptImageFiles] = useState([]);
|
|
|
|
const { getFile } = useGetFile();
|
|
|
|
const { getFile } = useGetFile();
|
|
|
|
|
|
|
|
const query = useGetUrlQuery();
|
|
|
|
|
|
|
|
|
|
|
|
const getData = async () => {
|
|
|
|
const getData = async () => {
|
|
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
|
|
request(`/hidden/hidden/${id || query[idKey]}`, "get").then((res) => {
|
|
|
|
const queryId = urlParams.get(idKey);
|
|
|
|
|
|
|
|
const queryHiddenId = urlParams.get(hiddenIdKey);
|
|
|
|
|
|
|
|
request(`/hidden/hidden/${id || queryId}`, "get").then((res) => {
|
|
|
|
|
|
|
|
setInfo(res.data);
|
|
|
|
setInfo(res.data);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const hiddenImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["3"], eqForeignKey: hiddenId || queryHiddenId });
|
|
|
|
const hiddenImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["3"], eqForeignKey: hiddenId || query[hiddenIdKey] });
|
|
|
|
setHiddenImageFiles(hiddenImageFiles);
|
|
|
|
setHiddenImageFiles(hiddenImageFiles);
|
|
|
|
const hiddenVideoFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["102"], eqForeignKey: hiddenId || queryHiddenId });
|
|
|
|
const hiddenVideoFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["102"], eqForeignKey: hiddenId || query[hiddenIdKey] });
|
|
|
|
setHiddenVideoFiles(hiddenVideoFiles);
|
|
|
|
setHiddenVideoFiles(hiddenVideoFiles);
|
|
|
|
const afterRectificationImageFiles = await getFile({
|
|
|
|
const afterRectificationImageFiles = await getFile({
|
|
|
|
eqType: UPLOAD_FILE_TYPE_ENUM["4"],
|
|
|
|
eqType: UPLOAD_FILE_TYPE_ENUM["4"],
|
|
|
|
eqForeignKey: hiddenId || queryHiddenId,
|
|
|
|
eqForeignKey: hiddenId || query[hiddenIdKey],
|
|
|
|
});
|
|
|
|
});
|
|
|
|
setAfterRectificationImageFiles(afterRectificationImageFiles);
|
|
|
|
setAfterRectificationImageFiles(afterRectificationImageFiles);
|
|
|
|
const rectificationPlanImageFiles = await getFile({
|
|
|
|
const rectificationPlanImageFiles = await getFile({
|
|
|
|
eqType: UPLOAD_FILE_TYPE_ENUM["8"],
|
|
|
|
eqType: UPLOAD_FILE_TYPE_ENUM["8"],
|
|
|
|
eqForeignKey: hiddenId || queryHiddenId,
|
|
|
|
eqForeignKey: hiddenId || query[hiddenIdKey],
|
|
|
|
});
|
|
|
|
});
|
|
|
|
setRectificationPlanImageFiles(rectificationPlanImageFiles);
|
|
|
|
setRectificationPlanImageFiles(rectificationPlanImageFiles);
|
|
|
|
const acceptImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["5"], eqForeignKey: hiddenId || queryHiddenId });
|
|
|
|
const acceptImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["5"], eqForeignKey: hiddenId || query[hiddenIdKey] });
|
|
|
|
setAcceptImageFiles(acceptImageFiles);
|
|
|
|
setAcceptImageFiles(acceptImageFiles);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
|