zy-react-library 1.0.74 → 1.0.76
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,5 +1,5 @@
|
|
|
1
1
|
import { request } from "@cqsjjb/jjb-common-lib/http";
|
|
2
|
-
import {
|
|
2
|
+
import {Button, Descriptions, Divider, Space, Spin} from "antd";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { HIDDEN_SOURCE_ENUM, HIDDEN_STATE_ENUM } from "../../../enum/hidden/gwj";
|
|
@@ -202,7 +202,12 @@ function HiddenInfo(props) {
|
|
|
202
202
|
children: (
|
|
203
203
|
getFileSuffix(item.disposalFile) === "pdf"
|
|
204
204
|
? <PreviewPdf name={getFileName(item.disposalFile)} url={item.disposalFile} />
|
|
205
|
-
:
|
|
205
|
+
: (
|
|
206
|
+
<Space>
|
|
207
|
+
<span>{getFileName(item.disposalFile)}</span>
|
|
208
|
+
<Button type="primary" size="small" onClick={() => downloadFile(item.disposalFile)}>预览</Button>
|
|
209
|
+
</Space>
|
|
210
|
+
)
|
|
206
211
|
),
|
|
207
212
|
},
|
|
208
213
|
]
|
|
@@ -255,7 +260,12 @@ function HiddenInfo(props) {
|
|
|
255
260
|
children: (
|
|
256
261
|
getFileSuffix(item.disposalFile) === "pdf"
|
|
257
262
|
? <PreviewPdf name={getFileName(item.disposalFile)} url={item.disposalFile} />
|
|
258
|
-
:
|
|
263
|
+
: (
|
|
264
|
+
<Space>
|
|
265
|
+
<span>{getFileName(item.disposalFile)}</span>
|
|
266
|
+
<Button type="primary" size="small" onClick={() => downloadFile(item.disposalFile)}>预览</Button>
|
|
267
|
+
</Space>
|
|
268
|
+
)
|
|
259
269
|
),
|
|
260
270
|
},
|
|
261
271
|
{ label: "是否更换整改负责人", children: item.rectifyUserCO && Object.keys(item.rectifyUserCO).length > 0 ? "是" : "否" },
|
|
@@ -64,6 +64,7 @@ export const UPLOAD_FILE_TYPE_ENUM = {
|
|
|
64
64
|
135: 135,
|
|
65
65
|
136: 136,
|
|
66
66
|
137: 137,
|
|
67
|
+
138: 138,
|
|
67
68
|
};
|
|
68
69
|
|
|
69
70
|
/**
|
|
@@ -132,4 +133,5 @@ export const UPLOAD_FILE_PATH_ENUM = {
|
|
|
132
133
|
135: "branch_manager_approval_signature",
|
|
133
134
|
136: "accident_incident",
|
|
134
135
|
137: "accident_incident",
|
|
136
|
+
138: "hidden_disposal_plan",
|
|
135
137
|
};
|
|
@@ -39,7 +39,7 @@ function useUploadFile(returnType = "object") {
|
|
|
39
39
|
|
|
40
40
|
// 当single为false时,foreignKey是必需的
|
|
41
41
|
if (!single) {
|
|
42
|
-
if (!params.hasOwnProperty(
|
|
42
|
+
if (!params.hasOwnProperty("foreignKey"))
|
|
43
43
|
throw new Error("请传入 options.params.foreignKey");
|
|
44
44
|
// 如果 foreignKey 是 undefined,设置默认值为空字符串
|
|
45
45
|
if (params.foreignKey === undefined || params.foreignKey === null)
|
|
@@ -51,7 +51,7 @@ function useUploadFile(returnType = "object") {
|
|
|
51
51
|
setLoading(false);
|
|
52
52
|
resolve(
|
|
53
53
|
single
|
|
54
|
-
? { filePath:
|
|
54
|
+
? { filePath: "" }
|
|
55
55
|
: { id: params.foreignKey },
|
|
56
56
|
);
|
|
57
57
|
return;
|