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.
@@ -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("/basic-info/department/listTree", "post", params);
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("/basic-info/user/listAll", "get", params);
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" ? "/basic-info/department/listTree" : "/basic-info/department/listAllTree", "post", params);
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
- ? `/basic-info/imgFiles/delete?filePath=${files[0].filePath}`
71
- : `/basic-info/imgFiles/ids?ids=${files.filter(f => f.id).map(f => f.id)}`,
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) => {
@@ -38,7 +38,7 @@ function useGetFile(returnType = "object") {
38
38
 
39
39
  // 发送请求
40
40
  request(
41
- "/basic-info/imgFiles/listAll",
41
+ "/basicInfo/imgFiles/listAll",
42
42
  "get",
43
43
  { eqType, eqForeignKey },
44
44
  )
@@ -21,7 +21,7 @@ function useGetUserInfo(returnType = "object") {
21
21
  return new Promise((resolve, reject) => {
22
22
  // 发送请求
23
23
  request(
24
- "/basic-info/user/getInfo",
24
+ "/basicInfo/user/getInfo",
25
25
  "get",
26
26
  {},
27
27
  )
@@ -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, reject) => {
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 ? "/basic-info/imgFiles/save" : "/basic-info/imgFiles/batchSave",
103
+ single ? "/basicInfo/imgFiles/save" : "/basicInfo/imgFiles/batchSave",
104
104
  "post",
105
105
  formData,
106
106
  { "Content-Type": "multipart/form-data" },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.127",
4
+ "version": "1.0.129",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",