ls-pro-common 1.0.26 → 1.0.27
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/dist/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/components/DtlLayout.d.ts +2 -0
- package/es/components/DtlLayout.js +8 -1
- package/es/hooks/useDtl/index.js +63 -36
- package/es/hooks/useSingle/index.js +44 -27
- package/lib/components/DtlLayout.d.ts +2 -0
- package/lib/components/DtlLayout.js +8 -1
- package/lib/hooks/useDtl/index.js +63 -36
- package/lib/hooks/useSingle/index.js +44 -27
- package/package.json +3 -3
|
@@ -281,7 +281,7 @@ function useSingle(inParam) {
|
|
|
281
281
|
|
|
282
282
|
case 20:
|
|
283
283
|
if ((result === null || result === void 0 ? void 0 : (_result$flag = result.flag) === null || _result$flag === void 0 ? void 0 : _result$flag.retCode) === '0') {
|
|
284
|
-
(0, _utils.showSuccess)(result.flag.retMsg);
|
|
284
|
+
(0, _utils.showSuccess)(result.flag.retMsg || '删除成功');
|
|
285
285
|
|
|
286
286
|
if (tableRef.current) {
|
|
287
287
|
tableRef.current.reload(false);
|
|
@@ -338,69 +338,83 @@ function useSingle(inParam) {
|
|
|
338
338
|
|
|
339
339
|
obj[statusField] = auditStatus;
|
|
340
340
|
return obj;
|
|
341
|
-
});
|
|
341
|
+
});
|
|
342
|
+
_context4.prev = 7;
|
|
343
|
+
_context4.next = 10;
|
|
344
|
+
return (0, _utils.showConfirm)('确认要审核选中的数据?', '审核提示');
|
|
345
|
+
|
|
346
|
+
case 10:
|
|
347
|
+
_context4.next = 16;
|
|
348
|
+
break;
|
|
349
|
+
|
|
350
|
+
case 12:
|
|
351
|
+
_context4.prev = 12;
|
|
352
|
+
_context4.t0 = _context4["catch"](7);
|
|
353
|
+
console.log(_context4.t0);
|
|
354
|
+
return _context4.abrupt("return");
|
|
342
355
|
|
|
343
|
-
|
|
356
|
+
case 16:
|
|
357
|
+
_context4.t1 = beforeAudit;
|
|
344
358
|
|
|
345
|
-
if (!_context4.
|
|
346
|
-
_context4.next =
|
|
359
|
+
if (!_context4.t1) {
|
|
360
|
+
_context4.next = 22;
|
|
347
361
|
break;
|
|
348
362
|
}
|
|
349
363
|
|
|
350
|
-
_context4.next =
|
|
364
|
+
_context4.next = 20;
|
|
351
365
|
return beforeAudit(rows);
|
|
352
366
|
|
|
353
|
-
case
|
|
354
|
-
_context4.
|
|
355
|
-
_context4.
|
|
367
|
+
case 20:
|
|
368
|
+
_context4.t2 = _context4.sent;
|
|
369
|
+
_context4.t1 = _context4.t2 === false;
|
|
356
370
|
|
|
357
|
-
case
|
|
358
|
-
if (!_context4.
|
|
359
|
-
_context4.next =
|
|
371
|
+
case 22:
|
|
372
|
+
if (!_context4.t1) {
|
|
373
|
+
_context4.next = 24;
|
|
360
374
|
break;
|
|
361
375
|
}
|
|
362
376
|
|
|
363
377
|
return _context4.abrupt("return");
|
|
364
378
|
|
|
365
|
-
case
|
|
366
|
-
_context4.prev =
|
|
367
|
-
_context4.next =
|
|
379
|
+
case 24:
|
|
380
|
+
_context4.prev = 24;
|
|
381
|
+
_context4.next = 27;
|
|
368
382
|
return service.audit(rows);
|
|
369
383
|
|
|
370
|
-
case
|
|
384
|
+
case 27:
|
|
371
385
|
result = _context4.sent;
|
|
372
386
|
|
|
373
387
|
if (!afterAudit) {
|
|
374
|
-
_context4.next =
|
|
388
|
+
_context4.next = 31;
|
|
375
389
|
break;
|
|
376
390
|
}
|
|
377
391
|
|
|
378
392
|
afterAudit(result, rows);
|
|
379
393
|
return _context4.abrupt("return");
|
|
380
394
|
|
|
381
|
-
case
|
|
395
|
+
case 31:
|
|
382
396
|
if ((result === null || result === void 0 ? void 0 : (_result$flag2 = result.flag) === null || _result$flag2 === void 0 ? void 0 : _result$flag2.retCode) === '0') {
|
|
383
|
-
(0, _utils.showSuccess)(result.flag.retMsg);
|
|
397
|
+
(0, _utils.showSuccess)(result.flag.retMsg || '审核成功');
|
|
384
398
|
|
|
385
399
|
if (tableRef.current) {
|
|
386
400
|
tableRef.current.reload(false);
|
|
387
401
|
}
|
|
388
402
|
}
|
|
389
403
|
|
|
390
|
-
_context4.next =
|
|
404
|
+
_context4.next = 37;
|
|
391
405
|
break;
|
|
392
406
|
|
|
393
|
-
case
|
|
394
|
-
_context4.prev =
|
|
395
|
-
_context4.
|
|
396
|
-
console.log(_context4.
|
|
407
|
+
case 34:
|
|
408
|
+
_context4.prev = 34;
|
|
409
|
+
_context4.t3 = _context4["catch"](24);
|
|
410
|
+
console.log(_context4.t3);
|
|
397
411
|
|
|
398
|
-
case
|
|
412
|
+
case 37:
|
|
399
413
|
case "end":
|
|
400
414
|
return _context4.stop();
|
|
401
415
|
}
|
|
402
416
|
}
|
|
403
|
-
}, _callee4, null, [[
|
|
417
|
+
}, _callee4, null, [[7, 12], [24, 34]]);
|
|
404
418
|
}));
|
|
405
419
|
|
|
406
420
|
return function onAudit(_x3) {
|
|
@@ -466,7 +480,7 @@ function useSingle(inParam) {
|
|
|
466
480
|
break;
|
|
467
481
|
}
|
|
468
482
|
|
|
469
|
-
(0, _utils.showSuccess)(result.flag.retMsg);
|
|
483
|
+
(0, _utils.showSuccess)(result.flag.retMsg || '操作成功');
|
|
470
484
|
|
|
471
485
|
if (tableRef.current) {
|
|
472
486
|
tableRef.current.reload(false);
|
|
@@ -688,6 +702,7 @@ function useSingle(inParam) {
|
|
|
688
702
|
onClick: function onClick() {
|
|
689
703
|
return onAdd(null);
|
|
690
704
|
},
|
|
705
|
+
disabled: btnDisabled('add'),
|
|
691
706
|
icon: /*#__PURE__*/_react.default.createElement(_icons.PlusOutlined, null)
|
|
692
707
|
}, "\u65B0\u589E") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.edit) && checkRight(4) ? /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
693
708
|
key: "edit",
|
|
@@ -718,6 +733,7 @@ function useSingle(inParam) {
|
|
|
718
733
|
|
|
719
734
|
tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : (_tableRef$current2$sh = _tableRef$current2.showImport) === null || _tableRef$current2$sh === void 0 ? void 0 : _tableRef$current2$sh.call(_tableRef$current2);
|
|
720
735
|
},
|
|
736
|
+
disabled: btnDisabled('import'),
|
|
721
737
|
icon: /*#__PURE__*/_react.default.createElement(_icons.ImportOutlined, null)
|
|
722
738
|
}, "\u5BFC\u5165") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.export) && checkRight(256) ? /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
723
739
|
key: "export",
|
|
@@ -726,6 +742,7 @@ function useSingle(inParam) {
|
|
|
726
742
|
|
|
727
743
|
tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current3 = tableRef.current) === null || _tableRef$current3 === void 0 ? void 0 : (_tableRef$current3$sh = _tableRef$current3.showExport) === null || _tableRef$current3$sh === void 0 ? void 0 : _tableRef$current3$sh.call(_tableRef$current3);
|
|
728
744
|
},
|
|
745
|
+
disabled: btnDisabled('export'),
|
|
729
746
|
icon: /*#__PURE__*/_react.default.createElement(_icons.ExportOutlined, null)
|
|
730
747
|
}, "\u5BFC\u51FA") : false].filter(function (o) {
|
|
731
748
|
return o !== false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ant-design/icons": "^4.3.0",
|
|
31
|
-
"ls-pro-table": "2.62.
|
|
32
|
-
"ls-pro-form": "1.52.
|
|
31
|
+
"ls-pro-table": "2.62.25",
|
|
32
|
+
"ls-pro-form": "1.52.24",
|
|
33
33
|
"@babel/runtime": "^7.16.3",
|
|
34
34
|
"classnames": "^2.2.6",
|
|
35
35
|
"moment": "^2.27.0",
|