cloud-web-corejs 1.0.54-dev.6 → 1.0.54-dev.61
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 +8 -2
- package/src/components/VabUpload/index.vue +2 -1
- package/src/components/VabUpload/mixins.js +1 -1
- package/src/components/VabUpload/view.vue +2 -1
- package/src/components/excelExport/exportFieldDialog.vue +160 -22
- package/src/components/excelExport/index.js +6 -5
- package/src/components/excelExport/index.vue +8 -5
- package/src/components/excelExport/mixins.js +4 -1
- package/src/components/excelImport/index.vue +2 -1
- package/src/components/excelImport/mixins.js +1 -1
- package/src/components/fileLibrary/fileObjAuthDialog.vue +125 -103
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -1
- package/src/components/fileLibrary/fileObjNotifyEdit.vue +192 -0
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +16 -9
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +4 -1
- package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +1 -1
- package/src/components/fileLibrary/mixins/indexMixins.js +31 -17
- package/src/components/onlineTalk/index.vue +327 -5
- package/src/components/onlineTalk/mixins.js +1 -1
- package/src/components/table/index.js +2 -1
- package/src/components/tempStorage/tempStorageDialog.vue +2 -2
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +1 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +1 -0
- package/src/components/xform/form-designer/form-widget/dialog/formFieldDialog.vue +2 -2
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +10 -2
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +3 -1
- package/src/components/xform/form-designer/form-widget/dialog/preformDialog.vue +2 -2
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +5 -4
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +3 -2
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +982 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +12 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +5 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +77 -0
- package/src/components/xform/form-designer/indexMixin.js +771 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +6 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +8 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +30 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +160 -69
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +184 -82
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +9 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1668 -1
- package/src/components/xform/form-render/indexMixin.js +1 -23
- package/src/mixins/selectDialog/index.js +1 -1
- package/src/router/modules/customer.js +15 -0
- package/src/store/config/index.js +1 -1
- package/src/store/modules/permission.js +1 -1
- package/src/utils/renderUtils.js +76 -0
- package/src/utils/request.js +28 -28
- package/src/utils/vab.js +1 -963
- package/src/views/bd/setting/bd_attach_setting/edit.vue +1 -1
- package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +1 -1
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
- package/src/views/bd/setting/form_template/edit.vue +2 -2
- package/src/views/bd/setting/form_template/list.vue +4 -2
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +280 -0
- package/src/views/bd/setting/form_template/mixins/edit.js +1 -1
- package/src/views/bd/setting/form_template/mixins/wf_list.js +434 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -0
- package/src/views/bd/setting/form_template/wf_list.vue +127 -0
- package/src/views/bd/setting/menu_kind/authDialog.vue +1 -1
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +1 -1
- package/src/views/bd/setting/table_model/list.vue +4 -2
- package/src/views/user/area/dialog.vue +21 -8
- package/src/views/user/company_info/dialog.vue +17 -8
- package/src/views/user/extend_datasource/list.vue +1 -1
- package/src/views/user/file_type/edit.vue +30 -1
- package/src/views/user/file_type/list.vue +28 -0
- package/src/views/user/groups/edit.vue +2 -0
- package/src/views/user/groups/list.vue +1 -0
- package/src/views/user/login/default.vue +4 -2
- package/src/views/user/outLink/form_view.vue +39 -12
- package/src/views/user/outLink/view.vue +39 -13
- package/src/views/user/user/edit.vue +7 -7
- package/src/views/user/user/form_edit.vue +117 -49
- package/src/views/user/user/form_list.vue +1 -0
- package/src/views/user/wf/wf_obj_config/list.vue +30 -2
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +292 -0
- package/src/components/excelExport/export-panel.js +0 -458
@@ -1,458 +0,0 @@
|
|
1
|
-
import XEUtils from 'xe-utils'
|
2
|
-
import GlobalConfig from 'vxe-table/lib/v-x-e-table/src/conf'
|
3
|
-
import VxeModal from 'vxe-table/lib/modal/src/modal'
|
4
|
-
import VxeInput from 'vxe-table/lib/input/src/input'
|
5
|
-
import VxeCheckbox from 'vxe-table/lib/checkbox/src/checkbox'
|
6
|
-
import VxeSelect from 'vxe-table/lib/select/src/select'
|
7
|
-
import VxeOption from 'vxe-table/lib/select/src/option'
|
8
|
-
import UtilTools from 'vxe-table/lib/tools/utils'
|
9
|
-
|
10
|
-
export default {
|
11
|
-
name: 'VxeExportPanel',
|
12
|
-
props: {
|
13
|
-
defaultOptions: Object,
|
14
|
-
storeData: Object
|
15
|
-
},
|
16
|
-
components: {
|
17
|
-
VxeModal,
|
18
|
-
VxeInput,
|
19
|
-
VxeCheckbox,
|
20
|
-
VxeSelect,
|
21
|
-
VxeOption
|
22
|
-
},
|
23
|
-
data () {
|
24
|
-
return {
|
25
|
-
isAll: false,
|
26
|
-
isIndeterminate: false,
|
27
|
-
loading: false
|
28
|
-
}
|
29
|
-
},
|
30
|
-
computed: {
|
31
|
-
vSize () {
|
32
|
-
return this.size || this.$parent.size || this.$parent.vSize
|
33
|
-
},
|
34
|
-
checkedAll () {
|
35
|
-
return this.storeData.columns.every(column => column.checked)
|
36
|
-
},
|
37
|
-
showSheet () {
|
38
|
-
return ['html', 'xml', 'xlsx', 'pdf'].indexOf(this.defaultOptions.type) > -1
|
39
|
-
},
|
40
|
-
supportMerge () {
|
41
|
-
const { storeData, defaultOptions } = this
|
42
|
-
return !defaultOptions.original && defaultOptions.mode === 'current' && (storeData.isPrint || ['html', 'xlsx'].indexOf(defaultOptions.type) > -1)
|
43
|
-
},
|
44
|
-
supportStyle () {
|
45
|
-
const { defaultOptions } = this
|
46
|
-
return !defaultOptions.original && ['xlsx'].indexOf(defaultOptions.type) > -1
|
47
|
-
}
|
48
|
-
},
|
49
|
-
render (h) {
|
50
|
-
const { _e, checkedAll, isAll, isIndeterminate, showSheet, supportMerge, supportStyle, defaultOptions, storeData } = this
|
51
|
-
const { hasTree, hasMerge, isPrint, hasColgroup } = storeData
|
52
|
-
const { isHeader } = defaultOptions
|
53
|
-
const cols = []
|
54
|
-
XEUtils.eachTree(storeData.columns, column => {
|
55
|
-
const colTitle = UtilTools.formatText(column.getTitle(), 1)
|
56
|
-
const isColGroup = column.children && column.children.length
|
57
|
-
cols.push(
|
58
|
-
h('li', {
|
59
|
-
class: ['vxe-export--panel-column-option', `level--${column.level}`, {
|
60
|
-
'is--group': isColGroup,
|
61
|
-
'is--checked': column.checked,
|
62
|
-
'is--indeterminate': column.halfChecked,
|
63
|
-
'is--disabled': column.disabled
|
64
|
-
}],
|
65
|
-
attrs: {
|
66
|
-
title: colTitle
|
67
|
-
},
|
68
|
-
on: {
|
69
|
-
click: () => {
|
70
|
-
if (!column.disabled) {
|
71
|
-
this.changeOption(column)
|
72
|
-
}
|
73
|
-
}
|
74
|
-
}
|
75
|
-
}, [
|
76
|
-
h('span', {
|
77
|
-
class: 'vxe-checkbox--icon vxe-checkbox--checked-icon'
|
78
|
-
}),
|
79
|
-
h('span', {
|
80
|
-
class: 'vxe-checkbox--icon vxe-checkbox--unchecked-icon'
|
81
|
-
}),
|
82
|
-
h('span', {
|
83
|
-
class: 'vxe-checkbox--icon vxe-checkbox--indeterminate-icon'
|
84
|
-
}),
|
85
|
-
h('span', {
|
86
|
-
class: 'vxe-checkbox--label'
|
87
|
-
}, colTitle)
|
88
|
-
])
|
89
|
-
)
|
90
|
-
})
|
91
|
-
return h('vxe-modal', {
|
92
|
-
res: 'modal',
|
93
|
-
props: {
|
94
|
-
value: storeData.visible,
|
95
|
-
title: GlobalConfig.i18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
|
96
|
-
width: 660,
|
97
|
-
mask: true,
|
98
|
-
lockView: true,
|
99
|
-
showFooter: false,
|
100
|
-
escClosable: true,
|
101
|
-
maskClosable: true,
|
102
|
-
loading: this.loading
|
103
|
-
},
|
104
|
-
on: {
|
105
|
-
input (value) {
|
106
|
-
storeData.visible = value
|
107
|
-
},
|
108
|
-
show: this.showEvent
|
109
|
-
}
|
110
|
-
}, [
|
111
|
-
h('div', {
|
112
|
-
class: 'vxe-export--panel'
|
113
|
-
}, [
|
114
|
-
h('table', {
|
115
|
-
attrs: {
|
116
|
-
cellspacing: 0,
|
117
|
-
cellpadding: 0,
|
118
|
-
border: 0
|
119
|
-
}
|
120
|
-
}, [
|
121
|
-
h('tbody', [
|
122
|
-
[
|
123
|
-
isPrint ? _e() : h('tr', [
|
124
|
-
h('td', GlobalConfig.i18n('vxe.export.expName')),
|
125
|
-
h('td', [
|
126
|
-
h('vxe-input', {
|
127
|
-
ref: 'filename',
|
128
|
-
props: {
|
129
|
-
value: defaultOptions.filename,
|
130
|
-
type: 'text',
|
131
|
-
clearable: true,
|
132
|
-
placeholder: GlobalConfig.i18n('vxe.export.expNamePlaceholder')
|
133
|
-
},
|
134
|
-
on: {
|
135
|
-
modelValue (value) {
|
136
|
-
defaultOptions.filename = value
|
137
|
-
}
|
138
|
-
}
|
139
|
-
})
|
140
|
-
])
|
141
|
-
]),
|
142
|
-
isPrint ? _e() : h('tr', [
|
143
|
-
h('td', GlobalConfig.i18n('vxe.export.expType')),
|
144
|
-
h('td', [
|
145
|
-
h('vxe-select', {
|
146
|
-
props: {
|
147
|
-
value: defaultOptions.type
|
148
|
-
},
|
149
|
-
on: {
|
150
|
-
input (value) {
|
151
|
-
defaultOptions.type = value
|
152
|
-
}
|
153
|
-
}
|
154
|
-
}, storeData.typeList.map(item => {
|
155
|
-
return h('vxe-option', {
|
156
|
-
props: {
|
157
|
-
value: item.value,
|
158
|
-
label: GlobalConfig.i18n(item.label)
|
159
|
-
}
|
160
|
-
})
|
161
|
-
}))
|
162
|
-
])
|
163
|
-
]),
|
164
|
-
isPrint || showSheet ? h('tr', [
|
165
|
-
h('td', GlobalConfig.i18n('vxe.export.expSheetName')),
|
166
|
-
h('td', [
|
167
|
-
h('vxe-input', {
|
168
|
-
ref: 'sheetname',
|
169
|
-
props: {
|
170
|
-
value: defaultOptions.sheetName,
|
171
|
-
type: 'text',
|
172
|
-
clearable: true,
|
173
|
-
placeholder: GlobalConfig.i18n('vxe.export.expSheetNamePlaceholder')
|
174
|
-
},
|
175
|
-
on: {
|
176
|
-
modelValue (value) {
|
177
|
-
defaultOptions.sheetName = value
|
178
|
-
}
|
179
|
-
}
|
180
|
-
})
|
181
|
-
])
|
182
|
-
]) : _e(),
|
183
|
-
h('tr', [
|
184
|
-
h('td', GlobalConfig.i18n('vxe.export.expMode')),
|
185
|
-
h('td', [
|
186
|
-
h('vxe-select', {
|
187
|
-
props: {
|
188
|
-
value: defaultOptions.mode
|
189
|
-
},
|
190
|
-
on: {
|
191
|
-
input (value) {
|
192
|
-
defaultOptions.mode = value
|
193
|
-
}
|
194
|
-
}
|
195
|
-
}, storeData.modeList.map(item => {
|
196
|
-
return h('vxe-option', {
|
197
|
-
props: {
|
198
|
-
value: item.value,
|
199
|
-
label: GlobalConfig.i18n(item.label)
|
200
|
-
}
|
201
|
-
})
|
202
|
-
}))
|
203
|
-
])
|
204
|
-
]),
|
205
|
-
h('tr', [
|
206
|
-
h('td', [GlobalConfig.i18n('vxe.export.expColumn')]),
|
207
|
-
h('td', [
|
208
|
-
h('div', {
|
209
|
-
class: 'vxe-export--panel-column'
|
210
|
-
}, [
|
211
|
-
h('ul', {
|
212
|
-
class: 'vxe-export--panel-column-header'
|
213
|
-
}, [
|
214
|
-
h('li', {
|
215
|
-
class: ['vxe-export--panel-column-option', {
|
216
|
-
'is--checked': isAll,
|
217
|
-
'is--indeterminate': isIndeterminate
|
218
|
-
}],
|
219
|
-
attrs: {
|
220
|
-
title: GlobalConfig.i18n('vxe.table.allTitle')
|
221
|
-
},
|
222
|
-
on: {
|
223
|
-
click: this.allColumnEvent
|
224
|
-
}
|
225
|
-
}, [
|
226
|
-
h('span', {
|
227
|
-
class: 'vxe-checkbox--icon vxe-checkbox--checked-icon'
|
228
|
-
}),
|
229
|
-
h('span', {
|
230
|
-
class: 'vxe-checkbox--icon vxe-checkbox--unchecked-icon'
|
231
|
-
}),
|
232
|
-
h('span', {
|
233
|
-
class: 'vxe-checkbox--icon vxe-checkbox--indeterminate-icon'
|
234
|
-
}),
|
235
|
-
h('span', {
|
236
|
-
class: 'vxe-checkbox--label'
|
237
|
-
}, GlobalConfig.i18n('vxe.export.expCurrentColumn'))
|
238
|
-
])
|
239
|
-
]),
|
240
|
-
h('ul', {
|
241
|
-
class: 'vxe-export--panel-column-body'
|
242
|
-
}, cols)
|
243
|
-
])
|
244
|
-
])
|
245
|
-
]),
|
246
|
-
h('tr', [
|
247
|
-
h('td', GlobalConfig.i18n('vxe.export.expOpts')),
|
248
|
-
h('td', [
|
249
|
-
h('div', {
|
250
|
-
class: 'vxe-export--panel-option-row'
|
251
|
-
}, [
|
252
|
-
h('vxe-checkbox', {
|
253
|
-
props: {
|
254
|
-
value: isHeader,
|
255
|
-
title: GlobalConfig.i18n('vxe.export.expHeaderTitle'),
|
256
|
-
content: GlobalConfig.i18n('vxe.export.expOptHeader')
|
257
|
-
},
|
258
|
-
on: {
|
259
|
-
input (value) {
|
260
|
-
defaultOptions.isHeader = value
|
261
|
-
}
|
262
|
-
}
|
263
|
-
}),
|
264
|
-
h('vxe-checkbox', {
|
265
|
-
props: {
|
266
|
-
value: defaultOptions.isFooter,
|
267
|
-
disabled: !storeData.hasFooter,
|
268
|
-
title: GlobalConfig.i18n('vxe.export.expFooterTitle'),
|
269
|
-
content: GlobalConfig.i18n('vxe.export.expOptFooter')
|
270
|
-
},
|
271
|
-
on: {
|
272
|
-
input (value) {
|
273
|
-
defaultOptions.isFooter = value
|
274
|
-
}
|
275
|
-
}
|
276
|
-
}),
|
277
|
-
h('vxe-checkbox', {
|
278
|
-
props: {
|
279
|
-
value: defaultOptions.original,
|
280
|
-
title: GlobalConfig.i18n('vxe.export.expOriginalTitle'),
|
281
|
-
content: GlobalConfig.i18n('vxe.export.expOptOriginal')
|
282
|
-
},
|
283
|
-
on: {
|
284
|
-
input (value) {
|
285
|
-
defaultOptions.original = value
|
286
|
-
}
|
287
|
-
}
|
288
|
-
})
|
289
|
-
]),
|
290
|
-
h('div', {
|
291
|
-
class: 'vxe-export--panel-option-row'
|
292
|
-
}, [
|
293
|
-
h('vxe-checkbox', {
|
294
|
-
props: {
|
295
|
-
value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
296
|
-
disabled: !isHeader || !hasColgroup || !supportMerge,
|
297
|
-
title: GlobalConfig.i18n('vxe.export.expColgroupTitle'),
|
298
|
-
content: GlobalConfig.i18n('vxe.export.expOptColgroup')
|
299
|
-
},
|
300
|
-
on: {
|
301
|
-
input (value) {
|
302
|
-
defaultOptions.isColgroup = value
|
303
|
-
}
|
304
|
-
}
|
305
|
-
}),
|
306
|
-
h('vxe-checkbox', {
|
307
|
-
props: {
|
308
|
-
value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
309
|
-
disabled: !hasMerge || !supportMerge || !checkedAll,
|
310
|
-
title: GlobalConfig.i18n('vxe.export.expMergeTitle'),
|
311
|
-
content: GlobalConfig.i18n('vxe.export.expOptMerge')
|
312
|
-
},
|
313
|
-
on: {
|
314
|
-
input (value) {
|
315
|
-
defaultOptions.isMerge = value
|
316
|
-
}
|
317
|
-
}
|
318
|
-
}),
|
319
|
-
isPrint ? _e() : h('vxe-checkbox', {
|
320
|
-
props: {
|
321
|
-
value: supportStyle ? defaultOptions.useStyle : false,
|
322
|
-
disabled: !supportStyle,
|
323
|
-
title: GlobalConfig.i18n('vxe.export.expUseStyleTitle'),
|
324
|
-
content: GlobalConfig.i18n('vxe.export.expOptUseStyle')
|
325
|
-
},
|
326
|
-
on: {
|
327
|
-
input (value) {
|
328
|
-
defaultOptions.useStyle = value
|
329
|
-
}
|
330
|
-
}
|
331
|
-
}),
|
332
|
-
h('vxe-checkbox', {
|
333
|
-
props: {
|
334
|
-
value: hasTree ? defaultOptions.isAllExpand : false,
|
335
|
-
disabled: !hasTree,
|
336
|
-
title: GlobalConfig.i18n('vxe.export.expAllExpandTitle'),
|
337
|
-
content: GlobalConfig.i18n('vxe.export.expOptAllExpand')
|
338
|
-
},
|
339
|
-
on: {
|
340
|
-
input (value) {
|
341
|
-
defaultOptions.isAllExpand = value
|
342
|
-
}
|
343
|
-
}
|
344
|
-
})
|
345
|
-
])
|
346
|
-
])
|
347
|
-
])
|
348
|
-
]
|
349
|
-
])
|
350
|
-
]),
|
351
|
-
h('div', {
|
352
|
-
class: 'vxe-export--panel-btns'
|
353
|
-
}, [
|
354
|
-
h('vxe-button', {
|
355
|
-
props: {
|
356
|
-
content: GlobalConfig.i18n('vxe.export.expCancel')
|
357
|
-
},
|
358
|
-
on: {
|
359
|
-
click: this.cancelEvent
|
360
|
-
}
|
361
|
-
}),
|
362
|
-
h('vxe-button', {
|
363
|
-
ref: 'confirmBtn',
|
364
|
-
props: {
|
365
|
-
status: 'primary',
|
366
|
-
content: GlobalConfig.i18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
|
367
|
-
},
|
368
|
-
on: {
|
369
|
-
click: this.confirmEvent
|
370
|
-
}
|
371
|
-
})
|
372
|
-
])
|
373
|
-
])
|
374
|
-
])
|
375
|
-
},
|
376
|
-
methods: {
|
377
|
-
changeOption (column) {
|
378
|
-
const isChecked = !column.checked
|
379
|
-
XEUtils.eachTree([column], (item) => {
|
380
|
-
item.checked = isChecked
|
381
|
-
item.halfChecked = false
|
382
|
-
})
|
383
|
-
this.handleOptionCheck(column)
|
384
|
-
this.checkStatus()
|
385
|
-
},
|
386
|
-
handleOptionCheck (column) {
|
387
|
-
const matchObj = XEUtils.findTree(this.storeData.columns, item => item === column)
|
388
|
-
if (matchObj && matchObj.parent) {
|
389
|
-
const { parent } = matchObj
|
390
|
-
if (parent.children && parent.children.length) {
|
391
|
-
parent.checked = parent.children.every(column => column.checked)
|
392
|
-
parent.halfChecked = !parent.checked && parent.children.some(column => column.checked || column.halfChecked)
|
393
|
-
this.handleOptionCheck(parent)
|
394
|
-
}
|
395
|
-
}
|
396
|
-
},
|
397
|
-
checkStatus () {
|
398
|
-
const columns = this.storeData.columns
|
399
|
-
this.isAll = columns.every(column => column.disabled || column.checked)
|
400
|
-
this.isIndeterminate = !this.isAll && columns.some(column => !column.disabled && (column.checked || column.halfChecked))
|
401
|
-
},
|
402
|
-
allColumnEvent () {
|
403
|
-
const isAll = !this.isAll
|
404
|
-
XEUtils.eachTree(this.storeData.columns, column => {
|
405
|
-
if (!column.disabled) {
|
406
|
-
column.checked = isAll
|
407
|
-
column.halfChecked = false
|
408
|
-
}
|
409
|
-
})
|
410
|
-
this.isAll = isAll
|
411
|
-
this.checkStatus()
|
412
|
-
},
|
413
|
-
showEvent () {
|
414
|
-
this.$nextTick(() => {
|
415
|
-
const { $refs } = this
|
416
|
-
const targetElem = $refs.filename || $refs.sheetname || $refs.confirmBtn
|
417
|
-
if (targetElem) {
|
418
|
-
targetElem.focus()
|
419
|
-
}
|
420
|
-
})
|
421
|
-
this.checkStatus()
|
422
|
-
},
|
423
|
-
getExportOption () {
|
424
|
-
const { checkedAll, storeData, defaultOptions, supportMerge } = this
|
425
|
-
const { hasMerge, columns } = storeData
|
426
|
-
const expColumns = XEUtils.searchTree(columns, column => column.checked, { children: 'children', mapChildren: 'childNodes', original: true })
|
427
|
-
return Object.assign({}, defaultOptions, {
|
428
|
-
columns: expColumns,
|
429
|
-
isMerge: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false
|
430
|
-
})
|
431
|
-
},
|
432
|
-
cancelEvent () {
|
433
|
-
this.storeData.visible = false
|
434
|
-
},
|
435
|
-
confirmEvent (evnt) {
|
436
|
-
if (this.storeData.isPrint) {
|
437
|
-
this.printEvent(evnt)
|
438
|
-
} else {
|
439
|
-
this.exportEvent(evnt)
|
440
|
-
}
|
441
|
-
},
|
442
|
-
printEvent () {
|
443
|
-
const $xetable = this.$parent
|
444
|
-
this.storeData.visible = false
|
445
|
-
$xetable.print(Object.assign({}, $xetable.printOpts, this.getExportOption()))
|
446
|
-
},
|
447
|
-
exportEvent () {
|
448
|
-
const $xetable = this.$parent
|
449
|
-
this.loading = true
|
450
|
-
$xetable.exportData(Object.assign({}, $xetable.exportOpts, this.getExportOption())).then(() => {
|
451
|
-
this.loading = false
|
452
|
-
this.storeData.visible = false
|
453
|
-
}).catch(() => {
|
454
|
-
this.loading = false
|
455
|
-
})
|
456
|
-
}
|
457
|
-
}
|
458
|
-
}
|