cloud-web-corejs 1.0.54-dev.798 → 1.0.54-dev.799
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/package.json +3 -1
- package/src/components/baseTabs/mixins.js +11 -12
- package/src/components/bizTab/BizBillActions.vue +129 -0
- package/src/components/bizTab/BizTabListPage.vue +391 -0
- package/src/components/bizTab/README.md +378 -0
- package/src/components/bizTab/billTableUtil.js +48 -0
- package/src/components/bizTab/billValidators.js +136 -0
- package/src/components/bizTab/bizBillDetailMixin.js +687 -0
- package/src/components/bizTab/index.js +24 -0
- package/src/components/excelExport/exportFieldDialog.vue +373 -367
- package/src/components/excelExport/exportType.js +49 -0
- package/src/components/excelExport/mixins.js +1153 -1144
- package/src/components/vb-tabs/x-tabs.vue +167 -143
- package/src/components/wf/wfUtil.js +327 -292
- package/src/components/xform/form-designer/designer.js +56 -8
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +59 -5
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +60 -8
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +8 -2
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +120 -92
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +63 -94
- package/src/components/xform/form-designer/index.vue +0 -1
- package/src/components/xform/form-designer/setting-panel/dataSource-setting.vue +397 -397
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +602 -602
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +13 -13
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +585 -585
- package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/alignType-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1154 -1154
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +96 -80
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-plain/detail-plain-editor.vue +75 -75
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-height-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/container-h5-card/h5-card-editor.vue +124 -124
- package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/height-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/width-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -119
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tabClass-editor.vue +45 -45
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +344 -344
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree-pane/tree-pane-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/okButtonLabel-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/title-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/containerClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/customClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/descriptionsItems-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/dsName-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/echartHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +7 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/addTableData-event-editor.vue +84 -84
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +97 -97
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/form-host-event-editor.vue +188 -188
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +74 -67
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -59
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +11 -11
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +12 -12
- package/src/components/xform/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -44
- package/src/components/xform/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +29 -29
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +6 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +44 -44
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +115 -115
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -115
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-max-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script/script-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/fontSize-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +74 -71
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-timeLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchField-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -176
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +2 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +972 -972
- package/src/components/xform/form-designer/setting-panel/property-editor/iconClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/label-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelAlign-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/max-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/maxLength-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/min-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/minLength-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +178 -178
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +6 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/rows-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/space-editor-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/step-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTableClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTitClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/uploadTip-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/uploadURL-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/urlValueEnabled-editor.vue +91 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/widgetWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/index.vue +3 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +55 -13
- package/src/components/xform/form-render/container-item/data-table-mixin copy.js +5910 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +59 -13
- package/src/components/xform/form-render/container-item/detail-item.vue +52 -11
- package/src/components/xform/form-render/container-item/tab-item.vue +6 -2
- package/src/components/xform/form-render/indexMixin.js +56 -16
- package/src/components/xform/lang/zh-CN.js +2 -1
- package/src/components/xform/utils/attachmentValueUtil.js +239 -0
- package/src/components/xform/utils/util.js +27 -0
- package/src/mixins/wf/index.js +40 -38
- package/src/router/modules/customer.js +50 -0
- package/src/store/config/index.js +46 -0
- package/src/utils/scrollUtil.js +25 -0
- package/src/views/demo/bizTab/bill/billConfig.js +41 -0
- package/src/views/demo/bizTab/bill/detail.vue +436 -0
- package/src/views/demo/bizTab/bill/list.vue +288 -0
- package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
- package/src/views/demo/bizTab/simple/billApi.js +123 -0
- package/src/views/demo/bizTab/simple/detail.vue +407 -0
- package/src/views/demo/bizTab/simple/list.vue +217 -0
- package/src/views/demo/bizTab/standalone/index.vue +121 -0
- package/src/views/demo/bizTab/wf/billConfig.js +44 -0
- package/src/views/demo/bizTab/wf/detail.vue +661 -0
- package/src/views/demo/bizTab/wf/list.vue +242 -0
- package/src/views/user/outLink/cc_form_view.vue +185 -0
|
@@ -1,1144 +1,1153 @@
|
|
|
1
|
-
/**version-1.0*/
|
|
2
|
-
let tmixins = {};
|
|
3
|
-
import { getToken } from "../../utils/auth";
|
|
4
|
-
import indexUtil from "../../utils/index.js";
|
|
5
|
-
import exportFieldDialog from "./exportFieldDialog.vue";
|
|
6
|
-
import { getCellValue } from "@base/components/table/util/index";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
this.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
) {
|
|
113
|
-
|
|
114
|
-
if (!
|
|
115
|
-
this.$baseAlert(
|
|
116
|
-
this.$
|
|
117
|
-
);
|
|
118
|
-
this.param.destroyComponent();
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
this
|
|
148
|
-
this.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
this
|
|
159
|
-
this
|
|
160
|
-
this.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
this
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
that.
|
|
219
|
-
that.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
let
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
let
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
let
|
|
262
|
-
let
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
let
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
)
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
let
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
let
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
let
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
promise =
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
)
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
this
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
this.countTimer =
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
this.
|
|
796
|
-
this.
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
let
|
|
865
|
-
let
|
|
866
|
-
let
|
|
867
|
-
let
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
} else if (
|
|
901
|
-
|
|
902
|
-
(
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
let
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
document.
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
form
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
this
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1
|
+
/**version-1.0*/
|
|
2
|
+
let tmixins = {};
|
|
3
|
+
import { getToken } from "../../utils/auth";
|
|
4
|
+
import indexUtil from "../../utils/index.js";
|
|
5
|
+
import exportFieldDialog from "./exportFieldDialog.vue";
|
|
6
|
+
import { getCellValue } from "@base/components/table/util/index";
|
|
7
|
+
import { isItemExport, isRowExport, requiresCheckedRows } from "./exportType";
|
|
8
|
+
|
|
9
|
+
let configUtil = {
|
|
10
|
+
baseUrl: process.env.VUE_APP_BASE_API,
|
|
11
|
+
getToken,
|
|
12
|
+
indexUtil,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function getGrid(that, tableRef) {
|
|
16
|
+
let $grid;
|
|
17
|
+
if (Array.isArray(that.$refs[tableRef])) {
|
|
18
|
+
$grid = that.$refs[tableRef][0];
|
|
19
|
+
} else {
|
|
20
|
+
$grid = that.$refs[tableRef];
|
|
21
|
+
}
|
|
22
|
+
return $grid;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
(function () {
|
|
26
|
+
tmixins = {
|
|
27
|
+
props: ["param"],
|
|
28
|
+
components: {
|
|
29
|
+
exportFieldDialog,
|
|
30
|
+
},
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
showImportDialog: false,
|
|
34
|
+
showImportDialog2: false,
|
|
35
|
+
falseValue: false,
|
|
36
|
+
fileRaw: false,
|
|
37
|
+
tTotalPage: 0,
|
|
38
|
+
tTotalSize: 0,
|
|
39
|
+
doneSize: 0,
|
|
40
|
+
CURRENT_PREFIX: "",
|
|
41
|
+
option: {},
|
|
42
|
+
uuid: "",
|
|
43
|
+
fileRows: [],
|
|
44
|
+
title: this.$t2("导出", "components.excelExport.title"),
|
|
45
|
+
tableTarget: null,
|
|
46
|
+
showContent: true,
|
|
47
|
+
percentageNum: 0,
|
|
48
|
+
exportGrid: {
|
|
49
|
+
className: "list-table",
|
|
50
|
+
resizable: true,
|
|
51
|
+
height: 120,
|
|
52
|
+
stripe: true,
|
|
53
|
+
highlightCurrentRow: true,
|
|
54
|
+
highlightHoverRow: true,
|
|
55
|
+
columns: [
|
|
56
|
+
{
|
|
57
|
+
field: "name",
|
|
58
|
+
minWidth: 140,
|
|
59
|
+
title: this.$t2("文件名", "components.excelExport.fileName"),
|
|
60
|
+
sortable: true,
|
|
61
|
+
slots: {
|
|
62
|
+
default: ({ row }) => {
|
|
63
|
+
return row.title + "-" + row.uuid;
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
field: "fileSize",
|
|
69
|
+
minWidth: 140,
|
|
70
|
+
title: this.$t2("大小", "components.excelExport.fileSize"),
|
|
71
|
+
sortable: true,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
field: "oper",
|
|
75
|
+
width: 140,
|
|
76
|
+
fixed: "right",
|
|
77
|
+
title: "",
|
|
78
|
+
sortable: false,
|
|
79
|
+
slots: {
|
|
80
|
+
default: "row_edit",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
excTime: 0,
|
|
86
|
+
showExportFieldDialog: false,
|
|
87
|
+
leafColumns: [],
|
|
88
|
+
columns: [],
|
|
89
|
+
queryParam: {},
|
|
90
|
+
isMinimize: false,
|
|
91
|
+
// 定时器必须放实例上:模块级共享会导致并发导出互相清除对方的定时器
|
|
92
|
+
exportTimer: null,
|
|
93
|
+
countTimer: null,
|
|
94
|
+
exportError: false,
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
created() {},
|
|
98
|
+
mounted() {
|
|
99
|
+
// this.exc();
|
|
100
|
+
},
|
|
101
|
+
beforeDestroy() {
|
|
102
|
+
this.clearExportTimer();
|
|
103
|
+
this.unlockMenu();
|
|
104
|
+
},
|
|
105
|
+
methods: {
|
|
106
|
+
exc() {
|
|
107
|
+
this.option = this.param;
|
|
108
|
+
let $grid = getGrid(this.option.vue, this.option.targetRef);
|
|
109
|
+
let datas = [];
|
|
110
|
+
// 明细导出的列来自 exportItemConfig,未维护时字段树为空、表头 JSON 也无从生成,
|
|
111
|
+
// 必须在此拦掉:这里是所有导出的唯一入口,放行下去会在字段选择弹框里抛异常。
|
|
112
|
+
if (isItemExport(this.option.type)) {
|
|
113
|
+
let originOption = $grid.params.originOption || {};
|
|
114
|
+
if (!originOption.exportItemConfig?.columns?.length) {
|
|
115
|
+
this.$baseAlert(
|
|
116
|
+
this.$t1("未维护明细导出列,请先在数据表格属性中配置")
|
|
117
|
+
);
|
|
118
|
+
this.param.destroyComponent();
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (requiresCheckedRows(this.option.type)) {
|
|
123
|
+
datas = $grid.getCheckboxRecords(true);
|
|
124
|
+
if (!datas.length) {
|
|
125
|
+
this.$baseAlert(
|
|
126
|
+
this.$t2("请选择导出的数据", "components.excelExport.warmMsg1")
|
|
127
|
+
);
|
|
128
|
+
this.param.destroyComponent();
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
} else if (this.option.type === "current") {
|
|
132
|
+
datas = $grid.getTableData().fullData;
|
|
133
|
+
if (!datas.length) {
|
|
134
|
+
this.$baseAlert(
|
|
135
|
+
this.$t2("不存在可导出的数据", "components.excelExport.warmMsg2")
|
|
136
|
+
);
|
|
137
|
+
this.param.destroyComponent();
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
this.isMinimize = false;
|
|
143
|
+
this.showExportFieldDialog = true;
|
|
144
|
+
},
|
|
145
|
+
handleMinimize() {
|
|
146
|
+
let result = !this.showImportDialog2;
|
|
147
|
+
this.isMinimize = !result;
|
|
148
|
+
this.showImportDialog2 = result;
|
|
149
|
+
},
|
|
150
|
+
dialogClose2() {
|
|
151
|
+
if (this.isMinimize) return;
|
|
152
|
+
let loadingObj = window.$vueRoot.$baseLoading({
|
|
153
|
+
target: document.body,
|
|
154
|
+
background: "unset",
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
this.$emit("update:visiable", false);
|
|
158
|
+
this.clearExportTimer();
|
|
159
|
+
// this.showImportDialog2 = false;
|
|
160
|
+
this.showExportFieldDialog = false;
|
|
161
|
+
// this.showContent = false;
|
|
162
|
+
setTimeout(() => {
|
|
163
|
+
this.param.destroyComponent(loadingObj);
|
|
164
|
+
}, 0);
|
|
165
|
+
},
|
|
166
|
+
dialogPrimary2() {
|
|
167
|
+
// this.showUserDialog=false
|
|
168
|
+
this.$emit("confirm");
|
|
169
|
+
this.$emit("close");
|
|
170
|
+
this.clearExportTimer();
|
|
171
|
+
},
|
|
172
|
+
startProcess() {
|
|
173
|
+
this.lockMenu();
|
|
174
|
+
this.createCountTimer();
|
|
175
|
+
this.tableTarget = getGrid(this.option.vue, this.option.targetRef);
|
|
176
|
+
|
|
177
|
+
//获取查询条件
|
|
178
|
+
let originOption = this.tableTarget.params.originOption;
|
|
179
|
+
this.queryParam = this.$baseLodash.cloneDeep(
|
|
180
|
+
originOption.param() || {}
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
let that = this;
|
|
184
|
+
let options = this.option;
|
|
185
|
+
let title = options.title
|
|
186
|
+
? this.$t1(options.title)
|
|
187
|
+
: this.$t2("导出", "components.excelExport.title");
|
|
188
|
+
if (!options.prefix && options.prefix !== "") {
|
|
189
|
+
let originOption = this.tableTarget.params.originOption;
|
|
190
|
+
let path = originOption.exportPath || originOption.path;
|
|
191
|
+
if (typeof path === "function") path = path();
|
|
192
|
+
if (path && typeof path === "string" && path !== "#") {
|
|
193
|
+
let os = path.split("/");
|
|
194
|
+
if (path.indexOf("http://") >= 0 || path.indexOf("https://") >= 0) {
|
|
195
|
+
options.prefix = "/" + os[3];
|
|
196
|
+
} else {
|
|
197
|
+
options.prefix = "/" + os[1];
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (!options.prefix) {
|
|
202
|
+
this.abortExport(
|
|
203
|
+
this.$t1("无法确定导出服务前缀,请在导出配置中指定 prefix")
|
|
204
|
+
);
|
|
205
|
+
this.unlockMenu();
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
this.CURRENT_PREFIX = options.prefix;
|
|
209
|
+
|
|
210
|
+
this.title = title;
|
|
211
|
+
that.tTotalPage = 0;
|
|
212
|
+
that.tTotalSize = 0;
|
|
213
|
+
that
|
|
214
|
+
.createExcelFile()
|
|
215
|
+
.then((resultMsg) => {
|
|
216
|
+
if (resultMsg.type === "success") {
|
|
217
|
+
let aObj = resultMsg.objx;
|
|
218
|
+
that.uuid = aObj.uuid;
|
|
219
|
+
that.nowDate = aObj.nowDate;
|
|
220
|
+
that.ippaaapp = aObj.ippaaapp;
|
|
221
|
+
setTimeout(function () {
|
|
222
|
+
/*num = 1;
|
|
223
|
+
loopToDo(0, num);*/
|
|
224
|
+
that.handleLoopToDo();
|
|
225
|
+
}, 300);
|
|
226
|
+
} else {
|
|
227
|
+
that.abortExport();
|
|
228
|
+
that.showImportDialog = false;
|
|
229
|
+
that.showImportDialog2 = false;
|
|
230
|
+
}
|
|
231
|
+
})
|
|
232
|
+
.catch((error) => {
|
|
233
|
+
console.error(error);
|
|
234
|
+
that.abortExport(that.$t1("创建导出文件失败,导出已中止"));
|
|
235
|
+
that.showImportDialog = false;
|
|
236
|
+
that.showImportDialog2 = false;
|
|
237
|
+
});
|
|
238
|
+
},
|
|
239
|
+
getExportPageSize() {
|
|
240
|
+
let pageSize = Math.min(this.option.pageSize || 1000, 1000);
|
|
241
|
+
let showImageAtTable = this.option.showImageAtTable || false;
|
|
242
|
+
let hasExportImage = !!this.leafColumns.find((item) => {
|
|
243
|
+
let exportType = item?.params?.exportType;
|
|
244
|
+
return exportType === "Image";
|
|
245
|
+
});
|
|
246
|
+
let hasExportImage2 = !!this.leafColumns.find((item) => {
|
|
247
|
+
let exportType = item?.params?.exportType;
|
|
248
|
+
return exportType === "Image2";
|
|
249
|
+
});
|
|
250
|
+
if (hasExportImage || (hasExportImage2 && showImageAtTable)) {
|
|
251
|
+
pageSize = Math.min(pageSize, 150);
|
|
252
|
+
}
|
|
253
|
+
return pageSize;
|
|
254
|
+
},
|
|
255
|
+
hadleMergeExcel(pPageSize) {
|
|
256
|
+
let that = this;
|
|
257
|
+
let title = this.title;
|
|
258
|
+
let options = this.option;
|
|
259
|
+
// let pPageSize = this.getExportPageSize();
|
|
260
|
+
let limitFileSize = options.limitFileSize || 100000;
|
|
261
|
+
let limitThreadNum = options.limitThreadNum || 5;
|
|
262
|
+
let totalPages = this.tTotalPage || 1;
|
|
263
|
+
|
|
264
|
+
let kTotalPages = parseInt(limitFileSize / pPageSize);
|
|
265
|
+
|
|
266
|
+
let fileNum = parseInt(totalPages / kTotalPages);
|
|
267
|
+
if (totalPages % kTotalPages !== 0) {
|
|
268
|
+
fileNum = fileNum + 1;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
let currentIndex = 0;
|
|
272
|
+
let mtExcedNum = 0;
|
|
273
|
+
let mtExcedSuccessNum = 0;
|
|
274
|
+
const loopDo = () => {
|
|
275
|
+
let startPage = currentIndex + 1;
|
|
276
|
+
if (mtExcedNum < fileNum) {
|
|
277
|
+
mtExcedNum++;
|
|
278
|
+
|
|
279
|
+
let endPage = currentIndex + kTotalPages;
|
|
280
|
+
if (endPage > totalPages) {
|
|
281
|
+
endPage = totalPages;
|
|
282
|
+
}
|
|
283
|
+
if (startPage > endPage) {
|
|
284
|
+
// 页码越界属异常状态,中止并不再发出非法页码的合并请求
|
|
285
|
+
that.abortExport();
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
currentIndex = endPage;
|
|
289
|
+
|
|
290
|
+
that
|
|
291
|
+
.mergeExcel(startPage, endPage)
|
|
292
|
+
.then(function (resultMsg3) {
|
|
293
|
+
if (resultMsg3.type === "success") {
|
|
294
|
+
mtExcedSuccessNum++;
|
|
295
|
+
let fileInfo = resultMsg3.objx;
|
|
296
|
+
let fileName = fileInfo.fileName;
|
|
297
|
+
let fileSize = fileInfo.fileSize;
|
|
298
|
+
|
|
299
|
+
let dataMap = {};
|
|
300
|
+
dataMap["startPage"] = startPage;
|
|
301
|
+
dataMap["endPage"] = endPage;
|
|
302
|
+
dataMap["title"] = title;
|
|
303
|
+
dataMap["uuid"] = fileName;
|
|
304
|
+
dataMap["fileSize"] = fileSize;
|
|
305
|
+
// fileRows.push(dataMap);
|
|
306
|
+
|
|
307
|
+
that.$refs["exportTable"].insertAt(dataMap, -1);
|
|
308
|
+
|
|
309
|
+
let fileSizeStr = fileSize;
|
|
310
|
+
|
|
311
|
+
// that.fileRows.push(dataMap);
|
|
312
|
+
if (mtExcedNum < fileNum) {
|
|
313
|
+
loopDo();
|
|
314
|
+
} else if (
|
|
315
|
+
mtExcedNum >= fileNum &&
|
|
316
|
+
mtExcedSuccessNum >= fileNum
|
|
317
|
+
) {
|
|
318
|
+
setTimeout(function () {
|
|
319
|
+
that.percentageNum = parseInt(100);
|
|
320
|
+
}, 100);
|
|
321
|
+
that.clearExportTimer();
|
|
322
|
+
} else if (mtExcedSuccessNum >= fileNum) {
|
|
323
|
+
setTimeout(function () {
|
|
324
|
+
that.percentageNum = parseInt(100);
|
|
325
|
+
}, 100);
|
|
326
|
+
that.clearExportTimer();
|
|
327
|
+
}
|
|
328
|
+
} else {
|
|
329
|
+
that.abortExport();
|
|
330
|
+
}
|
|
331
|
+
})
|
|
332
|
+
.catch(function (e) {
|
|
333
|
+
console.error(e);
|
|
334
|
+
that.abortExport(that.$t1("文件合并异常,导出已中止"));
|
|
335
|
+
});
|
|
336
|
+
// 注意:此处不能同步 clearExportTimer,否则计时统计会在合并完成前被提前停掉
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
loopDo();
|
|
340
|
+
},
|
|
341
|
+
handleLoopToDo() {
|
|
342
|
+
let that = this;
|
|
343
|
+
let uuid;
|
|
344
|
+
let num = 0;
|
|
345
|
+
let title = this.title;
|
|
346
|
+
|
|
347
|
+
let options = this.option;
|
|
348
|
+
|
|
349
|
+
let pPageSize = this.getExportPageSize();
|
|
350
|
+
let limitFileSize = options.limitFileSize || 100000;
|
|
351
|
+
let limitThreadNum = options.limitThreadNum || 5;
|
|
352
|
+
|
|
353
|
+
/**处理返回值*/
|
|
354
|
+
this.doneSize = 0;
|
|
355
|
+
let excedNum = 0;
|
|
356
|
+
let cSize = this.doneSize;
|
|
357
|
+
|
|
358
|
+
let handleData = function (resultMsg) {
|
|
359
|
+
let pageNumber = resultMsg.objx.pageNumber || 1;
|
|
360
|
+
that
|
|
361
|
+
.addExcelData({
|
|
362
|
+
rows: resultMsg.objx.records,
|
|
363
|
+
pageNumber: pageNumber,
|
|
364
|
+
})
|
|
365
|
+
.then(function (resultMsg2) {
|
|
366
|
+
let data = resultMsg.objx;
|
|
367
|
+
let total = data.total;
|
|
368
|
+
|
|
369
|
+
let pageNumber = data.pageNumber || 1;
|
|
370
|
+
let totalPages = that.tTotalPage || 1;
|
|
371
|
+
if (resultMsg2.type === "success") {
|
|
372
|
+
excedNum++;
|
|
373
|
+
let pageNumber = data.pageNumber || 1;
|
|
374
|
+
let k = (excedNum * 100) / totalPages;
|
|
375
|
+
if (k > 0 && k < 1) {
|
|
376
|
+
k = 1;
|
|
377
|
+
}
|
|
378
|
+
if (k > 100) k = 100;
|
|
379
|
+
let cTotal = that.tTotalSize;
|
|
380
|
+
let pageSize = data.pageSize;
|
|
381
|
+
// let datas = data.records;
|
|
382
|
+
let size = data.records.length;
|
|
383
|
+
cSize = cSize + size;
|
|
384
|
+
|
|
385
|
+
let ttNum = cSize + "/" + cTotal;
|
|
386
|
+
let percentageStr = parseInt(k) + "%";
|
|
387
|
+
|
|
388
|
+
let percentageNum = k;
|
|
389
|
+
if (percentageNum >= 100) {
|
|
390
|
+
percentageNum = 99;
|
|
391
|
+
}
|
|
392
|
+
// that.$set(that, "doneSize", parseInt(cSize));
|
|
393
|
+
// that.$set(that, "percentageNum", parseInt(percentageNum));
|
|
394
|
+
|
|
395
|
+
that.doneSize = parseInt(cSize);
|
|
396
|
+
that.percentageNum = parseInt(percentageNum);
|
|
397
|
+
|
|
398
|
+
if (totalPages === 0 || excedNum >= totalPages) {
|
|
399
|
+
that.hadleMergeExcel(data.pageSize);
|
|
400
|
+
return;
|
|
401
|
+
|
|
402
|
+
/*let kTotalPages = parseInt(limitFileSize / data.pageSize);
|
|
403
|
+
|
|
404
|
+
let fileNum = parseInt(totalPages / kTotalPages);
|
|
405
|
+
if (totalPages % kTotalPages !== 0) {
|
|
406
|
+
fileNum = fileNum + 1;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
let currentIndex = 0;
|
|
410
|
+
let excingNum = 0;
|
|
411
|
+
let mtExcedNum = 0;
|
|
412
|
+
let mtExcedSuccessNum = 0;
|
|
413
|
+
|
|
414
|
+
let fileRows = [];
|
|
415
|
+
|
|
416
|
+
setTimeout(function () {
|
|
417
|
+
let startPage = currentIndex + 1;
|
|
418
|
+
if (mtExcedNum < fileNum) {
|
|
419
|
+
if (excingNum >= limitThreadNum) return false;
|
|
420
|
+
excingNum++;
|
|
421
|
+
mtExcedNum++;
|
|
422
|
+
|
|
423
|
+
let endPage = currentIndex + kTotalPages;
|
|
424
|
+
if (endPage > totalPages) {
|
|
425
|
+
endPage = totalPages;
|
|
426
|
+
}
|
|
427
|
+
if (startPage > endPage) {
|
|
428
|
+
that.clearExportTimer();
|
|
429
|
+
}
|
|
430
|
+
currentIndex = endPage;
|
|
431
|
+
|
|
432
|
+
that.mergeExcel(startPage, endPage).then(function (resultMsg3) {
|
|
433
|
+
if (resultMsg3.type === "success") {
|
|
434
|
+
excingNum--;
|
|
435
|
+
mtExcedSuccessNum++;
|
|
436
|
+
let fileInfo = resultMsg3.objx;
|
|
437
|
+
let fileName = fileInfo.fileName;
|
|
438
|
+
let fileSize = fileInfo.fileSize;
|
|
439
|
+
|
|
440
|
+
let dataMap = {};
|
|
441
|
+
dataMap["startPage"] = startPage;
|
|
442
|
+
dataMap["endPage"] = endPage;
|
|
443
|
+
dataMap["title"] = title;
|
|
444
|
+
dataMap["uuid"] = fileName;
|
|
445
|
+
dataMap["fileSize"] = fileSize;
|
|
446
|
+
// fileRows.push(dataMap);
|
|
447
|
+
|
|
448
|
+
that.$refs["exportTable"].insertAt(
|
|
449
|
+
dataMap, -1);
|
|
450
|
+
|
|
451
|
+
let fileSizeStr = fileSize;
|
|
452
|
+
|
|
453
|
+
// that.fileRows.push(dataMap);
|
|
454
|
+
|
|
455
|
+
if (mtExcedNum >= fileNum && mtExcedSuccessNum >= fileNum) {
|
|
456
|
+
setTimeout(function () {
|
|
457
|
+
that.percentageNum =
|
|
458
|
+
parseInt(100);
|
|
459
|
+
}, 100);
|
|
460
|
+
that.clearExportTimer();
|
|
461
|
+
} else if (mtExcedSuccessNum >= fileNum) {
|
|
462
|
+
setTimeout(function () {
|
|
463
|
+
that.percentageNum = parseInt(100);
|
|
464
|
+
}, 100);
|
|
465
|
+
that.clearExportTimer();
|
|
466
|
+
}
|
|
467
|
+
} else {
|
|
468
|
+
that.clearExportTimer();
|
|
469
|
+
}
|
|
470
|
+
}).catch(function (e) {
|
|
471
|
+
console.error(e);
|
|
472
|
+
that.clearExportTimer();
|
|
473
|
+
});
|
|
474
|
+
that.clearExportTimer();
|
|
475
|
+
}
|
|
476
|
+
}, 100);*/
|
|
477
|
+
return false;
|
|
478
|
+
}
|
|
479
|
+
} else {
|
|
480
|
+
that.abortExport();
|
|
481
|
+
}
|
|
482
|
+
})
|
|
483
|
+
.catch(function (e) {
|
|
484
|
+
console.error(e);
|
|
485
|
+
that.abortExport(that.$t1("导出数据写入失败,导出已中止"));
|
|
486
|
+
});
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
let waitReqNum = 0;
|
|
490
|
+
let promise;
|
|
491
|
+
let loopToDo = function (flag, pageNumber, retryCount = 0) {
|
|
492
|
+
let maxWaitNum = limitThreadNum;
|
|
493
|
+
let nowDate = options.nowDate;
|
|
494
|
+
if (flag === 1) {
|
|
495
|
+
/*if (num > that.tTotalPage) {
|
|
496
|
+
let size = page.records.length;
|
|
497
|
+
if (size === 0 || page.totalPages === 0 || (page.pageNumber >= page.totalPages)) {
|
|
498
|
+
that.clearExportTimer();
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
}*/
|
|
502
|
+
} else {
|
|
503
|
+
waitReqNum = 0;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
let target = that.tableTarget;
|
|
507
|
+
let originOption = target.params.originOption;
|
|
508
|
+
let url = originOption.exportPath || originOption.path;
|
|
509
|
+
|
|
510
|
+
// let params = originOption.param() || {};
|
|
511
|
+
let params = that.queryParam;
|
|
512
|
+
let aParam = {
|
|
513
|
+
current: pageNumber,
|
|
514
|
+
size: pPageSize,
|
|
515
|
+
nowDate: nowDate,
|
|
516
|
+
searchCount: flag !== 1,
|
|
517
|
+
};
|
|
518
|
+
let cpParam;
|
|
519
|
+
if (originOption.vform === true) {
|
|
520
|
+
params.conditions = params.conditions || {};
|
|
521
|
+
cpParam = params.conditions;
|
|
522
|
+
} else {
|
|
523
|
+
cpParam = params;
|
|
524
|
+
}
|
|
525
|
+
Object.assign(cpParam, aParam);
|
|
526
|
+
|
|
527
|
+
if (!originOption.exportAjax) {
|
|
528
|
+
let turl = url.replace("searchCount=false", "1=1");
|
|
529
|
+
let finaParams = params;
|
|
530
|
+
if (originOption.paramHandle) {
|
|
531
|
+
finaParams = originOption.paramHandle
|
|
532
|
+
? originOption.paramHandle(params) || {}
|
|
533
|
+
: {};
|
|
534
|
+
}
|
|
535
|
+
promise = that.$commonHttp({
|
|
536
|
+
aes: originOption.aes || false,
|
|
537
|
+
url: turl,
|
|
538
|
+
method: "post",
|
|
539
|
+
data: finaParams,
|
|
540
|
+
modal: false,
|
|
541
|
+
queryCreateInfo: originOption.queryCreateInfo,
|
|
542
|
+
addCreateInfo: originOption.addCreateInfo,
|
|
543
|
+
});
|
|
544
|
+
} else {
|
|
545
|
+
promise = originOption.exportAjax(aParam, options);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
promise
|
|
549
|
+
.then(function (resultMsg) {
|
|
550
|
+
if (resultMsg.type === "success") {
|
|
551
|
+
let objx = resultMsg.objx;
|
|
552
|
+
objx.pageNumber = objx.current || 1;
|
|
553
|
+
objx.totalPages = objx.pages || 1;
|
|
554
|
+
objx.pageSize = objx.size;
|
|
555
|
+
let size = objx.records.length;
|
|
556
|
+
if (flag === 0) {
|
|
557
|
+
that.tTotalPage = objx.pages;
|
|
558
|
+
// that.tTotalSize = objx.total;
|
|
559
|
+
setTimeout(function () {
|
|
560
|
+
that.$set(that, "tTotalSize", objx.total);
|
|
561
|
+
}, 0);
|
|
562
|
+
let tTotalPage = objx.pages;
|
|
563
|
+
let tTotalSize = objx.total;
|
|
564
|
+
let ttNum = 0 + "/" + objx.total;
|
|
565
|
+
|
|
566
|
+
let opNum = limitFileSize;
|
|
567
|
+
let kTotalPages = parseInt(opNum / objx.size);
|
|
568
|
+
|
|
569
|
+
let fileNum = parseInt(tTotalPage / kTotalPages);
|
|
570
|
+
if (tTotalPage % kTotalPages !== 0) {
|
|
571
|
+
fileNum = fileNum + 1;
|
|
572
|
+
}
|
|
573
|
+
if (
|
|
574
|
+
size > 0 ||
|
|
575
|
+
objx.totalPages > 0 ||
|
|
576
|
+
objx.pageNumber < objx.totalPages
|
|
577
|
+
) {
|
|
578
|
+
that.exportTimer = setInterval(function () {
|
|
579
|
+
if (waitReqNum < maxWaitNum && num < tTotalPage) {
|
|
580
|
+
waitReqNum++;
|
|
581
|
+
num++;
|
|
582
|
+
let pageNumber = num;
|
|
583
|
+
loopToDo(1, pageNumber);
|
|
584
|
+
}
|
|
585
|
+
if (num >= tTotalPage) {
|
|
586
|
+
// 所有页已派发,停掉调度器(数据写入完成与否由 handleData 计数判断)
|
|
587
|
+
clearInterval(that.exportTimer);
|
|
588
|
+
that.exportTimer = null;
|
|
589
|
+
}
|
|
590
|
+
}, 100);
|
|
591
|
+
} else {
|
|
592
|
+
clearInterval(that.exportTimer);
|
|
593
|
+
that.exportTimer = null;
|
|
594
|
+
}
|
|
595
|
+
} else {
|
|
596
|
+
if (waitReqNum > 0) waitReqNum--;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
setTimeout(function () {
|
|
600
|
+
handleData(resultMsg, flag);
|
|
601
|
+
}, 1);
|
|
602
|
+
} else {
|
|
603
|
+
// 单页拉取失败自动重试一次;仍失败则中止(缺页合并会静默丢数据,必须中止)
|
|
604
|
+
if (retryCount < 1) {
|
|
605
|
+
setTimeout(function () {
|
|
606
|
+
loopToDo(flag, pageNumber, retryCount + 1);
|
|
607
|
+
}, 500);
|
|
608
|
+
} else {
|
|
609
|
+
that.abortExport();
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
})
|
|
613
|
+
.catch(function (e) {
|
|
614
|
+
console.error(e);
|
|
615
|
+
if (retryCount < 1) {
|
|
616
|
+
setTimeout(function () {
|
|
617
|
+
loopToDo(flag, pageNumber, retryCount + 1);
|
|
618
|
+
}, 500);
|
|
619
|
+
} else {
|
|
620
|
+
that.abortExport(
|
|
621
|
+
that.$t1("第{n}页数据拉取失败,导出已中止", {
|
|
622
|
+
n: pageNumber,
|
|
623
|
+
})
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
num = 1;
|
|
630
|
+
loopToDo(0, num);
|
|
631
|
+
},
|
|
632
|
+
createExcelFile(loading) {
|
|
633
|
+
let url1 = this.CURRENT_PREFIX + "/excel/createExcelTemplate";
|
|
634
|
+
let datas = this.getHeadTitleJson();
|
|
635
|
+
return this.$http({
|
|
636
|
+
url: url1,
|
|
637
|
+
method: "post",
|
|
638
|
+
headers: {
|
|
639
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
640
|
+
},
|
|
641
|
+
data: datas,
|
|
642
|
+
modal: loading || false,
|
|
643
|
+
isLoading: loading,
|
|
644
|
+
});
|
|
645
|
+
},
|
|
646
|
+
/*getExportTitleJson() {
|
|
647
|
+
let target = this.tableTarget;
|
|
648
|
+
// let columns = target.getColumns();
|
|
649
|
+
let columns = this.columns;
|
|
650
|
+
let titles = [];
|
|
651
|
+
columns.forEach(column => {
|
|
652
|
+
if (column.title) {
|
|
653
|
+
// titles.push(column.title)
|
|
654
|
+
titles.push({
|
|
655
|
+
colspan: 1,
|
|
656
|
+
rowspan: 1,
|
|
657
|
+
title: column.title
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
return [titles];
|
|
662
|
+
},*/
|
|
663
|
+
computeRealColSpan(columns) {
|
|
664
|
+
// 深拷贝避免修改原数据(可选)
|
|
665
|
+
// const result = JSON.parse(JSON.stringify(columns));
|
|
666
|
+
|
|
667
|
+
function traverse(node) {
|
|
668
|
+
if (!node.children || node.children.length === 0) {
|
|
669
|
+
// 叶子节点:realColSpan = 原始 colSpan
|
|
670
|
+
node.realColSpan = node.colSpan || 1;
|
|
671
|
+
} else {
|
|
672
|
+
// 非叶子节点:递归处理子节点,然后求和
|
|
673
|
+
let sum = 0;
|
|
674
|
+
for (const child of node.children) {
|
|
675
|
+
traverse(child);
|
|
676
|
+
sum += child.realColSpan;
|
|
677
|
+
}
|
|
678
|
+
node.realColSpan = sum;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
for (const col of columns) {
|
|
683
|
+
traverse(col);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
return columns;
|
|
687
|
+
},
|
|
688
|
+
getHeadTitleJson() {
|
|
689
|
+
let that = this;
|
|
690
|
+
let target = this.tableTarget;
|
|
691
|
+
// let columns = target.getTableColumn().collectColumn;
|
|
692
|
+
let columns = this.columns;
|
|
693
|
+
|
|
694
|
+
this.computeRealColSpan(columns);
|
|
695
|
+
|
|
696
|
+
let maxRowNum = 0;
|
|
697
|
+
let loop = function (column, n) {
|
|
698
|
+
if (column.children && column.children.length > 0) {
|
|
699
|
+
let num = n + 1;
|
|
700
|
+
column.children.forEach((child) => {
|
|
701
|
+
return loop(child, num);
|
|
702
|
+
});
|
|
703
|
+
} else {
|
|
704
|
+
let num = n;
|
|
705
|
+
if (num > maxRowNum) maxRowNum = num;
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
columns.forEach((column) => {
|
|
710
|
+
if (column.title) {
|
|
711
|
+
loop(column, 0);
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
maxRowNum = maxRowNum + 1;
|
|
715
|
+
|
|
716
|
+
let titleArr = [];
|
|
717
|
+
let columnsArr = [columns];
|
|
718
|
+
for (let i = 0; i < maxRowNum; i++) {
|
|
719
|
+
let contents = [];
|
|
720
|
+
let items = columnsArr[i];
|
|
721
|
+
let nextArr = [];
|
|
722
|
+
let colspan = 1;
|
|
723
|
+
let rowspan = 1;
|
|
724
|
+
items.forEach((column, index) => {
|
|
725
|
+
if (column.title) {
|
|
726
|
+
if (column.children && column.children.length > 0) {
|
|
727
|
+
nextArr = nextArr.concat(column.children);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
contents.push({
|
|
731
|
+
colspan: column.realColSpan,
|
|
732
|
+
rowspan: column.rowSpan,
|
|
733
|
+
title:
|
|
734
|
+
column.title !== null && column.title !== undefined
|
|
735
|
+
? column.title
|
|
736
|
+
: "",
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
titleArr.push(contents);
|
|
741
|
+
if (nextArr.length > 0) columnsArr.push(nextArr);
|
|
742
|
+
}
|
|
743
|
+
return titleArr;
|
|
744
|
+
},
|
|
745
|
+
addExcelData(opts, loading) {
|
|
746
|
+
let target = opts.target;
|
|
747
|
+
let pageNumber = opts.pageNumber || 1;
|
|
748
|
+
let callback = opts.callback;
|
|
749
|
+
let datas = this.getExcelData(opts.rows);
|
|
750
|
+
let cUUid = this.uuid;
|
|
751
|
+
let ippaaapp = this.ippaaapp;
|
|
752
|
+
let url1 =
|
|
753
|
+
this.CURRENT_PREFIX +
|
|
754
|
+
"/excel/appendExcelData?uuid=" +
|
|
755
|
+
cUUid +
|
|
756
|
+
"&ippaaapp=" +
|
|
757
|
+
ippaaapp +
|
|
758
|
+
"&pageNumber=" +
|
|
759
|
+
pageNumber;
|
|
760
|
+
return this.$http({
|
|
761
|
+
url: url1,
|
|
762
|
+
method: "post",
|
|
763
|
+
headers: {
|
|
764
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
765
|
+
},
|
|
766
|
+
data: datas,
|
|
767
|
+
modal: loading || false,
|
|
768
|
+
isLoading: loading || false,
|
|
769
|
+
});
|
|
770
|
+
},
|
|
771
|
+
mergeExcel(startPage, endPage, loading) {
|
|
772
|
+
let url1 =
|
|
773
|
+
this.CURRENT_PREFIX +
|
|
774
|
+
"/excel/mergeExcel?uuid=" +
|
|
775
|
+
this.uuid +
|
|
776
|
+
"&ippaaapp=" +
|
|
777
|
+
this.ippaaapp;
|
|
778
|
+
return this.$http({
|
|
779
|
+
url: url1 + "&startPage=" + startPage + "&endPage=" + endPage,
|
|
780
|
+
method: "post",
|
|
781
|
+
modal: loading || false,
|
|
782
|
+
isLoading: loading || false,
|
|
783
|
+
});
|
|
784
|
+
},
|
|
785
|
+
createCountTimer() {
|
|
786
|
+
this.excTime = 0;
|
|
787
|
+
let beginTime = new Date().getTime();
|
|
788
|
+
this.countTimer = setInterval(() => {
|
|
789
|
+
let nowTime = new Date().getTime();
|
|
790
|
+
let diffTime = (nowTime - beginTime) / 1000;
|
|
791
|
+
this.$set(this, "excTime", this.$baseLodash.round(diffTime, 2));
|
|
792
|
+
}, 100);
|
|
793
|
+
},
|
|
794
|
+
clearExportTimer() {
|
|
795
|
+
if (this.exportTimer) clearInterval(this.exportTimer);
|
|
796
|
+
if (this.countTimer) clearInterval(this.countTimer);
|
|
797
|
+
this.exportTimer = null;
|
|
798
|
+
this.countTimer = null;
|
|
799
|
+
},
|
|
800
|
+
/**
|
|
801
|
+
* 中止导出:停止全部定时器并把进度条置为错误态。
|
|
802
|
+
* @param {String} [msg] 需要额外弹给用户的提示;服务端已 toast 过的失败不传,避免重复提示。
|
|
803
|
+
*/
|
|
804
|
+
abortExport(msg) {
|
|
805
|
+
this.clearExportTimer();
|
|
806
|
+
this.exportError = true;
|
|
807
|
+
if (msg) this.$baseAlert(msg);
|
|
808
|
+
},
|
|
809
|
+
isPicture: function (suffix) {
|
|
810
|
+
if (!suffix || suffix === "") {
|
|
811
|
+
return false;
|
|
812
|
+
}
|
|
813
|
+
suffix = suffix.toLowerCase();
|
|
814
|
+
let fileTypeMap = {
|
|
815
|
+
jpg: true,
|
|
816
|
+
jpeg: true,
|
|
817
|
+
png: true,
|
|
818
|
+
// gif: true,
|
|
819
|
+
bmp: true,
|
|
820
|
+
mpg: true,
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
let type = fileTypeMap[suffix];
|
|
824
|
+
if (undefined === type) {
|
|
825
|
+
return false;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
return true;
|
|
829
|
+
},
|
|
830
|
+
/**
|
|
831
|
+
* 导出取值快路径:优先纯函数取值(filterVal → formatter → 原始字段),
|
|
832
|
+
* 只有真正配置了自定义渲染(renderCell/函数型 slots.default)的列才走
|
|
833
|
+
* getCellValue 的 vNode 挂载渲染兜底 —— 后者每个单元格要挂载一次 Vue
|
|
834
|
+
* 组件再爬 DOM,是导出耗时的大头。
|
|
835
|
+
* 字符串型 slots.default(具名插槽,如 xform 的 "widget")由 getCellValue
|
|
836
|
+
* 从 grid 作用域插槽解析后渲染;解析不到时其内部回退原始字段。
|
|
837
|
+
*/
|
|
838
|
+
getExportCellValue(params) {
|
|
839
|
+
let column = params.column;
|
|
840
|
+
if (column.slots && typeof column.slots.filterVal === "function") {
|
|
841
|
+
return column.slots.filterVal(params);
|
|
842
|
+
}
|
|
843
|
+
let slotDefault = column.slots && column.slots.default;
|
|
844
|
+
let hasRenderFn =
|
|
845
|
+
!!column.renderCell ||
|
|
846
|
+
typeof slotDefault === "function" ||
|
|
847
|
+
typeof slotDefault === "string";
|
|
848
|
+
if (!hasRenderFn) {
|
|
849
|
+
let cellValue = params.row[column.field];
|
|
850
|
+
if (typeof column.formatter === "function") {
|
|
851
|
+
return column.formatter({
|
|
852
|
+
cellValue,
|
|
853
|
+
row: params.row,
|
|
854
|
+
column,
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
return cellValue;
|
|
858
|
+
}
|
|
859
|
+
return getCellValue(params);
|
|
860
|
+
},
|
|
861
|
+
getExcelData(rows) {
|
|
862
|
+
let that = this;
|
|
863
|
+
|
|
864
|
+
let showImageAtTable = this.option.showImageAtTable || false;
|
|
865
|
+
// let target = this.option.vue.$refs[this.option.targetRef];
|
|
866
|
+
let target = getGrid(this.option.vue, this.option.targetRef);
|
|
867
|
+
let $table = target.$refs.xTable;
|
|
868
|
+
|
|
869
|
+
// let columns = target.getColumns();
|
|
870
|
+
let columns = this.leafColumns.filter(
|
|
871
|
+
(column) => !column.params?.exportDisabled
|
|
872
|
+
);
|
|
873
|
+
|
|
874
|
+
let arr = [];
|
|
875
|
+
let contents;
|
|
876
|
+
let params;
|
|
877
|
+
let resultStr;
|
|
878
|
+
// 批量取值期间复用 vNode 渲染的临时实例,结束时统一销毁
|
|
879
|
+
rows.forEach(function (row, index) {
|
|
880
|
+
contents = [];
|
|
881
|
+
columns.forEach((column) => {
|
|
882
|
+
if (column.title) {
|
|
883
|
+
params = {
|
|
884
|
+
$table: $table,
|
|
885
|
+
row: row,
|
|
886
|
+
rowIndex: index,
|
|
887
|
+
$rowIndex: index,
|
|
888
|
+
column: column,
|
|
889
|
+
// columnIndex: 0,
|
|
890
|
+
// $columnIndex: 0,
|
|
891
|
+
// _columnIndex
|
|
892
|
+
};
|
|
893
|
+
let exportType = column.params?.exportType;
|
|
894
|
+
let exportVal =
|
|
895
|
+
column.params && column.params.exportVal
|
|
896
|
+
? column.params.exportVal
|
|
897
|
+
: null;
|
|
898
|
+
if (exportVal) {
|
|
899
|
+
resultStr = exportVal(params);
|
|
900
|
+
} else if (exportType === "Number") {
|
|
901
|
+
resultStr = that.getExportCellValue(params);
|
|
902
|
+
if (
|
|
903
|
+
resultStr !== null &&
|
|
904
|
+
resultStr !== undefined &&
|
|
905
|
+
resultStr !== "" &&
|
|
906
|
+
!(resultStr + "").startsWith("[EXPNUM]")
|
|
907
|
+
) {
|
|
908
|
+
resultStr = "[EXPNUM]" + resultStr;
|
|
909
|
+
}
|
|
910
|
+
} else if (
|
|
911
|
+
exportType === "Image" ||
|
|
912
|
+
(showImageAtTable && exportType === "Image2")
|
|
913
|
+
) {
|
|
914
|
+
resultStr = that.getExportCellValue(params);
|
|
915
|
+
let attachments = row[column.field];
|
|
916
|
+
if (attachments) {
|
|
917
|
+
if (Array.isArray(attachments)) {
|
|
918
|
+
let items = attachments.filter((item) =>
|
|
919
|
+
that.isPicture(item.extension)
|
|
920
|
+
);
|
|
921
|
+
if (items.length > 0) {
|
|
922
|
+
resultStr =
|
|
923
|
+
"[EXPIMG]" +
|
|
924
|
+
items
|
|
925
|
+
.map((item) => {
|
|
926
|
+
let url = item.large || item.medium;
|
|
927
|
+
return item.domain + url;
|
|
928
|
+
})
|
|
929
|
+
.join(",");
|
|
930
|
+
} else {
|
|
931
|
+
resultStr = null;
|
|
932
|
+
}
|
|
933
|
+
} else {
|
|
934
|
+
if (
|
|
935
|
+
that.isPicture(
|
|
936
|
+
that.$commonFileUtil.getFileSuffix(resultStr)
|
|
937
|
+
)
|
|
938
|
+
) {
|
|
939
|
+
if (
|
|
940
|
+
resultStr !== null &&
|
|
941
|
+
resultStr !== undefined &&
|
|
942
|
+
resultStr !== "" &&
|
|
943
|
+
!(resultStr + "").startsWith("[EXPIMG]")
|
|
944
|
+
) {
|
|
945
|
+
resultStr = "[EXPIMG]" + resultStr;
|
|
946
|
+
}
|
|
947
|
+
} else {
|
|
948
|
+
resultStr = null;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
} else {
|
|
952
|
+
resultStr = null;
|
|
953
|
+
}
|
|
954
|
+
} else {
|
|
955
|
+
resultStr = that.getExportCellValue(params);
|
|
956
|
+
}
|
|
957
|
+
contents.push(resultStr);
|
|
958
|
+
resultStr = null;
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
arr.push(contents);
|
|
962
|
+
});
|
|
963
|
+
return arr;
|
|
964
|
+
},
|
|
965
|
+
exportAll(row) {
|
|
966
|
+
let cUUid = encodeURIComponent(row.uuid);
|
|
967
|
+
let ippaaapp = this.ippaaapp;
|
|
968
|
+
let fileName = row.title;
|
|
969
|
+
let fileUrl =
|
|
970
|
+
configUtil.baseUrl +
|
|
971
|
+
this.CURRENT_PREFIX +
|
|
972
|
+
"/excel/download?uuid=" +
|
|
973
|
+
cUUid +
|
|
974
|
+
"&ippaaapp=" +
|
|
975
|
+
ippaaapp;
|
|
976
|
+
|
|
977
|
+
function downLoadFile2() {
|
|
978
|
+
let params = {
|
|
979
|
+
n: fileName,
|
|
980
|
+
};
|
|
981
|
+
params["access_token"] = configUtil.getToken();
|
|
982
|
+
|
|
983
|
+
let form = document.createElement("form");
|
|
984
|
+
|
|
985
|
+
let randomNum =
|
|
986
|
+
new Date().valueOf() + Math.floor(Math.random() * 1000000);
|
|
987
|
+
let formId = "formId-" + randomNum;
|
|
988
|
+
let formName = "formName-" + randomNum;
|
|
989
|
+
|
|
990
|
+
form.id = formId;
|
|
991
|
+
form.name = formName;
|
|
992
|
+
form.target = "_blank";
|
|
993
|
+
document.body.appendChild(form);
|
|
994
|
+
for (let obj in params) {
|
|
995
|
+
if (params.hasOwnProperty(obj)) {
|
|
996
|
+
let input = document.createElement("input");
|
|
997
|
+
input.type = "hidden";
|
|
998
|
+
input.name = obj;
|
|
999
|
+
input.value = params[obj];
|
|
1000
|
+
form.appendChild(input);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
form.method = "post"; //请求方式
|
|
1004
|
+
form.action = fileUrl;
|
|
1005
|
+
form.submit();
|
|
1006
|
+
document.body.removeChild(form);
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
downLoadFile2();
|
|
1010
|
+
},
|
|
1011
|
+
startProcess2(datas) {
|
|
1012
|
+
this.tableTarget = getGrid(this.option.vue, this.option.targetRef);
|
|
1013
|
+
let that = this;
|
|
1014
|
+
let options = this.option;
|
|
1015
|
+
let title =
|
|
1016
|
+
options.title || this.$t2("导出", "components.excelExport.title");
|
|
1017
|
+
if (!options.prefix && options.prefix !== "") {
|
|
1018
|
+
let originOption = this.tableTarget.params.originOption;
|
|
1019
|
+
let path = originOption.exportPath || originOption.path;
|
|
1020
|
+
if (typeof path === "function") path = path();
|
|
1021
|
+
if (path && typeof path === "string" && path !== "#") {
|
|
1022
|
+
let os = path.split("/");
|
|
1023
|
+
if (path.indexOf("http://") >= 0 || path.indexOf("https://") >= 0) {
|
|
1024
|
+
options.prefix = "/" + os[3];
|
|
1025
|
+
} else {
|
|
1026
|
+
options.prefix = "/" + os[1];
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
if (!options.prefix) {
|
|
1031
|
+
this.$baseAlert(
|
|
1032
|
+
this.$t1("无法确定导出服务前缀,请在导出配置中指定 prefix")
|
|
1033
|
+
);
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
this.CURRENT_PREFIX = options.prefix;
|
|
1037
|
+
|
|
1038
|
+
let handleData = function () {
|
|
1039
|
+
let total = datas.length;
|
|
1040
|
+
that
|
|
1041
|
+
.addExcelData(
|
|
1042
|
+
{
|
|
1043
|
+
rows: datas,
|
|
1044
|
+
pageNumber: 1,
|
|
1045
|
+
},
|
|
1046
|
+
true
|
|
1047
|
+
)
|
|
1048
|
+
.then((resultMsg2) => {
|
|
1049
|
+
if (resultMsg2.type === "success") {
|
|
1050
|
+
setTimeout(() => {
|
|
1051
|
+
that.mergeExcel(1, 1, true).then((resultMsg3) => {
|
|
1052
|
+
if (resultMsg3.type === "success") {
|
|
1053
|
+
let fileInfo = resultMsg3.objx;
|
|
1054
|
+
let fileName = fileInfo.fileName;
|
|
1055
|
+
let fileSize = fileInfo.fileSize;
|
|
1056
|
+
|
|
1057
|
+
let dataMap = {};
|
|
1058
|
+
dataMap["startPage"] = 1;
|
|
1059
|
+
dataMap["endPage"] = 1;
|
|
1060
|
+
dataMap["title"] = title;
|
|
1061
|
+
dataMap["uuid"] = fileName;
|
|
1062
|
+
dataMap["fileSize"] = fileSize;
|
|
1063
|
+
that.exportAll(dataMap);
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1066
|
+
}, 0);
|
|
1067
|
+
}
|
|
1068
|
+
});
|
|
1069
|
+
};
|
|
1070
|
+
that.createExcelFile(true).then((resultMsg) => {
|
|
1071
|
+
if (resultMsg.type === "success") {
|
|
1072
|
+
let aObj = resultMsg.objx;
|
|
1073
|
+
that.uuid = aObj.uuid;
|
|
1074
|
+
that.nowDate = aObj.nowDate;
|
|
1075
|
+
that.ippaaapp = aObj.ippaaapp;
|
|
1076
|
+
setTimeout(() => {
|
|
1077
|
+
handleData();
|
|
1078
|
+
}, 0);
|
|
1079
|
+
}
|
|
1080
|
+
});
|
|
1081
|
+
},
|
|
1082
|
+
closeExportFieldDialog() {
|
|
1083
|
+
this.dialogClose2();
|
|
1084
|
+
},
|
|
1085
|
+
confirmExportFieldDialog({ columns, leafColumns }) {
|
|
1086
|
+
this.columns = columns;
|
|
1087
|
+
this.leafColumns = leafColumns;
|
|
1088
|
+
let flag = isRowExport(this.option.type);
|
|
1089
|
+
if (!flag) {
|
|
1090
|
+
this.showImportDialog2 = true;
|
|
1091
|
+
}
|
|
1092
|
+
this.$nextTick(() => {
|
|
1093
|
+
if (flag) {
|
|
1094
|
+
let $grid = getGrid(this.option.vue, this.option.targetRef);
|
|
1095
|
+
let datas = [];
|
|
1096
|
+
if (this.option.type === "selected") {
|
|
1097
|
+
datas = $grid.getCheckboxRecords(true);
|
|
1098
|
+
if (!datas.length) {
|
|
1099
|
+
this.$baseAlert(
|
|
1100
|
+
this.$t2(
|
|
1101
|
+
"请选择导出的数据",
|
|
1102
|
+
"components.excelExport.warmMsg1"
|
|
1103
|
+
)
|
|
1104
|
+
);
|
|
1105
|
+
return;
|
|
1106
|
+
}
|
|
1107
|
+
} else if (this.option.type === "current") {
|
|
1108
|
+
datas = $grid.getTableData().fullData;
|
|
1109
|
+
if (!datas.length) {
|
|
1110
|
+
this.$baseAlert(
|
|
1111
|
+
this.$t2(
|
|
1112
|
+
"不存在可导出的数据",
|
|
1113
|
+
"components.excelExport.warmMsg2"
|
|
1114
|
+
)
|
|
1115
|
+
);
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
this.startProcess2(datas);
|
|
1120
|
+
} else {
|
|
1121
|
+
this.startProcess();
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
},
|
|
1125
|
+
lockMenu() {
|
|
1126
|
+
let vueTarget = window.$vueRoot;
|
|
1127
|
+
let path = vueTarget.$route.path;
|
|
1128
|
+
let visitedViews = vueTarget.$store.state.tagsView.visitedViews;
|
|
1129
|
+
if (visitedViews) {
|
|
1130
|
+
let currentItem = visitedViews.find((item) => item.path === path);
|
|
1131
|
+
if (currentItem && !currentItem.meta.affix) {
|
|
1132
|
+
this.$set(currentItem.meta, "affix", true);
|
|
1133
|
+
this.$set(currentItem.meta, "user_affix", true);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
unlockMenu() {
|
|
1138
|
+
let vueTarget = window.$vueRoot;
|
|
1139
|
+
let path = vueTarget.$route.path;
|
|
1140
|
+
let visitedViews = vueTarget.$store.state.tagsView.visitedViews;
|
|
1141
|
+
if (visitedViews) {
|
|
1142
|
+
let currentItem = visitedViews.find((item) => item.path === path);
|
|
1143
|
+
if (currentItem && currentItem.meta.user_affix) {
|
|
1144
|
+
currentItem.meta.affix = false;
|
|
1145
|
+
currentItem.meta.user_affix = false;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1149
|
+
},
|
|
1150
|
+
};
|
|
1151
|
+
})();
|
|
1152
|
+
|
|
1153
|
+
export const mixins = tmixins;
|