zy-react-library 1.0.138 → 1.0.139
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.
|
@@ -24,14 +24,15 @@ function HiddenInfo(props) {
|
|
|
24
24
|
hiddenId = "",
|
|
25
25
|
hiddenIdKey = "hiddenId",
|
|
26
26
|
isShowHeaderBack = true,
|
|
27
|
+
history = false,
|
|
27
28
|
onGetData,
|
|
28
29
|
} = props;
|
|
29
30
|
|
|
30
31
|
const [info, setInfo] = useState({
|
|
31
32
|
hiddenUserPresetsCO: {},
|
|
32
|
-
hiddenRectifyUserCO:
|
|
33
|
-
hiddenConfirmUserCO:
|
|
34
|
-
hiddenAcceptUserCO:
|
|
33
|
+
hiddenRectifyUserCO: [],
|
|
34
|
+
hiddenConfirmUserCO: [],
|
|
35
|
+
hiddenAcceptUserCO: [],
|
|
35
36
|
hiddenInspecCO: {},
|
|
36
37
|
hiddenSpecialList: [],
|
|
37
38
|
hiddenExtensionList: [],
|
|
@@ -50,30 +51,43 @@ function HiddenInfo(props) {
|
|
|
50
51
|
const { loading: downloadFileLoading, downloadFile } = useDownloadFile();
|
|
51
52
|
|
|
52
53
|
const getFileData = async (info) => {
|
|
53
|
-
const hiddenImageFiles = await getFile({
|
|
54
|
+
const hiddenImageFiles = await getFile({
|
|
55
|
+
eqType: UPLOAD_FILE_TYPE_ENUM["3"],
|
|
56
|
+
eqForeignKey: hiddenId || query[hiddenIdKey],
|
|
57
|
+
});
|
|
54
58
|
setHiddenImageFiles(hiddenImageFiles);
|
|
55
|
-
const hiddenVideoFiles = await getFile({
|
|
59
|
+
const hiddenVideoFiles = await getFile({
|
|
60
|
+
eqType: UPLOAD_FILE_TYPE_ENUM["102"],
|
|
61
|
+
eqForeignKey: hiddenId || query[hiddenIdKey],
|
|
62
|
+
});
|
|
56
63
|
setHiddenVideoFiles(hiddenVideoFiles);
|
|
57
64
|
|
|
58
|
-
if (info.hiddenRectifyUserCO &&
|
|
65
|
+
if (info.hiddenRectifyUserCO && info.hiddenRectifyUserCO.length > 0) {
|
|
59
66
|
const afterRectificationImageFiles = await getFile({
|
|
60
67
|
eqType: UPLOAD_FILE_TYPE_ENUM["4"],
|
|
61
68
|
eqForeignKey: hiddenId || query[hiddenIdKey],
|
|
62
69
|
});
|
|
63
70
|
setAfterRectificationImageFiles(afterRectificationImageFiles);
|
|
64
71
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
for (let i = 0; i < info.hiddenRectifyUserCO.length; i++) {
|
|
73
|
+
if ((info.hiddenRectifyUserCO[i].isRectificationScheme === 1 && info.hiddenRectifyUserCO[i].hiddenSchemeCO && Object.keys(info.hiddenRectifyUserCO[i].hiddenSchemeCO).length > 0)) {
|
|
74
|
+
const rectificationPlanImageFiles = await getFile({
|
|
75
|
+
eqType: UPLOAD_FILE_TYPE_ENUM["8"],
|
|
76
|
+
eqForeignKey: hiddenId || query[hiddenIdKey],
|
|
77
|
+
});
|
|
78
|
+
setRectificationPlanImageFiles(prevState => [...prevState, ...rectificationPlanImageFiles]);
|
|
79
|
+
}
|
|
71
80
|
}
|
|
72
81
|
}
|
|
73
82
|
|
|
74
|
-
if (info.isQualified === 1 && (info.hiddenAcceptUserCO &&
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
if (info.isQualified === 1 && (info.hiddenAcceptUserCO && info.hiddenAcceptUserCO.length > 0)) {
|
|
84
|
+
for (let i = 0; i < info.hiddenAcceptUserCO.length; i++) {
|
|
85
|
+
const acceptImageFiles = await getFile({
|
|
86
|
+
eqType: UPLOAD_FILE_TYPE_ENUM["5"],
|
|
87
|
+
eqForeignKey: hiddenId || query[hiddenIdKey],
|
|
88
|
+
});
|
|
89
|
+
setAcceptImageFiles(prevState => [...prevState, ...acceptImageFiles]);
|
|
90
|
+
}
|
|
77
91
|
}
|
|
78
92
|
|
|
79
93
|
if (info.hiddenInspecCO && Object.keys(info.hiddenInspecCO).length > 0) {
|
|
@@ -86,7 +100,7 @@ function HiddenInfo(props) {
|
|
|
86
100
|
};
|
|
87
101
|
|
|
88
102
|
const getData = async () => {
|
|
89
|
-
request(`/hidden/hidden/${id || query[idKey]}`, "get").then((res) => {
|
|
103
|
+
request(!history ? `/hidden/hidden/${id || query[idKey]}` : `/hidden/hidden/history/${id || query[idKey]}`, "get").then((res) => {
|
|
90
104
|
setInfo(res.data);
|
|
91
105
|
getFileData(res.data);
|
|
92
106
|
setLoading(false);
|
|
@@ -106,7 +120,7 @@ function HiddenInfo(props) {
|
|
|
106
120
|
<Descriptions
|
|
107
121
|
bordered
|
|
108
122
|
column={1}
|
|
109
|
-
|
|
123
|
+
styles={{ label: { width: 200 } }}
|
|
110
124
|
items={[
|
|
111
125
|
{ label: "隐患来源", children: getLabelName({ list: HIDDEN_SOURCE_ENUM, status: info.source }) },
|
|
112
126
|
{ label: "隐患类型", children: info.hiddenTypeName },
|
|
@@ -149,12 +163,15 @@ function HiddenInfo(props) {
|
|
|
149
163
|
},
|
|
150
164
|
{ label: "隐患图片", children: <PreviewImg files={hiddenImageFiles} /> },
|
|
151
165
|
...(hiddenVideoFiles.length > 0
|
|
152
|
-
? [{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
166
|
+
? [{
|
|
167
|
+
label: "隐患视频",
|
|
168
|
+
children: (
|
|
169
|
+
<VideoIcon onClick={() => {
|
|
170
|
+
setVideoModalOpen(true);
|
|
171
|
+
}}
|
|
172
|
+
/>
|
|
173
|
+
),
|
|
174
|
+
}]
|
|
158
175
|
: []),
|
|
159
176
|
]}
|
|
160
177
|
/>
|
|
@@ -165,13 +182,16 @@ function HiddenInfo(props) {
|
|
|
165
182
|
<Descriptions
|
|
166
183
|
bordered
|
|
167
184
|
column={1}
|
|
168
|
-
|
|
185
|
+
styles={{ label: { width: 200 } }}
|
|
169
186
|
items={[
|
|
170
187
|
{ label: "整改部门", children: info.hiddenUserPresetsCO.rectifyDeptName },
|
|
171
188
|
{ label: "整改人", children: info.hiddenUserPresetsCO.rectifyUserName },
|
|
172
189
|
...(info.rectificationType === 2
|
|
173
190
|
? [
|
|
174
|
-
{
|
|
191
|
+
{
|
|
192
|
+
label: "整改期限",
|
|
193
|
+
children: dayjs(info.hiddenUserPresetsCO.rectifyDeadline).format("YYYY-MM-DD"),
|
|
194
|
+
},
|
|
175
195
|
]
|
|
176
196
|
: []),
|
|
177
197
|
...(info.rectificationType === 1
|
|
@@ -186,30 +206,35 @@ function HiddenInfo(props) {
|
|
|
186
206
|
)
|
|
187
207
|
}
|
|
188
208
|
{
|
|
189
|
-
(info.isConfirm === 1 && info.hiddenConfirmUserCO &&
|
|
209
|
+
(info.isConfirm === 1 && (info.hiddenConfirmUserCO && info.hiddenConfirmUserCO.length > 0)) && (
|
|
190
210
|
<>
|
|
191
211
|
<Divider orientation="left">隐患确认</Divider>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
{
|
|
213
|
+
info.hiddenConfirmUserCO.map(item => (
|
|
214
|
+
<Descriptions
|
|
215
|
+
key={item.id}
|
|
216
|
+
bordered
|
|
217
|
+
column={1}
|
|
218
|
+
styles={{ label: { width: 200 } }}
|
|
219
|
+
items={[
|
|
220
|
+
{ label: "隐患级别", children: item.hiddenLevelName },
|
|
221
|
+
{ label: "隐患确认人", children: item.userName },
|
|
222
|
+
{ label: "隐患确认时间", children: item.rectificationTime },
|
|
223
|
+
{ label: "整改负责人部门", children: item.rectifyDeptName },
|
|
224
|
+
{ label: "整改负责人", children: item.rectifyUserName },
|
|
225
|
+
{ label: "整改完成期限", children: item.rectificationDeadline },
|
|
226
|
+
{ label: "验收部门", children: item.checkDeptName },
|
|
227
|
+
{ label: "验收人", children: item.checkUserName },
|
|
228
|
+
...(item.repulseCause
|
|
229
|
+
? [
|
|
230
|
+
{ label: "打回意见", children: item.repulseCause },
|
|
231
|
+
{ label: "打回时间", children: item.rectificationTime },
|
|
232
|
+
]
|
|
233
|
+
: []),
|
|
234
|
+
]}
|
|
235
|
+
/>
|
|
236
|
+
))
|
|
237
|
+
}
|
|
213
238
|
</>
|
|
214
239
|
)
|
|
215
240
|
}
|
|
@@ -223,7 +248,7 @@ function HiddenInfo(props) {
|
|
|
223
248
|
key={item.id}
|
|
224
249
|
bordered
|
|
225
250
|
column={1}
|
|
226
|
-
|
|
251
|
+
styles={{ label: { width: 200 } }}
|
|
227
252
|
items={[
|
|
228
253
|
{ label: "申请延期日期", children: item.createTime },
|
|
229
254
|
{ label: "延期日期", children: item.delayTime },
|
|
@@ -239,7 +264,13 @@ function HiddenInfo(props) {
|
|
|
239
264
|
: (
|
|
240
265
|
<Space>
|
|
241
266
|
<span>{getFileName(item.disposalFile)}</span>
|
|
242
|
-
<Button
|
|
267
|
+
<Button
|
|
268
|
+
type="primary"
|
|
269
|
+
size="small"
|
|
270
|
+
onClick={() => downloadFile(item.disposalFile)}
|
|
271
|
+
>
|
|
272
|
+
预览
|
|
273
|
+
</Button>
|
|
243
274
|
</Space>
|
|
244
275
|
)
|
|
245
276
|
),
|
|
@@ -258,7 +289,12 @@ function HiddenInfo(props) {
|
|
|
258
289
|
</>
|
|
259
290
|
),
|
|
260
291
|
},
|
|
261
|
-
...((item.state === 3 || item.state === 4)
|
|
292
|
+
...((item.state === 3 || item.state === 4)
|
|
293
|
+
? [{
|
|
294
|
+
label: "延期审核时间",
|
|
295
|
+
children: item.updateTime,
|
|
296
|
+
}]
|
|
297
|
+
: []),
|
|
262
298
|
]}
|
|
263
299
|
/>
|
|
264
300
|
),
|
|
@@ -277,7 +313,7 @@ function HiddenInfo(props) {
|
|
|
277
313
|
key={item.id}
|
|
278
314
|
bordered
|
|
279
315
|
column={1}
|
|
280
|
-
|
|
316
|
+
styles={{ label: { width: 200 } }}
|
|
281
317
|
items={[
|
|
282
318
|
...((item.state === 3 || item.state === 4)
|
|
283
319
|
? [
|
|
@@ -297,12 +333,21 @@ function HiddenInfo(props) {
|
|
|
297
333
|
: (
|
|
298
334
|
<Space>
|
|
299
335
|
<span>{getFileName(item.disposalFile)}</span>
|
|
300
|
-
<Button
|
|
336
|
+
<Button
|
|
337
|
+
type="primary"
|
|
338
|
+
size="small"
|
|
339
|
+
onClick={() => downloadFile(item.disposalFile)}
|
|
340
|
+
>
|
|
341
|
+
预览
|
|
342
|
+
</Button>
|
|
301
343
|
</Space>
|
|
302
344
|
)
|
|
303
345
|
),
|
|
304
346
|
},
|
|
305
|
-
{
|
|
347
|
+
{
|
|
348
|
+
label: "是否更换整改负责人",
|
|
349
|
+
children: item.rectifyUserCO && Object.keys(item.rectifyUserCO).length > 0 ? "是" : "否",
|
|
350
|
+
},
|
|
306
351
|
...(
|
|
307
352
|
item.rectifyUserCO && Object.keys(item.rectifyUserCO).length > 0
|
|
308
353
|
? [{ label: "整改负责人", children: item.rectifyUserCO.userName }]
|
|
@@ -330,77 +375,92 @@ function HiddenInfo(props) {
|
|
|
330
375
|
)
|
|
331
376
|
}
|
|
332
377
|
{
|
|
333
|
-
(info.hiddenRectifyUserCO &&
|
|
378
|
+
(info.hiddenRectifyUserCO && info.hiddenRectifyUserCO.length > 0) && (
|
|
334
379
|
<>
|
|
335
380
|
<Divider orientation="left">整改信息</Divider>
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
381
|
+
{
|
|
382
|
+
info.hiddenSpecialList.map((item, index) => (
|
|
383
|
+
<Descriptions
|
|
384
|
+
key={item.id}
|
|
385
|
+
bordered
|
|
386
|
+
column={1}
|
|
387
|
+
styles={{ label: { width: 200 } }}
|
|
388
|
+
items={[
|
|
389
|
+
{ label: "整改部门", children: item.deptName },
|
|
390
|
+
{ label: "整改人", children: item.userName },
|
|
391
|
+
{ label: "整改时间", children: item.rectificationTime },
|
|
392
|
+
{ label: "整改描述", children: item.descr },
|
|
393
|
+
{ label: "投入资金", children: item.investmentFunds },
|
|
394
|
+
{ label: "临时安全措施", children: info.tempSafeMeasure },
|
|
395
|
+
{ label: "整改后图片", children: <PreviewImg files={afterRectificationImageFiles} /> },
|
|
396
|
+
{ label: "整改方案", children: item.isRectificationScheme === 0 ? "无" : "有" },
|
|
397
|
+
...((item.isRectificationScheme === 1 && item.hiddenSchemeCO && Object.keys(item.hiddenSchemeCO).length > 0)
|
|
398
|
+
? [
|
|
399
|
+
{ label: "治理标准", children: item.hiddenSchemeCO.governStanDards },
|
|
400
|
+
{ label: "治理方法", children: item.hiddenSchemeCO.governMethod },
|
|
401
|
+
{ label: "经费落实", children: item.hiddenSchemeCO.expenditure },
|
|
402
|
+
{ label: "负责人员", children: item.hiddenSchemeCO.principal },
|
|
403
|
+
{ label: "工时安排", children: item.hiddenSchemeCO.programming },
|
|
404
|
+
{ label: "时限要求", children: item.hiddenSchemeCO.timeLimitFor },
|
|
405
|
+
{ label: "工作要求", children: item.hiddenSchemeCO.jobRequireMent },
|
|
406
|
+
{ label: "其他事项", children: item.hiddenSchemeCO.otherBusiness },
|
|
407
|
+
{ label: "方案图片", children: <PreviewImg files={rectificationPlanImageFiles[index]} /> },
|
|
408
|
+
]
|
|
409
|
+
: []),
|
|
410
|
+
]}
|
|
411
|
+
/>
|
|
412
|
+
))
|
|
413
|
+
}
|
|
364
414
|
</>
|
|
365
415
|
)
|
|
366
416
|
}
|
|
367
417
|
{
|
|
368
|
-
(info.hiddenAcceptUserCO &&
|
|
418
|
+
(info.hiddenAcceptUserCO && info.hiddenAcceptUserCO.length > 0)
|
|
369
419
|
? (
|
|
370
420
|
info.isQualified === 1
|
|
371
421
|
? (
|
|
372
422
|
<>
|
|
373
423
|
<Divider orientation="left">验收信息</Divider>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
424
|
+
{
|
|
425
|
+
info.hiddenSpecialList.map((item, index) => (
|
|
426
|
+
<Descriptions
|
|
427
|
+
key={item.id}
|
|
428
|
+
bordered
|
|
429
|
+
column={1}
|
|
430
|
+
styles={{ label: { width: 200 } }}
|
|
431
|
+
items={[
|
|
432
|
+
{ label: "验收部门", children: item.deptName },
|
|
433
|
+
{ label: "验收人", children: item.userName },
|
|
434
|
+
{ label: "验收时间", children: item.rectificationTime },
|
|
435
|
+
{ label: "验收打回意见", children: item.repulseCause },
|
|
436
|
+
{ label: "是否合格", children: "合格" },
|
|
437
|
+
{ label: "验收描述", children: item.descr },
|
|
438
|
+
{ label: "验收图片", children: <PreviewImg files={acceptImageFiles[index]} /> },
|
|
439
|
+
]}
|
|
440
|
+
/>
|
|
441
|
+
))
|
|
442
|
+
}
|
|
388
443
|
</>
|
|
389
444
|
)
|
|
390
445
|
: (
|
|
391
446
|
<>
|
|
392
447
|
<Divider orientation="left">验收打回信息</Divider>
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
448
|
+
{
|
|
449
|
+
info.hiddenSpecialList.map(item => (
|
|
450
|
+
<Descriptions
|
|
451
|
+
key={item.id}
|
|
452
|
+
bordered
|
|
453
|
+
column={1}
|
|
454
|
+
styles={{ label: { width: 200 } }}
|
|
455
|
+
items={[
|
|
456
|
+
{ label: "验收部门", children: item.deptName },
|
|
457
|
+
{ label: "验收人", children: item.userName },
|
|
458
|
+
{ label: "验收时间", children: item.rectificationTime },
|
|
459
|
+
{ label: "验收打回意见", children: item.repulseCause },
|
|
460
|
+
]}
|
|
461
|
+
/>
|
|
462
|
+
))
|
|
463
|
+
}
|
|
404
464
|
</>
|
|
405
465
|
)
|
|
406
466
|
)
|
|
@@ -414,7 +474,7 @@ function HiddenInfo(props) {
|
|
|
414
474
|
<Descriptions
|
|
415
475
|
bordered
|
|
416
476
|
column={1}
|
|
417
|
-
|
|
477
|
+
styles={{ label: { width: 200 } }}
|
|
418
478
|
items={[
|
|
419
479
|
{ label: "验收人", children: info.hiddenInspecCO.finalCheckOr },
|
|
420
480
|
{ label: "验收时间", children: info.hiddenInspecCO.finalCheckTime },
|
package/enum/hidden/gwj/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export const HIDDEN_STATE_ENUM = [
|
|
|
17
17
|
{ bianma: "301", name: "已验收" },
|
|
18
18
|
{ bianma: "302", name: "验收打回" },
|
|
19
19
|
{ bianma: "400", name: "归档" },
|
|
20
|
-
{ bianma: "99", name: "
|
|
20
|
+
{ bianma: "99", name: "关闭" },
|
|
21
21
|
{ bianma: "98", name: "安全环保检查/清单排查暂存" },
|
|
22
22
|
{ bianma: "102", name: "安全环保检查,隐患带指派" },
|
|
23
23
|
{ bianma: "97", name: "已过期" },
|
|
@@ -78,7 +78,7 @@ export const UPLOAD_FILE_TYPE_ENUM = {
|
|
|
78
78
|
145: 145, // qualified_list_inspection - 清单检查合格
|
|
79
79
|
147: 147, // hidden_qualified_listInspection_signature - 隐患清单排查签字
|
|
80
80
|
148: 148, // special_qualification - 相关方-专项资质
|
|
81
|
-
149: 149, // safety_qualification -
|
|
81
|
+
149: 149, // safety_qualification - 相关方-安全资质(弃用,全部改成使用148)
|
|
82
82
|
150: 150, // promise_bookmark_photo - 安全承诺签字
|
|
83
83
|
151: 151, // project_related_materials - 相关方-项目相关资料
|
|
84
84
|
};
|