zy-react-library 1.0.127 → 1.0.129
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.
- package/components/LeftTree/Department/Gwj/index.js +1 -1
- package/components/Select/Personnel/Gwj/index.js +1 -1
- package/components/SelectTree/Department/Gwj/index.js +1 -1
- package/enum/uploadFile/gwj/index.js +2 -0
- package/hooks/useDeleteFile/index.js +2 -2
- package/hooks/useGetFile/index.js +1 -1
- package/hooks/useGetUserInfo/index.js +1 -1
- package/hooks/useIsExistenceDuplicateSelection/index.js +2 -3
- package/hooks/useUploadFile/index.js +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ function DepartmentLeftTree(props) {
|
|
|
14
14
|
const [treeData, setTreeData] = useState([]);
|
|
15
15
|
|
|
16
16
|
const getData = async () => {
|
|
17
|
-
const { data } = await request("/
|
|
17
|
+
const { data } = await request("/basicInfo/department/listTree", "post", params);
|
|
18
18
|
setTreeData(data);
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -27,7 +27,7 @@ function PersonnelSelect(props) {
|
|
|
27
27
|
if (isNeedPostId && !params.postId)
|
|
28
28
|
return;
|
|
29
29
|
|
|
30
|
-
const { data } = await request("/
|
|
30
|
+
const { data } = await request("/basicInfo/user/listAll", "get", params);
|
|
31
31
|
setData(data);
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -28,7 +28,7 @@ function DepartmentSelectTree(props) {
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const { data } = await request(searchType === "current" ? "/
|
|
31
|
+
const { data } = await request(searchType === "current" ? "/basicInfo/department/listTree" : "/basicInfo/department/listAllTree", "post", params);
|
|
32
32
|
setTreeData(data);
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -79,6 +79,7 @@ export const UPLOAD_FILE_TYPE_ENUM = {
|
|
|
79
79
|
147: 147, // hidden_qualified_listInspection_signature - 隐患清单排查签字
|
|
80
80
|
148: 148, // special_qualification - 专项资质
|
|
81
81
|
149: 149, // safety_qualification - 安全资质
|
|
82
|
+
150: 150, // promise_bookmark_photo - 安全承诺签字
|
|
82
83
|
};
|
|
83
84
|
|
|
84
85
|
/**
|
|
@@ -159,4 +160,5 @@ export const UPLOAD_FILE_PATH_ENUM = {
|
|
|
159
160
|
147: "hidden_qualified_listInspection_signature",
|
|
160
161
|
148: "special_qualification",
|
|
161
162
|
149: "safety_qualification",
|
|
163
|
+
150: "promise_bookmark_photo",
|
|
162
164
|
};
|
|
@@ -67,8 +67,8 @@ function useDeleteFile(returnType = "object") {
|
|
|
67
67
|
// 发送请求
|
|
68
68
|
request(
|
|
69
69
|
single
|
|
70
|
-
? `/
|
|
71
|
-
: `/
|
|
70
|
+
? `/basicInfo/imgFiles/delete?filePath=${files[0].filePath}`
|
|
71
|
+
: `/basicInfo/imgFiles/ids?ids=${files.filter(f => f.id).map(f => f.id)}`,
|
|
72
72
|
"delete",
|
|
73
73
|
)
|
|
74
74
|
.then((res) => {
|
|
@@ -7,15 +7,14 @@ import { uniqBy } from "lodash-es";
|
|
|
7
7
|
export default function useIsExistenceDuplicateSelection() {
|
|
8
8
|
const isExistenceDuplicateSelection = (options) => {
|
|
9
9
|
const { data, key, message = "存在重复项,请勿重复选择" } = options;
|
|
10
|
-
return new Promise((resolve
|
|
10
|
+
return new Promise((resolve) => {
|
|
11
11
|
if (uniqBy(data, key).length !== data.length) {
|
|
12
12
|
antdMessage.error(message);
|
|
13
|
-
reject(new Error(message));
|
|
14
13
|
}
|
|
15
14
|
else {
|
|
16
15
|
resolve();
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
|
-
}
|
|
18
|
+
};
|
|
20
19
|
return { isExistenceDuplicateSelection };
|
|
21
20
|
}
|
|
@@ -100,7 +100,7 @@ function useUploadFile(returnType = "object") {
|
|
|
100
100
|
|
|
101
101
|
// 发送请求
|
|
102
102
|
request(
|
|
103
|
-
single ? "/
|
|
103
|
+
single ? "/basicInfo/imgFiles/save" : "/basicInfo/imgFiles/batchSave",
|
|
104
104
|
"post",
|
|
105
105
|
formData,
|
|
106
106
|
{ "Content-Type": "multipart/form-data" },
|