ls-pro-common 1.0.17 → 1.0.20

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/es/http/index.js CHANGED
@@ -2,7 +2,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import { extend } from 'umi-request';
5
- import { getCache, getUrlQuery, showError, toGatewayUrl } from '../utils'; //默认超时时间为1分钟
5
+ import { getCache, getUrlQuery, setUrlQuery, getResourceProps, showError, toGatewayUrl } from '../utils'; //默认超时时间为1分钟
6
6
 
7
7
  var request = extend({
8
8
  timeout: 60000
@@ -22,8 +22,11 @@ request.interceptors.request.use(function (url, options) {
22
22
  });
23
23
  }
24
24
 
25
+ var param = {
26
+ resCode: getUrlQuery('resourceId') || getResourceProps('resourceId')
27
+ };
25
28
  return {
26
- url: url,
29
+ url: setUrlQuery(url, param),
27
30
  options: opts
28
31
  };
29
32
  });
package/es/typing.d.ts CHANGED
@@ -15,6 +15,8 @@ export declare type TableToolbar = {
15
15
  remove?: boolean;
16
16
  export?: boolean;
17
17
  import?: boolean;
18
+ audit?: boolean;
19
+ config?: boolean;
18
20
  print?: boolean;
19
21
  };
20
22
  /** 基础模块接口类型 */
package/es/utils/index.js CHANGED
@@ -52,7 +52,7 @@ export var setCookie = function setCookie(key, value) {
52
52
  */
53
53
 
54
54
  export var isLogin = function isLogin() {
55
- return !!getCookie('token');
55
+ return !!getCookie('inline');
56
56
  };
57
57
  /**
58
58
  * 设置本地缓存
@@ -155,7 +155,8 @@ function InputTable(prop) {
155
155
  form: {
156
156
  submitter: {
157
157
  resetButtonProps: false
158
- }
158
+ },
159
+ btnInline: true
159
160
  },
160
161
  height: 'full',
161
162
  rowSelection: {
@@ -64,15 +64,18 @@
64
64
  }
65
65
 
66
66
  .page404 {
67
- width : 100%;
68
- height : 100%;
69
- text-align : center;
70
- padding-top : 20%;
71
- vertical-align: middle;
67
+ width : 100%;
68
+ height : 100%;
69
+ text-align : center;
70
+ padding-top : 10%;
71
+ font-size : 15px;
72
+ font-weight : 600;
73
+ color : gray;
74
+ background-color: #fff;
72
75
 
73
76
  img {
74
- vertical-align: middle;
75
- padding-right : 20px;
77
+ vertical-align: bottom;
78
+ padding-right : 5px;
76
79
  }
77
80
  }
78
81
 
@@ -15,17 +15,18 @@ declare function useDtl(dtlParam: DtlParamType): {
15
15
  selectedRows: any;
16
16
  showEdit: boolean;
17
17
  editItem: any;
18
- tableTools: JSX.Element[];
18
+ tableTools: (boolean | JSX.Element)[];
19
19
  setSelectedRows: import("react").Dispatch<any>;
20
20
  setShowEdit: import("react").Dispatch<import("react").SetStateAction<boolean>>;
21
21
  setEditItem: import("react").Dispatch<any>;
22
- onRemoveDtl: () => void;
22
+ onRemoveDtl: (rows?: any) => void;
23
23
  onSaveDtl: (formData: any) => Promise<boolean>;
24
24
  onLoadDtl: (params: Record<string, any>, sort: Record<string, any>, filter: Record<string, any>) => Promise<any>;
25
- onAddDtl: () => Promise<boolean>;
26
- onEditDtl: () => Promise<boolean>;
27
- onSaveMst: (values: any) => Promise<void>;
25
+ onAddDtl: (item?: any) => Promise<boolean>;
26
+ onEditDtl: (item?: any) => Promise<boolean>;
27
+ onSaveMst: (values: any) => Promise<boolean>;
28
28
  onRemoveMst: () => Promise<boolean | undefined>;
29
29
  onExportDtl: (url: string, param: exportParam) => Promise<boolean>;
30
+ isAudit: () => boolean;
30
31
  };
31
32
  export default useDtl;
@@ -42,12 +42,16 @@ function useDtl(dtlParam) {
42
42
  relationField = dtlParam.relationField,
43
43
  toolConfig = dtlParam.toolConfig,
44
44
  dtlItem = dtlParam.dtlItem,
45
+ auditStatus = dtlParam.auditStatus,
46
+ statusField = dtlParam.statusField,
45
47
  beforeLoad = dtlParam.beforeLoad,
46
48
  beforeAdd = dtlParam.beforeAdd,
47
49
  beforeEdit = dtlParam.beforeEdit,
50
+ beforeSave = dtlParam.beforeSave,
48
51
  beforeRemove = dtlParam.beforeRemove,
49
52
  afterSave = dtlParam.afterSave,
50
- afterRemove = dtlParam.afterRemove;
53
+ afterRemove = dtlParam.afterRemove,
54
+ btnStatus = dtlParam.btnStatus;
51
55
  /** @name 选中行数据 */
52
56
 
53
57
  var _useState = (0, _react.useState)([]),
@@ -78,6 +82,10 @@ function useDtl(dtlParam) {
78
82
  /** @name 从表编辑表单Ref */
79
83
 
80
84
  var dtlFormRef = (0, _react.useRef)();
85
+ var isAudit = (0, _react.useCallback)(function () {
86
+ if (!auditStatus || !statusField) return false;
87
+ return Number(masterObject[statusField] || 0) >= auditStatus;
88
+ }, [auditStatus, statusField, masterObject]);
81
89
 
82
90
  var onSaveMst = /*#__PURE__*/function () {
83
91
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(values) {
@@ -88,13 +96,17 @@ function useDtl(dtlParam) {
88
96
  while (1) {
89
97
  switch (_context.prev = _context.next) {
90
98
  case 0:
91
- data = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, masterObject), values);
92
- _context.next = 3;
93
- return mstService.save(data);
99
+ if (!isAudit()) {
100
+ _context.next = 3;
101
+ break;
102
+ }
103
+
104
+ (0, _utils.showWarn)('当前单据已审核,不能保存');
105
+ return _context.abrupt("return", false);
94
106
 
95
107
  case 3:
96
- result = _context.sent;
97
- _context.t0 = afterSave;
108
+ data = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, masterObject), values);
109
+ _context.t0 = beforeSave;
98
110
 
99
111
  if (!_context.t0) {
100
112
  _context.next = 10;
@@ -102,7 +114,7 @@ function useDtl(dtlParam) {
102
114
  }
103
115
 
104
116
  _context.next = 8;
105
- return afterSave(result, data);
117
+ return beforeSave(data, false);
106
118
 
107
119
  case 8:
108
120
  _context.t1 = _context.sent;
@@ -114,16 +126,51 @@ function useDtl(dtlParam) {
114
126
  break;
115
127
  }
116
128
 
117
- return _context.abrupt("return");
129
+ return _context.abrupt("return", false);
118
130
 
119
131
  case 12:
120
- if ((result === null || result === void 0 ? void 0 : (_result$flag = result.flag) === null || _result$flag === void 0 ? void 0 : _result$flag.retCode) === '0') {
121
- (0, _utils.showSuccess)(result.flag.retMsg);
122
- Object.assign(masterObject, result.data);
123
- setEditItem({});
132
+ _context.next = 14;
133
+ return mstService.save(data);
134
+
135
+ case 14:
136
+ result = _context.sent;
137
+ _context.t2 = afterSave;
138
+
139
+ if (!_context.t2) {
140
+ _context.next = 21;
141
+ break;
124
142
  }
125
143
 
126
- case 13:
144
+ _context.next = 19;
145
+ return afterSave(result, data, false);
146
+
147
+ case 19:
148
+ _context.t3 = _context.sent;
149
+ _context.t2 = _context.t3 === false;
150
+
151
+ case 21:
152
+ if (!_context.t2) {
153
+ _context.next = 23;
154
+ break;
155
+ }
156
+
157
+ return _context.abrupt("return", false);
158
+
159
+ case 23:
160
+ if (!((result === null || result === void 0 ? void 0 : (_result$flag = result.flag) === null || _result$flag === void 0 ? void 0 : _result$flag.retCode) === '0')) {
161
+ _context.next = 28;
162
+ break;
163
+ }
164
+
165
+ (0, _utils.showSuccess)(result.flag.retMsg);
166
+ Object.assign(masterObject, result.data);
167
+ setEditItem({});
168
+ return _context.abrupt("return", true);
169
+
170
+ case 28:
171
+ return _context.abrupt("return", false);
172
+
173
+ case 29:
127
174
  case "end":
128
175
  return _context.stop();
129
176
  }
@@ -152,7 +199,7 @@ function useDtl(dtlParam) {
152
199
  break;
153
200
  }
154
201
 
155
- return _context2.abrupt("return");
202
+ return _context2.abrupt("return", false);
156
203
 
157
204
  case 2:
158
205
  _context2.next = 4;
@@ -175,7 +222,7 @@ function useDtl(dtlParam) {
175
222
  break;
176
223
  }
177
224
 
178
- return _context2.abrupt("return");
225
+ return _context2.abrupt("return", false);
179
226
 
180
227
  case 10:
181
228
  if (!ids) {
@@ -195,7 +242,7 @@ function useDtl(dtlParam) {
195
242
  }
196
243
 
197
244
  _context2.next = 18;
198
- return afterRemove(result, masterObject[mstKeyField]);
245
+ return afterRemove(result, masterObject);
199
246
 
200
247
  case 18:
201
248
  _context2.t1 = _context2.sent;
@@ -238,52 +285,85 @@ function useDtl(dtlParam) {
238
285
 
239
286
  var onAddDtl = /*#__PURE__*/function () {
240
287
  var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
288
+ var item,
289
+ _formRef$current,
290
+ mstVal,
291
+ mst,
292
+ _args3 = arguments;
293
+
241
294
  return _regenerator.default.wrap(function _callee3$(_context3) {
242
295
  while (1) {
243
296
  switch (_context3.prev = _context3.next) {
244
297
  case 0:
245
- if (masterObject[mstKeyField]) {
246
- _context3.next = 3;
298
+ item = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : (0, _objectSpread2.default)({}, dtlItem);
299
+
300
+ if (!(!masterObject[mstKeyField] && formRef.current)) {
301
+ _context3.next = 16;
302
+ break;
303
+ }
304
+
305
+ _context3.prev = 2;
306
+ _context3.next = 5;
307
+ return (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.validateFields();
308
+
309
+ case 5:
310
+ mstVal = formRef.current.getFieldsValue();
311
+ _context3.next = 8;
312
+ return onSaveMst(mstVal);
313
+
314
+ case 8:
315
+ mst = _context3.sent;
316
+
317
+ if (!(mst !== true)) {
318
+ _context3.next = 11;
247
319
  break;
248
320
  }
249
321
 
250
- (0, _utils.showWarn)("请先保存主表");
251
322
  return _context3.abrupt("return", false);
252
323
 
253
- case 3:
254
- _context3.t0 = beforeAdd;
324
+ case 11:
325
+ _context3.next = 16;
326
+ break;
327
+
328
+ case 13:
329
+ _context3.prev = 13;
330
+ _context3.t0 = _context3["catch"](2);
331
+ return _context3.abrupt("return", false);
255
332
 
256
- if (!_context3.t0) {
257
- _context3.next = 9;
333
+ case 16:
334
+ _context3.t1 = beforeAdd;
335
+
336
+ if (!_context3.t1) {
337
+ _context3.next = 22;
258
338
  break;
259
339
  }
260
340
 
261
- _context3.next = 7;
262
- return beforeAdd(dtlItem);
341
+ _context3.next = 20;
342
+ return beforeAdd(item);
263
343
 
264
- case 7:
265
- _context3.t1 = _context3.sent;
266
- _context3.t0 = _context3.t1 === false;
344
+ case 20:
345
+ _context3.t2 = _context3.sent;
346
+ _context3.t1 = _context3.t2 === false;
267
347
 
268
- case 9:
269
- if (!_context3.t0) {
270
- _context3.next = 11;
348
+ case 22:
349
+ if (!_context3.t1) {
350
+ _context3.next = 24;
271
351
  break;
272
352
  }
273
353
 
274
354
  return _context3.abrupt("return", false);
275
355
 
276
- case 11:
277
- setEditItem(dtlItem);
356
+ case 24:
357
+ setEditItem(item);
278
358
  setShowEdit(true);
279
359
  return _context3.abrupt("return", true);
280
360
 
281
- case 14:
361
+ case 27:
282
362
  case "end":
283
363
  return _context3.stop();
284
364
  }
285
365
  }
286
- }, _callee3);
366
+ }, _callee3, null, [[2, 13]]);
287
367
  }));
288
368
 
289
369
  return function onAddDtl() {
@@ -295,47 +375,51 @@ function useDtl(dtlParam) {
295
375
 
296
376
  var onEditDtl = /*#__PURE__*/function () {
297
377
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
378
+ var item,
379
+ _args4 = arguments;
298
380
  return _regenerator.default.wrap(function _callee4$(_context4) {
299
381
  while (1) {
300
382
  switch (_context4.prev = _context4.next) {
301
383
  case 0:
384
+ item = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : (0, _objectSpread2.default)({}, selectedRows[0]);
385
+
302
386
  if (selectedRows.length) {
303
- _context4.next = 3;
387
+ _context4.next = 4;
304
388
  break;
305
389
  }
306
390
 
307
391
  (0, _utils.showWarn)('请先选择需要更改的数据');
308
392
  return _context4.abrupt("return", false);
309
393
 
310
- case 3:
394
+ case 4:
311
395
  _context4.t0 = beforeEdit;
312
396
 
313
397
  if (!_context4.t0) {
314
- _context4.next = 9;
398
+ _context4.next = 10;
315
399
  break;
316
400
  }
317
401
 
318
- _context4.next = 7;
319
- return beforeEdit(selectedRows[0]);
402
+ _context4.next = 8;
403
+ return beforeEdit(item);
320
404
 
321
- case 7:
405
+ case 8:
322
406
  _context4.t1 = _context4.sent;
323
407
  _context4.t0 = _context4.t1 === false;
324
408
 
325
- case 9:
409
+ case 10:
326
410
  if (!_context4.t0) {
327
- _context4.next = 11;
411
+ _context4.next = 12;
328
412
  break;
329
413
  }
330
414
 
331
415
  return _context4.abrupt("return", false);
332
416
 
333
- case 11:
334
- setEditItem(selectedRows[0]);
417
+ case 12:
418
+ setEditItem(item);
335
419
  setShowEdit(true);
336
420
  return _context4.abrupt("return", true);
337
421
 
338
- case 14:
422
+ case 15:
339
423
  case "end":
340
424
  return _context4.stop();
341
425
  }
@@ -351,7 +435,9 @@ function useDtl(dtlParam) {
351
435
 
352
436
 
353
437
  var onRemoveDtl = function onRemoveDtl() {
354
- if (!selectedRows.length) {
438
+ var rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : selectedRows;
439
+
440
+ if (!rows || !rows.length) {
355
441
  (0, _utils.showWarn)('请选择需要删除的数据');
356
442
  return;
357
443
  }
@@ -370,7 +456,7 @@ function useDtl(dtlParam) {
370
456
  }
371
457
 
372
458
  _context5.next = 3;
373
- return beforeRemove(selectedRows);
459
+ return beforeRemove(rows);
374
460
 
375
461
  case 3:
376
462
  ids = _context5.sent;
@@ -384,7 +470,7 @@ function useDtl(dtlParam) {
384
470
 
385
471
  case 6:
386
472
  if (!ids) {
387
- ids = selectedRows.map(function (o) {
473
+ ids = rows.map(function (o) {
388
474
  return o.id;
389
475
  });
390
476
  }
@@ -402,7 +488,7 @@ function useDtl(dtlParam) {
402
488
  }
403
489
 
404
490
  _context5.next = 14;
405
- return afterRemove(result, selectedRows);
491
+ return afterRemove(result, rows);
406
492
 
407
493
  case 14:
408
494
  _context5.t1 = _context5.sent;
@@ -451,36 +537,59 @@ function useDtl(dtlParam) {
451
537
  data[relationField] = masterObject[mstKeyField];
452
538
  }
453
539
 
454
- _context6.next = 4;
455
- return dtlService.save(data);
456
-
457
- case 4:
458
- result = _context6.sent;
459
- _context6.t0 = afterSave;
540
+ _context6.t0 = beforeSave;
460
541
 
461
542
  if (!_context6.t0) {
462
- _context6.next = 11;
543
+ _context6.next = 8;
463
544
  break;
464
545
  }
465
546
 
466
- _context6.next = 9;
467
- return afterSave(data);
547
+ _context6.next = 6;
548
+ return beforeSave(data, true);
468
549
 
469
- case 9:
550
+ case 6:
470
551
  _context6.t1 = _context6.sent;
471
552
  _context6.t0 = _context6.t1 === false;
472
553
 
473
- case 11:
554
+ case 8:
474
555
  if (!_context6.t0) {
475
- _context6.next = 13;
556
+ _context6.next = 10;
476
557
  break;
477
558
  }
478
559
 
479
560
  return _context6.abrupt("return", false);
480
561
 
481
- case 13:
562
+ case 10:
563
+ _context6.next = 12;
564
+ return dtlService.save(data);
565
+
566
+ case 12:
567
+ result = _context6.sent;
568
+ _context6.t2 = afterSave;
569
+
570
+ if (!_context6.t2) {
571
+ _context6.next = 19;
572
+ break;
573
+ }
574
+
575
+ _context6.next = 17;
576
+ return afterSave(result, data, true);
577
+
578
+ case 17:
579
+ _context6.t3 = _context6.sent;
580
+ _context6.t2 = _context6.t3 === false;
581
+
582
+ case 19:
583
+ if (!_context6.t2) {
584
+ _context6.next = 21;
585
+ break;
586
+ }
587
+
588
+ return _context6.abrupt("return", false);
589
+
590
+ case 21:
482
591
  if (!((result === null || result === void 0 ? void 0 : (_result$flag4 = result.flag) === null || _result$flag4 === void 0 ? void 0 : _result$flag4.retCode) === '0')) {
483
- _context6.next = 17;
592
+ _context6.next = 25;
484
593
  break;
485
594
  }
486
595
 
@@ -492,10 +601,10 @@ function useDtl(dtlParam) {
492
601
 
493
602
  return _context6.abrupt("return", true);
494
603
 
495
- case 17:
604
+ case 25:
496
605
  return _context6.abrupt("return", false);
497
606
 
498
- case 18:
607
+ case 26:
499
608
  case "end":
500
609
  return _context6.stop();
501
610
  }
@@ -669,37 +778,44 @@ function useDtl(dtlParam) {
669
778
  };
670
779
  }();
671
780
 
672
- var tableTools = [];
781
+ var btnDisabled = function btnDisabled(key) {
782
+ if (btnStatus && typeof btnStatus(key) === 'boolean') return btnStatus(key);
783
+
784
+ switch (key) {
785
+ case 'edit':
786
+ return selectedRows.length !== 1;
787
+
788
+ case 'remove':
789
+ return selectedRows.length === 0 || isAudit();
673
790
 
674
- if (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.add) {
675
- tableTools.push( /*#__PURE__*/_react.default.createElement(_button.default, {
791
+ default:
792
+ return false;
793
+ }
794
+ };
795
+
796
+ var tableTools = (0, _react.useMemo)(function () {
797
+ return [(toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.add) && !isAudit() ? /*#__PURE__*/_react.default.createElement(_button.default, {
676
798
  key: "add",
677
- onClick: onAddDtl,
799
+ onClick: function onClick() {
800
+ return onAddDtl();
801
+ },
678
802
  icon: /*#__PURE__*/_react.default.createElement(_icons.PlusOutlined, null)
679
- }, "\u65B0\u589E"));
680
- }
681
-
682
- if (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.edit) {
683
- tableTools.push( /*#__PURE__*/_react.default.createElement(_button.default, {
803
+ }, "\u65B0\u589E") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.edit) && !isAudit() ? /*#__PURE__*/_react.default.createElement(_button.default, {
684
804
  key: "edit",
685
- disabled: selectedRows.length !== 1,
686
- onClick: onEditDtl,
805
+ disabled: btnDisabled('edit'),
806
+ onClick: function onClick() {
807
+ return onEditDtl();
808
+ },
687
809
  icon: /*#__PURE__*/_react.default.createElement(_icons.EditOutlined, null)
688
- }, "\u7F16\u8F91"));
689
- }
690
-
691
- if (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.remove) {
692
- tableTools.push( /*#__PURE__*/_react.default.createElement(_button.default, {
810
+ }, "\u7F16\u8F91") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.remove) && !isAudit() ? /*#__PURE__*/_react.default.createElement(_button.default, {
693
811
  key: "remove",
694
- onClick: onRemoveDtl,
812
+ onClick: function onClick() {
813
+ return onRemoveDtl();
814
+ },
695
815
  danger: true,
696
- disabled: selectedRows.length === 0,
816
+ disabled: btnDisabled('remove'),
697
817
  icon: /*#__PURE__*/_react.default.createElement(_icons.DeleteOutlined, null)
698
- }, "\u5220\u9664"));
699
- }
700
-
701
- if (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.import) {
702
- tableTools.push( /*#__PURE__*/_react.default.createElement(_button.default, {
818
+ }, "\u5220\u9664") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.import) ? /*#__PURE__*/_react.default.createElement(_button.default, {
703
819
  key: "import",
704
820
  onClick: function onClick() {
705
821
  var _tableRef$current, _tableRef$current$sho;
@@ -707,11 +823,7 @@ function useDtl(dtlParam) {
707
823
  tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : (_tableRef$current$sho = _tableRef$current.showImport) === null || _tableRef$current$sho === void 0 ? void 0 : _tableRef$current$sho.call(_tableRef$current);
708
824
  },
709
825
  icon: /*#__PURE__*/_react.default.createElement(_icons.ImportOutlined, null)
710
- }, "\u5BFC\u5165"));
711
- }
712
-
713
- if (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.export) {
714
- tableTools.push( /*#__PURE__*/_react.default.createElement(_button.default, {
826
+ }, "\u5BFC\u5165") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.import) ? /*#__PURE__*/_react.default.createElement(_button.default, {
715
827
  key: "export",
716
828
  onClick: function onClick() {
717
829
  var _tableRef$current2, _tableRef$current2$sh;
@@ -719,9 +831,10 @@ function useDtl(dtlParam) {
719
831
  tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : (_tableRef$current2$sh = _tableRef$current2.showExport) === null || _tableRef$current2$sh === void 0 ? void 0 : _tableRef$current2$sh.call(_tableRef$current2);
720
832
  },
721
833
  icon: /*#__PURE__*/_react.default.createElement(_icons.ExportOutlined, null)
722
- }, "\u5BFC\u51FA"));
723
- }
724
-
834
+ }, "\u5BFC\u51FA") : false].filter(function (o) {
835
+ return o !== false;
836
+ });
837
+ }, [selectedRows]);
725
838
  return {
726
839
  formRef: formRef,
727
840
  tableRef: tableRef,
@@ -740,7 +853,8 @@ function useDtl(dtlParam) {
740
853
  onEditDtl: onEditDtl,
741
854
  onSaveMst: onSaveMst,
742
855
  onRemoveMst: onRemoveMst,
743
- onExportDtl: onExportDtl
856
+ onExportDtl: onExportDtl,
857
+ isAudit: isAudit
744
858
  };
745
859
  }
746
860
 
@@ -0,0 +1,7 @@
1
+ declare function usePermission(): {
2
+ resourceId: any;
3
+ permissionVal: number;
4
+ resRightVal: number;
5
+ checkRight: (val: number) => boolean;
6
+ };
7
+ export default usePermission;