cloud-web-corejs 1.0.54-dev.674 → 1.0.54-dev.675
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/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor copy.vue +988 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +87 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +14 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onDynamicColumns-editor.vue +44 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +7 -0
- package/src/components/xform/form-render/container-item/data-table-item.vue +0 -9
- package/src/components/xform/form-render/container-item/data-table-mixin.js +438 -21
- package/src/utils/vab.js +87 -107
|
@@ -0,0 +1,988 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form-item :label="i18nt('designer.setting.tableWidth')">
|
|
4
|
+
<el-input v-model="optionModel.tableWidth"></el-input>
|
|
5
|
+
</el-form-item>
|
|
6
|
+
<el-form-item :label="i18nt('designer.setting.tableHeight')">
|
|
7
|
+
<el-input v-model="optionModel.tableHeight"></el-input>
|
|
8
|
+
</el-form-item>
|
|
9
|
+
<el-form-item label="行高度(px)">
|
|
10
|
+
<el-input v-model="optionModel.tableRowHeight"></el-input>
|
|
11
|
+
</el-form-item>
|
|
12
|
+
<!-- <el-form-item :label="i18nt('designer.setting.customClass')">
|
|
13
|
+
<el-select v-model="optionModel.customClass" multiple="" filterable="" allow-create="" default-first-option="">
|
|
14
|
+
<el-option v-for="(e, t) in cssClassList" :key="t" :value="e" :label="e"></el-option>
|
|
15
|
+
</el-select>
|
|
16
|
+
</el-form-item>-->
|
|
17
|
+
<!-- <el-form-item :label="i18nt('designer.setting.showIndex')"><el-switch v-model="optionModel.showIndex"></el-switch></el-form-item>
|
|
18
|
+
<el-form-item :label="i18nt('designer.setting.showCheckBox')"><el-switch v-model="optionModel.showCheckBox"></el-switch></el-form-item> -->
|
|
19
|
+
<el-form-item label="启用数据行合并">
|
|
20
|
+
<el-switch v-model="optionModel.mergeRowEnabled"></el-switch>
|
|
21
|
+
</el-form-item>
|
|
22
|
+
<el-form-item :label="i18nt('合并行唯一字段')">
|
|
23
|
+
<el-input v-model="optionModel.mergeRowKey"></el-input>
|
|
24
|
+
</el-form-item>
|
|
25
|
+
<el-form-item label="查询列表">
|
|
26
|
+
<el-switch v-model="optionModel.isQueryTable"></el-switch>
|
|
27
|
+
</el-form-item>
|
|
28
|
+
<el-form-item label="切换tab时自动查询">
|
|
29
|
+
<el-switch v-model="optionModel.searchOnSwitchTab"></el-switch>
|
|
30
|
+
</el-form-item>
|
|
31
|
+
<el-form-item label="是否显示查询按钮">
|
|
32
|
+
<el-switch v-model="isShowQueryButton"></el-switch>
|
|
33
|
+
</el-form-item>
|
|
34
|
+
<el-form-item :label="i18nt('designer.setting.showPagination')">
|
|
35
|
+
<el-switch v-model="optionModel.showPagination"></el-switch>
|
|
36
|
+
</el-form-item>
|
|
37
|
+
<el-form-item :label="i18nt('是否显示表尾统计行')">
|
|
38
|
+
<el-switch v-model="optionModel.showGridFooter"></el-switch>
|
|
39
|
+
</el-form-item>
|
|
40
|
+
<el-form-item :label="i18nt('是否隐藏复选框')">
|
|
41
|
+
<el-switch v-model="optionModel.hideGridCheckBox"></el-switch>
|
|
42
|
+
</el-form-item>
|
|
43
|
+
<el-form-item label="是否查询总页数">
|
|
44
|
+
<el-switch v-model="isQueryAllPage"></el-switch>
|
|
45
|
+
</el-form-item>
|
|
46
|
+
<el-form-item label="默认每页查询数">
|
|
47
|
+
<base-input-number
|
|
48
|
+
v-model="optionModel.gridPageSize"
|
|
49
|
+
size="mini"
|
|
50
|
+
:max="10000"
|
|
51
|
+
/>
|
|
52
|
+
</el-form-item>
|
|
53
|
+
<el-form-item :label="i18nt('可选择每页查询数')"></el-form-item>
|
|
54
|
+
<el-form-item label-width="0">
|
|
55
|
+
<template v-if="optionModel.gridPageSizeList">
|
|
56
|
+
<draggable
|
|
57
|
+
tag="ul"
|
|
58
|
+
class="draggable-box"
|
|
59
|
+
:list="optionModel.gridPageSizeList"
|
|
60
|
+
v-bind="{
|
|
61
|
+
group: 'optionsGroup',
|
|
62
|
+
ghostClass: 'ghost',
|
|
63
|
+
handle: '.drag-option',
|
|
64
|
+
}"
|
|
65
|
+
>
|
|
66
|
+
<li
|
|
67
|
+
v-for="(item, index) in optionModel.gridPageSizeList"
|
|
68
|
+
:key="index"
|
|
69
|
+
class="col-item"
|
|
70
|
+
>
|
|
71
|
+
<i class="el-icon-s-operation drag-option"></i>
|
|
72
|
+
<base-input-number
|
|
73
|
+
v-model="item.value"
|
|
74
|
+
:min="1"
|
|
75
|
+
:max="10000"
|
|
76
|
+
style="width: 200px"
|
|
77
|
+
></base-input-number>
|
|
78
|
+
<el-button
|
|
79
|
+
circle
|
|
80
|
+
plain
|
|
81
|
+
size="mini"
|
|
82
|
+
type="danger"
|
|
83
|
+
@click="optionModel.gridPageSizeList.splice(index, 1)"
|
|
84
|
+
icon="el-icon-minus"
|
|
85
|
+
class="col-delete-button"
|
|
86
|
+
style="position: unset"
|
|
87
|
+
></el-button>
|
|
88
|
+
</li>
|
|
89
|
+
</draggable>
|
|
90
|
+
</template>
|
|
91
|
+
<div>
|
|
92
|
+
<el-button
|
|
93
|
+
type="text"
|
|
94
|
+
@click="addGridPageSizeList"
|
|
95
|
+
icon="el-icon-circle-plus-outline"
|
|
96
|
+
class="add-option"
|
|
97
|
+
>
|
|
98
|
+
{{ i18nt("新增分页数") }}
|
|
99
|
+
</el-button>
|
|
100
|
+
</div>
|
|
101
|
+
</el-form-item>
|
|
102
|
+
|
|
103
|
+
<!-- <el-form-item :label="i18nt('显示导出')">
|
|
104
|
+
<el-switch v-model="optionModel.showExportBtn"></el-switch>
|
|
105
|
+
</el-form-item>-->
|
|
106
|
+
<!-- <el-form-item :label="i18nt('显示搜索栏')">
|
|
107
|
+
<el-switch v-model="optionModel.showSearchArea"></el-switch>
|
|
108
|
+
</el-form-item>-->
|
|
109
|
+
<!-- <el-form-item :label="i18nt('designer.setting.smallPagination')"><el-switch v-model="optionModel.smallPagination"></el-switch></el-form-item>
|
|
110
|
+
<el-form-item :label="i18nt('designer.setting.showSummary')"><el-switch v-model="optionModel.showSummary"></el-switch></el-form-item>
|
|
111
|
+
<el-form-item :label="i18nt('designer.setting.stripe')"><el-switch v-model="optionModel.stripe"></el-switch></el-form-item>
|
|
112
|
+
<el-form-item :label="i18nt('designer.setting.rowSpacing')">
|
|
113
|
+
<el-input-number style="width:100%;" controls-position="right" :min="0" :max="20" v-model="optionModel.rowSpacing"></el-input-number>
|
|
114
|
+
</el-form-item>
|
|
115
|
+
<el-form-item :label="i18nt('designer.setting.widgetSize')">
|
|
116
|
+
<el-select v-model="optionModel.tableSize" @change="refreshTableLayout">
|
|
117
|
+
<el-option v-for="e in widgetSizes" :key="e.value" :value="e.value" :label="e.label"></el-option>
|
|
118
|
+
</el-select>
|
|
119
|
+
</el-form-item> -->
|
|
120
|
+
<el-form-item :label="i18nt('designer.setting.tableColEdit')">
|
|
121
|
+
<el-button type="primary" plain="" round="" @click="openSetting"
|
|
122
|
+
>{{ i18nt("designer.setting.editAction") }}
|
|
123
|
+
</el-button>
|
|
124
|
+
</el-form-item>
|
|
125
|
+
<el-form-item label="动态列模式">
|
|
126
|
+
<el-select v-model="optionModel.dynamicColumnMode">
|
|
127
|
+
<el-option label="追加到静态列" value="append"></el-option>
|
|
128
|
+
<el-option label="替换静态列" value="replace"></el-option>
|
|
129
|
+
</el-select>
|
|
130
|
+
</el-form-item>
|
|
131
|
+
<el-form-item label-width="0">
|
|
132
|
+
<el-divider class="custom-divider-margin-top">接口动态列</el-divider>
|
|
133
|
+
</el-form-item>
|
|
134
|
+
<el-form-item label="启用接口动态列">
|
|
135
|
+
<el-switch
|
|
136
|
+
v-model="optionModel.dynamicColumnScriptEnabled"
|
|
137
|
+
@change="handleDynamicColumnScriptEnabledChange"
|
|
138
|
+
></el-switch>
|
|
139
|
+
</el-form-item>
|
|
140
|
+
<template v-if="optionModel.dynamicColumnScriptEnabled">
|
|
141
|
+
<el-form-item label="动态列脚本编码">
|
|
142
|
+
<el-input
|
|
143
|
+
v-model="optionModel.dynamicColumnScriptCode"
|
|
144
|
+
clearable
|
|
145
|
+
placeholder="如 getDynamicColumns"
|
|
146
|
+
></el-input>
|
|
147
|
+
</el-form-item>
|
|
148
|
+
<el-form-item label="动态列请求参数" label-width="150px">
|
|
149
|
+
<a
|
|
150
|
+
href="javascript:void(0);"
|
|
151
|
+
class="a-link link-oneLind"
|
|
152
|
+
@click="editEventHandler('dynamicColumnScriptParam', tableConfigParams)"
|
|
153
|
+
>
|
|
154
|
+
<span>{{ optionModel.dynamicColumnScriptParam }}</span>
|
|
155
|
+
<i class="el-icon-edit"></i>
|
|
156
|
+
</a>
|
|
157
|
+
</el-form-item>
|
|
158
|
+
<el-form-item label="动态列转换脚本" label-width="150px">
|
|
159
|
+
<a
|
|
160
|
+
href="javascript:void(0);"
|
|
161
|
+
class="a-link link-oneLind"
|
|
162
|
+
@click="editEventHandler('onDynamicColumnsConvert', ['res'])"
|
|
163
|
+
>
|
|
164
|
+
<span>{{ optionModel.onDynamicColumnsConvert }}</span>
|
|
165
|
+
<i class="el-icon-edit"></i>
|
|
166
|
+
</a>
|
|
167
|
+
</el-form-item>
|
|
168
|
+
<el-form-item label="加载后自动请求">
|
|
169
|
+
<el-switch v-model="optionModel.dynamicColumnAutoLoad"></el-switch>
|
|
170
|
+
</el-form-item>
|
|
171
|
+
<div class="el-form-item__tip" style="line-height: 1.4; margin: -8px 0 8px">
|
|
172
|
+
默认开启。打开表单时先请求动态列,再一次性渲染完整表格。
|
|
173
|
+
</div>
|
|
174
|
+
</template>
|
|
175
|
+
<el-form-item label="自定义表格配置" label-width="150px">
|
|
176
|
+
<a
|
|
177
|
+
href="javascript:void(0);"
|
|
178
|
+
class="a-link link-oneLind"
|
|
179
|
+
@click="editEventHandler('tableConfig', tableConfigParams)"
|
|
180
|
+
>
|
|
181
|
+
<span>{{ optionModel.tableConfig }}</span>
|
|
182
|
+
<i class="el-icon-edit"></i>
|
|
183
|
+
</a>
|
|
184
|
+
</el-form-item>
|
|
185
|
+
<el-form-item label-width="0">
|
|
186
|
+
<el-divider class="custom-divider-margin-top">编辑表格设置</el-divider>
|
|
187
|
+
</el-form-item>
|
|
188
|
+
<el-form-item :label="i18nt('编辑表格')">
|
|
189
|
+
<el-switch v-model="optionModel.isEditTable"></el-switch>
|
|
190
|
+
</el-form-item>
|
|
191
|
+
<el-form-item :label="i18nt('树表格')">
|
|
192
|
+
<el-switch v-model="optionModel.isTreeTable"></el-switch>
|
|
193
|
+
</el-form-item>
|
|
194
|
+
<el-form-item :label="i18nt('启用WBS码')">
|
|
195
|
+
<el-switch v-model="optionModel.wbsEnabled"></el-switch>
|
|
196
|
+
</el-form-item>
|
|
197
|
+
<el-form-item :label="i18nt('排序脚本编码')" v-if="optionModel.isEditTable">
|
|
198
|
+
<el-input v-model="optionModel.sortScriptCode"></el-input>
|
|
199
|
+
</el-form-item>
|
|
200
|
+
<el-form-item label-width="0">
|
|
201
|
+
<el-divider class="custom-divider-margin-top">明细导出设置</el-divider>
|
|
202
|
+
</el-form-item>
|
|
203
|
+
<el-form-item :label="i18nt('明细导出脚本编码')">
|
|
204
|
+
<el-input v-model="optionModel.exportItemScriptCode"></el-input>
|
|
205
|
+
</el-form-item>
|
|
206
|
+
<el-form-item label="自定义明细导出参数" label-width="150px">
|
|
207
|
+
<a
|
|
208
|
+
href="javascript:void(0);"
|
|
209
|
+
class="a-link link-oneLind"
|
|
210
|
+
@click="editEventHandler('exportItemParam', tableConfigParams)"
|
|
211
|
+
>
|
|
212
|
+
<span>{{ optionModel.exportItemParam }}</span>
|
|
213
|
+
<i class="el-icon-edit"></i>
|
|
214
|
+
</a>
|
|
215
|
+
</el-form-item>
|
|
216
|
+
<el-form-item label="明细导出列维护" label-width="150px">
|
|
217
|
+
<a
|
|
218
|
+
href="javascript:void(0);"
|
|
219
|
+
class="a-link link-oneLind"
|
|
220
|
+
@click="openExportItemColumnsDialog"
|
|
221
|
+
>
|
|
222
|
+
<span>{{
|
|
223
|
+
optionModel.exportItemColumns && optionModel.exportItemColumns.length
|
|
224
|
+
? "已维护"
|
|
225
|
+
: null
|
|
226
|
+
}}</span>
|
|
227
|
+
<i class="el-icon-edit"></i>
|
|
228
|
+
</a>
|
|
229
|
+
</el-form-item>
|
|
230
|
+
|
|
231
|
+
<el-dialog
|
|
232
|
+
v-if="dataDialogVisible"
|
|
233
|
+
custom-class="dialog-style list-dialog"
|
|
234
|
+
:title="i18nt('designer.setting.tableDataEdit')"
|
|
235
|
+
:visible.sync="dataDialogVisible"
|
|
236
|
+
:show-close="!0"
|
|
237
|
+
append-to-body=""
|
|
238
|
+
:close-on-click-modal="!1"
|
|
239
|
+
:close-on-press-escape="!1"
|
|
240
|
+
:destroy-on-close="!0"
|
|
241
|
+
width="75%"
|
|
242
|
+
v-dialog-drag
|
|
243
|
+
>
|
|
244
|
+
<template slot="footer">
|
|
245
|
+
<div class="dialog-footer">
|
|
246
|
+
<el-button
|
|
247
|
+
type=""
|
|
248
|
+
@click="dataDialogVisible = !1"
|
|
249
|
+
class="button-sty"
|
|
250
|
+
icon="el-icon-close"
|
|
251
|
+
>
|
|
252
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
253
|
+
</el-button>
|
|
254
|
+
<el-button
|
|
255
|
+
type="primary"
|
|
256
|
+
@click="saveTableData"
|
|
257
|
+
class="button-sty"
|
|
258
|
+
icon="el-icon-check"
|
|
259
|
+
>
|
|
260
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
261
|
+
</el-button>
|
|
262
|
+
</div>
|
|
263
|
+
</template>
|
|
264
|
+
<code-editor
|
|
265
|
+
mode="json"
|
|
266
|
+
:readonly="!1"
|
|
267
|
+
v-model="tableDataOptions"
|
|
268
|
+
></code-editor>
|
|
269
|
+
</el-dialog>
|
|
270
|
+
<el-dialog
|
|
271
|
+
v-if="showSqlEditDialog"
|
|
272
|
+
:title="i18nt('数据源SQL编辑')"
|
|
273
|
+
:visible.sync="showSqlEditDialog"
|
|
274
|
+
append-to-body=""
|
|
275
|
+
:show-close="!0"
|
|
276
|
+
custom-class="dialog-style list-dialog"
|
|
277
|
+
:close-on-click-modal="!1"
|
|
278
|
+
:close-on-press-escape="!1"
|
|
279
|
+
:destroy-on-close="!0"
|
|
280
|
+
v-dialog-drag
|
|
281
|
+
>
|
|
282
|
+
<el-alert type="info" :closable="!1" />
|
|
283
|
+
<code-editor
|
|
284
|
+
ref="dsResultEditor"
|
|
285
|
+
mode="javascript"
|
|
286
|
+
:readonly="!1"
|
|
287
|
+
v-model="dataSourceSql"
|
|
288
|
+
></code-editor>
|
|
289
|
+
<el-alert type="info" :closable="!1" />
|
|
290
|
+
<div class="dialog-footer" slot="footer">
|
|
291
|
+
<el-button
|
|
292
|
+
@click="showSqlEditDialog = !1"
|
|
293
|
+
class="button-sty"
|
|
294
|
+
icon="el-icon-close"
|
|
295
|
+
>
|
|
296
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
297
|
+
</el-button>
|
|
298
|
+
<el-button
|
|
299
|
+
type="primary"
|
|
300
|
+
@click="saveDataSourceSql"
|
|
301
|
+
class="button-sty"
|
|
302
|
+
icon="el-icon-check"
|
|
303
|
+
>
|
|
304
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
305
|
+
</el-button>
|
|
306
|
+
</div>
|
|
307
|
+
</el-dialog>
|
|
308
|
+
<requestaccessDialog
|
|
309
|
+
v-if="showRequestaccessDialog"
|
|
310
|
+
:visiable.sync="showRequestaccessDialog"
|
|
311
|
+
@confirm="confirmInsertRequestaccess"
|
|
312
|
+
multi="false"
|
|
313
|
+
:param="{ reportCode: reportTemplate.reportCode }"
|
|
314
|
+
/>
|
|
315
|
+
|
|
316
|
+
<el-dialog
|
|
317
|
+
v-if="showFieldTreeDialog"
|
|
318
|
+
custom-class="dialog-style list-dialog"
|
|
319
|
+
title="新增列表列"
|
|
320
|
+
:visible.sync="showFieldTreeDialog"
|
|
321
|
+
:show-close="!0"
|
|
322
|
+
:append-to-body="false"
|
|
323
|
+
:modal="false"
|
|
324
|
+
:close-on-click-modal="!1"
|
|
325
|
+
:close-on-press-escape="!1"
|
|
326
|
+
:destroy-on-close="!0"
|
|
327
|
+
width="500px"
|
|
328
|
+
v-dialog-drag
|
|
329
|
+
>
|
|
330
|
+
<div class="cont" style="height: 500px">
|
|
331
|
+
<el-tree
|
|
332
|
+
ref="tree"
|
|
333
|
+
:data="treeData"
|
|
334
|
+
show-checkbox
|
|
335
|
+
node-key="name"
|
|
336
|
+
:default-expand-all="true"
|
|
337
|
+
:check-on-click-node="true"
|
|
338
|
+
:expand-on-click-node="false"
|
|
339
|
+
:default-checked-keys="defaultCheckedKeys"
|
|
340
|
+
:props="defaultProps"
|
|
341
|
+
>
|
|
342
|
+
</el-tree>
|
|
343
|
+
</div>
|
|
344
|
+
<span slot="footer" class="dialog-footer">
|
|
345
|
+
<el-button
|
|
346
|
+
type="primary"
|
|
347
|
+
plain
|
|
348
|
+
class="button-sty"
|
|
349
|
+
@click="showFieldTreeDialog = false"
|
|
350
|
+
>
|
|
351
|
+
<i class="el-icon-close el-icon"></i>
|
|
352
|
+
取 消
|
|
353
|
+
</el-button>
|
|
354
|
+
<el-button
|
|
355
|
+
type="primary"
|
|
356
|
+
@click="confirmFieldTreeDialog"
|
|
357
|
+
class="button-sty"
|
|
358
|
+
>
|
|
359
|
+
<i class="el-icon-check el-icon"></i>
|
|
360
|
+
确 定
|
|
361
|
+
</el-button>
|
|
362
|
+
</span>
|
|
363
|
+
</el-dialog>
|
|
364
|
+
<tableColumnDialog
|
|
365
|
+
v-if="columnDialogMounted"
|
|
366
|
+
:visiable.sync="dialogVisible"
|
|
367
|
+
:designer="designer"
|
|
368
|
+
:selectedWidget="selectedWidget"
|
|
369
|
+
:optionModel="optionModel"
|
|
370
|
+
/>
|
|
371
|
+
<exportItemColumnsDialog
|
|
372
|
+
v-if="showExportItemColumnsDialog"
|
|
373
|
+
:visiable.sync="showExportItemColumnsDialog"
|
|
374
|
+
:designer="designer"
|
|
375
|
+
:selectedWidget="selectedWidget"
|
|
376
|
+
:optionModel="optionModel"
|
|
377
|
+
/>
|
|
378
|
+
</div>
|
|
379
|
+
</template>
|
|
380
|
+
|
|
381
|
+
<script>
|
|
382
|
+
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
383
|
+
import Draggable from "vuedraggable";
|
|
384
|
+
import {
|
|
385
|
+
deepClone,
|
|
386
|
+
generateId,
|
|
387
|
+
} from "../../../../../../components/xform/utils/util";
|
|
388
|
+
import Sortable from "sortablejs";
|
|
389
|
+
import requestaccessDialog from "../../../../../../views/user/form/report_requestaccess/dialog.vue";
|
|
390
|
+
// import conditionEditor from "./condition-editor.vue";
|
|
391
|
+
import tableColumnDialog from "./table-column-dialog.vue";
|
|
392
|
+
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
|
393
|
+
import setttingConfig from "@/settings";
|
|
394
|
+
|
|
395
|
+
import exportItemColumnsDialog from "./exportItemColumns-dialog.vue";
|
|
396
|
+
|
|
397
|
+
export default {
|
|
398
|
+
name: "data-table-editor",
|
|
399
|
+
componentName: "PropertyEditor",
|
|
400
|
+
mixins: [i18n, eventMixin],
|
|
401
|
+
components: {
|
|
402
|
+
Draggable,
|
|
403
|
+
requestaccessDialog,
|
|
404
|
+
// conditionEditor,
|
|
405
|
+
tableColumnDialog,
|
|
406
|
+
exportItemColumnsDialog,
|
|
407
|
+
},
|
|
408
|
+
props: {
|
|
409
|
+
designer: Object,
|
|
410
|
+
selectedWidget: Object,
|
|
411
|
+
optionModel: Object,
|
|
412
|
+
},
|
|
413
|
+
inject: [
|
|
414
|
+
"getReportTemplate",
|
|
415
|
+
"showEventCollapse",
|
|
416
|
+
"openWidgetPropertyDialog",
|
|
417
|
+
],
|
|
418
|
+
data: function () {
|
|
419
|
+
return {
|
|
420
|
+
showTableConfigDialog: false,
|
|
421
|
+
tableConfigCode: null,
|
|
422
|
+
dialogVisible: !1,
|
|
423
|
+
columnDialogMounted: !1,
|
|
424
|
+
dataDialogVisible: !1,
|
|
425
|
+
showButtonsEditDialog: !1,
|
|
426
|
+
oldButtonName: "",
|
|
427
|
+
cssClassList: [],
|
|
428
|
+
tableDataOptions: [],
|
|
429
|
+
widgetSizes: [
|
|
430
|
+
{
|
|
431
|
+
label: "default",
|
|
432
|
+
value: "",
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
label: "large",
|
|
436
|
+
value: "large",
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
label: "medium",
|
|
440
|
+
value: "medium",
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
label: "small",
|
|
444
|
+
value: "small",
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
label: "mini",
|
|
448
|
+
value: "mini",
|
|
449
|
+
},
|
|
450
|
+
],
|
|
451
|
+
alignOptions: [
|
|
452
|
+
{
|
|
453
|
+
value: "left",
|
|
454
|
+
label: "left",
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
value: "center",
|
|
458
|
+
label: "center",
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
value: "right",
|
|
462
|
+
label: "right",
|
|
463
|
+
},
|
|
464
|
+
],
|
|
465
|
+
fieldTypeOptions: [
|
|
466
|
+
{
|
|
467
|
+
value: "text",
|
|
468
|
+
label: "Text",
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
value: "number",
|
|
472
|
+
label: "Number",
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
value: "date",
|
|
476
|
+
label: "Date",
|
|
477
|
+
},
|
|
478
|
+
],
|
|
479
|
+
op: [
|
|
480
|
+
{
|
|
481
|
+
label: "Date Format",
|
|
482
|
+
options: [
|
|
483
|
+
{
|
|
484
|
+
value: "d1",
|
|
485
|
+
label: "yyyy-MM-dd",
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
value: "d2",
|
|
489
|
+
label: "yyyy/MM/dd",
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
value: "d3",
|
|
493
|
+
label: "yyyy年MM月dd日",
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
value: "d4",
|
|
497
|
+
label: "yyyy-MM-dd HH:mm:ss",
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
value: "d5",
|
|
501
|
+
label: "yyyy-MM-dd hh:mm:ss",
|
|
502
|
+
},
|
|
503
|
+
],
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
label: "Number Format",
|
|
507
|
+
options: [
|
|
508
|
+
{
|
|
509
|
+
value: "n1",
|
|
510
|
+
label: "###,###,###,##0.######",
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
value: "n2",
|
|
514
|
+
label: "###,###,###,##0.00####",
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
value: "n3",
|
|
518
|
+
label: "###,###,###,##0.000000",
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
value: "n4",
|
|
522
|
+
label: "###,###,###,##0.000",
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
value: "n5",
|
|
526
|
+
label: "###,###,###,##0.00",
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
value: "n6",
|
|
530
|
+
label: "###,###,###,##0",
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
value: "n7",
|
|
534
|
+
label: "###,##0.00##%",
|
|
535
|
+
},
|
|
536
|
+
],
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
label: "edit Format",
|
|
540
|
+
options: [
|
|
541
|
+
{
|
|
542
|
+
value: "editInput",
|
|
543
|
+
label: "文本输入框",
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
value: "editNumber",
|
|
547
|
+
label: "数字输入框",
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
value: "editDate",
|
|
551
|
+
label: "日期输入框",
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
value: "editSelect",
|
|
555
|
+
label: "下拉框",
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
value: "editSearch",
|
|
559
|
+
label: "搜索框",
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
value: "editDelete",
|
|
563
|
+
label: "删除按钮",
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
value: "editButton",
|
|
567
|
+
label: "查看按钮",
|
|
568
|
+
},
|
|
569
|
+
],
|
|
570
|
+
},
|
|
571
|
+
],
|
|
572
|
+
columnFormatMap: {
|
|
573
|
+
editInput: "input",
|
|
574
|
+
editNumber: "number",
|
|
575
|
+
editDate: "date",
|
|
576
|
+
editSelect: "select",
|
|
577
|
+
editSearch: "vabsearch",
|
|
578
|
+
},
|
|
579
|
+
showRenderDialogFlag: !1,
|
|
580
|
+
renderJson: "",
|
|
581
|
+
currentTableColumn: null,
|
|
582
|
+
nameRules: [
|
|
583
|
+
{
|
|
584
|
+
required: !0,
|
|
585
|
+
trigger: ["blur", "change"],
|
|
586
|
+
message: this.i18nt("designer.setting.fieldValueRequired"),
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
showSqlEditDialog: false,
|
|
590
|
+
dataSourceSql: "",
|
|
591
|
+
showRequestaccessDialog: false,
|
|
592
|
+
showDateConfigDialog: false,
|
|
593
|
+
columnOption: {},
|
|
594
|
+
dateFieldList: [],
|
|
595
|
+
columnSelectedWidget: {},
|
|
596
|
+
// reportTemplate:{}
|
|
597
|
+
|
|
598
|
+
showFieldTreeDialog: false,
|
|
599
|
+
treeData: [],
|
|
600
|
+
defaultProps: {
|
|
601
|
+
children: "children",
|
|
602
|
+
label: "label",
|
|
603
|
+
},
|
|
604
|
+
defaultCheckedKeys: [],
|
|
605
|
+
tableConfigParams: ["dataId", "formCode"],
|
|
606
|
+
showExportItemColumnsDialog: false,
|
|
607
|
+
};
|
|
608
|
+
},
|
|
609
|
+
computed: {
|
|
610
|
+
dataSourceList: function () {
|
|
611
|
+
return this.designer.formConfig && this.designer.formConfig.dataSources
|
|
612
|
+
? this.designer.formConfig.dataSources
|
|
613
|
+
: [];
|
|
614
|
+
},
|
|
615
|
+
reportTemplate: function () {
|
|
616
|
+
return this.getReportTemplate();
|
|
617
|
+
},
|
|
618
|
+
isQueryAllPage: {
|
|
619
|
+
get() {
|
|
620
|
+
return !this.optionModel.isNotQueryAllPage;
|
|
621
|
+
},
|
|
622
|
+
set(val) {
|
|
623
|
+
this.optionModel.isNotQueryAllPage = !val;
|
|
624
|
+
},
|
|
625
|
+
},
|
|
626
|
+
isShowQueryButton: {
|
|
627
|
+
get() {
|
|
628
|
+
return !this.optionModel.isNotShowQueryButton;
|
|
629
|
+
},
|
|
630
|
+
set(val) {
|
|
631
|
+
this.optionModel.isNotShowQueryButton = !val;
|
|
632
|
+
},
|
|
633
|
+
},
|
|
634
|
+
},
|
|
635
|
+
created: function () {
|
|
636
|
+
// this.reportTemplate = this.getReportTemplate();
|
|
637
|
+
var e = this;
|
|
638
|
+
(this.cssClassList = deepClone(this.designer.getCssClassList())),
|
|
639
|
+
this.designer.handleEvent("form-css-updated", function (t) {
|
|
640
|
+
e.cssClassList = t;
|
|
641
|
+
});
|
|
642
|
+
if (this.optionModel.showExportBtn == null)
|
|
643
|
+
this.$set(this.optionModel, "showExportBtn", true);
|
|
644
|
+
if (this.optionModel.tableConfig === void 0)
|
|
645
|
+
this.$set(this.optionModel, "tableConfig", "");
|
|
646
|
+
},
|
|
647
|
+
mounted: function () {
|
|
648
|
+
const preloadColumnDialog = () => {
|
|
649
|
+
this.columnDialogMounted = true;
|
|
650
|
+
};
|
|
651
|
+
if (typeof requestIdleCallback === "function") {
|
|
652
|
+
requestIdleCallback(preloadColumnDialog, { timeout: 200 });
|
|
653
|
+
} else {
|
|
654
|
+
this.$nextTick(preloadColumnDialog);
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
methods: {
|
|
658
|
+
handleDynamicColumnScriptEnabledChange(enabled) {
|
|
659
|
+
if (enabled) {
|
|
660
|
+
this.$set(this.optionModel, "dynamicColumnAutoLoad", true);
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
dragSort: function () {
|
|
664
|
+
var e = this.$refs.singleTable.$el.querySelectorAll(
|
|
665
|
+
".el-table__body-wrapper > table > tbody"
|
|
666
|
+
)[0],
|
|
667
|
+
t = this.optionModel.tableColumns;
|
|
668
|
+
this.sortable = Sortable.create(e, {
|
|
669
|
+
ghostClass: "sortable-ghost",
|
|
670
|
+
setData: function (e) {
|
|
671
|
+
e.setData("Text", "");
|
|
672
|
+
},
|
|
673
|
+
onEnd: function (e) {
|
|
674
|
+
var i = t.splice(e.oldIndex, 1)[0];
|
|
675
|
+
t.splice(e.newIndex, 0, i);
|
|
676
|
+
t[e.newIndex].id;
|
|
677
|
+
t[e.newIndex - 1] && t[e.newIndex - 1].id,
|
|
678
|
+
t[e.newIndex + 1] && t[e.newIndex + 1].id;
|
|
679
|
+
},
|
|
680
|
+
});
|
|
681
|
+
},
|
|
682
|
+
openTableDataEdit: function () {
|
|
683
|
+
(this.dataDialogVisible = !0),
|
|
684
|
+
(this.tableDataOptions = JSON.stringify(
|
|
685
|
+
this.optionModel.tableData,
|
|
686
|
+
null,
|
|
687
|
+
" "
|
|
688
|
+
));
|
|
689
|
+
},
|
|
690
|
+
saveTableData: function () {
|
|
691
|
+
try {
|
|
692
|
+
(this.optionModel.tableData = JSON.parse(this.tableDataOptions)),
|
|
693
|
+
(this.dataDialogVisible = !1);
|
|
694
|
+
} catch (e) {
|
|
695
|
+
this.$message.error(
|
|
696
|
+
this.i18nt("designer.hint.invalidOptionsData") + e.message
|
|
697
|
+
);
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
openSetting: function () {
|
|
701
|
+
if (!this.columnDialogMounted) {
|
|
702
|
+
this.columnDialogMounted = true;
|
|
703
|
+
}
|
|
704
|
+
this.dialogVisible = true;
|
|
705
|
+
},
|
|
706
|
+
colSubmit: function () {
|
|
707
|
+
this.dialogVisible = !1;
|
|
708
|
+
},
|
|
709
|
+
addCol: function () {
|
|
710
|
+
let tmpId = "column" + generateId();
|
|
711
|
+
var e = {
|
|
712
|
+
columnId: new Date().getTime(),
|
|
713
|
+
required: false,
|
|
714
|
+
width: 150,
|
|
715
|
+
prop: tmpId,
|
|
716
|
+
label: tmpId,
|
|
717
|
+
align: "left",
|
|
718
|
+
show: true,
|
|
719
|
+
sortable: true,
|
|
720
|
+
};
|
|
721
|
+
this.optionModel.tableColumns.push(e), this.designer.emitHistoryChange();
|
|
722
|
+
},
|
|
723
|
+
handleDelete: function (e, t) {
|
|
724
|
+
if (1 === this.optionModel.tableColumns.length)
|
|
725
|
+
return (
|
|
726
|
+
this.$message.warning(
|
|
727
|
+
this.i18nt("designer.setting.onlyOneColumnCannotBeDeleted")
|
|
728
|
+
),
|
|
729
|
+
!1
|
|
730
|
+
);
|
|
731
|
+
this.optionModel.tableColumns.splice(e, 1);
|
|
732
|
+
},
|
|
733
|
+
showRenderDialog: function (e) {
|
|
734
|
+
(this.currentTableColumn = e),
|
|
735
|
+
(this.renderJson = e.render || ""),
|
|
736
|
+
(this.showRenderDialogFlag = !0);
|
|
737
|
+
},
|
|
738
|
+
saveColumnRender: function () {
|
|
739
|
+
this.$set(this.currentTableColumn, "render", this.renderJson),
|
|
740
|
+
(this.showRenderDialogFlag = !1);
|
|
741
|
+
},
|
|
742
|
+
handleShowButtonsColumnChange: function (e) {
|
|
743
|
+
if (e) {
|
|
744
|
+
var t = this.designer.formWidget.getSelectedWidgetRef();
|
|
745
|
+
t &&
|
|
746
|
+
t.refreshLayout &&
|
|
747
|
+
this.$nextTick(function () {
|
|
748
|
+
t.refreshLayout();
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
onButtonNameFocus: function (e) {
|
|
753
|
+
console.log("test", e), (this.oldButtonName = e.target.value);
|
|
754
|
+
},
|
|
755
|
+
onButtonNameChange: function (e, t) {
|
|
756
|
+
var i = !1;
|
|
757
|
+
this.optionModel.operationButtons.map(function (n, o) {
|
|
758
|
+
n.name === e && o !== t && (i = !0);
|
|
759
|
+
}),
|
|
760
|
+
i &&
|
|
761
|
+
(this.$message.error(
|
|
762
|
+
this.i18nt("designer.setting.operationButtonDuplicatedNameError")
|
|
763
|
+
),
|
|
764
|
+
(this.optionModel.operationButtons[t].name = this.oldButtonName));
|
|
765
|
+
},
|
|
766
|
+
editButtonsColumn: function () {
|
|
767
|
+
this.showButtonsEditDialog = !0;
|
|
768
|
+
},
|
|
769
|
+
deleteOperationButton: function (e) {
|
|
770
|
+
var t = this;
|
|
771
|
+
this.$confirm(
|
|
772
|
+
this.i18nt("designer.setting.deleteOperationButtonHint"),
|
|
773
|
+
this.i18nt("render.hint.prompt"),
|
|
774
|
+
{
|
|
775
|
+
confirmButtonText: this.i18nt("render.hint.confirm"),
|
|
776
|
+
cancelButtonText: this.i18nt("render.hint.cancel"),
|
|
777
|
+
}
|
|
778
|
+
)
|
|
779
|
+
.then(function () {
|
|
780
|
+
t.optionModel.operationButtons.splice(e, 1);
|
|
781
|
+
})
|
|
782
|
+
.catch(function (e) {});
|
|
783
|
+
},
|
|
784
|
+
addOperationButton: function () {
|
|
785
|
+
this.$set(
|
|
786
|
+
this.optionModel,
|
|
787
|
+
"operationButtons",
|
|
788
|
+
this.optionModel.operationButtons || []
|
|
789
|
+
),
|
|
790
|
+
this.optionModel.operationButtons.push({
|
|
791
|
+
name: "btn" + generateId(),
|
|
792
|
+
label: "new btn",
|
|
793
|
+
type: "text",
|
|
794
|
+
size: "small",
|
|
795
|
+
round: !1,
|
|
796
|
+
hidden: !1,
|
|
797
|
+
disabled: !1,
|
|
798
|
+
});
|
|
799
|
+
},
|
|
800
|
+
refreshTableLayout: function () {
|
|
801
|
+
var e = this.designer.formWidget.getSelectedWidgetRef();
|
|
802
|
+
e &&
|
|
803
|
+
e.refreshLayout &&
|
|
804
|
+
this.$nextTick(function () {
|
|
805
|
+
e.refreshLayout();
|
|
806
|
+
});
|
|
807
|
+
},
|
|
808
|
+
saveDataSourceSql() {
|
|
809
|
+
this.optionModel.dataSourceSql = this.dataSourceSql;
|
|
810
|
+
this.showSqlEditDialog = false;
|
|
811
|
+
},
|
|
812
|
+
openSqlEditDialog() {
|
|
813
|
+
this.dataSourceSql = this.optionModel.dataSourceSql
|
|
814
|
+
? deepClone(this.optionModel.dataSourceSql)
|
|
815
|
+
: "";
|
|
816
|
+
this.showSqlEditDialog = true;
|
|
817
|
+
},
|
|
818
|
+
confirmInsertRequestaccess(rows) {
|
|
819
|
+
if (rows.length) {
|
|
820
|
+
let row = rows[0];
|
|
821
|
+
this.optionModel.accessName = row.accessName;
|
|
822
|
+
this.optionModel.accessCode = row.accessCode;
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
changeFormatS(row) {
|
|
826
|
+
row.widget = this.designer.createColumnWidget(row, false) || null;
|
|
827
|
+
if (row.formatS == "editDelete" || row.formatS == "editButton") {
|
|
828
|
+
row.width = 47;
|
|
829
|
+
row.prop = null;
|
|
830
|
+
row.label = null;
|
|
831
|
+
row.sortable = false;
|
|
832
|
+
} else {
|
|
833
|
+
let tmpId = "column" + generateId();
|
|
834
|
+
if (!row.width || row.width == 47) row.width = 150;
|
|
835
|
+
if (!row.prop) row.prop = tmpId;
|
|
836
|
+
if (!row.label) row.label = tmpId;
|
|
837
|
+
row.sortable = true;
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
confirmFormatConfigDialog(columnSelectedWidget) {
|
|
841
|
+
const options = columnSelectedWidget.options;
|
|
842
|
+
let row = this.optionModel.tableColumns[this.operateIndex];
|
|
843
|
+
row.widget = columnSelectedWidget;
|
|
844
|
+
row.prop = options.name;
|
|
845
|
+
row.label = options.label;
|
|
846
|
+
row.required = options.required;
|
|
847
|
+
},
|
|
848
|
+
openFieldTreeDialog() {
|
|
849
|
+
this.treeData = [
|
|
850
|
+
{
|
|
851
|
+
name: "Jinjilianxiren",
|
|
852
|
+
label: "员工-紧急联系人",
|
|
853
|
+
children: [
|
|
854
|
+
{
|
|
855
|
+
detailEntity: "Jinjilianxiren",
|
|
856
|
+
name: "createdOn",
|
|
857
|
+
label: "员工-紧急联系人.创建时间",
|
|
858
|
+
type: "DateTime",
|
|
859
|
+
required: "1",
|
|
860
|
+
},
|
|
861
|
+
/*{
|
|
862
|
+
"searchDialogWidth": "520px",
|
|
863
|
+
"detailEntity": "Jinjilianxiren",
|
|
864
|
+
"name": "createdBy",
|
|
865
|
+
"label": "员工-紧急联系人.创建用户",
|
|
866
|
+
"type": "Reference",
|
|
867
|
+
"required": "1"
|
|
868
|
+
},*/ {
|
|
869
|
+
detailEntity: "Jinjilianxiren",
|
|
870
|
+
name: "modifiedOn",
|
|
871
|
+
label: "员工-紧急联系人.最近修改时间",
|
|
872
|
+
type: "DateTime",
|
|
873
|
+
required: "0",
|
|
874
|
+
},
|
|
875
|
+
/*{
|
|
876
|
+
"searchDialogWidth": "520px",
|
|
877
|
+
"detailEntity": "Jinjilianxiren",
|
|
878
|
+
"name": "modifiedBy",
|
|
879
|
+
"label": "员工-紧急联系人.修改用户",
|
|
880
|
+
"type": "Reference",
|
|
881
|
+
"required": "0"
|
|
882
|
+
}, {
|
|
883
|
+
"searchDialogWidth": "520px",
|
|
884
|
+
"detailEntity": "Jinjilianxiren",
|
|
885
|
+
"name": "mdYuangongdanganId",
|
|
886
|
+
"label": "员工-紧急联系人.主从关联Id",
|
|
887
|
+
"type": "Reference",
|
|
888
|
+
"required": "1"
|
|
889
|
+
},*/ {
|
|
890
|
+
detailEntity: "Jinjilianxiren",
|
|
891
|
+
name: "shouji",
|
|
892
|
+
label: "员工-紧急联系人.手机",
|
|
893
|
+
type: "Text",
|
|
894
|
+
required: "0",
|
|
895
|
+
maxLength: "200",
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
detailEntity: "Jinjilianxiren",
|
|
899
|
+
name: "jinjilianxirenxingming",
|
|
900
|
+
label: "员工-紧急联系人.紧急联系人姓名",
|
|
901
|
+
type: "Text",
|
|
902
|
+
required: "0",
|
|
903
|
+
maxLength: "200",
|
|
904
|
+
},
|
|
905
|
+
],
|
|
906
|
+
},
|
|
907
|
+
];
|
|
908
|
+
|
|
909
|
+
let fields = this.optionModel.tableColumns
|
|
910
|
+
.filter((item) => !!item.prop)
|
|
911
|
+
.map((item) => item.prop);
|
|
912
|
+
let defaultCheckedKeys = [];
|
|
913
|
+
this.treeData.forEach((item1) => {
|
|
914
|
+
item1.children.forEach((item2) => {
|
|
915
|
+
if (
|
|
916
|
+
fields.includes(item2.name) &&
|
|
917
|
+
!defaultCheckedKeys.includes(item2.name)
|
|
918
|
+
) {
|
|
919
|
+
defaultCheckedKeys.push(item2.name);
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
});
|
|
923
|
+
this.defaultCheckedKeys = defaultCheckedKeys;
|
|
924
|
+
this.showFieldTreeDialog = true;
|
|
925
|
+
},
|
|
926
|
+
confirmFieldTreeDialog() {
|
|
927
|
+
// defaultCheckedKeys
|
|
928
|
+
let fields = this.optionModel.tableColumns
|
|
929
|
+
.filter((item) => !!item.prop)
|
|
930
|
+
.map((item) => item.prop);
|
|
931
|
+
let datas = this.$refs.tree.getCheckedNodes(true, false);
|
|
932
|
+
datas
|
|
933
|
+
.filter((item) => !fields.includes(item.name))
|
|
934
|
+
.forEach((item) => {
|
|
935
|
+
this.addCol2(item);
|
|
936
|
+
});
|
|
937
|
+
this.designer.emitHistoryChange();
|
|
938
|
+
this.showFieldTreeDialog = false;
|
|
939
|
+
},
|
|
940
|
+
addCol2: function (item) {
|
|
941
|
+
let tmpId = "column" + generateId();
|
|
942
|
+
var e = {
|
|
943
|
+
columnId: new Date().getTime(),
|
|
944
|
+
required: false,
|
|
945
|
+
width: 150,
|
|
946
|
+
prop: item.name,
|
|
947
|
+
label: item.label,
|
|
948
|
+
show: true,
|
|
949
|
+
sortable: true,
|
|
950
|
+
};
|
|
951
|
+
this.optionModel.tableColumns.push(e);
|
|
952
|
+
},
|
|
953
|
+
openTableConfigDialog() {
|
|
954
|
+
this.eventHeader = `${
|
|
955
|
+
this.optionModel.name
|
|
956
|
+
}.${eventName}(${eventParams.join(", ")}) {`;
|
|
957
|
+
this.eventHandlerCode = selectedWidget.options[eventName] || "";
|
|
958
|
+
this.showTableConfigDialog = true;
|
|
959
|
+
},
|
|
960
|
+
downloadExcel() {
|
|
961
|
+
let defaultUrl =
|
|
962
|
+
"http://file.sc.5mall.com/download/repo1/b/mk1/2024/12/13/b2aea548-a9a8-4dca-bba7-8d9c6134ebe3.xlsx";
|
|
963
|
+
let xformImportTemplateFile =
|
|
964
|
+
setttingConfig.xformImportTemplateFile || defaultUrl;
|
|
965
|
+
if (!xformImportTemplateFile) return;
|
|
966
|
+
this.$commonFileUtil.downloadFile(
|
|
967
|
+
xformImportTemplateFile,
|
|
968
|
+
"通用导入模板.xlsx"
|
|
969
|
+
);
|
|
970
|
+
},
|
|
971
|
+
addGridPageSizeList() {
|
|
972
|
+
if (this.optionModel.gridPageSizeList === undefined) {
|
|
973
|
+
this.$set(this.optionModel, "gridPageSizeList", []);
|
|
974
|
+
}
|
|
975
|
+
this.optionModel.gridPageSizeList.push({ value: 50 });
|
|
976
|
+
},
|
|
977
|
+
openExportItemColumnsDialog() {
|
|
978
|
+
this.showExportItemColumnsDialog = true;
|
|
979
|
+
},
|
|
980
|
+
},
|
|
981
|
+
};
|
|
982
|
+
</script>
|
|
983
|
+
|
|
984
|
+
<style>
|
|
985
|
+
.icon-drag:before {
|
|
986
|
+
content: "\e61d";
|
|
987
|
+
}
|
|
988
|
+
</style>
|