ls-pro-common 1.1.1 → 1.1.2

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.
Files changed (42) hide show
  1. package/dist/common.css +65 -1
  2. package/dist/common.js +1 -1
  3. package/dist/common.js.LICENSE.txt +5 -3
  4. package/dist/common.min.css +65 -1
  5. package/dist/common.min.js +1 -1
  6. package/dist/common.min.js.LICENSE.txt +5 -3
  7. package/es/components/AreaCascader.js +35 -48
  8. package/es/components/AreaCascaderPanel.js +55 -85
  9. package/es/components/DescritionCard.js +14 -19
  10. package/es/components/DtlLayout.js +25 -38
  11. package/es/components/IconSelector.js +27 -50
  12. package/es/components/ImageSelector.js +89 -139
  13. package/es/components/InputMultiLine.js +33 -45
  14. package/es/components/InputTable.js +118 -160
  15. package/es/components/Loading.js +3 -6
  16. package/es/components/common.less +63 -0
  17. package/es/hooks/useDtl/index.js +676 -947
  18. package/es/hooks/usePermission/index.js +0 -9
  19. package/es/hooks/useSingle/index.js +417 -595
  20. package/es/http/index.js +107 -151
  21. package/es/index.js +0 -1
  22. package/es/service/BaseService.js +121 -195
  23. package/es/utils/index.js +12 -111
  24. package/lib/components/404.js +1 -6
  25. package/lib/components/AreaCascader.js +37 -63
  26. package/lib/components/AreaCascaderPanel.js +57 -105
  27. package/lib/components/DescritionCard.js +16 -33
  28. package/lib/components/DtlLayout.js +27 -49
  29. package/lib/components/IconSelector.js +29 -64
  30. package/lib/components/ImageSelector.js +91 -162
  31. package/lib/components/InputMultiLine.js +35 -61
  32. package/lib/components/InputTable.js +120 -185
  33. package/lib/components/Loading.js +4 -16
  34. package/lib/components/common.less +63 -0
  35. package/lib/hooks/useDtl/index.js +677 -963
  36. package/lib/hooks/usePermission/index.js +0 -12
  37. package/lib/hooks/useSingle/index.js +418 -610
  38. package/lib/http/index.js +105 -160
  39. package/lib/index.js +2 -21
  40. package/lib/service/BaseService.js +121 -201
  41. package/lib/utils/index.js +13 -209
  42. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  /*!
2
- Copyright (c) 2018 Jed Watson.
3
- Licensed under the MIT License (MIT), see
4
- http://jedwatson.github.io/classnames
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
5
  */
6
6
 
7
7
  /*! *****************************************************************************
@@ -19,6 +19,8 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
21
 
22
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
23
+
22
24
  /** @license React v16.13.1
23
25
  * react-is.production.min.js
24
26
  *
@@ -1,18 +1,17 @@
1
1
  import "antd/es/cascader/style";
2
2
  import _Cascader from "antd/es/cascader";
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
- import _regeneratorRuntime from "@babel/runtime/regenerator";
5
4
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
6
5
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
8
8
  import { httpGet } from '../http';
9
9
  import { getCache, setCache, treeEach } from '../utils';
10
10
  var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
11
  var _useState = useState([]),
12
- _useState2 = _slicedToArray(_useState, 2),
13
- options = _useState2[0],
14
- setOptions = _useState2[1];
15
-
12
+ _useState2 = _slicedToArray(_useState, 2),
13
+ options = _useState2[0],
14
+ setOptions = _useState2[1];
16
15
  var areaRef = useRef();
17
16
  useImperativeHandle(ref, function () {
18
17
  return areaRef.current;
@@ -20,61 +19,49 @@ var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
20
19
  useEffect(function () {
21
20
  initOptions();
22
21
  }, []);
23
-
24
22
  var initOptions = /*#__PURE__*/function () {
25
23
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
26
24
  var cacheItems, api, result, opts;
27
25
  return _regeneratorRuntime.wrap(function _callee$(_context) {
28
- while (1) {
29
- switch (_context.prev = _context.next) {
30
- case 0:
31
- cacheItems = getCache("areaOptions", true);
32
-
33
- if (!(cacheItems && Array.isArray(cacheItems))) {
34
- _context.next = 4;
35
- break;
26
+ while (1) switch (_context.prev = _context.next) {
27
+ case 0:
28
+ cacheItems = getCache("areaOptions", true);
29
+ if (!(cacheItems && Array.isArray(cacheItems))) {
30
+ _context.next = 4;
31
+ break;
32
+ }
33
+ setOptions(cacheItems);
34
+ return _context.abrupt("return");
35
+ case 4:
36
+ api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
37
+ _context.next = 7;
38
+ return httpGet(api, {}, false);
39
+ case 7:
40
+ result = _context.sent;
41
+ opts = result.rows || [];
42
+ treeEach(opts, function (item) {
43
+ item.label = item.name;
44
+ item.value = item.id;
45
+ if (item.level === 'district') {
46
+ delete item.children;
36
47
  }
37
-
38
- setOptions(cacheItems);
39
- return _context.abrupt("return");
40
-
41
- case 4:
42
- api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
43
- _context.next = 7;
44
- return httpGet(api, {}, false);
45
-
46
- case 7:
47
- result = _context.sent;
48
- opts = result.rows || [];
49
- treeEach(opts, function (item) {
50
- item.label = item.name;
51
- item.value = item.id;
52
-
53
- if (item.level === 'district') {
54
- delete item.children;
55
- }
56
-
57
- delete item.name;
58
- delete item.id;
59
- delete item.level;
60
- delete item.parentId;
61
- });
62
- setCache('areaOptions', opts, true);
63
- setOptions(opts);
64
-
65
- case 12:
66
- case "end":
67
- return _context.stop();
68
- }
48
+ delete item.name;
49
+ delete item.id;
50
+ delete item.level;
51
+ delete item.parentId;
52
+ });
53
+ setCache('areaOptions', opts, true);
54
+ setOptions(opts);
55
+ case 12:
56
+ case "end":
57
+ return _context.stop();
69
58
  }
70
59
  }, _callee);
71
60
  }));
72
-
73
61
  return function initOptions() {
74
62
  return _ref.apply(this, arguments);
75
63
  };
76
64
  }();
77
-
78
65
  return /*#__PURE__*/React.createElement(_Cascader, _extends({
79
66
  options: options,
80
67
  style: {
@@ -3,10 +3,10 @@ import _Cascader from "antd/es/cascader";
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import "antd/es/button/style";
5
5
  import _Button from "antd/es/button";
6
- import _regeneratorRuntime from "@babel/runtime/regenerator";
7
6
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
8
7
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
9
8
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
11
11
  import { httpGet } from '../http';
12
12
  import { getCache, setCache, treeEach } from '../utils';
@@ -15,41 +15,34 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
15
15
  var propsConfig = _objectSpread({
16
16
  getPopupContainer: function getPopupContainer(triggerNode) {
17
17
  var _document;
18
-
19
18
  return (_document = document) === null || _document === void 0 ? void 0 : _document.body;
20
19
  },
21
20
  placeholder: "请选择"
22
21
  }, props);
23
-
24
22
  var _useState = useState(getCache('areaOptionsPanel', true) || []),
25
- _useState2 = _slicedToArray(_useState, 2),
26
- options = _useState2[0],
27
- setOptions = _useState2[1]; //显示数据
28
-
29
-
23
+ _useState2 = _slicedToArray(_useState, 2),
24
+ options = _useState2[0],
25
+ setOptions = _useState2[1];
26
+ //显示数据
30
27
  var _useState3 = useState(getCache('areaOptionsPanel', true) || []),
31
- _useState4 = _slicedToArray(_useState3, 2),
32
- showData = _useState4[0],
33
- setShowData = _useState4[1]; //暂存值
34
-
35
-
28
+ _useState4 = _slicedToArray(_useState3, 2),
29
+ showData = _useState4[0],
30
+ setShowData = _useState4[1];
31
+ //暂存值
36
32
  var _useState5 = useState([]),
37
- _useState6 = _slicedToArray(_useState5, 2),
38
- listData = _useState6[0],
39
- setListData = _useState6[1]; //省市区实际值
40
-
41
-
33
+ _useState6 = _slicedToArray(_useState5, 2),
34
+ listData = _useState6[0],
35
+ setListData = _useState6[1];
36
+ //省市区实际值
42
37
  var _useState7 = useState(props.value || []),
43
- _useState8 = _slicedToArray(_useState7, 2),
44
- actualData = _useState8[0],
45
- setActualData = _useState8[1]; //标题显示值
46
-
47
-
38
+ _useState8 = _slicedToArray(_useState7, 2),
39
+ actualData = _useState8[0],
40
+ setActualData = _useState8[1];
41
+ //标题显示值
48
42
  var _useState9 = useState('province'),
49
- _useState10 = _slicedToArray(_useState9, 2),
50
- areaTitle = _useState10[0],
51
- setAreaTitle = _useState10[1];
52
-
43
+ _useState10 = _slicedToArray(_useState9, 2),
44
+ areaTitle = _useState10[0],
45
+ setAreaTitle = _useState10[1];
53
46
  var areaRef = useRef();
54
47
  useImperativeHandle(ref, function () {
55
48
  return areaRef.current;
@@ -60,7 +53,6 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
60
53
  useEffect(function () {
61
54
  if (actualData.length !== 0) {
62
55
  var _props$onChange;
63
-
64
56
  (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, actualData, listData);
65
57
  } else {
66
58
  setAreaTitle('province');
@@ -68,14 +60,11 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
68
60
  }, [actualData]);
69
61
  useEffect(function () {
70
62
  var _props$value;
71
-
72
63
  if (!options.length || !((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length)) return;
73
-
74
64
  var _props$value2 = _slicedToArray(props.value, 3),
75
- pKey = _props$value2[0],
76
- cKey = _props$value2[1],
77
- dKey = _props$value2[2];
78
-
65
+ pKey = _props$value2[0],
66
+ cKey = _props$value2[1],
67
+ dKey = _props$value2[2];
79
68
  var province = pKey ? options.find(function (o) {
80
69
  return o.value === pKey;
81
70
  }) : false;
@@ -90,63 +79,50 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
90
79
  setAreaTitle(area.length === 3 ? 'district' : area.length === 2 ? 'city' : 'province');
91
80
  setShowData(area.length === 3 ? city.children : area.length === 2 ? province.children : options);
92
81
  }, [options]);
93
-
94
82
  var initOptions = /*#__PURE__*/function () {
95
83
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
96
84
  var cacheItems, api, result, opts;
97
85
  return _regeneratorRuntime.wrap(function _callee$(_context) {
98
- while (1) {
99
- switch (_context.prev = _context.next) {
100
- case 0:
101
- cacheItems = getCache('areaOptionsPanel', true);
102
-
103
- if (!(cacheItems && Array.isArray(cacheItems) && cacheItems.length)) {
104
- _context.next = 3;
105
- break;
86
+ while (1) switch (_context.prev = _context.next) {
87
+ case 0:
88
+ cacheItems = getCache('areaOptionsPanel', true);
89
+ if (!(cacheItems && Array.isArray(cacheItems) && cacheItems.length)) {
90
+ _context.next = 3;
91
+ break;
92
+ }
93
+ return _context.abrupt("return");
94
+ case 3:
95
+ api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
96
+ _context.next = 6;
97
+ return httpGet(api, {}, false);
98
+ case 6:
99
+ result = _context.sent;
100
+ opts = result.rows || [];
101
+ treeEach(opts, function (item) {
102
+ item.label = item.name;
103
+ item.value = item.id;
104
+ if (item.level === 'district') {
105
+ delete item.children;
106
106
  }
107
-
108
- return _context.abrupt("return");
109
-
110
- case 3:
111
- api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
112
- _context.next = 6;
113
- return httpGet(api, {}, false);
114
-
115
- case 6:
116
- result = _context.sent;
117
- opts = result.rows || [];
118
- treeEach(opts, function (item) {
119
- item.label = item.name;
120
- item.value = item.id;
121
-
122
- if (item.level === 'district') {
123
- delete item.children;
124
- }
125
-
126
- delete item.name;
127
- delete item.id;
128
- delete item.parentId;
129
- });
130
- setCache('areaOptionsPanel', opts, true);
131
- setOptions(opts);
132
- setShowData(opts);
133
-
134
- case 12:
135
- case "end":
136
- return _context.stop();
137
- }
107
+ delete item.name;
108
+ delete item.id;
109
+ delete item.parentId;
110
+ });
111
+ setCache('areaOptionsPanel', opts, true);
112
+ setOptions(opts);
113
+ setShowData(opts);
114
+ case 12:
115
+ case "end":
116
+ return _context.stop();
138
117
  }
139
118
  }, _callee);
140
119
  }));
141
-
142
120
  return function initOptions() {
143
121
  return _ref.apply(this, arguments);
144
122
  };
145
123
  }();
146
-
147
124
  var dropdownRender = function dropdownRender(menus) {
148
125
  var _listData$, _listData$3;
149
-
150
126
  var title = /*#__PURE__*/React.createElement("div", {
151
127
  className: "ls-area-cascaded-header"
152
128
  }, /*#__PURE__*/React.createElement("div", {
@@ -169,7 +145,6 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
169
145
  disabled: listData.length < 2,
170
146
  onClick: function onClick() {
171
147
  var _listData$2;
172
-
173
148
  setAreaTitle('city');
174
149
  setShowData((_listData$2 = listData[0]) === null || _listData$2 === void 0 ? void 0 : _listData$2.children);
175
150
  setListData(function (val) {
@@ -200,18 +175,16 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
200
175
  title: item.label,
201
176
  onClick: function onClick(e) {
202
177
  var _areaRef$current;
203
-
204
178
  switch ((item === null || item === void 0 ? void 0 : item.level) || '') {
205
179
  case 'province':
206
180
  setShowData(item === null || item === void 0 ? void 0 : item.children);
207
181
  setActualData([item === null || item === void 0 ? void 0 : item.value]);
208
182
  setListData(function (val) {
209
183
  return [item];
210
- }); //面板标题指向市
211
-
184
+ });
185
+ //面板标题指向市
212
186
  setAreaTitle('city');
213
187
  break;
214
-
215
188
  case 'city':
216
189
  setShowData(item === null || item === void 0 ? void 0 : item.children);
217
190
  setActualData(function (val) {
@@ -222,7 +195,6 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
222
195
  });
223
196
  setAreaTitle('district');
224
197
  break;
225
-
226
198
  case 'district':
227
199
  setActualData(function (val) {
228
200
  return [val[0], val[1], item === null || item === void 0 ? void 0 : item.value];
@@ -232,7 +204,6 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
232
204
  });
233
205
  (_areaRef$current = areaRef.current) === null || _areaRef$current === void 0 ? void 0 : _areaRef$current.blur();
234
206
  break;
235
-
236
207
  default:
237
208
  break;
238
209
  }
@@ -240,7 +211,6 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
240
211
  }, item.label);
241
212
  })));
242
213
  };
243
-
244
214
  return /*#__PURE__*/React.createElement(_Cascader, _extends({
245
215
  options: options,
246
216
  style: {
@@ -8,26 +8,23 @@ import { UpOutlined } from '@ant-design/icons';
8
8
  import ProCard from 'ls-pro-card';
9
9
  import ProDescriptions from 'ls-pro-descriptions';
10
10
  import './common.less';
11
-
12
11
  function DescritionCard(props) {
13
12
  var title = props.title,
14
- extra = props.extra,
15
- className = props.className,
16
- _props$collapsible = props.collapsible,
17
- collapsible = _props$collapsible === void 0 ? true : _props$collapsible,
18
- _props$defaultCollaps = props.defaultCollapsed,
19
- defaultCollapsed = _props$defaultCollaps === void 0 ? false : _props$defaultCollaps,
20
- desc = props.desc,
21
- hasBackground = props.hasBackground,
22
- _props$collapseTitle = props.collapseTitle,
23
- collapseTitle = _props$collapseTitle === void 0 ? '展开/收起' : _props$collapseTitle,
24
- rest = _objectWithoutProperties(props, _excluded);
25
-
13
+ extra = props.extra,
14
+ className = props.className,
15
+ _props$collapsible = props.collapsible,
16
+ collapsible = _props$collapsible === void 0 ? true : _props$collapsible,
17
+ _props$defaultCollaps = props.defaultCollapsed,
18
+ defaultCollapsed = _props$defaultCollaps === void 0 ? false : _props$defaultCollaps,
19
+ desc = props.desc,
20
+ hasBackground = props.hasBackground,
21
+ _props$collapseTitle = props.collapseTitle,
22
+ collapseTitle = _props$collapseTitle === void 0 ? '展开/收起' : _props$collapseTitle,
23
+ rest = _objectWithoutProperties(props, _excluded);
26
24
  var _useState = useState(defaultCollapsed),
27
- _useState2 = _slicedToArray(_useState, 2),
28
- collapsed = _useState2[0],
29
- setCollapsed = _useState2[1];
30
-
25
+ _useState2 = _slicedToArray(_useState, 2),
26
+ collapsed = _useState2[0],
27
+ setCollapsed = _useState2[1];
31
28
  var titleLayout = useMemo(function () {
32
29
  if (typeof title === 'string') {
33
30
  return /*#__PURE__*/React.createElement("div", {
@@ -61,7 +58,6 @@ function DescritionCard(props) {
61
58
  } else if (collapsedDom) {
62
59
  return collapsedDom;
63
60
  }
64
-
65
61
  return null;
66
62
  }, [extra, collapsedDom]);
67
63
  return desc ? /*#__PURE__*/React.createElement(ProCard, _extends({
@@ -80,5 +76,4 @@ function DescritionCard(props) {
80
76
  collapsed: collapsed
81
77
  }, rest));
82
78
  }
83
-
84
79
  export default DescritionCard;
@@ -5,55 +5,47 @@ import classNames from 'classnames';
5
5
  import { LeftOutlined, SaveOutlined, AuditOutlined } from '@ant-design/icons';
6
6
  import './common.less';
7
7
  import usePermission from '../hooks/usePermission';
8
-
9
8
  function DtlLayout(props) {
10
9
  var title = props.title,
11
- _props$keyField = props.keyField,
12
- keyField = _props$keyField === void 0 ? 'id' : _props$keyField,
13
- masterObject = props.masterObject,
14
- children = props.children,
15
- headerClass = props.headerClass,
16
- headerStyle = props.headerStyle,
17
- bodyClass = props.bodyClass,
18
- bodyStyle = props.bodyStyle,
19
- formRef = props.formRef,
20
- _props$btnSaveText = props.btnSaveText,
21
- btnSaveText = _props$btnSaveText === void 0 ? '保存' : _props$btnSaveText,
22
- _props$btnExitText = props.btnExitText,
23
- btnExitText = _props$btnExitText === void 0 ? '返回' : _props$btnExitText,
24
- btnStatus = props.btnStatus,
25
- statusField = props.statusField,
26
- auditStatus = props.auditStatus,
27
- _props$isView = props.isView,
28
- isView = _props$isView === void 0 ? false : _props$isView;
29
-
10
+ _props$keyField = props.keyField,
11
+ keyField = _props$keyField === void 0 ? 'id' : _props$keyField,
12
+ masterObject = props.masterObject,
13
+ children = props.children,
14
+ headerClass = props.headerClass,
15
+ headerStyle = props.headerStyle,
16
+ bodyClass = props.bodyClass,
17
+ bodyStyle = props.bodyStyle,
18
+ formRef = props.formRef,
19
+ _props$btnSaveText = props.btnSaveText,
20
+ btnSaveText = _props$btnSaveText === void 0 ? '保存' : _props$btnSaveText,
21
+ _props$btnExitText = props.btnExitText,
22
+ btnExitText = _props$btnExitText === void 0 ? '返回' : _props$btnExitText,
23
+ btnStatus = props.btnStatus,
24
+ statusField = props.statusField,
25
+ auditStatus = props.auditStatus,
26
+ _props$isView = props.isView,
27
+ isView = _props$isView === void 0 ? false : _props$isView;
30
28
  var _usePermission = usePermission(),
31
- checkRight = _usePermission.checkRight;
32
-
29
+ checkRight = _usePermission.checkRight;
33
30
  var dtlTitle = useMemo(function () {
34
31
  if (title) return title;
35
32
  if (!masterObject) return '';
36
33
  return masterObject[keyField] ? '编辑' : '新增';
37
34
  }, [title, masterObject, keyField]);
38
-
39
35
  var isAudit = function isAudit() {
40
36
  if (masterObject && statusField && auditStatus) {
41
37
  return Number(masterObject[statusField] || 0) >= auditStatus;
42
38
  }
43
-
44
39
  return false;
45
40
  };
46
-
47
41
  var btnDisabled = function btnDisabled(btnKey) {
48
- if (isView) return true; // 优先处理自定义的状态
49
-
42
+ if (isView) return true;
43
+ // 优先处理自定义的状态
50
44
  if (btnStatus && typeof btnStatus(btnKey) === 'boolean') {
51
45
  return btnStatus(btnKey) || false;
52
46
  }
53
-
54
47
  return isAudit();
55
48
  };
56
-
57
49
  var btns = useMemo(function () {
58
50
  // const b = [
59
51
  // <Button
@@ -63,26 +55,23 @@ function DtlLayout(props) {
63
55
  // {btnExitText}
64
56
  // </Button>
65
57
  // ]
66
- var b = []; // 有新增或更改权限且未审核,开放出保存按钮
67
-
58
+ var b = [];
59
+ // 有新增或更改权限且未审核,开放出保存按钮
68
60
  if ((checkRight(2) || checkRight(4)) && !isAudit() && !isView) {
69
61
  b.unshift( /*#__PURE__*/React.createElement(_Button, {
70
62
  key: "btnSave",
71
63
  onClick: function onClick() {
72
64
  var _formRef$current;
73
-
74
65
  if (props.onSave) {
75
66
  return props.onSave();
76
67
  }
77
-
78
68
  formRef === null || formRef === void 0 ? void 0 : (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.submit();
79
69
  },
80
70
  disabled: btnDisabled('btnSave'),
81
71
  icon: /*#__PURE__*/React.createElement(SaveOutlined, null)
82
72
  }, btnSaveText));
83
- } // 转入onAudit方法且有审核权限,数据未审核,开放出审核按钮
84
-
85
-
73
+ }
74
+ // 转入onAudit方法且有审核权限,数据未审核,开放出审核按钮
86
75
  if (props.onAudit && checkRight(64) && !isAudit() && !isView) {
87
76
  b.unshift( /*#__PURE__*/React.createElement(_Button, {
88
77
  key: "btnAudit",
@@ -94,7 +83,6 @@ function DtlLayout(props) {
94
83
  icon: /*#__PURE__*/React.createElement(AuditOutlined, null)
95
84
  }, "\u5BA1\u6838"));
96
85
  }
97
-
98
86
  if (props.renderButton) return props.renderButton(b);
99
87
  return b;
100
88
  }, [props]);
@@ -118,5 +106,4 @@ function DtlLayout(props) {
118
106
  style: bodyStyle
119
107
  }, children));
120
108
  }
121
-
122
109
  export default DtlLayout;