zy-react-library 1.0.151 → 1.0.153

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.
@@ -63,19 +63,18 @@ function HiddenInfo(props) {
63
63
  setHiddenVideoFiles(hiddenVideoFiles);
64
64
 
65
65
  if (info.hiddenRectifyUserCO && info.hiddenRectifyUserCO.length > 0) {
66
- const afterRectificationImageFiles = await getFile({
67
- eqType: UPLOAD_FILE_TYPE_ENUM["4"],
68
- eqForeignKey: hiddenId || query[hiddenIdKey],
69
- });
70
- setAfterRectificationImageFiles(afterRectificationImageFiles);
71
-
72
66
  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)) {
67
+ const afterRectificationImageFiles = await getFile({
68
+ eqType: UPLOAD_FILE_TYPE_ENUM["4"],
69
+ eqForeignKey: info.hiddenRectifyUserCO[i].hiddenUserId,
70
+ });
71
+ setAfterRectificationImageFiles(prevState => [...prevState, afterRectificationImageFiles]);
72
+ if (info.hiddenRectifyUserCO[i].isRectificationScheme === 1 && info.hiddenRectifyUserCO[i].hiddenSchemeCO && Object.keys(info.hiddenRectifyUserCO[i].hiddenSchemeCO).length > 0) {
74
73
  const rectificationPlanImageFiles = await getFile({
75
74
  eqType: UPLOAD_FILE_TYPE_ENUM["8"],
76
- eqForeignKey: hiddenId || query[hiddenIdKey],
75
+ eqForeignKey: info.hiddenRectifyUserCO[i].hiddenSchemeId,
77
76
  });
78
- setRectificationPlanImageFiles(prevState => [...prevState, ...rectificationPlanImageFiles]);
77
+ setRectificationPlanImageFiles(prevState => [...prevState, rectificationPlanImageFiles]);
79
78
  }
80
79
  }
81
80
  }
@@ -86,7 +85,7 @@ function HiddenInfo(props) {
86
85
  eqType: UPLOAD_FILE_TYPE_ENUM["5"],
87
86
  eqForeignKey: hiddenId || query[hiddenIdKey],
88
87
  });
89
- setAcceptImageFiles(prevState => [...prevState, ...acceptImageFiles]);
88
+ setAcceptImageFiles(prevState => [...prevState, acceptImageFiles]);
90
89
  }
91
90
  }
92
91
 
@@ -206,7 +205,7 @@ function HiddenInfo(props) {
206
205
  )
207
206
  }
208
207
  {
209
- (info.isConfirm === 1 && (info.hiddenConfirmUserCO && info.hiddenConfirmUserCO.length > 0)) && (
208
+ (info.hiddenConfirmUserCO && info.hiddenConfirmUserCO.length > 0) && (
210
209
  <>
211
210
  <Divider orientation="left">隐患确认</Divider>
212
211
  {
@@ -379,7 +378,7 @@ function HiddenInfo(props) {
379
378
  <>
380
379
  <Divider orientation="left">整改信息</Divider>
381
380
  {
382
- info.hiddenSpecialList.map((item, index) => (
381
+ info.hiddenRectifyUserCO.map((item, index) => (
383
382
  <Descriptions
384
383
  key={item.id}
385
384
  bordered
@@ -392,7 +391,7 @@ function HiddenInfo(props) {
392
391
  { label: "整改描述", children: item.descr },
393
392
  { label: "投入资金", children: item.investmentFunds },
394
393
  { label: "临时安全措施", children: info.tempSafeMeasure },
395
- { label: "整改后图片", children: <PreviewImg files={afterRectificationImageFiles} /> },
394
+ { label: "整改后图片", children: <PreviewImg files={afterRectificationImageFiles[index]} /> },
396
395
  { label: "整改方案", children: item.isRectificationScheme === 0 ? "无" : "有" },
397
396
  ...((item.isRectificationScheme === 1 && item.hiddenSchemeCO && Object.keys(item.hiddenSchemeCO).length > 0)
398
397
  ? [
@@ -422,7 +421,7 @@ function HiddenInfo(props) {
422
421
  <>
423
422
  <Divider orientation="left">验收信息</Divider>
424
423
  {
425
- info.hiddenSpecialList.map((item, index) => (
424
+ info.hiddenAcceptUserCO.map((item, index) => (
426
425
  <Descriptions
427
426
  key={item.id}
428
427
  bordered
@@ -446,7 +445,7 @@ function HiddenInfo(props) {
446
445
  <>
447
446
  <Divider orientation="left">验收打回信息</Divider>
448
447
  {
449
- info.hiddenSpecialList.map(item => (
448
+ info.hiddenAcceptUserCO.map(item => (
450
449
  <Descriptions
451
450
  key={item.id}
452
451
  bordered
@@ -93,6 +93,17 @@ const MapSelector = (props) => {
93
93
  }
94
94
  };
95
95
 
96
+ // 清空
97
+ const handleLocalClear = () => {
98
+ setLocalSearch("");
99
+ if (mapInstanceRef.current) {
100
+ const local = new window.BMapGL.LocalSearch(mapInstanceRef.current, {
101
+ renderOptions: { map: mapInstanceRef.current },
102
+ });
103
+ local.search("");
104
+ }
105
+ };
106
+
96
107
  // 关闭弹窗
97
108
  const handleClose = () => {
98
109
  setLocalSearch("");
@@ -191,10 +202,13 @@ const MapSelector = (props) => {
191
202
  </Form.Item>
192
203
  </Col>
193
204
  <Col span={12}>
194
- <Form.Item label=" " colon={false}>
205
+ <Form.Item label=" " colon={false} style={{ textAlign: "right" }}>
195
206
  <Button type="primary" onClick={handleLocalSearch}>
196
207
  搜索
197
208
  </Button>
209
+ <Button onClick={handleLocalClear}>
210
+ 重置
211
+ </Button>
198
212
  </Form.Item>
199
213
  </Col>
200
214
  </Row>
@@ -27,6 +27,8 @@ export interface PersonnelSelectProps extends Omit<BasicSelectProps, "data" | "p
27
27
  isNeedPostId?: boolean;
28
28
  /** 是否需要部门id,默认 true */
29
29
  isNeedDepartmentId?: boolean;
30
+ /** 返回值是否存在主账号 */
31
+ noMain?: 1 | "";
30
32
  }
31
33
 
32
34
  /**
@@ -12,6 +12,7 @@ function PersonnelSelect(props) {
12
12
  isNeedCorpInfoId = false,
13
13
  isNeedDepartmentId = true,
14
14
  isNeedPostId = false,
15
+ noMain = "",
15
16
  ...restProps
16
17
  } = props;
17
18
 
@@ -27,13 +28,13 @@ function PersonnelSelect(props) {
27
28
  if (isNeedPostId && !params.postId)
28
29
  return;
29
30
 
30
- const { data } = await request("/basicInfo/user/listAll", "get", params);
31
+ const { data } = await request("/basicInfo/user/listAll", "get", { ...params, noMain });
31
32
  setData(data);
32
33
  };
33
34
 
34
35
  useEffect(() => {
35
36
  getData();
36
- }, [JSON.stringify(params), isNeedCorpInfoId, isNeedDepartmentId, isNeedPostId]);
37
+ }, [JSON.stringify(params), isNeedCorpInfoId, isNeedDepartmentId, isNeedPostId, noMain]);
37
38
 
38
39
  return (
39
40
  <BasicSelect data={data} placeholder={placeholder} {...restProps} />
@@ -81,6 +81,10 @@ export const UPLOAD_FILE_TYPE_ENUM = {
81
81
  149: 149, // safety_qualification - 相关方-安全资质(弃用,全部改成使用148)
82
82
  150: 150, // promise_bookmark_photo - 安全承诺签字
83
83
  151: 151, // project_related_materials - 相关方-项目相关资料
84
+ 152: 152, // legal_and_regulatory_database - 法律法规库
85
+ 153: 153, // regulations_resource_library - 安全生产操作规程资源库
86
+ 154: 154, // responsibility_based_resource_library - 安全生产责任制资源库
87
+ 155: 155, // institutional_resource_library - 安全生产管理制度资源库
84
88
  };
85
89
 
86
90
  /**
@@ -163,4 +167,8 @@ export const UPLOAD_FILE_PATH_ENUM = {
163
167
  149: "safety_qualification",
164
168
  150: "promise_bookmark_photo",
165
169
  151: "project_related_materials",
170
+ 152: "legal_and_regulatory_database",
171
+ 153: "regulations_resource_library",
172
+ 154: "responsibility_based_resource_library",
173
+ 155: "institutional_resource_library",
166
174
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.151",
4
+ "version": "1.0.153",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",