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,367 +1,373 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
:title="$t1('导出数据')"
|
|
4
|
-
width="355px"
|
|
5
|
-
custom-class="dialog-style list-dialog"
|
|
6
|
-
:visible.sync="showDialog"
|
|
7
|
-
:modal="false"
|
|
8
|
-
:append-to-body="false"
|
|
9
|
-
:modal-append-to-body="false"
|
|
10
|
-
:close-on-click-modal="false"
|
|
11
|
-
:destroy-on-close="true"
|
|
12
|
-
v-el-dialog-center
|
|
13
|
-
:before-close="handleBeforeClose"
|
|
14
|
-
>
|
|
15
|
-
<div class="cont" style="max-height: 500px">
|
|
16
|
-
<div class="tit" style="margin-bottom: 5px">
|
|
17
|
-
<b>{{ $t1("导出字段") }}</b>
|
|
18
|
-
</div>
|
|
19
|
-
<el-tree
|
|
20
|
-
:props="defaultProps"
|
|
21
|
-
:data="data"
|
|
22
|
-
show-checkbox
|
|
23
|
-
node-key="id"
|
|
24
|
-
ref="tree"
|
|
25
|
-
default-expand-all
|
|
26
|
-
check-on-click-node
|
|
27
|
-
:expand-on-click-node="false"
|
|
28
|
-
icon-class="el-icon-arrow-right"
|
|
29
|
-
:default-checked-keys="defaultCheckedKeys"
|
|
30
|
-
></el-tree>
|
|
31
|
-
</div>
|
|
32
|
-
<span slot="footer" class="dialog-footer">
|
|
33
|
-
<el-button type="primary" plain class="button-sty" @click="handleDialogClose">
|
|
34
|
-
<i class="el-icon-close el-icon"></i>
|
|
35
|
-
{{ $t1("取 消") }}
|
|
36
|
-
</el-button>
|
|
37
|
-
<el-button type="primary" @click="dialogConfirm" class="button-sty">
|
|
38
|
-
<i class="el-icon-check el-icon"></i>
|
|
39
|
-
{{ $t1("确 定") }}
|
|
40
|
-
</el-button>
|
|
41
|
-
</span>
|
|
42
|
-
</el-dialog>
|
|
43
|
-
</template>
|
|
44
|
-
<script>
|
|
45
|
-
import xeUtils from "xe-utils";
|
|
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
|
-
if (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
let
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
//
|
|
116
|
-
let columns =
|
|
117
|
-
let
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
let
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
let
|
|
169
|
-
|
|
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
|
-
let
|
|
205
|
-
let
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
let
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
this.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
this
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
this
|
|
291
|
-
this
|
|
292
|
-
},
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
let
|
|
299
|
-
let
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
let
|
|
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
|
-
let
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:title="$t1('导出数据')"
|
|
4
|
+
width="355px"
|
|
5
|
+
custom-class="dialog-style list-dialog"
|
|
6
|
+
:visible.sync="showDialog"
|
|
7
|
+
:modal="false"
|
|
8
|
+
:append-to-body="false"
|
|
9
|
+
:modal-append-to-body="false"
|
|
10
|
+
:close-on-click-modal="false"
|
|
11
|
+
:destroy-on-close="true"
|
|
12
|
+
v-el-dialog-center
|
|
13
|
+
:before-close="handleBeforeClose"
|
|
14
|
+
>
|
|
15
|
+
<div class="cont" style="max-height: 500px">
|
|
16
|
+
<div class="tit" style="margin-bottom: 5px">
|
|
17
|
+
<b>{{ $t1("导出字段") }}</b>
|
|
18
|
+
</div>
|
|
19
|
+
<el-tree
|
|
20
|
+
:props="defaultProps"
|
|
21
|
+
:data="data"
|
|
22
|
+
show-checkbox
|
|
23
|
+
node-key="id"
|
|
24
|
+
ref="tree"
|
|
25
|
+
default-expand-all
|
|
26
|
+
check-on-click-node
|
|
27
|
+
:expand-on-click-node="false"
|
|
28
|
+
icon-class="el-icon-arrow-right"
|
|
29
|
+
:default-checked-keys="defaultCheckedKeys"
|
|
30
|
+
></el-tree>
|
|
31
|
+
</div>
|
|
32
|
+
<span slot="footer" class="dialog-footer">
|
|
33
|
+
<el-button type="primary" plain class="button-sty" @click="handleDialogClose">
|
|
34
|
+
<i class="el-icon-close el-icon"></i>
|
|
35
|
+
{{ $t1("取 消") }}
|
|
36
|
+
</el-button>
|
|
37
|
+
<el-button type="primary" @click="dialogConfirm" class="button-sty">
|
|
38
|
+
<i class="el-icon-check el-icon"></i>
|
|
39
|
+
{{ $t1("确 定") }}
|
|
40
|
+
</el-button>
|
|
41
|
+
</span>
|
|
42
|
+
</el-dialog>
|
|
43
|
+
</template>
|
|
44
|
+
<script>
|
|
45
|
+
import xeUtils from "xe-utils";
|
|
46
|
+
import { isItemExport } from "./exportType";
|
|
47
|
+
export default {
|
|
48
|
+
name: "exportFieldDialog",
|
|
49
|
+
props: ["param"],
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
showDialog: true,
|
|
53
|
+
data: [],
|
|
54
|
+
defaultProps: {
|
|
55
|
+
label: "title", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
|
|
56
|
+
children: "children",
|
|
57
|
+
},
|
|
58
|
+
defaultCheckedKeys: [],
|
|
59
|
+
columns: [],
|
|
60
|
+
allFields: [],
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
created() {
|
|
64
|
+
this.init();
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
loopColumnHandle(items, handler) {
|
|
68
|
+
items.forEach((item) => {
|
|
69
|
+
handler(item);
|
|
70
|
+
if (item.children && item.children.length) {
|
|
71
|
+
this.loopColumnHandle(item.children, handler);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
generateId() {
|
|
76
|
+
// 自增序号保证唯一:随机数范围小,列多时会碰撞导致树勾选(node-key)错乱
|
|
77
|
+
this.idSeed = (this.idSeed || 0) + 1;
|
|
78
|
+
return "expcol_" + Date.now() + "_" + this.idSeed;
|
|
79
|
+
},
|
|
80
|
+
filterExportVisible(items) {
|
|
81
|
+
if (!Array.isArray(items)) return [];
|
|
82
|
+
|
|
83
|
+
return items
|
|
84
|
+
.filter((item) => item.exportItemVisible === true) // 只保留 exportItemVisible 严格等于 true 的项
|
|
85
|
+
.map((item) => {
|
|
86
|
+
// 如果有 children,递归过滤
|
|
87
|
+
if (Array.isArray(item.children)) {
|
|
88
|
+
return {
|
|
89
|
+
...item,
|
|
90
|
+
children: this.filterExportVisible(item.children),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return item;
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
filterNonDataExportColumns(items) {
|
|
97
|
+
if (!Array.isArray(items)) return [];
|
|
98
|
+
return items.reduce((result, item) => {
|
|
99
|
+
if (item.params?.exportDisabled) return result;
|
|
100
|
+
if (Array.isArray(item.children) && item.children.length) {
|
|
101
|
+
let children = this.filterNonDataExportColumns(item.children);
|
|
102
|
+
if (!children.length) return result;
|
|
103
|
+
result.push({ ...item, children });
|
|
104
|
+
} else {
|
|
105
|
+
result.push(item);
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}, []);
|
|
109
|
+
},
|
|
110
|
+
init() {
|
|
111
|
+
let target = this.getGrid();
|
|
112
|
+
let { fullColumn, collectColumn: column1s } = target.getTableColumn();
|
|
113
|
+
|
|
114
|
+
let checkMethod = target.$refs.xTable.customOpts?.checkMethod;
|
|
115
|
+
// var checkMethod = $xetable ? $xetable.customOpts.checkMethod : null;
|
|
116
|
+
// let columns = target.getTableColumn().collectColumn;
|
|
117
|
+
let columns = [];
|
|
118
|
+
let allFields = [];
|
|
119
|
+
if (checkMethod) {
|
|
120
|
+
const handleColumnVisible = (column) => {
|
|
121
|
+
if (!column.title) return false;
|
|
122
|
+
let visible = true;
|
|
123
|
+
|
|
124
|
+
let isColGroup = column.children && column.children.length;
|
|
125
|
+
|
|
126
|
+
if (isColGroup) {
|
|
127
|
+
// 如果是分组字段,则根据子字段的显示状态来处理
|
|
128
|
+
let parentVisible = false;
|
|
129
|
+
column.children.forEach((item) => {
|
|
130
|
+
let itemVisible = handleColumnVisible(item);
|
|
131
|
+
if (itemVisible) {
|
|
132
|
+
parentVisible = true;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
visible = parentVisible;
|
|
136
|
+
/* visible = column.children.some((item) => {
|
|
137
|
+
return handleColumnVisible(item);
|
|
138
|
+
}); */
|
|
139
|
+
} else {
|
|
140
|
+
let isDisabled = !checkMethod({
|
|
141
|
+
column: column,
|
|
142
|
+
});
|
|
143
|
+
if (isDisabled) {
|
|
144
|
+
// 如果字段被禁用勾选,根据显示状态来处理
|
|
145
|
+
visible = column.visible;
|
|
146
|
+
}
|
|
147
|
+
if (column.field && visible) {
|
|
148
|
+
allFields.push(column.field);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
column.exportItemVisible = visible;
|
|
152
|
+
return visible;
|
|
153
|
+
};
|
|
154
|
+
column1s.forEach((column) => {
|
|
155
|
+
return handleColumnVisible(column);
|
|
156
|
+
});
|
|
157
|
+
columns = this.filterExportVisible(column1s);
|
|
158
|
+
} else {
|
|
159
|
+
columns = column1s;
|
|
160
|
+
}
|
|
161
|
+
columns = this.filterNonDataExportColumns(columns);
|
|
162
|
+
|
|
163
|
+
let exportItem = isItemExport(this.param.type);
|
|
164
|
+
|
|
165
|
+
let defaultCheckedKeys = [];
|
|
166
|
+
let cols = [];
|
|
167
|
+
|
|
168
|
+
let yesFields = [];
|
|
169
|
+
let noFields = [];
|
|
170
|
+
|
|
171
|
+
let exportColumns = !exportItem
|
|
172
|
+
? target.exportColumns || []
|
|
173
|
+
: target.exportItemColumns || [];
|
|
174
|
+
|
|
175
|
+
this.loopColumnHandle(exportColumns, (item) => {
|
|
176
|
+
if (item.field) {
|
|
177
|
+
if (item.export) {
|
|
178
|
+
yesFields.push(item.field);
|
|
179
|
+
} else {
|
|
180
|
+
noFields.push(item.field);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
if (!exportItem) {
|
|
186
|
+
//导出主表数据
|
|
187
|
+
|
|
188
|
+
fullColumn.forEach((column) => {
|
|
189
|
+
if (column.field && !column.params?.exportDisabled) {
|
|
190
|
+
if (yesFields.includes(column.field)) {
|
|
191
|
+
defaultCheckedKeys.push(column.id);
|
|
192
|
+
} else if (!noFields.includes(column.field) && column.visible) {
|
|
193
|
+
defaultCheckedKeys.push(column.id);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
columns.forEach((column) => {
|
|
198
|
+
if (column.title) {
|
|
199
|
+
cols.push(column);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
} else {
|
|
203
|
+
//导出子表数据
|
|
204
|
+
let exportItemColumns = target.exportItemColumns || [];
|
|
205
|
+
let originOption = target.params.originOption;
|
|
206
|
+
let oriExportItemColumns = originOption.exportItemConfig?.columns || [];
|
|
207
|
+
|
|
208
|
+
// 与主表分支一致的三态:记为导出→勾选,记为不导出→不勾,两者都无(新增列)→ 默认勾选。
|
|
209
|
+
// 这里曾以 allFields.includes(field) 为前置门槛,但 allFields 只在 custom-config
|
|
210
|
+
// 配了 checkMethod 时才有内容,而全库未配任何 checkMethod → 恒为空数组 → 明细列
|
|
211
|
+
// 一个都勾不上,连 exportItemColumns 的勾选记忆也一并失效。明细列与主表列本就是两套
|
|
212
|
+
// 字段,取交集没有意义,故去掉该门槛。
|
|
213
|
+
this.loopColumnHandle(oriExportItemColumns, (item) => {
|
|
214
|
+
item.id = this.generateId();
|
|
215
|
+
if (!item.field) return;
|
|
216
|
+
let isYes = yesFields.includes(item.field);
|
|
217
|
+
let isNo = noFields.includes(item.field);
|
|
218
|
+
if (isYes || !isNo) {
|
|
219
|
+
defaultCheckedKeys.push(item.id);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
oriExportItemColumns.forEach((column) => {
|
|
223
|
+
if (column.title) {
|
|
224
|
+
cols.push(column);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
this.allFields = allFields;
|
|
230
|
+
this.defaultCheckedKeys = defaultCheckedKeys;
|
|
231
|
+
/* let data = [
|
|
232
|
+
{
|
|
233
|
+
label: this.$t1("全部字段"),
|
|
234
|
+
id: -1,
|
|
235
|
+
leaf: true,
|
|
236
|
+
children: this.$baseLodash.cloneDeep(cols),
|
|
237
|
+
},
|
|
238
|
+
]; */
|
|
239
|
+
this.data = this.$baseLodash.cloneDeep(cols);
|
|
240
|
+
},
|
|
241
|
+
addTableExportColumns() {
|
|
242
|
+
let exportItem = isItemExport(this.param.type);
|
|
243
|
+
|
|
244
|
+
let $grid = this.getGrid();
|
|
245
|
+
let originOption = $grid.params.originOption;
|
|
246
|
+
let leafColumns = this.$refs.tree.getCheckedNodes(true);
|
|
247
|
+
let checkLeafIds = leafColumns.map((item) => item.id);
|
|
248
|
+
|
|
249
|
+
// let syncEportItemColumns = $grid.exportItemColumns || [];
|
|
250
|
+
// let syncExportColumns = $grid.exportColumns || [];
|
|
251
|
+
|
|
252
|
+
if (!exportItem) {
|
|
253
|
+
//导出主表数据
|
|
254
|
+
let exportColumns = [];
|
|
255
|
+
let { fullColumn } = $grid.getTableColumn();
|
|
256
|
+
fullColumn.map((column) => {
|
|
257
|
+
if (column.field && column.title) {
|
|
258
|
+
let item = {
|
|
259
|
+
field: column.field,
|
|
260
|
+
export: checkLeafIds.includes(column.id),
|
|
261
|
+
};
|
|
262
|
+
exportColumns.push(item);
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
$grid.exportColumns = exportColumns;
|
|
266
|
+
} else {
|
|
267
|
+
//导出子表数据
|
|
268
|
+
let exportItemColumns = [];
|
|
269
|
+
if (originOption.exportItemConfig?.columns?.length) {
|
|
270
|
+
this.loopColumnHandle(originOption.exportItemConfig?.columns, (column) => {
|
|
271
|
+
if (column.field && column.title) {
|
|
272
|
+
let item = {
|
|
273
|
+
field: column.field,
|
|
274
|
+
export: checkLeafIds.includes(column.id),
|
|
275
|
+
};
|
|
276
|
+
exportItemColumns.push(item);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
$grid.exportItemColumns = exportItemColumns;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
this.$vxeTableUtil.addTableJson(originOption.vue, $grid, originOption.tableName);
|
|
283
|
+
},
|
|
284
|
+
handleBeforeClose(hide) {
|
|
285
|
+
// this.$emit('cancel');
|
|
286
|
+
this.handleDialogClose();
|
|
287
|
+
hide();
|
|
288
|
+
},
|
|
289
|
+
handleDialogClose() {
|
|
290
|
+
this.$emit("close");
|
|
291
|
+
this.dialogClose();
|
|
292
|
+
},
|
|
293
|
+
dialogClose() {
|
|
294
|
+
this.showDialog = false;
|
|
295
|
+
this.$emit("update:visiable", false);
|
|
296
|
+
},
|
|
297
|
+
dialogConfirm() {
|
|
298
|
+
let target = this.getGrid();
|
|
299
|
+
let originOption = target.params.originOption;
|
|
300
|
+
let leafColumns = this.$refs.tree.getCheckedNodes(true);
|
|
301
|
+
let checkIds = this.$refs.tree.getCheckedNodes(false, true).map((item) => item.id);
|
|
302
|
+
let exportItem = isItemExport(this.param.type);
|
|
303
|
+
let collectColumn = !exportItem
|
|
304
|
+
? target.getTableColumn().collectColumn
|
|
305
|
+
: originOption.exportItemConfig?.columns;
|
|
306
|
+
// 明细导出列未维护时这里是 undefined,下面 depthDo/loopDo 直接遍历会抛错
|
|
307
|
+
collectColumn = collectColumn || [];
|
|
308
|
+
// 按勾选后的实际层级算表头总行数(item.level 在导出明细列上不存在,不可依赖)
|
|
309
|
+
let maxRowspan = 1;
|
|
310
|
+
let depthDo = (items, depth) => {
|
|
311
|
+
(items || []).forEach((item) => {
|
|
312
|
+
if (!checkIds.includes(item.id)) return;
|
|
313
|
+
if (item.children && item.children.length > 0) {
|
|
314
|
+
depthDo(item.children, depth + 1);
|
|
315
|
+
} else if (depth > maxRowspan) {
|
|
316
|
+
maxRowspan = depth;
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
};
|
|
320
|
+
depthDo(collectColumn, 1);
|
|
321
|
+
|
|
322
|
+
let loopDo = (items, depth) => {
|
|
323
|
+
let datas = [];
|
|
324
|
+
(items || []).forEach((item) => {
|
|
325
|
+
if (checkIds.includes(item.id) && !item.params?.exportDisabled) {
|
|
326
|
+
let column = this.$baseLodash.cloneDeep(item);
|
|
327
|
+
if (item.children && item.children.length > 0) {
|
|
328
|
+
let children = loopDo(item.children, depth + 1);
|
|
329
|
+
column.children = children;
|
|
330
|
+
column.colSpan = children.length ? children.length : 1;
|
|
331
|
+
column.rowSpan = 1;
|
|
332
|
+
} else {
|
|
333
|
+
// 任意层级的叶子列都要跨到表头底行,否则多层分组表头导出错位
|
|
334
|
+
column.rowSpan = maxRowspan - depth + 1;
|
|
335
|
+
}
|
|
336
|
+
datas.push(column);
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
return datas;
|
|
340
|
+
};
|
|
341
|
+
let columns = loopDo(collectColumn, 1);
|
|
342
|
+
this.$emit("confirm", { columns, leafColumns });
|
|
343
|
+
this.addTableExportColumns();
|
|
344
|
+
this.dialogClose();
|
|
345
|
+
},
|
|
346
|
+
/* getExportTitleJson() {
|
|
347
|
+
let target = this.getGrid();
|
|
348
|
+
let columns = target.getColumns();
|
|
349
|
+
let cols = [];
|
|
350
|
+
columns.forEach((column) => {
|
|
351
|
+
if (column.title && column.visible) {
|
|
352
|
+
cols.push(column);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
return cols;
|
|
356
|
+
}, */
|
|
357
|
+
getGrid() {
|
|
358
|
+
let that = this.param.vue;
|
|
359
|
+
let tableRef = this.param.targetRef;
|
|
360
|
+
let $grid;
|
|
361
|
+
if (Array.isArray(that.$refs[tableRef])) {
|
|
362
|
+
$grid = that.$refs[tableRef][0];
|
|
363
|
+
} else {
|
|
364
|
+
$grid = that.$refs[tableRef];
|
|
365
|
+
}
|
|
366
|
+
return $grid;
|
|
367
|
+
},
|
|
368
|
+
revert() {},
|
|
369
|
+
},
|
|
370
|
+
};
|
|
371
|
+
</script>
|
|
372
|
+
|
|
373
|
+
<style scoped></style>
|