cloud-web-corejs 1.0.54-dev.530 → 1.0.54-dev.532
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 +1 -1
- package/src/components/excelExport/exportFieldDialog.vue +154 -81
- package/src/components/excelExport/mixins.js +963 -1
- package/src/components/table/index.js +1044 -1
- package/src/components/table/util/index.js +8 -1
- package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +10 -0
- package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +4 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +92 -0
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +37 -37
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +54 -47
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +432 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +71 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +37 -34
- package/src/components/xform/form-render/container-item/data-table-mixin.js +3025 -1
- package/src/components/xform/lang/zh-CN.js +1 -0
- package/src/components/xform/utils/formula-util copy.js +0 -4
- package/src/utils/vab.js +1 -1218
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
|
@@ -28,9 +28,16 @@ export function getCellValue(obj) {
|
|
|
28
28
|
let cellValue;
|
|
29
29
|
if (column.slots && column.slots.filterVal) {
|
|
30
30
|
cellValue = column.slots.filterVal(params);
|
|
31
|
-
} else {
|
|
31
|
+
} else if(column.renderCell){
|
|
32
32
|
let result = column.renderCell(h, params);
|
|
33
33
|
cellValue = vNodeRender(result);
|
|
34
|
+
}else{
|
|
35
|
+
if(column.slots?.default){
|
|
36
|
+
let result = column.slots.default(obj, h);
|
|
37
|
+
cellValue = vNodeRender(result);
|
|
38
|
+
}else{
|
|
39
|
+
cellValue = obj.row[column.field];
|
|
40
|
+
}
|
|
34
41
|
}
|
|
35
42
|
return cellValue;
|
|
36
43
|
}
|
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
><span class="line"></span>
|
|
15
15
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
16
16
|
</el-button>
|
|
17
|
+
<el-dropdown-menu slot="dropdown">
|
|
18
|
+
<el-dropdown-item
|
|
19
|
+
icon="el-icon-upload2"
|
|
20
|
+
command="1"
|
|
21
|
+
>导出</el-dropdown-item>
|
|
22
|
+
<el-dropdown-item
|
|
23
|
+
icon="el-icon-printer"
|
|
24
|
+
:command="2"
|
|
25
|
+
>打印</el-dropdown-item>
|
|
26
|
+
</el-dropdown-menu>
|
|
17
27
|
</el-dropdown>
|
|
18
28
|
<base-input-export
|
|
19
29
|
:option="exportOption"
|
package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
><span class="line"></span>
|
|
15
15
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
16
16
|
</el-button>
|
|
17
|
+
<el-dropdown-menu slot="dropdown">
|
|
18
|
+
<el-dropdown-item icon="el-icon-upload2" command="1">导出</el-dropdown-item>
|
|
19
|
+
<el-dropdown-item icon="el-icon-printer" :command="2">打印</el-dropdown-item>
|
|
20
|
+
</el-dropdown-menu>
|
|
17
21
|
</el-dropdown>
|
|
18
22
|
<base-input-export
|
|
19
23
|
:option="exportOption"
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<static-content-wrapper
|
|
3
|
+
:designer="designer"
|
|
4
|
+
:field="field"
|
|
5
|
+
:design-state="designState"
|
|
6
|
+
:display-style="field.options.displayStyle"
|
|
7
|
+
:parent-widget="parentWidget"
|
|
8
|
+
:parent-list="parentList"
|
|
9
|
+
:index-of-parent-list="indexOfParentList"
|
|
10
|
+
>
|
|
11
|
+
<el-button
|
|
12
|
+
:type="field.options.type"
|
|
13
|
+
class="button-sty"
|
|
14
|
+
size="mini"
|
|
15
|
+
icon="el-icon-upload2"
|
|
16
|
+
@click="toDo('exportItem')"
|
|
17
|
+
:disabled="field.options.disabled"
|
|
18
|
+
>{{ getI18nLabel(field.options.label) }}
|
|
19
|
+
</el-button>
|
|
20
|
+
</static-content-wrapper>
|
|
21
|
+
</template>
|
|
22
|
+
<script>
|
|
23
|
+
import emitter from "../../../utils/emitter";
|
|
24
|
+
import i18n from "../../../utils/i18n";
|
|
25
|
+
import fieldMixin from "./fieldMixin";
|
|
26
|
+
import StaticContentWrapper from "./static-content-wrapper.vue";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: "select-export-item-button-widget",
|
|
30
|
+
components: { StaticContentWrapper },
|
|
31
|
+
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
32
|
+
mixins: [emitter, fieldMixin, i18n],
|
|
33
|
+
props: {
|
|
34
|
+
field: Object,
|
|
35
|
+
parentWidget: Object,
|
|
36
|
+
parentList: Array,
|
|
37
|
+
indexOfParentList: Number,
|
|
38
|
+
designer: Object,
|
|
39
|
+
designState: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
return {};
|
|
46
|
+
},
|
|
47
|
+
beforeCreate() {
|
|
48
|
+
/* 这里不能访问方法和属性!! */
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
created() {
|
|
52
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
|
53
|
+
需要在父组件created中初始化!! */
|
|
54
|
+
this.registerToRefList();
|
|
55
|
+
this.initEventHandler();
|
|
56
|
+
|
|
57
|
+
this.handleOnCreated();
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
mounted() {
|
|
61
|
+
this.handleOnMounted();
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
beforeDestroy() {
|
|
65
|
+
this.unregisterFromRefList();
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
methods: {
|
|
69
|
+
toDo(type = null) {
|
|
70
|
+
if (this.designState) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
let opt = {
|
|
74
|
+
title: this.field.options.exportFileName || null,
|
|
75
|
+
targetRef: this.field.options.tableRef || null,
|
|
76
|
+
pageSize: this.field.options.exportPageSize || null,
|
|
77
|
+
showImageAtTable: this.field.options.showImageAtTable || null,
|
|
78
|
+
};
|
|
79
|
+
let tableExportParam = this.handleCustomEvent(this.field.options.tableExportParam);
|
|
80
|
+
let options = { ...opt, ...tableExportParam, type: type };
|
|
81
|
+
let tableRef = options?.targetRef;
|
|
82
|
+
delete options.targetRef;
|
|
83
|
+
let tableWidget = this.getWidgetRef(tableRef);
|
|
84
|
+
tableWidget.exportData(options);
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style lang="scss" scoped>
|
|
91
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
|
92
|
+
</style>
|
package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue
CHANGED
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<static-content-wrapper
|
|
3
|
-
:designer="designer"
|
|
3
|
+
:designer="designer"
|
|
4
|
+
:field="field"
|
|
5
|
+
:design-state="designState"
|
|
4
6
|
:display-style="field.options.displayStyle"
|
|
5
|
-
:parent-widget="parentWidget"
|
|
6
|
-
:
|
|
7
|
+
:parent-widget="parentWidget"
|
|
8
|
+
:parent-list="parentList"
|
|
9
|
+
:index-of-parent-list="indexOfParentList"
|
|
10
|
+
>
|
|
7
11
|
<el-dropdown trigger="hover" :disabled="field.options.disabled">
|
|
8
12
|
<el-button type="primary" class="button-sty" size="mini">
|
|
9
|
-
<span>{{ getI18nLabel(
|
|
10
|
-
class="el-icon-arrow-down el-icon--right"></i>
|
|
13
|
+
<span>{{ getI18nLabel("列表导出") }}</span
|
|
14
|
+
><span class="line"></span> <i class="el-icon-arrow-down el-icon--right"></i>
|
|
11
15
|
</el-button>
|
|
12
16
|
<el-dropdown-menu slot="dropdown">
|
|
13
|
-
<el-dropdown-item icon="el-icon-upload2"
|
|
14
|
-
|
|
15
|
-
{{ getI18nLabel('条件导出') }}
|
|
17
|
+
<el-dropdown-item icon="el-icon-upload2" @click.native="toDo()">
|
|
18
|
+
{{ getI18nLabel("条件导出") }}
|
|
16
19
|
</el-dropdown-item>
|
|
17
|
-
<el-dropdown-item icon="el-icon-upload2"
|
|
18
|
-
|
|
19
|
-
{{ getI18nLabel('选择导出') }}
|
|
20
|
+
<el-dropdown-item icon="el-icon-upload2" @click.native="toDo('selected')">
|
|
21
|
+
{{ getI18nLabel("选择导出") }}
|
|
20
22
|
</el-dropdown-item>
|
|
21
|
-
|
|
23
|
+
<!-- <el-dropdown-item icon="el-icon-upload2" @click.native="toDo('exportItem')">
|
|
24
|
+
{{ getI18nLabel("选择导出明细") }}
|
|
25
|
+
</el-dropdown-item> -->
|
|
22
26
|
</el-dropdown-menu>
|
|
23
27
|
</el-dropdown>
|
|
24
28
|
</static-content-wrapper>
|
|
25
|
-
|
|
26
29
|
</template>
|
|
27
30
|
<script>
|
|
28
|
-
import emitter from
|
|
31
|
+
import emitter from "../../../../../components/xform/utils/emitter";
|
|
29
32
|
import i18n from "../../../../../components/xform/utils/i18n";
|
|
30
33
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
31
|
-
import StaticContentWrapper
|
|
32
|
-
from "../../../../../components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue";
|
|
34
|
+
import StaticContentWrapper from "../../../../../components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue";
|
|
33
35
|
|
|
34
36
|
export default {
|
|
35
37
|
name: "table-export-button-widget",
|
|
36
|
-
components: {StaticContentWrapper},
|
|
37
|
-
componentName:
|
|
38
|
+
components: { StaticContentWrapper },
|
|
39
|
+
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
38
40
|
mixins: [emitter, fieldMixin, i18n],
|
|
39
41
|
props: {
|
|
40
42
|
field: Object,
|
|
@@ -44,11 +46,11 @@ export default {
|
|
|
44
46
|
designer: Object,
|
|
45
47
|
designState: {
|
|
46
48
|
type: Boolean,
|
|
47
|
-
default: false
|
|
48
|
-
}
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
49
51
|
},
|
|
50
52
|
data() {
|
|
51
|
-
return {}
|
|
53
|
+
return {};
|
|
52
54
|
},
|
|
53
55
|
beforeCreate() {
|
|
54
56
|
/* 这里不能访问方法和属性!! */
|
|
@@ -57,44 +59,42 @@ export default {
|
|
|
57
59
|
created() {
|
|
58
60
|
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
|
59
61
|
需要在父组件created中初始化!! */
|
|
60
|
-
this.registerToRefList()
|
|
61
|
-
this.initEventHandler()
|
|
62
|
+
this.registerToRefList();
|
|
63
|
+
this.initEventHandler();
|
|
62
64
|
|
|
63
|
-
this.handleOnCreated()
|
|
65
|
+
this.handleOnCreated();
|
|
64
66
|
},
|
|
65
67
|
|
|
66
68
|
mounted() {
|
|
67
|
-
this.handleOnMounted()
|
|
69
|
+
this.handleOnMounted();
|
|
68
70
|
},
|
|
69
71
|
|
|
70
72
|
beforeDestroy() {
|
|
71
|
-
this.unregisterFromRefList()
|
|
73
|
+
this.unregisterFromRefList();
|
|
72
74
|
},
|
|
73
75
|
|
|
74
76
|
methods: {
|
|
75
77
|
toDo(type = null) {
|
|
76
78
|
if (this.designState) {
|
|
77
|
-
return
|
|
79
|
+
return;
|
|
78
80
|
}
|
|
79
81
|
let opt = {
|
|
80
82
|
title: this.field.options.exportFileName || null,
|
|
81
83
|
targetRef: this.field.options.tableRef || null,
|
|
82
|
-
pageSize:
|
|
83
|
-
showImageAtTable: this.field.options.showImageAtTable || null
|
|
84
|
+
pageSize: this.field.options.exportPageSize || null,
|
|
85
|
+
showImageAtTable: this.field.options.showImageAtTable || null,
|
|
84
86
|
};
|
|
85
87
|
let tableExportParam = this.handleCustomEvent(this.field.options.tableExportParam);
|
|
86
|
-
let options = {...opt, ...tableExportParam, type: type};
|
|
88
|
+
let options = { ...opt, ...tableExportParam, type: type };
|
|
87
89
|
let tableRef = options?.targetRef;
|
|
88
|
-
delete options.targetRef
|
|
90
|
+
delete options.targetRef;
|
|
89
91
|
let tableWidget = this.getWidgetRef(tableRef);
|
|
90
|
-
tableWidget.exportData(options)
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
}
|
|
92
|
+
tableWidget.exportData(options);
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
95
96
|
</script>
|
|
96
97
|
|
|
97
98
|
<style lang="scss" scoped>
|
|
98
99
|
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
|
99
|
-
|
|
100
100
|
</style>
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
<el-form-item :label="i18nt('designer.setting.tableHeight')">
|
|
7
7
|
<el-input v-model="optionModel.tableHeight"></el-input>
|
|
8
8
|
</el-form-item>
|
|
9
|
+
<el-form-item label="行高度(px)">
|
|
10
|
+
<el-input v-model="optionModel.tableRowHeight"></el-input>
|
|
11
|
+
</el-form-item>
|
|
9
12
|
<!-- <el-form-item :label="i18nt('designer.setting.customClass')">
|
|
10
13
|
<el-select v-model="optionModel.customClass" multiple="" filterable="" allow-create="" default-first-option="">
|
|
11
14
|
<el-option v-for="(e, t) in cssClassList" :key="t" :value="e" :label="e"></el-option>
|
|
@@ -47,7 +50,11 @@
|
|
|
47
50
|
tag="ul"
|
|
48
51
|
class="draggable-box"
|
|
49
52
|
:list="optionModel.gridPageSizeList"
|
|
50
|
-
v-bind="{
|
|
53
|
+
v-bind="{
|
|
54
|
+
group: 'optionsGroup',
|
|
55
|
+
ghostClass: 'ghost',
|
|
56
|
+
handle: '.drag-option',
|
|
57
|
+
}"
|
|
51
58
|
>
|
|
52
59
|
<li
|
|
53
60
|
v-for="(item, index) in optionModel.gridPageSizeList"
|
|
@@ -133,52 +140,38 @@
|
|
|
133
140
|
<el-form-item :label="i18nt('排序脚本编码')" v-if="optionModel.isEditTable">
|
|
134
141
|
<el-input v-model="optionModel.sortScriptCode"></el-input>
|
|
135
142
|
</el-form-item>
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
v-model="optionModel.accessName"
|
|
169
|
-
@clear="
|
|
170
|
-
optionModel.accessCode = '';
|
|
171
|
-
$forceUpdate();
|
|
172
|
-
"
|
|
173
|
-
v-el-readonly
|
|
174
|
-
clearable
|
|
175
|
-
>
|
|
176
|
-
<i slot="suffix" class="el-input__icon el-icon-search" @click="showRequestaccessDialog=true"></i>
|
|
177
|
-
</el-input>
|
|
178
|
-
</el-form-item>-->
|
|
179
|
-
<!-- <el-form-item v-if="optionModel.showButtonsColumn" :label="i18nt('designer.setting.buttonsColumnEdit')">
|
|
180
|
-
<el-button type="primary" plain="" round="" @click="editButtonsColumn">{{ i18nt('designer.setting.editAction') }}</el-button>
|
|
181
|
-
</el-form-item> -->
|
|
143
|
+
|
|
144
|
+
<el-form-item label-width="0">
|
|
145
|
+
<el-divider class="custom-divider-margin-top">明细导出设置</el-divider>
|
|
146
|
+
</el-form-item>
|
|
147
|
+
<el-form-item :label="i18nt('明细导出脚本编码')">
|
|
148
|
+
<el-input v-model="optionModel.exportItemScriptCode"></el-input>
|
|
149
|
+
</el-form-item>
|
|
150
|
+
<el-form-item label="自定义明细导出参数" label-width="150px">
|
|
151
|
+
<a
|
|
152
|
+
href="javascript:void(0);"
|
|
153
|
+
class="a-link link-oneLind"
|
|
154
|
+
@click="editEventHandler('exportItemParam', tableConfigParams)"
|
|
155
|
+
>
|
|
156
|
+
<span>{{ optionModel.exportItemParam }}</span>
|
|
157
|
+
<i class="el-icon-edit"></i>
|
|
158
|
+
</a>
|
|
159
|
+
</el-form-item>
|
|
160
|
+
<el-form-item label="明细导出列维护" label-width="150px">
|
|
161
|
+
<a
|
|
162
|
+
href="javascript:void(0);"
|
|
163
|
+
class="a-link link-oneLind"
|
|
164
|
+
@click="openExportItemColumnsDialog"
|
|
165
|
+
>
|
|
166
|
+
<span>{{
|
|
167
|
+
optionModel.exportItemColumns && optionModel.exportItemColumns.length
|
|
168
|
+
? "已维护"
|
|
169
|
+
: null
|
|
170
|
+
}}</span>
|
|
171
|
+
<i class="el-icon-edit"></i>
|
|
172
|
+
</a>
|
|
173
|
+
</el-form-item>
|
|
174
|
+
|
|
182
175
|
<el-dialog
|
|
183
176
|
v-if="dataDialogVisible"
|
|
184
177
|
custom-class="dialog-style list-dialog"
|
|
@@ -311,6 +304,13 @@
|
|
|
311
304
|
:selectedWidget="selectedWidget"
|
|
312
305
|
:optionModel="optionModel"
|
|
313
306
|
/>
|
|
307
|
+
<exportItemColumnsDialog
|
|
308
|
+
v-if="showExportItemColumnsDialog"
|
|
309
|
+
:visiable.sync="showExportItemColumnsDialog"
|
|
310
|
+
:designer="designer"
|
|
311
|
+
:selectedWidget="selectedWidget"
|
|
312
|
+
:optionModel="optionModel"
|
|
313
|
+
/>
|
|
314
314
|
</div>
|
|
315
315
|
</template>
|
|
316
316
|
|
|
@@ -325,6 +325,8 @@ import tableColumnDialog from "./table-column-dialog.vue";
|
|
|
325
325
|
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
|
326
326
|
import setttingConfig from "@/settings";
|
|
327
327
|
|
|
328
|
+
import exportItemColumnsDialog from "./exportItemColumns-dialog.vue";
|
|
329
|
+
|
|
328
330
|
export default {
|
|
329
331
|
name: "data-table-editor",
|
|
330
332
|
componentName: "PropertyEditor",
|
|
@@ -334,6 +336,7 @@ export default {
|
|
|
334
336
|
requestaccessDialog,
|
|
335
337
|
// conditionEditor,
|
|
336
338
|
tableColumnDialog,
|
|
339
|
+
exportItemColumnsDialog,
|
|
337
340
|
},
|
|
338
341
|
props: {
|
|
339
342
|
designer: Object,
|
|
@@ -528,6 +531,7 @@ export default {
|
|
|
528
531
|
},
|
|
529
532
|
defaultCheckedKeys: [],
|
|
530
533
|
tableConfigParams: ["dataId", "formCode"],
|
|
534
|
+
showExportItemColumnsDialog: false,
|
|
531
535
|
};
|
|
532
536
|
},
|
|
533
537
|
computed: {
|
|
@@ -935,6 +939,9 @@ export default {
|
|
|
935
939
|
}
|
|
936
940
|
this.optionModel.gridPageSizeList.push({ value: 50 });
|
|
937
941
|
},
|
|
942
|
+
openExportItemColumnsDialog() {
|
|
943
|
+
this.showExportItemColumnsDialog = true;
|
|
944
|
+
},
|
|
938
945
|
},
|
|
939
946
|
};
|
|
940
947
|
</script>
|