cloud-web-corejs 1.0.113 → 1.0.115
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/wf/content.vue +106 -27
- package/src/components/wf/wf.js +1 -3
- package/src/components/xform/form-designer/designer.js +3 -2
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
- package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +89 -0
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +99 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +323 -202
- package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +3 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +778 -666
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
- package/src/components/xform/form-render/indexMixin.js +1 -1
- package/src/components/xform/lang/zh-CN.js +2 -0
- package/src/store/modules/tagsView.js +1 -14
- package/src/utils/vab.js +3 -3
- package/src/views/user/form/vform/out_render.vue +1 -1
- package/src/views/user/form/vform/render.vue +8 -4
- package/src/views/user/form/view/edit.vue +38 -37
- package/src/views/user/form/view/list.vue +27 -7
- package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
- package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
- package/src/views/user/wf/wf_obj_config/list.vue +19 -1
@@ -29,13 +29,13 @@
|
|
29
29
|
element-loading-text="数据正在加载中"
|
30
30
|
element-loading-spinner="el-icon-loading"
|
31
31
|
>
|
32
|
-
<el-table-column label=""
|
32
|
+
<el-table-column label="" width="80" fixed="left">
|
33
33
|
<template #default="scope">
|
34
34
|
<span>{{ scope.$index + 1 }}</span>
|
35
35
|
</template>
|
36
36
|
</el-table-column>
|
37
37
|
<el-table-column label="" width="35" fixed="left"
|
38
|
-
|
38
|
+
><i class="el-icon-s-operation drag-option"></i>
|
39
39
|
</el-table-column>
|
40
40
|
<el-table-column
|
41
41
|
:label="i18nt('designer.setting.columnLabel')"
|
@@ -44,7 +44,10 @@
|
|
44
44
|
fixed="left"
|
45
45
|
>
|
46
46
|
<template #default="scope">
|
47
|
-
<el-input
|
47
|
+
<el-input
|
48
|
+
v-model="scope.row.label"
|
49
|
+
@change="changeRowLabel(scope.row)"
|
50
|
+
></el-input>
|
48
51
|
</template>
|
49
52
|
</el-table-column>
|
50
53
|
<el-table-column
|
@@ -69,32 +72,13 @@
|
|
69
72
|
<el-input v-model="scope.row.width"></el-input>
|
70
73
|
</template>
|
71
74
|
</el-table-column>
|
72
|
-
|
73
|
-
:label="i18nt('designer.setting.visibleColumn')"
|
74
|
-
width="70"
|
75
|
-
prop="show"
|
76
|
-
>
|
77
|
-
<template #default="scope">
|
78
|
-
<el-switch v-model="scope.row.show"></el-switch>
|
79
|
-
</template>
|
80
|
-
</el-table-column>
|
75
|
+
|
81
76
|
<el-table-column :label="i18nt('必填')" width="70" prop="required">
|
82
77
|
<template #default="scope">
|
83
|
-
<el-switch
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
:label="i18nt('designer.setting.sortableColumn')"
|
88
|
-
width="70"
|
89
|
-
prop="sortable"
|
90
|
-
>
|
91
|
-
<template #default="scope">
|
92
|
-
<el-switch v-model="scope.row.sortable"></el-switch>
|
93
|
-
</template>
|
94
|
-
</el-table-column>
|
95
|
-
<el-table-column :label="i18nt('明细行')" width="70" prop="sortable">
|
96
|
-
<template #default="scope">
|
97
|
-
<el-switch v-model="scope.row.isItemLine"></el-switch>
|
78
|
+
<el-switch
|
79
|
+
v-model="scope.row.required"
|
80
|
+
@change="changeRowRequired(scope.row)"
|
81
|
+
></el-switch>
|
98
82
|
</template>
|
99
83
|
</el-table-column>
|
100
84
|
<el-table-column
|
@@ -109,13 +93,6 @@
|
|
109
93
|
</el-select>
|
110
94
|
</template>
|
111
95
|
</el-table-column>
|
112
|
-
<!-- <el-table-column :label="i18nt('designer.setting.alignTypeOfColumn')" width="100" prop="align">
|
113
|
-
<template #default="scope">
|
114
|
-
<el-select v-model="scope.row.align">
|
115
|
-
<el-option v-for="(e,index) in alignOptions" :key="index" :value="e.value" :label="e.label"></el-option>
|
116
|
-
</el-select>
|
117
|
-
</template>
|
118
|
-
</el-table-column>-->
|
119
96
|
<el-table-column
|
120
97
|
:label="i18nt('designer.setting.formatOfColumn')"
|
121
98
|
width="200"
|
@@ -124,7 +101,7 @@
|
|
124
101
|
<template #default="scope">
|
125
102
|
<el-select
|
126
103
|
v-model="scope.row.formatS"
|
127
|
-
@change="changeFormatS(scope.row,false)"
|
104
|
+
@change="changeFormatS(scope.row, false)"
|
128
105
|
clearable
|
129
106
|
>
|
130
107
|
<el-option-group
|
@@ -132,11 +109,7 @@
|
|
132
109
|
>
|
133
110
|
<el-option value="render" label="render"></el-option>
|
134
111
|
</el-option-group>
|
135
|
-
<el-option-group
|
136
|
-
v-for="t in op"
|
137
|
-
:key="t.label"
|
138
|
-
:label="t.label"
|
139
|
-
>
|
112
|
+
<el-option-group v-for="t in op" :key="t.label" :label="t.label">
|
140
113
|
<el-option
|
141
114
|
v-for="e in t.options"
|
142
115
|
:key="e.value"
|
@@ -147,11 +120,7 @@
|
|
147
120
|
</el-select>
|
148
121
|
</template>
|
149
122
|
</el-table-column>
|
150
|
-
<el-table-column
|
151
|
-
label="格式化配置"
|
152
|
-
width="90"
|
153
|
-
align="center"
|
154
|
-
>
|
123
|
+
<el-table-column label="格式化配置" width="90" align="center">
|
155
124
|
<template #default="scope">
|
156
125
|
<el-button
|
157
126
|
size="mini"
|
@@ -159,7 +128,10 @@
|
|
159
128
|
round=""
|
160
129
|
icon="el-icon-edit"
|
161
130
|
@click="openFormatConfigDialog(scope.row, scope.$index)"
|
162
|
-
:disabled="
|
131
|
+
:disabled="
|
132
|
+
!columnFormatMap[scope.row.formatS] &&
|
133
|
+
'widgetRender' !== scope.row.formatS
|
134
|
+
"
|
163
135
|
></el-button>
|
164
136
|
</template>
|
165
137
|
</el-table-column>
|
@@ -179,115 +151,40 @@
|
|
179
151
|
></el-button>
|
180
152
|
</template>
|
181
153
|
</el-table-column>
|
182
|
-
<el-table-column :label="i18nt('自定义表格列配置')" width="150">
|
183
|
-
<template #default="scope">
|
184
|
-
<a
|
185
|
-
href="javascript:void(0);"
|
186
|
-
class="a-link link-oneLind"
|
187
|
-
@click="openTableColumnConfigDialog(scope.row, scope.$index)"
|
188
|
-
>
|
189
|
-
<span>{{ scope.row.tableColumnConfig }}</span>
|
190
|
-
<i class="el-icon-edit"></i>
|
191
|
-
</a>
|
192
|
-
</template>
|
193
|
-
</el-table-column>
|
194
|
-
<el-table-column :label="i18nt('下拉列')" width="70" prop="sortable">
|
195
|
-
<template #default="scope">
|
196
|
-
<el-switch v-model="scope.row.treeNode"></el-switch>
|
197
|
-
</template>
|
198
|
-
</el-table-column>
|
199
154
|
<el-table-column
|
200
|
-
:label="i18nt('
|
201
|
-
width="
|
202
|
-
prop="
|
155
|
+
:label="i18nt('designer.setting.visibleColumn')"
|
156
|
+
width="70"
|
157
|
+
prop="show"
|
203
158
|
>
|
204
159
|
<template #default="scope">
|
205
|
-
<el-
|
206
|
-
v-model="scope.row.editFormatS"
|
207
|
-
@change="changeFormatS(scope.row,true)"
|
208
|
-
clearable
|
209
|
-
>
|
210
|
-
<el-option
|
211
|
-
v-for="e in editOp"
|
212
|
-
:key="e.value"
|
213
|
-
:value="e.value"
|
214
|
-
:label="e.label"
|
215
|
-
></el-option>
|
216
|
-
</el-select>
|
217
|
-
</template>
|
218
|
-
</el-table-column>
|
219
|
-
<el-table-column label="编辑插槽配置" width="150" align="center">
|
220
|
-
<template #default="scope">
|
221
|
-
<el-button
|
222
|
-
size="mini"
|
223
|
-
plain=""
|
224
|
-
round=""
|
225
|
-
icon="el-icon-edit"
|
226
|
-
@click="openEditFormatConfigDialog(scope.row, scope.$index)"
|
227
|
-
:disabled="!scope.row.editFormatS"
|
228
|
-
></el-button>
|
160
|
+
<el-switch v-model="scope.row.show"></el-switch>
|
229
161
|
</template>
|
230
162
|
</el-table-column>
|
231
163
|
<el-table-column
|
232
|
-
:label="i18nt('
|
233
|
-
width="
|
234
|
-
prop="
|
164
|
+
:label="i18nt('designer.setting.sortableColumn')"
|
165
|
+
width="70"
|
166
|
+
prop="sortable"
|
235
167
|
>
|
236
168
|
<template #default="scope">
|
237
|
-
<el-
|
238
|
-
<el-option value="Image2" label="图片"></el-option>
|
239
|
-
<el-option value="Number" label="数值"></el-option>
|
240
|
-
</el-select>
|
169
|
+
<el-switch v-model="scope.row.sortable"></el-switch>
|
241
170
|
</template>
|
242
171
|
</el-table-column>
|
243
|
-
|
244
172
|
<el-table-column
|
245
|
-
|
246
|
-
width="
|
247
|
-
|
173
|
+
label="编辑更多属性"
|
174
|
+
width="100"
|
175
|
+
align="center"
|
176
|
+
fixed="right"
|
248
177
|
>
|
249
|
-
<template #default="scope">
|
250
|
-
<el-select v-model="scope.row.footerDataType" clearable>
|
251
|
-
<el-option value="1" label="合计"></el-option>
|
252
|
-
<el-option value="2" label="平均"></el-option>
|
253
|
-
<el-option value="3" label="自定义"></el-option>
|
254
|
-
</el-select>
|
255
|
-
</template>
|
256
|
-
</el-table-column>
|
257
|
-
<el-table-column label="表尾统计行配置" width="150" align="center">
|
258
178
|
<template #default="scope">
|
259
179
|
<el-button
|
260
180
|
size="mini"
|
261
181
|
plain=""
|
262
182
|
round=""
|
263
183
|
icon="el-icon-edit"
|
264
|
-
@click="
|
265
|
-
editFormEventHandler(
|
266
|
-
scope.row,
|
267
|
-
scope.$index,
|
268
|
-
'footerMethodConfg'
|
269
|
-
)
|
270
|
-
"
|
271
|
-
:disabled="scope.row.footerDataType !== '3'"
|
184
|
+
@click="openRowEditDialog(scope.row, scope.$index)"
|
272
185
|
></el-button>
|
273
186
|
</template>
|
274
187
|
</el-table-column>
|
275
|
-
<el-table-column
|
276
|
-
:label="i18nt('显示名称颜色')"
|
277
|
-
width="100"
|
278
|
-
prop="fixed"
|
279
|
-
>
|
280
|
-
<template #default="scope">
|
281
|
-
<el-select v-model="scope.row.labelColor" clearable>
|
282
|
-
<el-option value="#e6a23c" label="橙"></el-option>
|
283
|
-
<el-option value="#2a6494" label="蓝"></el-option>
|
284
|
-
<el-option value="#30b08f" label="绿"></el-option>
|
285
|
-
<el-option value="#909399" label="灰"></el-option>
|
286
|
-
<el-option value="#ea5353" label="红"></el-option>
|
287
|
-
</el-select>
|
288
|
-
</template>
|
289
|
-
</el-table-column>
|
290
|
-
|
291
188
|
<el-table-column label="操作" width="150" fixed="right">
|
292
189
|
<template slot="header">
|
293
190
|
<el-tooltip
|
@@ -356,9 +253,13 @@
|
|
356
253
|
</template>
|
357
254
|
</el-table-column>
|
358
255
|
</el-table>
|
359
|
-
<columnRenderDialog
|
360
|
-
|
361
|
-
|
256
|
+
<columnRenderDialog
|
257
|
+
:column="currentTableColumn"
|
258
|
+
:sourceData="sourceData"
|
259
|
+
v-if="showColumnRenderDialog"
|
260
|
+
:visiable.sync="showColumnRenderDialog"
|
261
|
+
@confirm="confirmWidgetRenderDialog"
|
262
|
+
></columnRenderDialog>
|
362
263
|
</div>
|
363
264
|
<div class="dialog-footer" slot="footer">
|
364
265
|
<el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
|
@@ -398,7 +299,7 @@
|
|
398
299
|
:readonly="!1"
|
399
300
|
v-model="renderJson"
|
400
301
|
></code-editor>
|
401
|
-
<el-alert type="info" :closable="!1" title="}"/>
|
302
|
+
<el-alert type="info" :closable="!1" title="}" />
|
402
303
|
<div class="dialog-footer" slot="footer">
|
403
304
|
<el-button
|
404
305
|
@click="showRenderDialogFlag = !1"
|
@@ -509,14 +410,207 @@
|
|
509
410
|
</el-button>
|
510
411
|
</div>
|
511
412
|
</el-dialog>
|
413
|
+
|
414
|
+
<el-dialog
|
415
|
+
custom-class="dialog-style list-dialog"
|
416
|
+
:title="i18nt('designer.setting.tableColEdit')"
|
417
|
+
:visible.sync="showRowEditDialog"
|
418
|
+
v-if="showRowEditDialog"
|
419
|
+
:modal="false"
|
420
|
+
:show-close="!0"
|
421
|
+
:close-on-click-modal="!1"
|
422
|
+
:close-on-press-escape="!1"
|
423
|
+
:destroy-on-close="!0"
|
424
|
+
top="5vh"
|
425
|
+
width="409px"
|
426
|
+
v-dialog-drag
|
427
|
+
>
|
428
|
+
<div class="cont">
|
429
|
+
<el-form :model="rowData" class="form-m2" label-position="top">
|
430
|
+
<el-form-item :label="i18nt('designer.setting.columnLabel')">
|
431
|
+
<el-input
|
432
|
+
v-model="rowData.label"
|
433
|
+
@change="changeRowLabel(rowData)"
|
434
|
+
></el-input>
|
435
|
+
</el-form-item>
|
436
|
+
<el-form-item :label="i18nt('designer.setting.columnName')">
|
437
|
+
<el-input
|
438
|
+
v-model="rowData.prop"
|
439
|
+
@change="changeRowProp(rowData)"
|
440
|
+
:disabled="'editAttachment' == rowData.formatS"
|
441
|
+
></el-input>
|
442
|
+
</el-form-item>
|
443
|
+
<el-form-item :label="i18nt('designer.setting.columnWidth')">
|
444
|
+
<el-input v-model="rowData.width"></el-input>
|
445
|
+
</el-form-item>
|
446
|
+
<el-form-item :label="i18nt('必填')">
|
447
|
+
<el-switch
|
448
|
+
v-model="rowData.required"
|
449
|
+
@change="changeRowRequired(rowData)"
|
450
|
+
></el-switch>
|
451
|
+
</el-form-item>
|
452
|
+
<el-form-item :label="i18nt('designer.setting.fixedColumn')">
|
453
|
+
<el-select v-model="rowData.fixed" clearable>
|
454
|
+
<el-option value="left">left</el-option>
|
455
|
+
<el-option value="right">right</el-option>
|
456
|
+
</el-select>
|
457
|
+
</el-form-item>
|
458
|
+
<el-form-item :label="i18nt('designer.setting.formatOfColumn')">
|
459
|
+
<el-select
|
460
|
+
v-model="rowData.formatS"
|
461
|
+
@change="changeFormatS(rowData, false)"
|
462
|
+
clearable
|
463
|
+
>
|
464
|
+
<el-option-group
|
465
|
+
:label="i18nt('designer.setting.customRenderGroup')"
|
466
|
+
>
|
467
|
+
<el-option value="render" label="render"></el-option>
|
468
|
+
</el-option-group>
|
469
|
+
<el-option-group v-for="t in op" :key="t.label" :label="t.label">
|
470
|
+
<el-option
|
471
|
+
v-for="e in t.options"
|
472
|
+
:key="e.value"
|
473
|
+
:value="e.value"
|
474
|
+
:label="e.label"
|
475
|
+
></el-option>
|
476
|
+
</el-option-group>
|
477
|
+
</el-select>
|
478
|
+
</el-form-item>
|
479
|
+
<el-form-item label="格式化配置">
|
480
|
+
<el-button
|
481
|
+
size="mini"
|
482
|
+
plain=""
|
483
|
+
round=""
|
484
|
+
icon="el-icon-edit"
|
485
|
+
@click="openFormatConfigDialog(rowData, rowDataIndex)"
|
486
|
+
:disabled="
|
487
|
+
!columnFormatMap[rowData.formatS] &&
|
488
|
+
'widgetRender' !== rowData.formatS
|
489
|
+
"
|
490
|
+
></el-button>
|
491
|
+
</el-form-item>
|
492
|
+
<el-form-item :label="i18nt('designer.setting.renderFunction')">
|
493
|
+
<el-button
|
494
|
+
:disabled="'render' !== rowData.formatS"
|
495
|
+
size="mini"
|
496
|
+
plain=""
|
497
|
+
round=""
|
498
|
+
icon="el-icon-edit"
|
499
|
+
@click="showRenderDialog(rowData)"
|
500
|
+
></el-button>
|
501
|
+
</el-form-item>
|
502
|
+
<el-form-item :label="i18nt('designer.setting.visibleColumn')">
|
503
|
+
<el-switch v-model="rowData.show"></el-switch>
|
504
|
+
</el-form-item>
|
505
|
+
<el-form-item :label="i18nt('designer.setting.sortableColumn')">
|
506
|
+
<el-switch v-model="rowData.sortable"></el-switch>
|
507
|
+
</el-form-item>
|
508
|
+
<el-form-item :label="i18nt('明细行')">
|
509
|
+
<el-switch v-model="rowData.isItemLine"></el-switch>
|
510
|
+
</el-form-item>
|
511
|
+
|
512
|
+
<el-form-item :label="i18nt('下拉列')">
|
513
|
+
<el-switch v-model="rowData.treeNode"></el-switch>
|
514
|
+
</el-form-item>
|
515
|
+
<el-form-item :label="i18nt('自定义表格列配置')">
|
516
|
+
<a
|
517
|
+
href="javascript:void(0);"
|
518
|
+
class="a-link link-oneLind"
|
519
|
+
@click="openTableColumnConfigDialog(rowData, rowDataIndex)"
|
520
|
+
>
|
521
|
+
<span>{{ rowData.tableColumnConfig }}</span>
|
522
|
+
<i class="el-icon-edit"></i>
|
523
|
+
</a>
|
524
|
+
</el-form-item>
|
525
|
+
<el-form-item :label="i18nt('编辑插槽类型')">
|
526
|
+
<el-select
|
527
|
+
v-model="rowData.editFormatS"
|
528
|
+
@change="changeFormatS(rowData, true)"
|
529
|
+
clearable
|
530
|
+
>
|
531
|
+
<el-option
|
532
|
+
v-for="e in editOp"
|
533
|
+
:key="e.value"
|
534
|
+
:value="e.value"
|
535
|
+
:label="e.label"
|
536
|
+
></el-option>
|
537
|
+
</el-select>
|
538
|
+
</el-form-item>
|
539
|
+
<el-form-item label="编辑插槽配置">
|
540
|
+
<el-button
|
541
|
+
size="mini"
|
542
|
+
plain=""
|
543
|
+
round=""
|
544
|
+
icon="el-icon-edit"
|
545
|
+
@click="openEditFormatConfigDialog(rowData, rowDataIndex)"
|
546
|
+
:disabled="!rowData.editFormatS"
|
547
|
+
></el-button>
|
548
|
+
</el-form-item>
|
549
|
+
<el-form-item :label="i18nt('导出类型')">
|
550
|
+
<el-select v-model="rowData.exportType" clearable>
|
551
|
+
<el-option value="Image2" label="图片"></el-option>
|
552
|
+
<el-option value="Number" label="数值"></el-option>
|
553
|
+
</el-select>
|
554
|
+
</el-form-item>
|
555
|
+
<el-form-item :label="i18nt('表尾统计行类型')">
|
556
|
+
<el-select v-model="rowData.footerDataType" clearable>
|
557
|
+
<el-option value="1" label="合计"></el-option>
|
558
|
+
<el-option value="2" label="平均"></el-option>
|
559
|
+
<el-option value="3" label="自定义"></el-option>
|
560
|
+
</el-select>
|
561
|
+
</el-form-item>
|
562
|
+
<el-form-item label="表尾统计行配置">
|
563
|
+
<el-button
|
564
|
+
size="mini"
|
565
|
+
plain=""
|
566
|
+
round=""
|
567
|
+
icon="el-icon-edit"
|
568
|
+
@click="
|
569
|
+
editFormEventHandler(rowData, rowDataIndex, 'footerMethodConfg')
|
570
|
+
"
|
571
|
+
:disabled="rowData.footerDataType !== '3'"
|
572
|
+
></el-button>
|
573
|
+
</el-form-item>
|
574
|
+
<el-form-item :label="i18nt('显示名称颜色')">
|
575
|
+
<el-select v-model="rowData.labelColor" clearable>
|
576
|
+
<el-option value="#e6a23c" label="橙"></el-option>
|
577
|
+
<el-option value="#2a6494" label="蓝"></el-option>
|
578
|
+
<el-option value="#30b08f" label="绿"></el-option>
|
579
|
+
<el-option value="#909399" label="灰"></el-option>
|
580
|
+
<el-option value="#ea5353" label="红"></el-option>
|
581
|
+
</el-select>
|
582
|
+
</el-form-item>
|
583
|
+
</el-form>
|
584
|
+
</div>
|
585
|
+
<div class="dialog-footer" slot="footer">
|
586
|
+
<el-button
|
587
|
+
@click="closeRowEditDialog"
|
588
|
+
class="button-sty"
|
589
|
+
icon="el-icon-close"
|
590
|
+
>
|
591
|
+
{{ i18nt("designer.hint.cancel") }}
|
592
|
+
</el-button>
|
593
|
+
<el-button
|
594
|
+
type="primary"
|
595
|
+
@click="submitRowEditDialog"
|
596
|
+
class="button-sty"
|
597
|
+
icon="el-icon-check"
|
598
|
+
>
|
599
|
+
{{ i18nt("designer.hint.confirm") }}
|
600
|
+
</el-button>
|
601
|
+
</div>
|
602
|
+
</el-dialog>
|
512
603
|
</el-dialog>
|
513
604
|
</template>
|
514
605
|
<script>
|
515
606
|
import i18n from "../../../../../../components/xform/utils/i18n";
|
516
607
|
import Sortable from "sortablejs";
|
517
|
-
import {
|
518
|
-
|
519
|
-
|
608
|
+
import {
|
609
|
+
generateId,
|
610
|
+
loopHandleWidget,
|
611
|
+
deepClone,
|
612
|
+
} from "../../../../../../components/xform/utils/util";
|
613
|
+
import columnRenderDialog from "./columnRenderDialog.vue";
|
520
614
|
|
521
615
|
let businessOptions = [
|
522
616
|
{
|
@@ -536,7 +630,7 @@ let businessOptions = [
|
|
536
630
|
label: "更新时间",
|
537
631
|
},
|
538
632
|
];
|
539
|
-
let userFields = ["_createBy", "_modifyBy", "create_date", "modify_date"]
|
633
|
+
let userFields = ["_createBy", "_modifyBy", "create_date", "modify_date"];
|
540
634
|
|
541
635
|
export default {
|
542
636
|
mixins: [i18n],
|
@@ -545,10 +639,9 @@ export default {
|
|
545
639
|
selectedWidget: Object,
|
546
640
|
optionModel: Object,
|
547
641
|
},
|
548
|
-
components: {columnRenderDialog},
|
642
|
+
components: { columnRenderDialog },
|
549
643
|
inject: ["openWidgetPropertyDialog"],
|
550
644
|
data() {
|
551
|
-
|
552
645
|
return {
|
553
646
|
pictLoading: true,
|
554
647
|
tableColumnConfigTitle: null,
|
@@ -675,7 +768,7 @@ export default {
|
|
675
768
|
|
676
769
|
{
|
677
770
|
label: "业务模块",
|
678
|
-
options: businessOptions
|
771
|
+
options: businessOptions,
|
679
772
|
},
|
680
773
|
{
|
681
774
|
label: "Date Format",
|
@@ -798,6 +891,7 @@ export default {
|
|
798
891
|
showFormEventDialogFlag: false,
|
799
892
|
formEventHandlerCode: "",
|
800
893
|
curEventName: "",
|
894
|
+
curEventRow:null,
|
801
895
|
|
802
896
|
eventParamsMap: {
|
803
897
|
footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
|
@@ -805,18 +899,22 @@ export default {
|
|
805
899
|
|
806
900
|
showColumnRenderDialog: false,
|
807
901
|
|
902
|
+
editRowData: null,
|
903
|
+
rowData: null,
|
904
|
+
rowDataIndex: 0,
|
905
|
+
showRowEditDialog: false,
|
808
906
|
};
|
809
907
|
},
|
810
908
|
beforeDestroy() {
|
811
909
|
if (this.dragSort) this.dragSort.destroy();
|
812
910
|
},
|
813
|
-
created() {
|
814
|
-
},
|
911
|
+
created() {},
|
815
912
|
mounted() {
|
816
913
|
this.init();
|
817
914
|
},
|
818
915
|
methods: {
|
819
916
|
editFormEventHandler(row, index, eventName) {
|
917
|
+
this.curEventRow = row;
|
820
918
|
this.curEventName = eventName;
|
821
919
|
this.curEventIndex = index;
|
822
920
|
this.formEventHandlerCode = row[eventName];
|
@@ -840,7 +938,7 @@ export default {
|
|
840
938
|
return;
|
841
939
|
}
|
842
940
|
}
|
843
|
-
this.
|
941
|
+
this.curEventRow[this.curEventName] =
|
844
942
|
this.formEventHandlerCode;
|
845
943
|
this.showFormEventDialogFlag = false;
|
846
944
|
},
|
@@ -852,10 +950,10 @@ export default {
|
|
852
950
|
this.$nextTick(() => {
|
853
951
|
this.rowDrop();
|
854
952
|
setTimeout(() => {
|
855
|
-
this.pictLoading = false
|
856
|
-
}, 200)
|
953
|
+
this.pictLoading = false;
|
954
|
+
}, 200);
|
857
955
|
});
|
858
|
-
}, 10)
|
956
|
+
}, 10);
|
859
957
|
|
860
958
|
/*this.$nextTick(() => {
|
861
959
|
this.rowDrop();
|
@@ -874,11 +972,11 @@ export default {
|
|
874
972
|
|
875
973
|
// this.designer.widgetList
|
876
974
|
|
877
|
-
this.showColumnRenderDialog = true
|
975
|
+
this.showColumnRenderDialog = true;
|
878
976
|
},
|
879
977
|
confirmWidgetRenderDialog(widgetList) {
|
880
|
-
this.currentTableColumn.widgetList = widgetList
|
881
|
-
this.showColumnRenderDialog = false
|
978
|
+
this.currentTableColumn.widgetList = widgetList;
|
979
|
+
this.showColumnRenderDialog = false;
|
882
980
|
},
|
883
981
|
showRenderDialog: function (e) {
|
884
982
|
/*if(e.formatS == 'widgetRender'){
|
@@ -926,7 +1024,7 @@ export default {
|
|
926
1024
|
* @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
|
927
1025
|
*/
|
928
1026
|
handleAddOneRow(row, index, type) {
|
929
|
-
const {parentId, columnId} = row;
|
1027
|
+
const { parentId, columnId } = row;
|
930
1028
|
const curId = type === "SIBLING" ? parentId : columnId;
|
931
1029
|
let curRow = {};
|
932
1030
|
// 在 tableData 中,找到当前节点
|
@@ -943,7 +1041,7 @@ export default {
|
|
943
1041
|
|
944
1042
|
findRow(this.tableData);
|
945
1043
|
|
946
|
-
const {columnId: generateParentId, children} = curRow;
|
1044
|
+
const { columnId: generateParentId, children } = curRow;
|
947
1045
|
|
948
1046
|
let newRow = this.generateRow(generateParentId);
|
949
1047
|
if (children) {
|
@@ -982,7 +1080,7 @@ export default {
|
|
982
1080
|
footerDataType: null,
|
983
1081
|
footerMethodConfg: null,
|
984
1082
|
widgetList: [],
|
985
|
-
labelColor:null
|
1083
|
+
labelColor: null,
|
986
1084
|
// treeNode: false,
|
987
1085
|
};
|
988
1086
|
return row;
|
@@ -993,7 +1091,7 @@ export default {
|
|
993
1091
|
},
|
994
1092
|
// 删除当前节点及对应子节点数据
|
995
1093
|
onDelete(row) {
|
996
|
-
const {parentId, columnId} = row;
|
1094
|
+
const { parentId, columnId } = row;
|
997
1095
|
// 根节点直接删除
|
998
1096
|
if (!parentId) {
|
999
1097
|
const delIndex = this.tableData.findIndex(
|
@@ -1006,7 +1104,7 @@ export default {
|
|
1006
1104
|
const findRow = (data) => {
|
1007
1105
|
data.forEach((item) => {
|
1008
1106
|
if (item.columnId === parentId) {
|
1009
|
-
parentRow = {...item};
|
1107
|
+
parentRow = { ...item };
|
1010
1108
|
}
|
1011
1109
|
if (item.children && item.children.length) {
|
1012
1110
|
findRow(item.children);
|
@@ -1015,7 +1113,7 @@ export default {
|
|
1015
1113
|
};
|
1016
1114
|
findRow(this.tableData);
|
1017
1115
|
|
1018
|
-
const {children} = parentRow;
|
1116
|
+
const { children } = parentRow;
|
1019
1117
|
|
1020
1118
|
const delIndex = children.findIndex(
|
1021
1119
|
(item) => item.columnId === columnId
|
@@ -1051,11 +1149,11 @@ export default {
|
|
1051
1149
|
this.dragSort = Sortable.create(tbody, {
|
1052
1150
|
ghostClass: "sortable-ghost",
|
1053
1151
|
// draggable: ".drag-option", // 修改可拖拽元素
|
1054
|
-
handle:
|
1152
|
+
handle: ".drag-option", // 指定拖动按钮
|
1055
1153
|
setData: function (e) {
|
1056
1154
|
e.setData("Text", "");
|
1057
1155
|
},
|
1058
|
-
onEnd({newIndex, oldIndex}) {
|
1156
|
+
onEnd({ newIndex, oldIndex }) {
|
1059
1157
|
_this.rowDropEnd(newIndex, oldIndex);
|
1060
1158
|
},
|
1061
1159
|
});
|
@@ -1178,7 +1276,7 @@ export default {
|
|
1178
1276
|
let formatS = isEdit ? row.editFormatS : row.formatS;
|
1179
1277
|
let isButtontCell = this.getIsButtontCell(formatS);
|
1180
1278
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, true, isEdit);
|
1181
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1279
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
1182
1280
|
if (!isEdit) {
|
1183
1281
|
//格式化类型
|
1184
1282
|
if (columnSelectedWidget) {
|
@@ -1221,7 +1319,9 @@ export default {
|
|
1221
1319
|
if (!row.label) row.label = tmpId;
|
1222
1320
|
|
1223
1321
|
if (this.userFields.includes(row.formatS)) {
|
1224
|
-
let item = this.businessOptions.find(
|
1322
|
+
let item = this.businessOptions.find(
|
1323
|
+
(item) => item.value == row.formatS
|
1324
|
+
);
|
1225
1325
|
if (item) {
|
1226
1326
|
row.prop = item.value;
|
1227
1327
|
row.label = item.label;
|
@@ -1238,7 +1338,6 @@ export default {
|
|
1238
1338
|
}
|
1239
1339
|
}
|
1240
1340
|
}
|
1241
|
-
|
1242
1341
|
},
|
1243
1342
|
getColumnWidgetConfig(row, isChange, isEdit) {
|
1244
1343
|
let formatS = isEdit ? row.editFormatS : row.formatS;
|
@@ -1346,72 +1445,74 @@ export default {
|
|
1346
1445
|
columnSelectedWidget.options.labelHidden = true;
|
1347
1446
|
}
|
1348
1447
|
}
|
1349
|
-
return {columnSelectedWidget, columnEditFields};
|
1448
|
+
return { columnSelectedWidget, columnEditFields };
|
1350
1449
|
},
|
1351
1450
|
findColumnByColumnId(columnList, columnId) {
|
1352
|
-
let result = null
|
1451
|
+
let result = null;
|
1353
1452
|
if (columnList) {
|
1354
|
-
let column = columnList.find(item => item.columnId == columnId);
|
1453
|
+
let column = columnList.find((item) => item.columnId == columnId);
|
1355
1454
|
if (!column) {
|
1356
|
-
|
1357
1455
|
}
|
1358
1456
|
for (let column of columnList) {
|
1359
1457
|
if (column.columnId == columnId) {
|
1360
1458
|
result = column;
|
1361
|
-
break
|
1459
|
+
break;
|
1362
1460
|
} else if (column.children && column.children.length) {
|
1363
|
-
let subColumn = this.findColumnByColumnId(
|
1461
|
+
let subColumn = this.findColumnByColumnId(
|
1462
|
+
column.children,
|
1463
|
+
children
|
1464
|
+
);
|
1364
1465
|
if (subColumn) {
|
1365
1466
|
result = subColumn;
|
1366
|
-
break
|
1467
|
+
break;
|
1367
1468
|
}
|
1368
1469
|
}
|
1369
|
-
|
1370
1470
|
}
|
1371
1471
|
}
|
1372
1472
|
return result;
|
1373
1473
|
},
|
1374
1474
|
|
1375
|
-
getRowWidget(row){
|
1376
|
-
let widget = row.widget
|
1377
|
-
if(!widget){
|
1475
|
+
getRowWidget(row) {
|
1476
|
+
let widget = row.widget;
|
1477
|
+
if (!widget) {
|
1378
1478
|
widget.options.a = a;
|
1379
1479
|
widget.options.a = a;
|
1380
1480
|
}
|
1381
1481
|
return widget;
|
1382
1482
|
},
|
1383
1483
|
openFormatConfigDialog(row, index) {
|
1384
|
-
if (row.formatS ==
|
1484
|
+
if (row.formatS == "widgetRender") {
|
1385
1485
|
let formWidgetList = deepClone(this.designer.widgetList);
|
1386
1486
|
let tableData = deepClone(this.tableData);
|
1387
1487
|
let columnId = row.columnId;
|
1388
1488
|
|
1389
1489
|
let dataTableName = this.optionModel.name;
|
1390
1490
|
|
1391
|
-
|
1392
1491
|
let targetColumn = null;
|
1393
1492
|
loopHandleWidget(formWidgetList, (item) => {
|
1394
1493
|
if (item.options.name == dataTableName) {
|
1395
1494
|
item.options.tableColumns = tableData;
|
1396
|
-
targetColumn = this.findColumnByColumnId(
|
1495
|
+
targetColumn = this.findColumnByColumnId(
|
1496
|
+
item.options.tableColumns,
|
1497
|
+
columnId
|
1498
|
+
);
|
1397
1499
|
}
|
1398
1500
|
});
|
1399
1501
|
let getWidgetList = (subWidgetList = []) => {
|
1400
1502
|
targetColumn.widgetList = this.$baseLodash.cloneDeep(subWidgetList);
|
1401
1503
|
return formWidgetList;
|
1402
|
-
}
|
1504
|
+
};
|
1403
1505
|
let sourceData = {
|
1404
1506
|
formWidgetList,
|
1405
1507
|
dataTableName,
|
1406
1508
|
columnId,
|
1407
|
-
getWidgetList
|
1408
|
-
}
|
1509
|
+
getWidgetList,
|
1510
|
+
};
|
1409
1511
|
|
1410
1512
|
this.openWidgetRenderDialog(row, sourceData);
|
1411
|
-
return
|
1513
|
+
return;
|
1412
1514
|
}
|
1413
1515
|
|
1414
|
-
|
1415
1516
|
/*let option = row.columnOption;
|
1416
1517
|
let selectedWidget;
|
1417
1518
|
let columnWidgetConfig = this.getColumnWidgetConfig(row);
|
@@ -1455,7 +1556,7 @@ export default {
|
|
1455
1556
|
let type = this.columnFormatMap[row.formatS];
|
1456
1557
|
let fieldWidget = this.designer.copyNewFieldWidget(
|
1457
1558
|
this.designer.getFieldWidgetByType(type)
|
1458
|
-
)
|
1559
|
+
);
|
1459
1560
|
fieldWidget.options = columnOption;
|
1460
1561
|
row.widget = fieldWidget;
|
1461
1562
|
}
|
@@ -1508,7 +1609,7 @@ export default {
|
|
1508
1609
|
let type = this.columnFormatMap[row.editFormatS];
|
1509
1610
|
let fieldWidget = this.designer.copyNewFieldWidget(
|
1510
1611
|
this.designer.getFieldWidgetByType(type)
|
1511
|
-
)
|
1612
|
+
);
|
1512
1613
|
fieldWidget.options = columnOption;
|
1513
1614
|
row.editWidget = fieldWidget;
|
1514
1615
|
}
|
@@ -1559,44 +1660,64 @@ export default {
|
|
1559
1660
|
this.showTableColumnConfigDialog = false;
|
1560
1661
|
},
|
1561
1662
|
changeRowLabel(row) {
|
1562
|
-
this.setRowWidgetAttars(row,
|
1663
|
+
this.setRowWidgetAttars(row, "label", row.label);
|
1563
1664
|
},
|
1564
1665
|
changeRowProp(row) {
|
1565
|
-
this.setRowWidgetAttars(row,
|
1666
|
+
this.setRowWidgetAttars(row, "keyName", row.prop);
|
1566
1667
|
},
|
1567
1668
|
changeRowRequired(row) {
|
1568
|
-
this.setRowWidgetAttars(row,
|
1669
|
+
this.setRowWidgetAttars(row, "required", row.required);
|
1569
1670
|
},
|
1570
1671
|
setRowWidgetAttars(row, key, value) {
|
1571
1672
|
let type1 = this.columnFormatMap[row.formatS];
|
1572
1673
|
let type2 = this.columnFormatMap[row.editFormatS];
|
1573
|
-
let newWidget = type1
|
1574
|
-
this.designer.
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1674
|
+
let newWidget = type1
|
1675
|
+
? this.designer.copyNewFieldWidget(
|
1676
|
+
this.designer.getFieldWidgetByType(type1)
|
1677
|
+
)
|
1678
|
+
: null;
|
1679
|
+
|
1680
|
+
let newEditWidget = type2
|
1681
|
+
? this.designer.copyNewFieldWidget(
|
1682
|
+
this.designer.getFieldWidgetByType(type2)
|
1683
|
+
)
|
1684
|
+
: null;
|
1580
1685
|
|
1581
1686
|
if (newWidget.formItemFlag) {
|
1582
1687
|
if (row.widget) {
|
1583
|
-
if (row.widget.options[key] !== undefined)
|
1688
|
+
if (row.widget.options[key] !== undefined)
|
1689
|
+
row.widget.options[key] = value;
|
1584
1690
|
}
|
1585
1691
|
if (row.columnOption) {
|
1586
|
-
if (row.columnOption[key] !== undefined)
|
1692
|
+
if (row.columnOption[key] !== undefined)
|
1693
|
+
row.columnOption[key] = value;
|
1587
1694
|
}
|
1588
1695
|
}
|
1589
1696
|
|
1590
1697
|
if (newWidget.formItemFlag) {
|
1591
1698
|
if (row.editWidget) {
|
1592
|
-
if (row.editWidget.options[key] !== undefined)
|
1699
|
+
if (row.editWidget.options[key] !== undefined)
|
1700
|
+
row.editWidget.options[key] = value;
|
1593
1701
|
}
|
1594
1702
|
if (row.editColumnOption) {
|
1595
|
-
if (row.editColumnOption[key] !== undefined)
|
1703
|
+
if (row.editColumnOption[key] !== undefined)
|
1704
|
+
row.editColumnOption[key] = value;
|
1596
1705
|
}
|
1597
1706
|
}
|
1598
|
-
|
1599
|
-
|
1707
|
+
},
|
1708
|
+
openRowEditDialog(row, index) {
|
1709
|
+
this.editRowData = row;
|
1710
|
+
this.rowData = this.$baseLodash.cloneDeep(row);
|
1711
|
+
this.rowDataIndex = index;
|
1712
|
+
this.showRowEditDialog = true;
|
1713
|
+
},
|
1714
|
+
submitRowEditDialog() {
|
1715
|
+
Object.assign(this.editRowData, this.$baseLodash.cloneDeep(this.rowData));
|
1716
|
+
// this.editRowData = this.$baseLodash.cloneDeep(this.rowData);
|
1717
|
+
this.showRowEditDialog = false;
|
1718
|
+
},
|
1719
|
+
closeRowEditDialog() {
|
1720
|
+
this.showRowEditDialog = false;
|
1600
1721
|
},
|
1601
1722
|
},
|
1602
1723
|
};
|