ls-pro-common 3.1.4 → 3.1.6
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.css +3825 -2563
- package/dist/common.js +1 -1
- package/dist/common.js.LICENSE.txt +31 -0
- package/dist/common.min.css +3825 -2563
- package/dist/common.min.js +1 -1
- package/dist/common.min.js.LICENSE.txt +31 -0
- package/es/components/RecordLog/index.js +1 -2
- package/es/hooks/useDtl/index.d.ts +2 -1
- package/es/hooks/useDtl/index.js +18 -12
- package/es/hooks/useSingle/index.d.ts +1 -1
- package/es/hooks/useSingle/index.js +20 -13
- package/lib/components/RecordLog/index.js +1 -2
- package/lib/hooks/useDtl/index.d.ts +2 -1
- package/lib/hooks/useDtl/index.js +18 -12
- package/lib/hooks/useSingle/index.d.ts +1 -1
- package/lib/hooks/useSingle/index.js +20 -13
- package/package.json +1 -1
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/*!
|
|
8
|
+
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
9
|
+
Code licensed under the BSD License:
|
|
10
|
+
http://developer.yahoo.com/yui/license.html
|
|
11
|
+
version: 2.9.0
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/*! *****************************************************************************
|
|
15
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
16
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
17
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
18
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
|
|
20
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
21
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
22
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
23
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
24
|
+
|
|
25
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
26
|
+
and limitations under the License.
|
|
27
|
+
***************************************************************************** */
|
|
28
|
+
|
|
7
29
|
/*! *****************************************************************************
|
|
8
30
|
Copyright (c) Microsoft Corporation.
|
|
9
31
|
|
|
@@ -21,6 +43,15 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
21
43
|
|
|
22
44
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
23
45
|
|
|
46
|
+
/**
|
|
47
|
+
* @fileOverview
|
|
48
|
+
* @name asn1-1.0.js
|
|
49
|
+
* @author Kenji Urushima kenji.urushima@gmail.com
|
|
50
|
+
* @version asn1 1.0.13 (2017-Jun-02)
|
|
51
|
+
* @since jsrsasign 2.1
|
|
52
|
+
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
53
|
+
*/
|
|
54
|
+
|
|
24
55
|
/**
|
|
25
56
|
* @license
|
|
26
57
|
* Lodash <https://lodash.com/>
|
|
@@ -25,8 +25,7 @@ var RecordLog = function RecordLog(props) {
|
|
|
25
25
|
recordKey = _props$recordKey === void 0 ? '' : _props$recordKey,
|
|
26
26
|
_props$bizNo = props.bizNo,
|
|
27
27
|
bizNo = _props$bizNo === void 0 ? '' : _props$bizNo,
|
|
28
|
-
|
|
29
|
-
param = _props$param === void 0 ? {} : _props$param,
|
|
28
|
+
param = props.param,
|
|
30
29
|
_props$fieldsMap = props.fieldsMap,
|
|
31
30
|
fieldsMap = _props$fieldsMap === void 0 ? {} : _props$fieldsMap,
|
|
32
31
|
_props$showResourceNa = props.showResourceName,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ActionType } from 'ls-pro-table';
|
|
2
2
|
import type { ProFormInstance } from 'ls-pro-form';
|
|
3
|
+
import type { ApiResponse } from '../../typing';
|
|
3
4
|
import type { SingleParamType } from '../useSingle';
|
|
4
5
|
export declare type DtlParamType = SingleParamType & {
|
|
5
6
|
/** 重置主表对象方法 */
|
|
@@ -40,7 +41,7 @@ declare function useDtl(dtlParam: DtlParamType): {
|
|
|
40
41
|
onSaveMst: (values: any) => Promise<boolean>;
|
|
41
42
|
onSaveMstDtl: (isDelete?: boolean) => Promise<boolean | undefined>;
|
|
42
43
|
onRemoveMst: () => Promise<boolean | undefined>;
|
|
43
|
-
onExportDtl: (url: string, param: any) => Promise<boolean>;
|
|
44
|
+
onExportDtl: (url: string, param: any) => Promise<boolean | ApiResponse>;
|
|
44
45
|
isAudit: () => boolean;
|
|
45
46
|
onAudit: () => Promise<void>;
|
|
46
47
|
};
|
package/es/hooks/useDtl/index.js
CHANGED
|
@@ -730,7 +730,7 @@ function useDtl(dtlParam) {
|
|
|
730
730
|
var onExportDtl = /*#__PURE__*/function () {
|
|
731
731
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(url, param) {
|
|
732
732
|
var _param$exportColumns;
|
|
733
|
-
var searchArr, arr, otherArr, whereArr, where, _result$flag6, result, _result$
|
|
733
|
+
var searchArr, arr, otherArr, whereArr, where, _result$flag6, _result$flag7, _result$flag8, result, _result$flag9;
|
|
734
734
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
735
735
|
while (1) switch (_context9.prev = _context9.next) {
|
|
736
736
|
case 0:
|
|
@@ -792,14 +792,14 @@ function useDtl(dtlParam) {
|
|
|
792
792
|
return httpPost(url, param);
|
|
793
793
|
case 10:
|
|
794
794
|
result = _context9.sent;
|
|
795
|
-
if (!(result.data && typeof result.data === 'string')) {
|
|
795
|
+
if (!(result.data && typeof result.data === 'string' && ((_result$flag6 = result.flag) === null || _result$flag6 === void 0 ? void 0 : _result$flag6.retCode) === '0')) {
|
|
796
796
|
_context9.next = 14;
|
|
797
797
|
break;
|
|
798
798
|
}
|
|
799
799
|
downloadFile(result.data);
|
|
800
800
|
return _context9.abrupt("return", true);
|
|
801
801
|
case 14:
|
|
802
|
-
if (!(((_result$
|
|
802
|
+
if (!(((_result$flag7 = result.flag) === null || _result$flag7 === void 0 ? void 0 : _result$flag7.retCode) === '0')) {
|
|
803
803
|
_context9.next = 19;
|
|
804
804
|
break;
|
|
805
805
|
}
|
|
@@ -807,21 +807,27 @@ function useDtl(dtlParam) {
|
|
|
807
807
|
// showSuccess(result.flag?.retMsg || '导出成功');
|
|
808
808
|
return _context9.abrupt("return", true);
|
|
809
809
|
case 19:
|
|
810
|
-
|
|
810
|
+
if (!['9101', '9102', '9103', '9013', '9014', '9110'].includes((result === null || result === void 0 ? void 0 : (_result$flag8 = result.flag) === null || _result$flag8 === void 0 ? void 0 : _result$flag8.retCode) || '0')) {
|
|
811
|
+
_context9.next = 23;
|
|
812
|
+
break;
|
|
813
|
+
}
|
|
814
|
+
return _context9.abrupt("return", result);
|
|
815
|
+
case 23:
|
|
816
|
+
showError(((_result$flag9 = result.flag) === null || _result$flag9 === void 0 ? void 0 : _result$flag9.retMsg) || '导出失败,请联系系统管理员');
|
|
811
817
|
return _context9.abrupt("return", false);
|
|
812
|
-
case
|
|
813
|
-
_context9.next =
|
|
818
|
+
case 25:
|
|
819
|
+
_context9.next = 31;
|
|
814
820
|
break;
|
|
815
|
-
case
|
|
816
|
-
_context9.prev =
|
|
821
|
+
case 27:
|
|
822
|
+
_context9.prev = 27;
|
|
817
823
|
_context9.t0 = _context9["catch"](7);
|
|
818
824
|
showError(_context9.t0.message);
|
|
819
825
|
return _context9.abrupt("return", false);
|
|
820
|
-
case
|
|
826
|
+
case 31:
|
|
821
827
|
case "end":
|
|
822
828
|
return _context9.stop();
|
|
823
829
|
}
|
|
824
|
-
}, _callee9, null, [[7,
|
|
830
|
+
}, _callee9, null, [[7, 27]]);
|
|
825
831
|
}));
|
|
826
832
|
return function onExportDtl(_x6, _x7) {
|
|
827
833
|
return _ref9.apply(this, arguments);
|
|
@@ -830,7 +836,7 @@ function useDtl(dtlParam) {
|
|
|
830
836
|
/** 审核按钮事件 */
|
|
831
837
|
var onAudit = /*#__PURE__*/function () {
|
|
832
838
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
|
833
|
-
var obj, _result$
|
|
839
|
+
var obj, _result$flag10, result;
|
|
834
840
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
835
841
|
while (1) switch (_context10.prev = _context10.next) {
|
|
836
842
|
case 0:
|
|
@@ -900,7 +906,7 @@ function useDtl(dtlParam) {
|
|
|
900
906
|
}
|
|
901
907
|
return _context10.abrupt("return");
|
|
902
908
|
case 36:
|
|
903
|
-
if ((result === null || result === void 0 ? void 0 : (_result$
|
|
909
|
+
if ((result === null || result === void 0 ? void 0 : (_result$flag10 = result.flag) === null || _result$flag10 === void 0 ? void 0 : _result$flag10.retCode) === '0') {
|
|
904
910
|
showSuccess(result.flag.retMsg || '审核成功');
|
|
905
911
|
Object.assign(masterObject, result.data);
|
|
906
912
|
}
|
|
@@ -44,7 +44,7 @@ declare function useSingle(inParam: SingleParamType): {
|
|
|
44
44
|
onLoad: (params: Record<string, any>, sort: Record<string, any>, filter: Record<string, any>, isHistory: any) => Promise<any>;
|
|
45
45
|
onAdd: (item: any) => Promise<void>;
|
|
46
46
|
onEdit: (item: any) => Promise<void>;
|
|
47
|
-
onExport: (url: string, param: any) => Promise<boolean>;
|
|
47
|
+
onExport: (url: string, param: any) => Promise<boolean | ApiResponse>;
|
|
48
48
|
onAudit: (row: any) => Promise<void>;
|
|
49
49
|
resourceId: any;
|
|
50
50
|
checkRight: (val: number) => boolean;
|
|
@@ -528,7 +528,7 @@ function useSingle(inParam) {
|
|
|
528
528
|
var onExport = /*#__PURE__*/function () {
|
|
529
529
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(url, param) {
|
|
530
530
|
var _param$exportColumns;
|
|
531
|
-
var searchArr, arr, otherArr, whereArr, where, _result$flag4, result, _result$flag5;
|
|
531
|
+
var searchArr, arr, otherArr, whereArr, where, _result$flag4, result, code, _result$flag5;
|
|
532
532
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
533
533
|
while (1) switch (_context7.prev = _context7.next) {
|
|
534
534
|
case 0:
|
|
@@ -590,37 +590,44 @@ function useSingle(inParam) {
|
|
|
590
590
|
return httpPost(url, param, true, false);
|
|
591
591
|
case 10:
|
|
592
592
|
result = _context7.sent;
|
|
593
|
-
|
|
594
|
-
|
|
593
|
+
code = ((_result$flag4 = result.flag) === null || _result$flag4 === void 0 ? void 0 : _result$flag4.retCode) || '9009'; // 后端直接返回导出文件地址,直接打开相当于是下载
|
|
594
|
+
if (!(result.data && typeof result.data === 'string' && code === '0')) {
|
|
595
|
+
_context7.next = 15;
|
|
595
596
|
break;
|
|
596
597
|
}
|
|
597
598
|
downloadFile(result.data);
|
|
598
599
|
return _context7.abrupt("return", true);
|
|
599
|
-
case
|
|
600
|
-
if (!(
|
|
601
|
-
_context7.next =
|
|
600
|
+
case 15:
|
|
601
|
+
if (!(code === '0')) {
|
|
602
|
+
_context7.next = 20;
|
|
602
603
|
break;
|
|
603
604
|
}
|
|
604
605
|
// showSuccess(result.flag?.retMsg || '导出成功');
|
|
605
606
|
exportProcess(result);
|
|
606
607
|
return _context7.abrupt("return", true);
|
|
607
|
-
case
|
|
608
|
+
case 20:
|
|
609
|
+
if (!['9101', '9102', '9103', '9013', '9014', '9110'].includes(code)) {
|
|
610
|
+
_context7.next = 24;
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
return _context7.abrupt("return", result);
|
|
614
|
+
case 24:
|
|
608
615
|
showError(((_result$flag5 = result.flag) === null || _result$flag5 === void 0 ? void 0 : _result$flag5.retMsg) || '导出失败,请联系系统管理员');
|
|
609
616
|
return _context7.abrupt("return", false);
|
|
610
|
-
case
|
|
611
|
-
_context7.next =
|
|
617
|
+
case 26:
|
|
618
|
+
_context7.next = 33;
|
|
612
619
|
break;
|
|
613
|
-
case
|
|
614
|
-
_context7.prev =
|
|
620
|
+
case 28:
|
|
621
|
+
_context7.prev = 28;
|
|
615
622
|
_context7.t0 = _context7["catch"](7);
|
|
616
623
|
console.log(_context7.t0);
|
|
617
624
|
showError(_context7.t0.message);
|
|
618
625
|
return _context7.abrupt("return", false);
|
|
619
|
-
case
|
|
626
|
+
case 33:
|
|
620
627
|
case "end":
|
|
621
628
|
return _context7.stop();
|
|
622
629
|
}
|
|
623
|
-
}, _callee7, null, [[7,
|
|
630
|
+
}, _callee7, null, [[7, 28]]);
|
|
624
631
|
}));
|
|
625
632
|
return function onExport(_x9, _x10) {
|
|
626
633
|
return _ref7.apply(this, arguments);
|
|
@@ -25,8 +25,7 @@ var RecordLog = function RecordLog(props) {
|
|
|
25
25
|
recordKey = _props$recordKey === void 0 ? '' : _props$recordKey,
|
|
26
26
|
_props$bizNo = props.bizNo,
|
|
27
27
|
bizNo = _props$bizNo === void 0 ? '' : _props$bizNo,
|
|
28
|
-
|
|
29
|
-
param = _props$param === void 0 ? {} : _props$param,
|
|
28
|
+
param = props.param,
|
|
30
29
|
_props$fieldsMap = props.fieldsMap,
|
|
31
30
|
fieldsMap = _props$fieldsMap === void 0 ? {} : _props$fieldsMap,
|
|
32
31
|
_props$showResourceNa = props.showResourceName,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ActionType } from 'ls-pro-table';
|
|
2
2
|
import type { ProFormInstance } from 'ls-pro-form';
|
|
3
|
+
import type { ApiResponse } from '../../typing';
|
|
3
4
|
import type { SingleParamType } from '../useSingle';
|
|
4
5
|
export declare type DtlParamType = SingleParamType & {
|
|
5
6
|
/** 重置主表对象方法 */
|
|
@@ -40,7 +41,7 @@ declare function useDtl(dtlParam: DtlParamType): {
|
|
|
40
41
|
onSaveMst: (values: any) => Promise<boolean>;
|
|
41
42
|
onSaveMstDtl: (isDelete?: boolean) => Promise<boolean | undefined>;
|
|
42
43
|
onRemoveMst: () => Promise<boolean | undefined>;
|
|
43
|
-
onExportDtl: (url: string, param: any) => Promise<boolean>;
|
|
44
|
+
onExportDtl: (url: string, param: any) => Promise<boolean | ApiResponse>;
|
|
44
45
|
isAudit: () => boolean;
|
|
45
46
|
onAudit: () => Promise<void>;
|
|
46
47
|
};
|
|
@@ -730,7 +730,7 @@ function useDtl(dtlParam) {
|
|
|
730
730
|
var onExportDtl = /*#__PURE__*/function () {
|
|
731
731
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(url, param) {
|
|
732
732
|
var _param$exportColumns;
|
|
733
|
-
var searchArr, arr, otherArr, whereArr, where, _result$flag6, result, _result$
|
|
733
|
+
var searchArr, arr, otherArr, whereArr, where, _result$flag6, _result$flag7, _result$flag8, result, _result$flag9;
|
|
734
734
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
735
735
|
while (1) switch (_context9.prev = _context9.next) {
|
|
736
736
|
case 0:
|
|
@@ -792,14 +792,14 @@ function useDtl(dtlParam) {
|
|
|
792
792
|
return httpPost(url, param);
|
|
793
793
|
case 10:
|
|
794
794
|
result = _context9.sent;
|
|
795
|
-
if (!(result.data && typeof result.data === 'string')) {
|
|
795
|
+
if (!(result.data && typeof result.data === 'string' && ((_result$flag6 = result.flag) === null || _result$flag6 === void 0 ? void 0 : _result$flag6.retCode) === '0')) {
|
|
796
796
|
_context9.next = 14;
|
|
797
797
|
break;
|
|
798
798
|
}
|
|
799
799
|
downloadFile(result.data);
|
|
800
800
|
return _context9.abrupt("return", true);
|
|
801
801
|
case 14:
|
|
802
|
-
if (!(((_result$
|
|
802
|
+
if (!(((_result$flag7 = result.flag) === null || _result$flag7 === void 0 ? void 0 : _result$flag7.retCode) === '0')) {
|
|
803
803
|
_context9.next = 19;
|
|
804
804
|
break;
|
|
805
805
|
}
|
|
@@ -807,21 +807,27 @@ function useDtl(dtlParam) {
|
|
|
807
807
|
// showSuccess(result.flag?.retMsg || '导出成功');
|
|
808
808
|
return _context9.abrupt("return", true);
|
|
809
809
|
case 19:
|
|
810
|
-
|
|
810
|
+
if (!['9101', '9102', '9103', '9013', '9014', '9110'].includes((result === null || result === void 0 ? void 0 : (_result$flag8 = result.flag) === null || _result$flag8 === void 0 ? void 0 : _result$flag8.retCode) || '0')) {
|
|
811
|
+
_context9.next = 23;
|
|
812
|
+
break;
|
|
813
|
+
}
|
|
814
|
+
return _context9.abrupt("return", result);
|
|
815
|
+
case 23:
|
|
816
|
+
showError(((_result$flag9 = result.flag) === null || _result$flag9 === void 0 ? void 0 : _result$flag9.retMsg) || '导出失败,请联系系统管理员');
|
|
811
817
|
return _context9.abrupt("return", false);
|
|
812
|
-
case
|
|
813
|
-
_context9.next =
|
|
818
|
+
case 25:
|
|
819
|
+
_context9.next = 31;
|
|
814
820
|
break;
|
|
815
|
-
case
|
|
816
|
-
_context9.prev =
|
|
821
|
+
case 27:
|
|
822
|
+
_context9.prev = 27;
|
|
817
823
|
_context9.t0 = _context9["catch"](7);
|
|
818
824
|
showError(_context9.t0.message);
|
|
819
825
|
return _context9.abrupt("return", false);
|
|
820
|
-
case
|
|
826
|
+
case 31:
|
|
821
827
|
case "end":
|
|
822
828
|
return _context9.stop();
|
|
823
829
|
}
|
|
824
|
-
}, _callee9, null, [[7,
|
|
830
|
+
}, _callee9, null, [[7, 27]]);
|
|
825
831
|
}));
|
|
826
832
|
return function onExportDtl(_x6, _x7) {
|
|
827
833
|
return _ref9.apply(this, arguments);
|
|
@@ -830,7 +836,7 @@ function useDtl(dtlParam) {
|
|
|
830
836
|
/** 审核按钮事件 */
|
|
831
837
|
var onAudit = /*#__PURE__*/function () {
|
|
832
838
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
|
833
|
-
var obj, _result$
|
|
839
|
+
var obj, _result$flag10, result;
|
|
834
840
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
835
841
|
while (1) switch (_context10.prev = _context10.next) {
|
|
836
842
|
case 0:
|
|
@@ -900,7 +906,7 @@ function useDtl(dtlParam) {
|
|
|
900
906
|
}
|
|
901
907
|
return _context10.abrupt("return");
|
|
902
908
|
case 36:
|
|
903
|
-
if ((result === null || result === void 0 ? void 0 : (_result$
|
|
909
|
+
if ((result === null || result === void 0 ? void 0 : (_result$flag10 = result.flag) === null || _result$flag10 === void 0 ? void 0 : _result$flag10.retCode) === '0') {
|
|
904
910
|
showSuccess(result.flag.retMsg || '审核成功');
|
|
905
911
|
Object.assign(masterObject, result.data);
|
|
906
912
|
}
|
|
@@ -44,7 +44,7 @@ declare function useSingle(inParam: SingleParamType): {
|
|
|
44
44
|
onLoad: (params: Record<string, any>, sort: Record<string, any>, filter: Record<string, any>, isHistory: any) => Promise<any>;
|
|
45
45
|
onAdd: (item: any) => Promise<void>;
|
|
46
46
|
onEdit: (item: any) => Promise<void>;
|
|
47
|
-
onExport: (url: string, param: any) => Promise<boolean>;
|
|
47
|
+
onExport: (url: string, param: any) => Promise<boolean | ApiResponse>;
|
|
48
48
|
onAudit: (row: any) => Promise<void>;
|
|
49
49
|
resourceId: any;
|
|
50
50
|
checkRight: (val: number) => boolean;
|
|
@@ -528,7 +528,7 @@ function useSingle(inParam) {
|
|
|
528
528
|
var onExport = /*#__PURE__*/function () {
|
|
529
529
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(url, param) {
|
|
530
530
|
var _param$exportColumns;
|
|
531
|
-
var searchArr, arr, otherArr, whereArr, where, _result$flag4, result, _result$flag5;
|
|
531
|
+
var searchArr, arr, otherArr, whereArr, where, _result$flag4, result, code, _result$flag5;
|
|
532
532
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
533
533
|
while (1) switch (_context7.prev = _context7.next) {
|
|
534
534
|
case 0:
|
|
@@ -590,37 +590,44 @@ function useSingle(inParam) {
|
|
|
590
590
|
return httpPost(url, param, true, false);
|
|
591
591
|
case 10:
|
|
592
592
|
result = _context7.sent;
|
|
593
|
-
|
|
594
|
-
|
|
593
|
+
code = ((_result$flag4 = result.flag) === null || _result$flag4 === void 0 ? void 0 : _result$flag4.retCode) || '9009'; // 后端直接返回导出文件地址,直接打开相当于是下载
|
|
594
|
+
if (!(result.data && typeof result.data === 'string' && code === '0')) {
|
|
595
|
+
_context7.next = 15;
|
|
595
596
|
break;
|
|
596
597
|
}
|
|
597
598
|
downloadFile(result.data);
|
|
598
599
|
return _context7.abrupt("return", true);
|
|
599
|
-
case
|
|
600
|
-
if (!(
|
|
601
|
-
_context7.next =
|
|
600
|
+
case 15:
|
|
601
|
+
if (!(code === '0')) {
|
|
602
|
+
_context7.next = 20;
|
|
602
603
|
break;
|
|
603
604
|
}
|
|
604
605
|
// showSuccess(result.flag?.retMsg || '导出成功');
|
|
605
606
|
exportProcess(result);
|
|
606
607
|
return _context7.abrupt("return", true);
|
|
607
|
-
case
|
|
608
|
+
case 20:
|
|
609
|
+
if (!['9101', '9102', '9103', '9013', '9014', '9110'].includes(code)) {
|
|
610
|
+
_context7.next = 24;
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
return _context7.abrupt("return", result);
|
|
614
|
+
case 24:
|
|
608
615
|
showError(((_result$flag5 = result.flag) === null || _result$flag5 === void 0 ? void 0 : _result$flag5.retMsg) || '导出失败,请联系系统管理员');
|
|
609
616
|
return _context7.abrupt("return", false);
|
|
610
|
-
case
|
|
611
|
-
_context7.next =
|
|
617
|
+
case 26:
|
|
618
|
+
_context7.next = 33;
|
|
612
619
|
break;
|
|
613
|
-
case
|
|
614
|
-
_context7.prev =
|
|
620
|
+
case 28:
|
|
621
|
+
_context7.prev = 28;
|
|
615
622
|
_context7.t0 = _context7["catch"](7);
|
|
616
623
|
console.log(_context7.t0);
|
|
617
624
|
showError(_context7.t0.message);
|
|
618
625
|
return _context7.abrupt("return", false);
|
|
619
|
-
case
|
|
626
|
+
case 33:
|
|
620
627
|
case "end":
|
|
621
628
|
return _context7.stop();
|
|
622
629
|
}
|
|
623
|
-
}, _callee7, null, [[7,
|
|
630
|
+
}, _callee7, null, [[7, 28]]);
|
|
624
631
|
}));
|
|
625
632
|
return function onExport(_x9, _x10) {
|
|
626
633
|
return _ref7.apply(this, arguments);
|