zy-react-library 1.0.61 → 1.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { tools } from "@cqsjjb/jjb-common-lib";
|
|
2
1
|
import { request } from "@cqsjjb/jjb-common-lib/http";
|
|
3
2
|
import { Descriptions, Divider } from "antd";
|
|
4
3
|
import dayjs from "dayjs";
|
|
@@ -12,8 +11,6 @@ import useGetFile from "../../../hooks/useGetFile";
|
|
|
12
11
|
import { getLabelName } from "../../../utils";
|
|
13
12
|
import { HIDDEN_SOURCE_ENUM, HIDDEN_STATE_ENUM } from "../../../enum/hidden/gwj";
|
|
14
13
|
|
|
15
|
-
const { query } = tools.router;
|
|
16
|
-
|
|
17
14
|
/**
|
|
18
15
|
* 隐患查看组件(港务局版本)
|
|
19
16
|
*/
|
|
@@ -44,24 +41,27 @@ function HiddenInfo(props) {
|
|
|
44
41
|
const { getFile } = useGetFile();
|
|
45
42
|
|
|
46
43
|
const getData = async () => {
|
|
47
|
-
|
|
44
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
45
|
+
const queryId = urlParams.get(idKey);
|
|
46
|
+
const queryHiddenId = urlParams.get(hiddenIdKey);
|
|
47
|
+
request(`/hidden/hidden/${id || queryId}`, "get").then((res) => {
|
|
48
48
|
setInfo(res.data);
|
|
49
49
|
});
|
|
50
|
-
const hiddenImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["3"], eqForeignKey: hiddenId ||
|
|
50
|
+
const hiddenImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["3"], eqForeignKey: hiddenId || queryHiddenId });
|
|
51
51
|
setHiddenImageFiles(hiddenImageFiles);
|
|
52
|
-
const hiddenVideoFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["102"], eqForeignKey: hiddenId ||
|
|
52
|
+
const hiddenVideoFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["102"], eqForeignKey: hiddenId || queryHiddenId });
|
|
53
53
|
setHiddenVideoFiles(hiddenVideoFiles);
|
|
54
54
|
const afterRectificationImageFiles = await getFile({
|
|
55
55
|
eqType: UPLOAD_FILE_TYPE_ENUM["4"],
|
|
56
|
-
eqForeignKey: hiddenId ||
|
|
56
|
+
eqForeignKey: hiddenId || queryHiddenId,
|
|
57
57
|
});
|
|
58
58
|
setAfterRectificationImageFiles(afterRectificationImageFiles);
|
|
59
59
|
const rectificationPlanImageFiles = await getFile({
|
|
60
60
|
eqType: UPLOAD_FILE_TYPE_ENUM["8"],
|
|
61
|
-
eqForeignKey: hiddenId ||
|
|
61
|
+
eqForeignKey: hiddenId || queryHiddenId,
|
|
62
62
|
});
|
|
63
63
|
setRectificationPlanImageFiles(rectificationPlanImageFiles);
|
|
64
|
-
const acceptImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["5"], eqForeignKey: hiddenId ||
|
|
64
|
+
const acceptImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["5"], eqForeignKey: hiddenId || queryHiddenId });
|
|
65
65
|
setAcceptImageFiles(acceptImageFiles);
|
|
66
66
|
};
|
|
67
67
|
useEffect(() => {
|