zy-react-library 1.0.115 → 1.0.117

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.
@@ -33,6 +33,7 @@ function HiddenInfo(props) {
33
33
  },
34
34
  hiddenConfirmUserCO: {},
35
35
  hiddenAcceptUserCO: {},
36
+ hiddenInspecCO: {},
36
37
  hiddenSpecialList: [],
37
38
  hiddenExtensionList: [],
38
39
  });
@@ -41,7 +42,9 @@ function HiddenInfo(props) {
41
42
  const [afterRectificationImageFiles, setAfterRectificationImageFiles] = useState([]);
42
43
  const [rectificationPlanImageFiles, setRectificationPlanImageFiles] = useState([]);
43
44
  const [acceptImageFiles, setAcceptImageFiles] = useState([]);
45
+ const [inspectionAcceptImageFiles, setInspectionAcceptImageFiles] = useState([]);
44
46
  const [loading, setLoading] = useState(true);
47
+
45
48
  const { getFile } = useGetFile();
46
49
  const query = useGetUrlQuery();
47
50
  const { loading: downloadFileLoading, downloadFile } = useDownloadFile();
@@ -72,7 +75,15 @@ function HiddenInfo(props) {
72
75
  const acceptImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["5"], eqForeignKey: hiddenId || query[hiddenIdKey] });
73
76
  setAcceptImageFiles(acceptImageFiles);
74
77
  }
75
- }
78
+
79
+ if (info.hiddenInspecCO && Object.keys(info.hiddenInspecCO).length > 0) {
80
+ const inspectionAcceptImageFiles = await getFile({
81
+ eqType: UPLOAD_FILE_TYPE_ENUM["146"],
82
+ eqForeignKey: info.hiddenInspecCO.foreignKey,
83
+ });
84
+ setInspectionAcceptImageFiles(inspectionAcceptImageFiles);
85
+ }
86
+ };
76
87
 
77
88
  const getData = async () => {
78
89
  request(`/hidden/hidden/${id || query[idKey]}`, "get").then((res) => {
@@ -388,19 +399,27 @@ function HiddenInfo(props) {
388
399
  )
389
400
  : null
390
401
  }
391
- <Divider orientation="left">安全环保验收信息</Divider>
392
- <Descriptions
393
- bordered
394
- column={1}
395
- labelStyle={{ width: 200 }}
396
- items={[
397
- { label: "验收人", children: "todo" },
398
- { label: "验收时间", children: "todo" },
399
- { label: "是否合格", children: "todo" },
400
- { label: "验收描述", children: "todo" },
401
- { label: "验收图片", children: "todo" },
402
- ]}
403
- />
402
+ {
403
+ (info.hiddenInspecCO && Object.keys(info.hiddenInspecCO).length > 0)
404
+ ? (
405
+ <>
406
+ <Divider orientation="left">安全环保验收信息</Divider>
407
+ <Descriptions
408
+ bordered
409
+ column={1}
410
+ labelStyle={{ width: 200 }}
411
+ items={[
412
+ { label: "验收人", children: info.hiddenInspecCO.finalCheckOr },
413
+ { label: "验收时间", children: info.hiddenInspecCO.finalCheckTime },
414
+ { label: "是否合格", children: info.hiddenInspecCO.finalCheck === 1 ? "合格" : "不合格" },
415
+ { label: "验收描述", children: info.hiddenInspecCO.finalCheckDesc },
416
+ { label: "验收图片", children: <PreviewImg files={inspectionAcceptImageFiles} /> },
417
+ ]}
418
+ />
419
+ </>
420
+ )
421
+ : null
422
+ }
404
423
  </div>
405
424
  </Spin>
406
425
  </div>
@@ -14,6 +14,8 @@ export interface DepartmentSelectTreeProps extends Omit<BasicSelectTreeProps, "t
14
14
  isNeedCorpInfoId?: boolean;
15
15
  /** 是否需要父级部门id,默认 false */
16
16
  isNeedParentId?: boolean;
17
+ /** 查询当前登陆人部门还是所有企业部门,all 的话 isNeedCorpInfoId、isNeedParentId、params 不生效 */
18
+ searchType?: "current" | "all";
17
19
  }
18
20
 
19
21
  /**
@@ -11,6 +11,7 @@ function DepartmentSelectTree(props) {
11
11
  placeholder = "部门",
12
12
  isNeedCorpInfoId = false,
13
13
  isNeedParentId = false,
14
+ searchType = "current",
14
15
  ...restProps
15
16
  } = props;
16
17
 
@@ -19,19 +20,21 @@ function DepartmentSelectTree(props) {
19
20
  const getData = async () => {
20
21
  setTreeData([]);
21
22
 
22
- // 根据参数决定是否发送请求
23
- if (isNeedCorpInfoId && !params.eqCorpinfoId)
24
- return;
25
- if (isNeedParentId && !params.eqParentId)
26
- return;
23
+ if (searchType === "all") {
24
+ // 根据参数决定是否发送请求
25
+ if (isNeedCorpInfoId && !params.eqCorpinfoId)
26
+ return;
27
+ if (isNeedParentId && !params.eqParentId)
28
+ return;
29
+ }
27
30
 
28
- const { data } = await request("/basic-info/department/listTree", "post", params);
31
+ const { data } = await request(searchType === "current" ? "/basic-info/department/listTree" : "/basic-info/department/listAllTree", "post", params);
29
32
  setTreeData(data);
30
33
  };
31
34
 
32
35
  useEffect(() => {
33
36
  getData();
34
- }, [JSON.stringify(params), isNeedCorpInfoId, isNeedParentId]);
37
+ }, [JSON.stringify(params), isNeedCorpInfoId, isNeedParentId, searchType]);
35
38
 
36
39
  return (
37
40
  <BasicSelectTree treeData={treeData} placeholder={placeholder} childrenKey="childrenList" {...restProps} />
@@ -74,6 +74,7 @@ export const UPLOAD_FILE_TYPE_ENUM = {
74
74
  142: 142, // safety_environmental_inspection_inspected_signature - 安全环保检查-被检查人签字
75
75
  143: 143, // safety_environmental_inspection_inspected_file - 安全环保检查-被检查文件
76
76
  144: 144, // safety_environmental_inspection_defense_signature - 安全环保检查-申辩签字
77
+ 146: 146, // safety_environmental_inspection_acceptance - 安全环保检查-验收
77
78
  145: 145, // qualified_list_inspection - 清单检查合格
78
79
  };
79
80
 
@@ -151,4 +152,5 @@ export const UPLOAD_FILE_PATH_ENUM = {
151
152
  143: "safety_environmental_inspection_inspected_file",
152
153
  144: "safety_environmental_inspection_defense_signature",
153
154
  145: "qualified_list_inspection",
155
+ 146: "safety_environmental_inspection_acceptance",
154
156
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.115",
4
+ "version": "1.0.117",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",