zy-react-library 1.1.2 → 1.1.4

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.
Files changed (72) hide show
  1. package/components/Cascader/Area/index.js +1 -20
  2. package/components/Cascader/Basic/index.js +1 -57
  3. package/components/Cascader/Dictionary/index.js +1 -42
  4. package/components/Cascader/Industry/index.js +1 -21
  5. package/components/Editor/index.js +1 -82
  6. package/components/FormBuilder/FormBuilder.js +1 -97
  7. package/components/FormBuilder/FormItemsRenderer.js +1 -589
  8. package/components/FormBuilder/index.js +1 -5
  9. package/components/HeaderBack/index.js +1 -44
  10. package/components/HiddenInfo/gwj/index.js +1 -586
  11. package/components/Icon/AddIcon/index.js +1 -9
  12. package/components/Icon/BackIcon/index.js +1 -9
  13. package/components/Icon/DeleteIcon/index.js +1 -9
  14. package/components/Icon/DownloadIcon/index.js +1 -9
  15. package/components/Icon/EditIcon/index.js +1 -9
  16. package/components/Icon/ExportIcon/index.js +1 -9
  17. package/components/Icon/ImportIcon/index.js +1 -9
  18. package/components/Icon/LocationIcon/index.js +1 -9
  19. package/components/Icon/PrintIcon/index.js +1 -9
  20. package/components/Icon/ResetIcon/index.js +1 -9
  21. package/components/Icon/SearchIcon/index.js +1 -9
  22. package/components/Icon/VideoIcon/index.js +1 -9
  23. package/components/Icon/ViewIcon/index.js +1 -9
  24. package/components/ImportFile/index.js +1 -94
  25. package/components/LeftTree/Area/index.js +1 -15
  26. package/components/LeftTree/Basic/index.js +1 -160
  27. package/components/LeftTree/Department/Gwj/index.js +1 -29
  28. package/components/LeftTree/Dictionary/index.js +1 -42
  29. package/components/Map/MapSelector.js +1 -280
  30. package/components/Map/index.js +1 -90
  31. package/components/Page/index.js +1 -59
  32. package/components/Pdf/index.js +1 -136
  33. package/components/PreviewImg/index.js +1 -26
  34. package/components/PreviewPdf/index.js +1 -78
  35. package/components/Search/index.js +1 -147
  36. package/components/Select/Basic/index.js +1 -70
  37. package/components/Select/Dictionary/index.js +1 -42
  38. package/components/Select/Personnel/Gwj/index.js +1 -45
  39. package/components/SelectCreate/index.js +1 -48
  40. package/components/SelectTree/Area/index.js +1 -20
  41. package/components/SelectTree/Basic/index.js +1 -105
  42. package/components/SelectTree/Department/Gwj/index.js +1 -40
  43. package/components/SelectTree/Dictionary/index.js +1 -42
  44. package/components/SelectTree/HiddenLevel/Gwj/index.js +1 -70
  45. package/components/SelectTree/HiddenPart/Gwj/index.js +1 -36
  46. package/components/SelectTree/Industry/index.js +1 -21
  47. package/components/Signature/index.js +1 -100
  48. package/components/Table/index.js +1 -77
  49. package/components/TooltipPreviewImg/index.js +1 -28
  50. package/components/Upload/index.js +1 -229
  51. package/components/Video/AliPlayer.js +1 -182
  52. package/components/Video/index.js +1 -71
  53. package/enum/dictionary/index.js +1 -9
  54. package/enum/formItemRender/index.js +1 -39
  55. package/enum/hidden/gwj/index.js +1 -70
  56. package/enum/uploadFile/gwj/index.js +1 -258
  57. package/hooks/useDeleteFile/index.js +1 -95
  58. package/hooks/useDictionary/index.js +1 -64
  59. package/hooks/useDownloadBlob/index.js +1 -80
  60. package/hooks/useDownloadFile/index.js +1 -78
  61. package/hooks/useGetFile/index.js +1 -74
  62. package/hooks/useGetUrlQuery/index.js +1 -15
  63. package/hooks/useGetUserInfo/index.js +1 -42
  64. package/hooks/useIdle/index.js +1 -65
  65. package/hooks/useImportFile/index.js +1 -61
  66. package/hooks/useIsExistenceDuplicateSelection/index.js +1 -27
  67. package/hooks/useTable/index.js +1 -124
  68. package/hooks/useUploadFile/index.js +1 -144
  69. package/hooks/useUrlQueryCriteria/index.js +1 -84
  70. package/package.json +5 -1
  71. package/regular/index.js +1 -56
  72. package/utils/index.js +1 -591
@@ -1,586 +1 @@
1
- import { request } from '@cqsjjb/jjb-common-lib/http';
2
- import { Spin, Divider, Descriptions, Space, Button } from 'antd';
3
- import dayjs from 'dayjs';
4
- import { useState, useEffect } from 'react';
5
- import { HIDDEN_SOURCE_ENUM, HIDDEN_STATE_ENUM, HIDDEN_RECTIFICATION_TYPE_ENUM } from '../../../enum/hidden/gwj/index.js';
6
- import { UPLOAD_FILE_TYPE_ENUM } from '../../../enum/uploadFile/gwj/index.js';
7
- import useDownloadFile from '../../../hooks/useDownloadFile/index.js';
8
- import useGetFile from '../../../hooks/useGetFile/index.js';
9
- import useGetUrlQuery from '../../../hooks/useGetUrlQuery/index.js';
10
- import { getLabelName, getFileSuffix, getFileName } from '../../../utils/index.js';
11
- import VideoIcon from '../../Icon/VideoIcon/index.js';
12
- import PreviewImg from '../../PreviewImg/index.js';
13
- import PreviewPdf from '../../PreviewPdf/index.js';
14
- import Video from '../../Video/index.js';
15
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
16
-
17
- function HiddenInfo(props) {
18
- const {
19
- id = "",
20
- idKey = "id",
21
- hiddenId = "",
22
- hiddenIdKey = "hiddenId",
23
- history = false,
24
- onGetData
25
- } = props;
26
- const [info, setInfo] = useState({
27
- hiddenUserPresetsCO: {},
28
- hiddenRectifyUserCO: [],
29
- hiddenConfirmUserCO: [],
30
- hiddenAcceptUserCO: [],
31
- hiddenInspecCO: {},
32
- hiddenSpecialList: [],
33
- hiddenExtensionList: []
34
- });
35
- const [hiddenImageFiles, setHiddenImageFiles] = useState([]);
36
- const [hiddenVideoFiles, setHiddenVideoFiles] = useState([]);
37
- const [afterRectificationImageFiles, setAfterRectificationImageFiles] = useState([]);
38
- const [rectificationPlanImageFiles, setRectificationPlanImageFiles] = useState([]);
39
- const [acceptImageFiles, setAcceptImageFiles] = useState([]);
40
- const [inspectionAcceptImageFiles, setInspectionAcceptImageFiles] = useState([]);
41
- const [loading, setLoading] = useState(true);
42
- const [videoModalOpen, setVideoModalOpen] = useState(false);
43
- const {
44
- getFile
45
- } = useGetFile();
46
- const query = useGetUrlQuery();
47
- const {
48
- loading: downloadFileLoading,
49
- downloadFile
50
- } = useDownloadFile();
51
- const getFileData = async info => {
52
- const hiddenImageFiles = await getFile({
53
- eqType: UPLOAD_FILE_TYPE_ENUM["3"],
54
- eqForeignKey: hiddenId || query[hiddenIdKey]
55
- });
56
- setHiddenImageFiles(hiddenImageFiles);
57
- const hiddenVideoFiles = await getFile({
58
- eqType: UPLOAD_FILE_TYPE_ENUM["102"],
59
- eqForeignKey: hiddenId || query[hiddenIdKey]
60
- });
61
- setHiddenVideoFiles(hiddenVideoFiles);
62
- if (info.hiddenRectifyUserCO && info.hiddenRectifyUserCO.length > 0) {
63
- for (let i = 0; i < info.hiddenRectifyUserCO.length; i++) {
64
- if (info.hiddenRectifyUserCO[i].hiddenUserId) {
65
- const afterRectificationImageFiles = await getFile({
66
- eqType: UPLOAD_FILE_TYPE_ENUM["4"],
67
- eqForeignKey: info.hiddenRectifyUserCO[i].hiddenUserId
68
- });
69
- setAfterRectificationImageFiles(prevState => [...prevState, afterRectificationImageFiles]);
70
- }
71
- if (info.hiddenRectifyUserCO[i].isRectificationScheme === 1 && info.hiddenRectifyUserCO[i].hiddenSchemeCO && Object.keys(info.hiddenRectifyUserCO[i].hiddenSchemeCO).length > 0) {
72
- if (info.hiddenRectifyUserCO[i].hiddenSchemeCO.hiddenSchemeId) {
73
- const rectificationPlanImageFiles = await getFile({
74
- eqType: UPLOAD_FILE_TYPE_ENUM["8"],
75
- eqForeignKey: info.hiddenRectifyUserCO[i].hiddenSchemeCO.hiddenSchemeId
76
- });
77
- setRectificationPlanImageFiles(prevState => [...prevState, rectificationPlanImageFiles]);
78
- }
79
- }
80
- }
81
- }
82
- if (info.isQualified === 1 && info.hiddenAcceptUserCO && info.hiddenAcceptUserCO.length > 0) {
83
- for (let i = 0; i < info.hiddenAcceptUserCO.length; i++) {
84
- const acceptImageFiles = await getFile({
85
- eqType: UPLOAD_FILE_TYPE_ENUM["5"],
86
- eqForeignKey: hiddenId || query[hiddenIdKey]
87
- });
88
- setAcceptImageFiles(prevState => [...prevState, acceptImageFiles]);
89
- }
90
- }
91
- if (info.hiddenInspecCO && Object.keys(info.hiddenInspecCO).length > 0) {
92
- const inspectionAcceptImageFiles = await getFile({
93
- eqType: UPLOAD_FILE_TYPE_ENUM["146"],
94
- eqForeignKey: hiddenId || query[hiddenIdKey]
95
- });
96
- setInspectionAcceptImageFiles(inspectionAcceptImageFiles);
97
- }
98
- };
99
- const getData = async () => {
100
- request(!history ? `/hidden/hidden/${id || query[idKey]}` : `/hidden/hidden/history/${id || query[idKey]}`, "get").then(res => {
101
- setInfo(res.data);
102
- getFileData(res.data);
103
- setLoading(false);
104
- onGetData?.(res.data);
105
- });
106
- };
107
- useEffect(() => {
108
- getData();
109
- }, [props.id, props.hiddenId]);
110
- return /*#__PURE__*/jsxs("div", {
111
- children: [/*#__PURE__*/jsxs(Spin, {
112
- spinning: loading || downloadFileLoading,
113
- children: [/*#__PURE__*/jsx(Divider, {
114
- orientation: "left",
115
- children: "\u9690\u60A3\u4FE1\u606F"
116
- }), /*#__PURE__*/jsx(Descriptions, {
117
- bordered: true,
118
- column: 1,
119
- styles: {
120
- label: {
121
- width: 200
122
- }
123
- },
124
- items: [{
125
- label: "隐患来源",
126
- children: getLabelName({
127
- list: HIDDEN_SOURCE_ENUM,
128
- status: info.source
129
- })
130
- }, {
131
- label: "隐患类型",
132
- children: info.hiddenTypeName
133
- }, {
134
- label: "隐患级别",
135
- children: info.hiddenLevelName
136
- }, {
137
- label: "隐患状态",
138
- children: getLabelName({
139
- list: HIDDEN_STATE_ENUM,
140
- status: info.state
141
- })
142
- }, {
143
- label: "隐患描述",
144
- children: info.hiddenDesc
145
- }, ...(info.hiddenPartName ? [{
146
- label: "隐患部位",
147
- children: info.hiddenPartName
148
- }] : []), ...((info.source === 2 || info.source === 3) && info.hiddenCheckListCO && Object.keys(info.hiddenCheckListCO).length > 0 ? [{
149
- label: "风险点(单元)",
150
- children: info.hiddenCheckListCO.listRiskPoints
151
- }, {
152
- label: "辨识部位",
153
- children: info.hiddenCheckListCO.identifiedLocations
154
- }, {
155
- label: "存在风险",
156
- children: info.hiddenCheckListCO.existingRisks
157
- }, {
158
- label: "风险分级",
159
- children: info.hiddenCheckListCO.riskLevel
160
- }, {
161
- label: "隐患清单",
162
- children: info.hiddenCheckListCO.listName
163
- }, {
164
- label: "检查内容",
165
- children: info.hiddenCheckListCO.inspectionContent
166
- }] : []), ...(info.longitude ? [{
167
- label: "隐患上报位置(经纬度)",
168
- children: [info.longitude && `经度:${info.longitude}`, info.latitude && `纬度:${info.latitude}`].filter(Boolean).join(" ")
169
- }] : []), ...(info.positionDesc ? [{
170
- label: "隐患位置描述",
171
- children: info.positionDesc
172
- }] : []), {
173
- label: "隐患发现人",
174
- children: info.creatorName
175
- }, {
176
- label: "隐患发现时间",
177
- children: dayjs(info.hiddenFindTime).format("YYYY-MM-DD HH:mm:ss")
178
- }, {
179
- label: "整改类型",
180
- children: getLabelName({
181
- list: HIDDEN_RECTIFICATION_TYPE_ENUM,
182
- status: info.rectificationType
183
- })
184
- }, {
185
- label: "是否相关方",
186
- children: getLabelName({
187
- list: [{
188
- bianma: "1",
189
- name: "是"
190
- }, {
191
- bianma: "0",
192
- name: "否"
193
- }],
194
- status: info.isRelated
195
- })
196
- }, ...(info.isRelated === 1 ? [{
197
- label: "相关方项目",
198
- children: info.projectName
199
- }] : []), {
200
- label: "隐患图片",
201
- children: /*#__PURE__*/jsx(PreviewImg, {
202
- files: hiddenImageFiles
203
- })
204
- }, ...(hiddenVideoFiles.length > 0 ? [{
205
- label: "隐患视频",
206
- children: /*#__PURE__*/jsx(VideoIcon, {
207
- onClick: () => {
208
- setVideoModalOpen(true);
209
- }
210
- })
211
- }] : [])]
212
- }), info.hiddenUserPresetsCO && Object.keys(info.hiddenUserPresetsCO).length > 0 && /*#__PURE__*/jsxs(Fragment, {
213
- children: [/*#__PURE__*/jsx(Divider, {
214
- orientation: "left",
215
- children: "\u6574\u6539\u4FE1\u606F\uFF08\u53D1\u73B0\u4EBA\u9884\u586B\uFF09"
216
- }), /*#__PURE__*/jsx(Descriptions, {
217
- bordered: true,
218
- column: 1,
219
- styles: {
220
- label: {
221
- width: 200
222
- }
223
- },
224
- items: [{
225
- label: `整改${info.isRelated === 1 ? "单位" : "部门"}`,
226
- children: info.hiddenUserPresetsCO.rectifyDeptName
227
- }, {
228
- label: "整改人",
229
- children: info.hiddenUserPresetsCO.rectifyUserName
230
- }, ...(info.rectificationType === 2 ? [{
231
- label: "整改期限",
232
- children: dayjs(info.hiddenUserPresetsCO.rectifyDeadline).format("YYYY-MM-DD")
233
- }] : []), ...(info.rectificationType === 1 ? [{
234
- label: "验收部门",
235
- children: info.hiddenUserPresetsCO.checkDeptName
236
- }, {
237
- label: "验收人",
238
- children: info.hiddenUserPresetsCO.checkUserName
239
- }] : [])]
240
- })]
241
- }), info.hiddenConfirmUserCO && info.hiddenConfirmUserCO.length > 0 && /*#__PURE__*/jsxs(Fragment, {
242
- children: [/*#__PURE__*/jsx(Divider, {
243
- orientation: "left",
244
- children: "\u9690\u60A3\u786E\u8BA4"
245
- }), info.hiddenConfirmUserCO.map(item => /*#__PURE__*/jsx(Descriptions, {
246
- bordered: true,
247
- column: 1,
248
- styles: {
249
- label: {
250
- width: 200
251
- }
252
- },
253
- items: [...(item.hiddenLevelName ? [{
254
- label: "隐患级别",
255
- children: item.hiddenLevelName
256
- }] : []), ...(item.userName ? [{
257
- label: "隐患确认人",
258
- children: item.userName
259
- }] : []), ...(item.rectificationTime ? [{
260
- label: "隐患确认时间",
261
- children: item.rectificationTime
262
- }] : []), ...(item.rectifyDeptName ? [{
263
- label: `整改${info.isRelated === 1 ? "单位" : "部门"}`,
264
- children: item.rectifyDeptName
265
- }] : []), ...(item.rectifyUserName ? [{
266
- label: "整改人",
267
- children: item.rectifyUserName
268
- }] : []), ...(item.rectificationDeadline ? [{
269
- label: "整改完成期限",
270
- children: item.rectificationDeadline
271
- }] : []), ...(item.checkDeptName ? [{
272
- label: "验收部门",
273
- children: item.checkDeptName
274
- }] : []), ...(item.checkUserName ? [{
275
- label: "验收人",
276
- children: item.checkUserName
277
- }] : []), ...(item.repulseCause ? [...(item.repulseCause ? [{
278
- label: "打回意见",
279
- children: item.repulseCause
280
- }] : []), ...(item.rectificationTime ? [{
281
- label: "打回时间",
282
- children: item.rectificationTime
283
- }] : [])] : [])]
284
- }, item.id))]
285
- }), info.hiddenExtensionList && info.hiddenExtensionList.length > 0 && /*#__PURE__*/jsxs(Fragment, {
286
- children: [/*#__PURE__*/jsx(Divider, {
287
- orientation: "left",
288
- children: "\u5EF6\u671F\u4FE1\u606F"
289
- }), info.hiddenExtensionList.map(item => /*#__PURE__*/jsx(Descriptions, {
290
- bordered: true,
291
- column: 1,
292
- styles: {
293
- label: {
294
- width: 200
295
- }
296
- },
297
- items: [...(item.createTime ? [{
298
- label: "申请延期日期",
299
- children: item.createTime
300
- }] : []), ...(item.delayTime ? [{
301
- label: "延期日期",
302
- children: item.delayTime
303
- }] : []), ...(item.updateName ? [{
304
- label: "审核人",
305
- children: item.updateName
306
- }] : []), ...(item.state === 3 ? [...(item.disposalPlan ? [{
307
- label: "处置方案",
308
- children: item.disposalPlan
309
- }] : []), ...(item.disposalFile ? [{
310
- label: "处置方案附件",
311
- children: getFileSuffix(item.disposalFile) === "pdf" ? /*#__PURE__*/jsx(PreviewPdf, {
312
- name: getFileName(item.disposalFile),
313
- url: item.disposalFile
314
- }) : /*#__PURE__*/jsxs(Space, {
315
- children: [/*#__PURE__*/jsx("span", {
316
- children: getFileName(item.disposalFile)
317
- }), /*#__PURE__*/jsx(Button, {
318
- type: "primary",
319
- size: "small",
320
- onClick: () => downloadFile(item.disposalFile),
321
- children: "\u4E0B\u8F7D"
322
- })]
323
- })
324
- }] : [])] : []), {
325
- label: "延期审核状态",
326
- children: /*#__PURE__*/jsxs(Fragment, {
327
- children: [item.state === 1 && /*#__PURE__*/jsx("span", {
328
- children: "\u5F85\u5BA1\u6838"
329
- }), item.state === 2 && /*#__PURE__*/jsx("span", {
330
- children: "\u5BA1\u6279\u4E2D"
331
- }), item.state === 3 && /*#__PURE__*/jsx("span", {
332
- children: "\u5DF2\u901A\u8FC7"
333
- }), item.state === 4 && /*#__PURE__*/jsx("span", {
334
- children: "\u5DF2\u62D2\u7EDD"
335
- }), item.state === 5 && /*#__PURE__*/jsx("span", {
336
- children: "\u5DF2\u64A4\u56DE"
337
- })]
338
- })
339
- }, ...(item.state === 3 || item.state === 4 ? [{
340
- label: "延期审核时间",
341
- children: item.updateTime
342
- }] : [])]
343
- }, item.id))]
344
- }), info.hiddenSpecialList && info.hiddenSpecialList.length > 0 && /*#__PURE__*/jsxs(Fragment, {
345
- children: [/*#__PURE__*/jsx(Divider, {
346
- orientation: "left",
347
- children: "\u7279\u6B8A\u5904\u7F6E\u5BA1\u6838\u4FE1\u606F"
348
- }), info.hiddenSpecialList.map(item => /*#__PURE__*/jsx(Descriptions, {
349
- bordered: true,
350
- column: 1,
351
- styles: {
352
- label: {
353
- width: 200
354
- }
355
- },
356
- items: [...(item.state === 3 || item.state === 4 ? [...(item.updateName ? [{
357
- label: "审核人",
358
- children: item.updateName
359
- }] : []), ...(item.updateTime ? [{
360
- label: "审核时间",
361
- children: item.updateTime
362
- }] : [])] : []), {
363
- label: "无法整改原因",
364
- children: item.examine
365
- }, ...(item.state === 3 ? [...(item.disposalPlan ? [{
366
- label: "处置方案",
367
- children: item.disposalPlan
368
- }] : []), ...(item.disposalFile ? [{
369
- label: "处置方案附件",
370
- children: getFileSuffix(item.disposalFile) === "pdf" ? /*#__PURE__*/jsx(PreviewPdf, {
371
- name: getFileName(item.disposalFile),
372
- url: item.disposalFile
373
- }) : /*#__PURE__*/jsxs(Space, {
374
- children: [/*#__PURE__*/jsx("span", {
375
- children: getFileName(item.disposalFile)
376
- }), /*#__PURE__*/jsx(Button, {
377
- type: "primary",
378
- size: "small",
379
- onClick: () => downloadFile(item.disposalFile),
380
- children: "\u4E0B\u8F7D"
381
- })]
382
- })
383
- }] : []), {
384
- label: "是否更换整改负责人",
385
- children: item.rectifyUserCO && Object.keys(item.rectifyUserCO).length > 0 ? "是" : "否"
386
- }, ...(item.rectifyUserCO && Object.keys(item.rectifyUserCO).length > 0 ? [{
387
- label: "整改负责人",
388
- children: item.rectifyUserCO.userName
389
- }] : [])] : []), {
390
- label: "特殊处置审核状态",
391
- children: /*#__PURE__*/jsxs(Fragment, {
392
- children: [item.state === 1 && /*#__PURE__*/jsx("span", {
393
- children: "\u5F85\u5BA1\u6838"
394
- }), item.state === 2 && /*#__PURE__*/jsx("span", {
395
- children: "\u5BA1\u6279\u4E2D"
396
- }), item.state === 3 && /*#__PURE__*/jsx("span", {
397
- children: "\u5DF2\u901A\u8FC7"
398
- }), item.state === 4 && /*#__PURE__*/jsx("span", {
399
- children: "\u5DF2\u62D2\u7EDD"
400
- }), item.state === 5 && /*#__PURE__*/jsx("span", {
401
- children: "\u5DF2\u64A4\u56DE"
402
- })]
403
- })
404
- }]
405
- }, item.id))]
406
- }), info.hiddenRectifyUserCO && info.hiddenRectifyUserCO.length > 0 && /*#__PURE__*/jsxs(Fragment, {
407
- children: [/*#__PURE__*/jsx(Divider, {
408
- orientation: "left",
409
- children: "\u6574\u6539\u4FE1\u606F"
410
- }), info.hiddenRectifyUserCO.map((item, index) => /*#__PURE__*/jsx(Descriptions, {
411
- bordered: true,
412
- column: 1,
413
- styles: {
414
- label: {
415
- width: 200
416
- }
417
- },
418
- items: [...(item.deptName ? [{
419
- label: `整改${info.isRelated === 1 ? "单位" : "部门"}`,
420
- children: item.deptName
421
- }] : []), ...(item.userName ? [{
422
- label: "整改人",
423
- children: item.userName
424
- }] : []), ...(item.rectificationTime ? [{
425
- label: "整改时间",
426
- children: item.rectificationTime
427
- }] : []), ...(item.descr ? [{
428
- label: "整改描述",
429
- children: item.descr
430
- }] : []), ...(item.investmentFunds ? [{
431
- label: "投入资金",
432
- children: `${item.investmentFunds}元`
433
- }] : []), ...(info.tempSafeMeasure ? [{
434
- label: "临时安全措施",
435
- children: info.tempSafeMeasure
436
- }] : []), {
437
- label: "整改后图片",
438
- children: /*#__PURE__*/jsx(PreviewImg, {
439
- files: afterRectificationImageFiles[index]
440
- })
441
- }, {
442
- label: "整改方案",
443
- children: /*#__PURE__*/jsxs(Fragment, {
444
- children: [item.isRectificationScheme === 0 && /*#__PURE__*/jsx("span", {
445
- children: "\u65E0"
446
- }), item.isRectificationScheme === 1 && /*#__PURE__*/jsx("span", {
447
- children: "\u6709"
448
- })]
449
- })
450
- }, ...(item.isRectificationScheme === 1 && item.hiddenSchemeCO && Object.keys(item.hiddenSchemeCO).length > 0 ? [{
451
- label: "治理标准",
452
- children: item.hiddenSchemeCO.governStanDards
453
- }, {
454
- label: "治理方法",
455
- children: item.hiddenSchemeCO.governMethod
456
- }, {
457
- label: "经费落实",
458
- children: item.hiddenSchemeCO.expenditure
459
- }, {
460
- label: "负责人员",
461
- children: item.hiddenSchemeCO.principal
462
- }, {
463
- label: "工时安排",
464
- children: item.hiddenSchemeCO.programming
465
- }, {
466
- label: "时限要求",
467
- children: item.hiddenSchemeCO.timeLimitFor
468
- }, {
469
- label: "工作要求",
470
- children: item.hiddenSchemeCO.jobRequireMent
471
- }, {
472
- label: "其他事项",
473
- children: item.hiddenSchemeCO.otherBusiness
474
- }, {
475
- label: "方案图片",
476
- children: /*#__PURE__*/jsx(PreviewImg, {
477
- files: rectificationPlanImageFiles[index]
478
- })
479
- }] : [])]
480
- }, item.id))]
481
- }), info.hiddenAcceptUserCO && info.hiddenAcceptUserCO.length > 0 ? info.isQualified === 1 ? /*#__PURE__*/jsxs(Fragment, {
482
- children: [/*#__PURE__*/jsx(Divider, {
483
- orientation: "left",
484
- children: "\u9A8C\u6536\u4FE1\u606F"
485
- }), info.hiddenAcceptUserCO.map((item, index) => /*#__PURE__*/jsx(Descriptions, {
486
- bordered: true,
487
- column: 1,
488
- styles: {
489
- label: {
490
- width: 200
491
- }
492
- },
493
- items: [{
494
- label: "验收部门",
495
- children: item.deptName
496
- }, {
497
- label: "验收人",
498
- children: item.userName
499
- }, {
500
- label: "验收时间",
501
- children: item.rectificationTime
502
- }, ...(item.repulseCause ? [{
503
- label: "验收打回意见",
504
- children: item.repulseCause
505
- }] : []), {
506
- label: "是否合格",
507
- children: item.rectificationTime ? "合格" : ""
508
- }, ...(item.descr ? [{
509
- label: "验收描述",
510
- children: item.descr
511
- }] : []), ...(acceptImageFiles[index] && acceptImageFiles[index].length > 0 ? [{
512
- label: "验收图片",
513
- children: /*#__PURE__*/jsx(PreviewImg, {
514
- files: acceptImageFiles[index]
515
- })
516
- }] : [])]
517
- }, item.id))]
518
- }) : /*#__PURE__*/jsxs(Fragment, {
519
- children: [/*#__PURE__*/jsx(Divider, {
520
- orientation: "left",
521
- children: "\u9A8C\u6536\u6253\u56DE\u4FE1\u606F"
522
- }), info.hiddenAcceptUserCO.map(item => /*#__PURE__*/jsx(Descriptions, {
523
- bordered: true,
524
- column: 1,
525
- styles: {
526
- label: {
527
- width: 200
528
- }
529
- },
530
- items: [{
531
- label: "验收部门",
532
- children: item.deptName
533
- }, {
534
- label: "验收人",
535
- children: item.userName
536
- }, {
537
- label: "验收时间",
538
- children: item.rectificationTime
539
- }, {
540
- label: "验收打回意见",
541
- children: item.repulseCause
542
- }]
543
- }, item.id))]
544
- }) : null, info.hiddenInspecCO && Object.keys(info.hiddenInspecCO).length > 0 ? /*#__PURE__*/jsxs(Fragment, {
545
- children: [/*#__PURE__*/jsx(Divider, {
546
- orientation: "left",
547
- children: "\u5B89\u5168\u73AF\u4FDD\u9A8C\u6536\u4FE1\u606F"
548
- }), /*#__PURE__*/jsx(Descriptions, {
549
- bordered: true,
550
- column: 1,
551
- styles: {
552
- label: {
553
- width: 200
554
- }
555
- },
556
- items: [{
557
- label: "验收人",
558
- children: info.hiddenInspecCO.finalCheckOr
559
- }, {
560
- label: "验收时间",
561
- children: info.hiddenInspecCO.finalCheckTime
562
- }, {
563
- label: "是否合格",
564
- children: info.hiddenInspecCO.finalCheck === 1 ? "合格" : "不合格"
565
- }, {
566
- label: "验收描述",
567
- children: info.hiddenInspecCO.finalCheckDesc
568
- }, {
569
- label: "验收图片",
570
- children: /*#__PURE__*/jsx(PreviewImg, {
571
- files: inspectionAcceptImageFiles
572
- })
573
- }]
574
- })]
575
- }) : null]
576
- }), videoModalOpen && /*#__PURE__*/jsx(Video, {
577
- visible: videoModalOpen,
578
- source: hiddenVideoFiles[0].url,
579
- onCancel: () => setVideoModalOpen(false),
580
- title: "\u9690\u60A3\u89C6\u9891"
581
- })]
582
- });
583
- }
584
- HiddenInfo.displayName = "HiddenInfo";
585
-
586
- export { HiddenInfo as default };
1
+ import{request as e}from"@cqsjjb/jjb-common-lib/http";import{Spin as i,Divider as d,Descriptions as l,Space as n,Button as t}from"antd";import r from"dayjs";import{useState as a,useEffect as c}from"react";import{HIDDEN_SOURCE_ENUM as s,HIDDEN_STATE_ENUM as h,HIDDEN_RECTIFICATION_TYPE_ENUM as o}from"../../../enum/hidden/gwj/index.js";import{UPLOAD_FILE_TYPE_ENUM as m}from"../../../enum/uploadFile/gwj/index.js";import p from"../../../hooks/useDownloadFile/index.js";import f from"../../../hooks/useGetFile/index.js";import b from"../../../hooks/useGetUrlQuery/index.js";import{getLabelName as C,getFileSuffix as O,getFileName as u}from"../../../utils/index.js";import y from"../../Icon/VideoIcon/index.js";import U from"../../PreviewImg/index.js";import g from"../../PreviewPdf/index.js";import N from"../../Video/index.js";import{jsxs as k,jsx as j,Fragment as T}from"react/jsx-runtime";function F(F){const{id:S="",idKey:R="id",hiddenId:I="",hiddenIdKey:A="hiddenId",history:L=!1,onGetData:w}=F,[D,q]=a({hiddenUserPresetsCO:{},hiddenRectifyUserCO:[],hiddenConfirmUserCO:[],hiddenAcceptUserCO:[],hiddenAcceptQualifiedUserCO:[],hiddenAcceptUnqualifiedUserCO:[],hiddenInspecCO:{},hiddenSpecialList:[],hiddenExtensionList:[]}),[x,P]=a([]),[v,Q]=a([]),[K,M]=a([]),[Y,$]=a([]),[E,G]=a([]),[H,z]=a([]),[B,V]=a(!0),[J,W]=a(!1),{getFile:X}=f(),Z=b(),{loading:_,downloadFile:ee}=p();return c(()=>{(async()=>{e(L?`/hidden/hidden/history/${S||Z[R]}`:`/hidden/hidden/${S||Z[R]}`,"get").then(e=>{if(e.data.hiddenAcceptQualifiedUserCO=[],e.data.hiddenAcceptUnqualifiedUserCO=[],e.data.hiddenAcceptUserCO&&e.data.hiddenAcceptUserCO.length>0)for(let i=0;i<e.data.hiddenAcceptUserCO.length;i++)1===e.data.hiddenAcceptUserCO[i].status?e.data.hiddenAcceptQualifiedUserCO.push(e.data.hiddenAcceptUserCO[i]):e.data.hiddenAcceptUnqualifiedUserCO.push(e.data.hiddenAcceptUserCO[i]);q(e.data),(async e=>{const i=await X({eqType:m[3],eqForeignKey:I||Z[A]});P(i);const d=await X({eqType:m[102],eqForeignKey:I||Z[A]});if(Q(d),e.hiddenRectifyUserCO&&e.hiddenRectifyUserCO.length>0)for(let i=0;i<e.hiddenRectifyUserCO.length;i++){if(e.hiddenRectifyUserCO[i].hiddenUserId){const d=await X({eqType:m[4],eqForeignKey:e.hiddenRectifyUserCO[i].hiddenUserId});M(e=>[...e,d])}if(1===e.hiddenRectifyUserCO[i].isRectificationScheme&&e.hiddenRectifyUserCO[i].hiddenSchemeCO&&Object.keys(e.hiddenRectifyUserCO[i].hiddenSchemeCO).length>0&&e.hiddenRectifyUserCO[i].hiddenSchemeCO.hiddenSchemeId){const d=await X({eqType:m[8],eqForeignKey:e.hiddenRectifyUserCO[i].hiddenSchemeCO.hiddenSchemeId});$(e=>[...e,d])}}if(e.hiddenAcceptQualifiedUserCO&&e.hiddenAcceptQualifiedUserCO.length>0)for(let i=0;i<e.hiddenAcceptQualifiedUserCO.length;i++)if(e.hiddenAcceptQualifiedUserCO[i].hiddenUserId){const d=await X({eqType:m[5],eqForeignKey:e.hiddenAcceptQualifiedUserCO[i].hiddenUserId});G(e=>[...e,d])}if(e.hiddenInspecCO&&Object.keys(e.hiddenInspecCO).length>0){const e=await X({eqType:m[146],eqForeignKey:I||Z[A]});z(e)}})(e.data),V(!1),w?.(e.data)})})()},[F.id,F.hiddenId]),k("div",{children:[k(i,{spinning:B||_,children:[j(d,{orientation:"left",children:"隐患信息"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"隐患来源",children:C({list:s,status:D.source})},{label:"隐患类型",children:D.hiddenTypeName},{label:"隐患级别",children:D.hiddenLevelName},{label:"隐患状态",children:C({list:h,status:D.state})},{label:"隐患描述",children:D.hiddenDesc},...D.hiddenPartName?[{label:"隐患部位",children:D.hiddenPartName}]:[],...(2===D.source||3===D.source)&&D.hiddenCheckListCO&&Object.keys(D.hiddenCheckListCO).length>0?[{label:"风险点(单元)",children:D.hiddenCheckListCO.listRiskPoints},{label:"辨识部位",children:D.hiddenCheckListCO.identifiedLocations},{label:"存在风险",children:D.hiddenCheckListCO.existingRisks},{label:"风险分级",children:D.hiddenCheckListCO.riskLevel},{label:"隐患清单",children:D.hiddenCheckListCO.listName},{label:"检查内容",children:D.hiddenCheckListCO.inspectionContent}]:[],...D.longitude?[{label:"隐患上报位置(经纬度)",children:[D.longitude&&`经度:${D.longitude}`,D.latitude&&`纬度:${D.latitude}`].filter(Boolean).join(" ")}]:[],...D.positionDesc?[{label:"隐患位置描述",children:D.positionDesc}]:[],{label:"隐患发现人",children:D.creatorName},{label:"隐患发现时间",children:r(D.hiddenFindTime).format("YYYY-MM-DD HH:mm:ss")},{label:"整改类型",children:C({list:o,status:D.rectificationType})},{label:"是否相关方",children:C({list:[{bianma:"1",name:"是"},{bianma:"0",name:"否"}],status:D.isRelated})},...1===D.isRelated?[{label:"相关方项目",children:D.projectName}]:[],{label:"隐患图片",children:j(U,{files:x})},...v.length>0?[{label:"隐患视频",children:j(y,{onClick:()=>{W(!0)}})}]:[]]}),D.hiddenUserPresetsCO&&Object.keys(D.hiddenUserPresetsCO).length>0&&k(T,{children:[j(d,{orientation:"left",children:"整改信息(发现人预填)"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:D.hiddenUserPresetsCO.rectifyDeptName},{label:"整改人",children:D.hiddenUserPresetsCO.rectifyUserName},...2===D.rectificationType?[{label:"整改期限",children:D.hiddenUserPresetsCO.rectifyDeadline?r(D.hiddenUserPresetsCO.rectifyDeadline).format("YYYY-MM-DD"):""}]:[],...1===D.rectificationType?[{label:"验收部门",children:D.hiddenUserPresetsCO.checkDeptName},{label:"验收人",children:D.hiddenUserPresetsCO.checkUserName}]:[]]})]}),D.hiddenConfirmUserCO&&D.hiddenConfirmUserCO.length>0&&k(T,{children:[j(d,{orientation:"left",children:"隐患确认"}),D.hiddenConfirmUserCO.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.hiddenLevelName?[{label:"隐患级别",children:e.hiddenLevelName}]:[],...e.userName?[{label:"隐患确认人",children:e.userName}]:[],...e.rectificationTime?[{label:"隐患确认时间",children:e.rectificationTime}]:[],...e.rectifyDeptName?[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:e.rectifyDeptName}]:[],...e.rectifyUserName?[{label:"整改人",children:e.rectifyUserName}]:[],...e.rectificationDeadline?[{label:"整改完成期限",children:e.rectificationDeadline}]:[],...e.checkDeptName?[{label:"验收部门",children:e.checkDeptName}]:[],...e.checkUserName?[{label:"验收人",children:e.checkUserName}]:[],...e.repulseCause?[...e.repulseCause?[{label:"打回意见",children:e.repulseCause}]:[],...e.rectificationTime?[{label:"打回时间",children:e.rectificationTime}]:[]]:[]]},e.id))]}),D.hiddenExtensionList&&D.hiddenExtensionList.length>0&&k(T,{children:[j(d,{orientation:"left",children:"延期信息"}),D.hiddenExtensionList.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.createTime?[{label:"申请延期日期",children:e.createTime}]:[],...e.delayTime?[{label:"延期日期",children:e.delayTime}]:[],...e.updateName?[{label:"审核人",children:e.updateName}]:[],...e.disposalPlan?[{label:"处置方案",children:e.disposalPlan}]:[],...e.disposalFile?[{label:"处置方案附件",children:"pdf"===O(e.disposalFile)?j(g,{name:u(e.disposalFile),url:e.disposalFile}):k(n,{children:[j("span",{children:u(e.disposalFile)}),j(t,{type:"primary",size:"small",onClick:()=>ee(e.disposalFile),children:"下载"})]})}]:[],{label:"延期审核状态",children:k(T,{children:[1===e.state&&j("span",{children:"待审核"}),2===e.state&&j("span",{children:"审批中"}),3===e.state&&j("span",{children:"已通过"}),4===e.state&&j("span",{children:"已拒绝"}),5===e.state&&j("span",{children:"已撤回"})]})},...3===e.state||4===e.state?[{label:"延期审核时间",children:e.updateTime}]:[]]},e.id))]}),D.hiddenSpecialList&&D.hiddenSpecialList.length>0&&k(T,{children:[j(d,{orientation:"left",children:"特殊处置审核信息"}),D.hiddenSpecialList.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...3===e.state||4===e.state?[...e.updateName?[{label:"审核人",children:e.updateName}]:[],...e.updateTime?[{label:"审核时间",children:e.updateTime}]:[]]:[],{label:"无法整改原因",children:e.examine},...3===e.state?[...e.disposalPlan?[{label:"处置方案",children:e.disposalPlan}]:[],...e.disposalFile?[{label:"处置方案附件",children:"pdf"===O(e.disposalFile)?j(g,{name:u(e.disposalFile),url:e.disposalFile}):k(n,{children:[j("span",{children:u(e.disposalFile)}),j(t,{type:"primary",size:"small",onClick:()=>ee(e.disposalFile),children:"下载"})]})}]:[],{label:"是否更换整改负责人",children:e.rectifyUserCO&&Object.keys(e.rectifyUserCO).length>0?"是":"否"},...e.rectifyUserCO&&Object.keys(e.rectifyUserCO).length>0?[{label:"整改负责人",children:e.rectifyUserCO.userName}]:[]]:[],{label:"特殊处置审核状态",children:k(T,{children:[1===e.state&&j("span",{children:"待审核"}),2===e.state&&j("span",{children:"审批中"}),3===e.state&&j("span",{children:"已通过"}),4===e.state&&j("span",{children:"已拒绝"}),5===e.state&&j("span",{children:"已撤回"})]})}]},e.id))]}),D.hiddenRectifyUserCO&&D.hiddenRectifyUserCO.length>0&&k(T,{children:[j(d,{orientation:"left",children:"整改信息"}),D.hiddenRectifyUserCO.map((e,i)=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[...e.deptName?[{label:"整改"+(1===D.isRelated?"单位":"部门"),children:e.deptName}]:[],...e.userName?[{label:"整改人",children:e.userName}]:[],...e.rectificationTime?[{label:"整改时间",children:e.rectificationTime}]:[],...e.descr?[{label:"整改描述",children:e.descr}]:[],...e.investmentFunds?[{label:"投入资金",children:`${e.investmentFunds}元`}]:[],...D.tempSafeMeasure?[{label:"临时安全措施",children:D.tempSafeMeasure}]:[],{label:"整改后图片",children:j(U,{files:K[i]})},{label:"整改方案",children:k(T,{children:[0===e.isRectificationScheme&&j("span",{children:"无"}),1===e.isRectificationScheme&&j("span",{children:"有"})]})},...1===e.isRectificationScheme&&e.hiddenSchemeCO&&Object.keys(e.hiddenSchemeCO).length>0?[{label:"治理标准",children:e.hiddenSchemeCO.governStanDards},{label:"治理方法",children:e.hiddenSchemeCO.governMethod},{label:"经费落实",children:e.hiddenSchemeCO.expenditure},{label:"负责人员",children:e.hiddenSchemeCO.principal},{label:"工时安排",children:e.hiddenSchemeCO.programming},{label:"时限要求",children:e.hiddenSchemeCO.timeLimitFor},{label:"工作要求",children:e.hiddenSchemeCO.jobRequireMent},{label:"其他事项",children:e.hiddenSchemeCO.otherBusiness},{label:"方案图片",children:j(U,{files:Y[i]})}]:[]]},e.id))]}),D.hiddenAcceptQualifiedUserCO.length>0?k(T,{children:[j(d,{orientation:"left",children:"验收信息"}),D.hiddenAcceptQualifiedUserCO.map((e,i)=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收部门",children:e.deptName},{label:"验收人",children:e.userName},{label:"验收时间",children:e.rectificationTime},...e.repulseCause?[{label:"验收打回意见",children:e.repulseCause}]:[],{label:"是否合格",children:e.rectificationTime?"合格":""},...e.descr?[{label:"验收描述",children:e.descr}]:[],...E[i]&&E[i].length>0?[{label:"验收图片",children:j(U,{files:E[i]})}]:[]]},e.id))]}):null,D.hiddenAcceptUnqualifiedUserCO.length>0?k(T,{children:[j(d,{orientation:"left",children:"验收打回信息"}),D.hiddenAcceptUnqualifiedUserCO.map(e=>j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收部门",children:e.deptName},{label:"验收人",children:e.userName},{label:"验收时间",children:e.rectificationTime},{label:"验收打回意见",children:e.repulseCause}]},e.id))]}):null,D.hiddenInspecCO&&Object.keys(D.hiddenInspecCO).length>0?k(T,{children:[j(d,{orientation:"left",children:"安全环保验收信息"}),j(l,{bordered:!0,column:1,styles:{label:{width:200}},items:[{label:"验收人",children:D.hiddenInspecCO.finalCheckOr},{label:"验收时间",children:D.hiddenInspecCO.finalCheckTime},{label:"是否合格",children:1===D.hiddenInspecCO.finalCheck?"合格":"不合格"},{label:"验收描述",children:D.hiddenInspecCO.finalCheckDesc},{label:"验收图片",children:j(U,{files:H})}]})]}):null]}),J&&j(N,{visible:J,source:v[0].url,onCancel:()=>W(!1),title:"隐患视频"})]})}F.displayName="HiddenInfo";export{F as default};
@@ -1,9 +1 @@
1
- import { PlusOutlined } from '@ant-design/icons';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- const AddIcon = props => /*#__PURE__*/jsx(PlusOutlined, {
5
- ...props
6
- });
7
- AddIcon.displayName = "AddIcon";
8
-
9
- export { AddIcon as default };
1
+ import{PlusOutlined as o}from"@ant-design/icons";import{jsx as t}from"react/jsx-runtime";const r=r=>t(o,{...r});r.displayName="AddIcon";export{r as default};
@@ -1,9 +1 @@
1
- import { ArrowLeftOutlined } from '@ant-design/icons';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- const BackIcon = props => /*#__PURE__*/jsx(ArrowLeftOutlined, {
5
- ...props
6
- });
7
- BackIcon.displayName = "BackIcon";
8
-
9
- export { BackIcon as default };
1
+ import{ArrowLeftOutlined as o}from"@ant-design/icons";import{jsx as t}from"react/jsx-runtime";const a=a=>t(o,{...a});a.displayName="BackIcon";export{a as default};
@@ -1,9 +1 @@
1
- import { DeleteOutlined } from '@ant-design/icons';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- const DeleteIcon = props => /*#__PURE__*/jsx(DeleteOutlined, {
5
- ...props
6
- });
7
- DeleteIcon.displayName = "DeleteIcon";
8
-
9
- export { DeleteIcon as default };
1
+ import{DeleteOutlined as e}from"@ant-design/icons";import{jsx as t}from"react/jsx-runtime";const o=o=>t(e,{...o});o.displayName="DeleteIcon";export{o as default};
@@ -1,9 +1 @@
1
- import { DownloadOutlined } from '@ant-design/icons';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- const DownloadIcon = props => /*#__PURE__*/jsx(DownloadOutlined, {
5
- ...props
6
- });
7
- DownloadIcon.displayName = "DownloadIcon";
8
-
9
- export { DownloadIcon as default };
1
+ import{DownloadOutlined as o}from"@ant-design/icons";import{jsx as t}from"react/jsx-runtime";const a=a=>t(o,{...a});a.displayName="DownloadIcon";export{a as default};
@@ -1,9 +1 @@
1
- import { EditOutlined } from '@ant-design/icons';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- const EditIcon = props => /*#__PURE__*/jsx(EditOutlined, {
5
- ...props
6
- });
7
- EditIcon.displayName = "EditIcon";
8
-
9
- export { EditIcon as default };
1
+ import{EditOutlined as t}from"@ant-design/icons";import{jsx as o}from"react/jsx-runtime";const i=i=>o(t,{...i});i.displayName="EditIcon";export{i as default};