ls-pro-common 1.0.33 → 1.0.34

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.
@@ -129,7 +129,14 @@ function IconSelector(prop) {
129
129
  var totalPage = useMemo(function () {
130
130
  if (total === 0) return 1;
131
131
  return Math.ceil(total / pageSize);
132
- }, [total]); // 验证上传文件大小
132
+ }, [total]);
133
+ useEffect(function () {
134
+ var val = formRef.current.getFieldsValue();
135
+
136
+ if (val && val[name]) {
137
+ setImgUrl(toGatewayUrl(val[name]));
138
+ }
139
+ }, []); // 验证上传文件大小
133
140
 
134
141
  var beforeUpload = function beforeUpload(file) {
135
142
  var sizeLimit = file.size / 1024 / 1024 >= maxSize;
@@ -736,35 +736,44 @@ function useDtl(dtlParam) {
736
736
  case 9:
737
737
  result = _context8.sent;
738
738
 
739
+ if (!(result.data && typeof result.data === 'string')) {
740
+ _context8.next = 13;
741
+ break;
742
+ }
743
+
744
+ window.open(result.data);
745
+ return _context8.abrupt("return", true);
746
+
747
+ case 13:
739
748
  if (!(((_result$flag5 = result.flag) === null || _result$flag5 === void 0 ? void 0 : _result$flag5.retCode) === '0')) {
740
- _context8.next = 15;
749
+ _context8.next = 18;
741
750
  break;
742
751
  }
743
752
 
744
753
  showSuccess(((_result$flag6 = result.flag) === null || _result$flag6 === void 0 ? void 0 : _result$flag6.retMsg) || '导出成功');
745
754
  return _context8.abrupt("return", true);
746
755
 
747
- case 15:
756
+ case 18:
748
757
  showError(((_result$flag7 = result.flag) === null || _result$flag7 === void 0 ? void 0 : _result$flag7.retMsg) || '导出失败,请联系系统管理员');
749
758
  return _context8.abrupt("return", false);
750
759
 
751
- case 17:
752
- _context8.next = 24;
760
+ case 20:
761
+ _context8.next = 27;
753
762
  break;
754
763
 
755
- case 19:
756
- _context8.prev = 19;
764
+ case 22:
765
+ _context8.prev = 22;
757
766
  _context8.t0 = _context8["catch"](6);
758
767
  console.log(_context8.t0);
759
768
  showError(_context8.t0.message);
760
769
  return _context8.abrupt("return", false);
761
770
 
762
- case 24:
771
+ case 27:
763
772
  case "end":
764
773
  return _context8.stop();
765
774
  }
766
775
  }
767
- }, _callee8, null, [[6, 19]]);
776
+ }, _callee8, null, [[6, 22]]);
768
777
  }));
769
778
 
770
779
  return function onExportDtl(_x6, _x7) {
@@ -607,35 +607,44 @@ function useSingle(inParam) {
607
607
  case 9:
608
608
  result = _context7.sent;
609
609
 
610
+ if (!(result.data && typeof result.data === 'string')) {
611
+ _context7.next = 13;
612
+ break;
613
+ }
614
+
615
+ window.open(result.data);
616
+ return _context7.abrupt("return", true);
617
+
618
+ case 13:
610
619
  if (!(((_result$flag4 = result.flag) === null || _result$flag4 === void 0 ? void 0 : _result$flag4.retCode) === '0')) {
611
- _context7.next = 15;
620
+ _context7.next = 18;
612
621
  break;
613
622
  }
614
623
 
615
624
  showSuccess(((_result$flag5 = result.flag) === null || _result$flag5 === void 0 ? void 0 : _result$flag5.retMsg) || '导出成功');
616
625
  return _context7.abrupt("return", true);
617
626
 
618
- case 15:
627
+ case 18:
619
628
  showError(((_result$flag6 = result.flag) === null || _result$flag6 === void 0 ? void 0 : _result$flag6.retMsg) || '导出失败,请联系系统管理员');
620
629
  return _context7.abrupt("return", false);
621
630
 
622
- case 17:
623
- _context7.next = 24;
631
+ case 20:
632
+ _context7.next = 27;
624
633
  break;
625
634
 
626
- case 19:
627
- _context7.prev = 19;
635
+ case 22:
636
+ _context7.prev = 22;
628
637
  _context7.t0 = _context7["catch"](6);
629
638
  console.log(_context7.t0);
630
639
  showError(_context7.t0.message);
631
640
  return _context7.abrupt("return", false);
632
641
 
633
- case 24:
642
+ case 27:
634
643
  case "end":
635
644
  return _context7.stop();
636
645
  }
637
646
  }
638
- }, _callee7, null, [[6, 19]]);
647
+ }, _callee7, null, [[6, 22]]);
639
648
  }));
640
649
 
641
650
  return function onExport(_x8, _x9) {
package/es/http/index.js CHANGED
@@ -283,12 +283,9 @@ function _getDict() {
283
283
  case 0:
284
284
  showValue = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : true;
285
285
  needGateWay = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : true;
286
- api = '/lesoon-integration/sysDictDtl';
286
+ api = '/lesoon-integration/sysDictDtl/listByProperties';
287
287
  param = {
288
- where: {
289
- dictCode: dictCode
290
- },
291
- ifPage: 0
288
+ dictCode: dictCode
292
289
  };
293
290
  return _context6.abrupt("return", fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay));
294
291
 
@@ -159,7 +159,14 @@ function IconSelector(prop) {
159
159
  var totalPage = (0, _react.useMemo)(function () {
160
160
  if (total === 0) return 1;
161
161
  return Math.ceil(total / pageSize);
162
- }, [total]); // 验证上传文件大小
162
+ }, [total]);
163
+ (0, _react.useEffect)(function () {
164
+ var val = formRef.current.getFieldsValue();
165
+
166
+ if (val && val[name]) {
167
+ setImgUrl((0, _utils.toGatewayUrl)(val[name]));
168
+ }
169
+ }, []); // 验证上传文件大小
163
170
 
164
171
  var beforeUpload = function beforeUpload(file) {
165
172
  var sizeLimit = file.size / 1024 / 1024 >= maxSize;
@@ -757,35 +757,44 @@ function useDtl(dtlParam) {
757
757
  case 9:
758
758
  result = _context8.sent;
759
759
 
760
+ if (!(result.data && typeof result.data === 'string')) {
761
+ _context8.next = 13;
762
+ break;
763
+ }
764
+
765
+ window.open(result.data);
766
+ return _context8.abrupt("return", true);
767
+
768
+ case 13:
760
769
  if (!(((_result$flag5 = result.flag) === null || _result$flag5 === void 0 ? void 0 : _result$flag5.retCode) === '0')) {
761
- _context8.next = 15;
770
+ _context8.next = 18;
762
771
  break;
763
772
  }
764
773
 
765
774
  (0, _utils.showSuccess)(((_result$flag6 = result.flag) === null || _result$flag6 === void 0 ? void 0 : _result$flag6.retMsg) || '导出成功');
766
775
  return _context8.abrupt("return", true);
767
776
 
768
- case 15:
777
+ case 18:
769
778
  (0, _utils.showError)(((_result$flag7 = result.flag) === null || _result$flag7 === void 0 ? void 0 : _result$flag7.retMsg) || '导出失败,请联系系统管理员');
770
779
  return _context8.abrupt("return", false);
771
780
 
772
- case 17:
773
- _context8.next = 24;
781
+ case 20:
782
+ _context8.next = 27;
774
783
  break;
775
784
 
776
- case 19:
777
- _context8.prev = 19;
785
+ case 22:
786
+ _context8.prev = 22;
778
787
  _context8.t0 = _context8["catch"](6);
779
788
  console.log(_context8.t0);
780
789
  (0, _utils.showError)(_context8.t0.message);
781
790
  return _context8.abrupt("return", false);
782
791
 
783
- case 24:
792
+ case 27:
784
793
  case "end":
785
794
  return _context8.stop();
786
795
  }
787
796
  }
788
- }, _callee8, null, [[6, 19]]);
797
+ }, _callee8, null, [[6, 22]]);
789
798
  }));
790
799
 
791
800
  return function onExportDtl(_x6, _x7) {
@@ -628,35 +628,44 @@ function useSingle(inParam) {
628
628
  case 9:
629
629
  result = _context7.sent;
630
630
 
631
+ if (!(result.data && typeof result.data === 'string')) {
632
+ _context7.next = 13;
633
+ break;
634
+ }
635
+
636
+ window.open(result.data);
637
+ return _context7.abrupt("return", true);
638
+
639
+ case 13:
631
640
  if (!(((_result$flag4 = result.flag) === null || _result$flag4 === void 0 ? void 0 : _result$flag4.retCode) === '0')) {
632
- _context7.next = 15;
641
+ _context7.next = 18;
633
642
  break;
634
643
  }
635
644
 
636
645
  (0, _utils.showSuccess)(((_result$flag5 = result.flag) === null || _result$flag5 === void 0 ? void 0 : _result$flag5.retMsg) || '导出成功');
637
646
  return _context7.abrupt("return", true);
638
647
 
639
- case 15:
648
+ case 18:
640
649
  (0, _utils.showError)(((_result$flag6 = result.flag) === null || _result$flag6 === void 0 ? void 0 : _result$flag6.retMsg) || '导出失败,请联系系统管理员');
641
650
  return _context7.abrupt("return", false);
642
651
 
643
- case 17:
644
- _context7.next = 24;
652
+ case 20:
653
+ _context7.next = 27;
645
654
  break;
646
655
 
647
- case 19:
648
- _context7.prev = 19;
656
+ case 22:
657
+ _context7.prev = 22;
649
658
  _context7.t0 = _context7["catch"](6);
650
659
  console.log(_context7.t0);
651
660
  (0, _utils.showError)(_context7.t0.message);
652
661
  return _context7.abrupt("return", false);
653
662
 
654
- case 24:
663
+ case 27:
655
664
  case "end":
656
665
  return _context7.stop();
657
666
  }
658
667
  }
659
- }, _callee7, null, [[6, 19]]);
668
+ }, _callee7, null, [[6, 22]]);
660
669
  }));
661
670
 
662
671
  return function onExport(_x8, _x9) {
package/lib/http/index.js CHANGED
@@ -307,12 +307,9 @@ function _getDict() {
307
307
  case 0:
308
308
  showValue = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : true;
309
309
  needGateWay = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : true;
310
- api = '/lesoon-integration/sysDictDtl';
310
+ api = '/lesoon-integration/sysDictDtl/listByProperties';
311
311
  param = {
312
- where: {
313
- dictCode: dictCode
314
- },
315
- ifPage: 0
312
+ dictCode: dictCode
316
313
  };
317
314
  return _context6.abrupt("return", fetchOptions(api, param, 'dictValue', 'displayName', showValue, needGateWay));
318
315
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
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.26",
32
- "ls-pro-form": "1.52.24",
31
+ "ls-pro-table": "2.62.27",
32
+ "ls-pro-form": "1.52.25",
33
33
  "@babel/runtime": "^7.16.3",
34
34
  "classnames": "^2.2.6",
35
35
  "moment": "^2.27.0",