cloud-web-corejs 1.0.54-dev.161 → 1.0.54-dev.163
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/form-widget/field-widget/fieldMixin.js +17 -19
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +375 -361
package/package.json
CHANGED
@@ -155,21 +155,19 @@ modules = {
|
|
155
155
|
},
|
156
156
|
methods: {
|
157
157
|
initValueWatchEvent() {
|
158
|
-
this
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
})
|
172
|
-
|
158
|
+
if (!this.designer) {
|
159
|
+
this.$watch(() => {
|
160
|
+
let currentData = this.tableParam && this.tableParam.row
|
161
|
+
? this.tableParam.row
|
162
|
+
: this.formModel;
|
163
|
+
let currentValue = currentData[this.fieldKeyName];
|
164
|
+
return currentValue;
|
165
|
+
}, (newValue, oldValue) => {
|
166
|
+
if (oldValue !== undefined) {
|
167
|
+
this.initFieldModel(true);
|
168
|
+
}
|
169
|
+
})
|
170
|
+
}
|
173
171
|
},
|
174
172
|
initFieldAttrs() {
|
175
173
|
this.setDisabled(this.field.options.disabled)
|
@@ -939,9 +937,9 @@ modules = {
|
|
939
937
|
tableData.forEach((item) => {
|
940
938
|
// formModel[item.targetField] = row[item.sourceField]
|
941
939
|
let value = !isClear ? row[item.sourceField] ?? null : null;
|
942
|
-
if(item.targetField){
|
940
|
+
if (item.targetField) {
|
943
941
|
this.getWidgetRef(item.targetField).setValue(value);
|
944
|
-
}else if(item.targetFormField){
|
942
|
+
} else if (item.targetFormField) {
|
945
943
|
formModel[item.targetFormField] = value;
|
946
944
|
}
|
947
945
|
|
@@ -970,9 +968,9 @@ modules = {
|
|
970
968
|
// formModel[item.targetField] = value
|
971
969
|
// this.getWidgetRef(item.targetField).setValue(value);
|
972
970
|
|
973
|
-
if(item.targetField){
|
971
|
+
if (item.targetField) {
|
974
972
|
this.getWidgetRef(item.targetField).setValue(value);
|
975
|
-
}else if(item.targetFormField){
|
973
|
+
} else if (item.targetFormField) {
|
976
974
|
formModel[item.targetFormField] = value;
|
977
975
|
}
|
978
976
|
|
@@ -1,361 +1,363 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
>
|
17
|
-
<
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
2
|
+
<el-dialog
|
3
|
+
custom-class="dialog-style list-dialog"
|
4
|
+
:title="i18nt('designer.setting.tableColEdit')"
|
5
|
+
:visible.sync="showDialog"
|
6
|
+
:modal="false"
|
7
|
+
:show-close="!0"
|
8
|
+
:close-on-click-modal="!1"
|
9
|
+
:close-on-press-escape="!1"
|
10
|
+
:destroy-on-close="!0"
|
11
|
+
top="5vh"
|
12
|
+
width="1220px"
|
13
|
+
v-dialog-drag
|
14
|
+
:before-close="closeHandle"
|
15
|
+
>
|
16
|
+
<div class="cont">
|
17
|
+
<el-table
|
18
|
+
ref="singleTable"
|
19
|
+
width="100%"
|
20
|
+
:data="tableData"
|
21
|
+
height="500"
|
22
|
+
border=""
|
23
|
+
row-key="columnId"
|
24
|
+
stripe=""
|
25
|
+
:tree-props="{ children: 'children' }"
|
26
|
+
default-expand-all
|
27
|
+
v-loading="pictLoading"
|
28
|
+
element-loading-background="rgba(0, 0, 0, 0)"
|
29
|
+
element-loading-text="数据正在加载中"
|
30
|
+
element-loading-spinner="el-icon-loading"
|
31
|
+
>
|
32
|
+
<el-table-column label="" min-width="80" fixed="left">
|
33
|
+
<template #default="scope">
|
34
|
+
<span>{{ scope.$index + 1 }}</span>
|
35
|
+
</template>
|
36
|
+
</el-table-column>
|
37
|
+
<el-table-column label="" width="35" fixed="left"
|
38
|
+
><i class="el-icon-s-operation drag-option"></i>
|
39
|
+
</el-table-column>
|
40
|
+
<el-table-column
|
41
|
+
:label="i18nt('designer.setting.columnLabel')"
|
42
|
+
width="150"
|
43
|
+
prop="label"
|
44
|
+
fixed="left"
|
28
45
|
>
|
29
|
-
<
|
30
|
-
<
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
</el-table-column>-->
|
115
|
-
<el-table-column
|
116
|
-
:label="i18nt('designer.setting.formatOfColumn')"
|
117
|
-
width="200"
|
118
|
-
prop="formatS"
|
119
|
-
>
|
120
|
-
<template slot-scope="scope">
|
121
|
-
<el-select
|
122
|
-
v-model="scope.row.formatS"
|
123
|
-
@change="changeFormatS(scope.row)"
|
124
|
-
clearable
|
125
|
-
>
|
126
|
-
<el-option-group
|
127
|
-
:label="i18nt('designer.setting.customRenderGroup')"
|
128
|
-
>
|
129
|
-
<el-option value="render" label="render"></el-option>
|
130
|
-
</el-option-group>
|
131
|
-
<el-option-group
|
132
|
-
v-for="t in op"
|
133
|
-
:key="t.label"
|
134
|
-
:label="t.label"
|
135
|
-
>
|
136
|
-
<el-option
|
137
|
-
v-for="e in t.options"
|
138
|
-
:key="e.value"
|
139
|
-
:value="e.value"
|
140
|
-
:label="e.label"
|
141
|
-
></el-option>
|
142
|
-
</el-option-group>
|
143
|
-
</el-select>
|
144
|
-
</template>
|
145
|
-
</el-table-column>
|
146
|
-
<el-table-column :label="i18nt('自定义表格列配置')" width="150">
|
147
|
-
<template slot-scope="scope">
|
148
|
-
<a
|
149
|
-
href="javascript:void(0);"
|
150
|
-
class="a-link link-oneLind"
|
151
|
-
@click="openTableColumnConfigDialog(scope.row, scope.$index)"
|
46
|
+
<template #default="scope">
|
47
|
+
<el-input v-model="scope.row.label"></el-input>
|
48
|
+
</template>
|
49
|
+
</el-table-column>
|
50
|
+
<el-table-column
|
51
|
+
:label="i18nt('designer.setting.columnName')"
|
52
|
+
width="150"
|
53
|
+
prop="prop"
|
54
|
+
>
|
55
|
+
<template #default="scope">
|
56
|
+
<el-input
|
57
|
+
v-model="scope.row.prop"
|
58
|
+
:disabled="'editAttachment' == scope.row.formatS"
|
59
|
+
></el-input>
|
60
|
+
</template>
|
61
|
+
</el-table-column>
|
62
|
+
<el-table-column
|
63
|
+
:label="i18nt('designer.setting.columnWidth')"
|
64
|
+
width="100"
|
65
|
+
prop="width"
|
66
|
+
>
|
67
|
+
<template #default="scope">
|
68
|
+
<el-input v-model="scope.row.width"></el-input>
|
69
|
+
</template>
|
70
|
+
</el-table-column>
|
71
|
+
<el-table-column
|
72
|
+
:label="i18nt('designer.setting.visibleColumn')"
|
73
|
+
width="70"
|
74
|
+
prop="show"
|
75
|
+
>
|
76
|
+
<template #default="scope">
|
77
|
+
<el-switch v-model="scope.row.show"></el-switch>
|
78
|
+
</template>
|
79
|
+
</el-table-column>
|
80
|
+
<el-table-column :label="i18nt('必填')" width="70" prop="required">
|
81
|
+
<template #default="scope">
|
82
|
+
<el-switch v-model="scope.row.required"></el-switch>
|
83
|
+
</template>
|
84
|
+
</el-table-column>
|
85
|
+
<el-table-column
|
86
|
+
:label="i18nt('designer.setting.sortableColumn')"
|
87
|
+
width="70"
|
88
|
+
prop="sortable"
|
89
|
+
>
|
90
|
+
<template #default="scope">
|
91
|
+
<el-switch v-model="scope.row.sortable"></el-switch>
|
92
|
+
</template>
|
93
|
+
</el-table-column>
|
94
|
+
<el-table-column :label="i18nt('明细行')" width="70" prop="sortable">
|
95
|
+
<template #default="scope">
|
96
|
+
<el-switch v-model="scope.row.isItemLine"></el-switch>
|
97
|
+
</template>
|
98
|
+
</el-table-column>
|
99
|
+
<el-table-column
|
100
|
+
:label="i18nt('designer.setting.fixedColumn')"
|
101
|
+
width="100"
|
102
|
+
prop="fixed"
|
103
|
+
>
|
104
|
+
<template #default="scope">
|
105
|
+
<el-select v-model="scope.row.fixed" clearable>
|
106
|
+
<el-option value="left">left</el-option>
|
107
|
+
<el-option value="right">right</el-option>
|
108
|
+
</el-select>
|
109
|
+
</template>
|
110
|
+
</el-table-column>
|
111
|
+
<!-- <el-table-column :label="i18nt('designer.setting.alignTypeOfColumn')" width="100" prop="align">
|
112
|
+
<template #default="scope">
|
113
|
+
<el-select v-model="scope.row.align">
|
114
|
+
<el-option v-for="(e,index) in alignOptions" :key="index" :value="e.value" :label="e.label"></el-option>
|
115
|
+
</el-select>
|
116
|
+
</template>
|
117
|
+
</el-table-column>-->
|
118
|
+
<el-table-column
|
119
|
+
:label="i18nt('designer.setting.formatOfColumn')"
|
120
|
+
width="200"
|
121
|
+
prop="formatS"
|
122
|
+
>
|
123
|
+
<template #default="scope">
|
124
|
+
<el-select
|
125
|
+
v-model="scope.row.formatS"
|
126
|
+
@change="changeFormatS(scope.row)"
|
127
|
+
clearable
|
128
|
+
>
|
129
|
+
<el-option-group
|
130
|
+
:label="i18nt('designer.setting.customRenderGroup')"
|
152
131
|
>
|
153
|
-
<
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
<template slot-scope="scope">
|
160
|
-
<el-switch v-model="scope.row.treeNode"></el-switch>
|
161
|
-
</template>
|
162
|
-
</el-table-column>
|
163
|
-
<el-table-column
|
164
|
-
:label="i18nt('编辑插槽类型')"
|
165
|
-
width="200"
|
166
|
-
prop="editFormatS"
|
167
|
-
>
|
168
|
-
<template slot-scope="scope">
|
169
|
-
<el-select
|
170
|
-
v-model="scope.row.editFormatS"
|
171
|
-
@change="changeFormatS(scope.row)"
|
172
|
-
clearable
|
132
|
+
<el-option value="render" label="render"></el-option>
|
133
|
+
</el-option-group>
|
134
|
+
<el-option-group
|
135
|
+
v-for="t in op"
|
136
|
+
:key="t.label"
|
137
|
+
:label="t.label"
|
173
138
|
>
|
174
139
|
<el-option
|
175
|
-
v-for="e in
|
140
|
+
v-for="e in t.options"
|
176
141
|
:key="e.value"
|
177
142
|
:value="e.value"
|
178
143
|
:label="e.label"
|
179
144
|
></el-option>
|
180
|
-
</el-
|
181
|
-
</
|
182
|
-
</
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
145
|
+
</el-option-group>
|
146
|
+
</el-select>
|
147
|
+
</template>
|
148
|
+
</el-table-column>
|
149
|
+
<el-table-column
|
150
|
+
label="格式化配置"
|
151
|
+
width="90"
|
152
|
+
align="center"
|
153
|
+
>
|
154
|
+
<template #default="scope">
|
155
|
+
<el-button
|
156
|
+
size="mini"
|
157
|
+
plain=""
|
158
|
+
round=""
|
159
|
+
icon="el-icon-edit"
|
160
|
+
@click="openFormatConfigDialog(scope.row, scope.$index)"
|
161
|
+
:disabled="!columnFormatMap[scope.row.formatS] && 'widgetRender'!== scope.row.formatS"
|
162
|
+
></el-button>
|
163
|
+
</template>
|
164
|
+
</el-table-column>
|
165
|
+
<el-table-column
|
166
|
+
:label="i18nt('designer.setting.renderFunction')"
|
167
|
+
width="70"
|
168
|
+
align="center"
|
169
|
+
>
|
170
|
+
<template #default="scope">
|
171
|
+
<el-button
|
172
|
+
:disabled="'render' !== scope.row.formatS"
|
173
|
+
size="mini"
|
174
|
+
plain=""
|
175
|
+
round=""
|
176
|
+
icon="el-icon-edit"
|
177
|
+
@click="showRenderDialog(scope.row)"
|
178
|
+
></el-button>
|
179
|
+
</template>
|
180
|
+
</el-table-column>
|
181
|
+
<el-table-column :label="i18nt('自定义表格列配置')" width="150">
|
182
|
+
<template #default="scope">
|
183
|
+
<a
|
184
|
+
href="javascript:void(0);"
|
185
|
+
class="a-link link-oneLind"
|
186
|
+
@click="openTableColumnConfigDialog(scope.row, scope.$index)"
|
187
|
+
>
|
188
|
+
<span>{{ scope.row.tableColumnConfig }}</span>
|
189
|
+
<i class="el-icon-edit"></i>
|
190
|
+
</a>
|
191
|
+
</template>
|
192
|
+
</el-table-column>
|
193
|
+
<el-table-column :label="i18nt('下拉列')" width="70" prop="sortable">
|
194
|
+
<template #default="scope">
|
195
|
+
<el-switch v-model="scope.row.treeNode"></el-switch>
|
196
|
+
</template>
|
197
|
+
</el-table-column>
|
198
|
+
<el-table-column
|
199
|
+
:label="i18nt('编辑插槽类型')"
|
200
|
+
width="200"
|
201
|
+
prop="editFormatS"
|
202
|
+
>
|
203
|
+
<template #default="scope">
|
204
|
+
<el-select
|
205
|
+
v-model="scope.row.editFormatS"
|
206
|
+
@change="changeFormatS(scope.row)"
|
207
|
+
clearable
|
208
|
+
>
|
209
|
+
<el-option
|
210
|
+
v-for="e in editOp"
|
211
|
+
:key="e.value"
|
212
|
+
:value="e.value"
|
213
|
+
:label="e.label"
|
214
|
+
></el-option>
|
215
|
+
</el-select>
|
216
|
+
</template>
|
217
|
+
</el-table-column>
|
218
|
+
<el-table-column label="编辑插槽配置" width="150" align="center">
|
219
|
+
<template #default="scope">
|
220
|
+
<el-button
|
221
|
+
size="mini"
|
222
|
+
plain=""
|
223
|
+
round=""
|
224
|
+
icon="el-icon-edit"
|
225
|
+
@click="openEditFormatConfigDialog(scope.row, scope.$index)"
|
226
|
+
:disabled="!scope.row.editFormatS"
|
227
|
+
></el-button>
|
228
|
+
</template>
|
229
|
+
</el-table-column>
|
230
|
+
<el-table-column
|
231
|
+
:label="i18nt('导出类型')"
|
232
|
+
width="200"
|
233
|
+
prop="formatS"
|
234
|
+
>
|
235
|
+
<template #default="scope">
|
236
|
+
<el-select v-model="scope.row.exportType" clearable>
|
237
|
+
<el-option value="Image2" label="图片"></el-option>
|
238
|
+
<el-option value="Number" label="数值"></el-option>
|
239
|
+
</el-select>
|
240
|
+
</template>
|
241
|
+
</el-table-column>
|
207
242
|
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
243
|
+
<el-table-column
|
244
|
+
:label="i18nt('表尾统计行类型')"
|
245
|
+
width="200"
|
246
|
+
prop="formatS"
|
247
|
+
>
|
248
|
+
<template #default="scope">
|
249
|
+
<el-select v-model="scope.row.footerDataType" clearable>
|
250
|
+
<el-option value="1" label="合计"></el-option>
|
251
|
+
<el-option value="2" label="平均"></el-option>
|
252
|
+
<el-option value="3" label="自定义"></el-option>
|
253
|
+
</el-select>
|
254
|
+
</template>
|
255
|
+
</el-table-column>
|
256
|
+
<el-table-column label="表尾统计行配置" width="150" align="center">
|
257
|
+
<template #default="scope">
|
258
|
+
<el-button
|
259
|
+
size="mini"
|
260
|
+
plain=""
|
261
|
+
round=""
|
262
|
+
icon="el-icon-edit"
|
263
|
+
@click="
|
229
264
|
editFormEventHandler(
|
230
265
|
scope.row,
|
231
266
|
scope.$index,
|
232
267
|
'footerMethodConfg'
|
233
268
|
)
|
234
269
|
"
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
270
|
+
:disabled="scope.row.footerDataType !== '3'"
|
271
|
+
></el-button>
|
272
|
+
</template>
|
273
|
+
</el-table-column>
|
239
274
|
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
275
|
+
|
276
|
+
<el-table-column label="操作" width="150" fixed="right">
|
277
|
+
<template slot="header">
|
278
|
+
<el-tooltip
|
279
|
+
:hide-after="500"
|
280
|
+
class="item"
|
281
|
+
effect="dark"
|
282
|
+
content="添加根节点"
|
283
|
+
placement="top"
|
284
|
+
>
|
247
285
|
<el-button
|
248
286
|
size="mini"
|
249
|
-
|
250
|
-
|
251
|
-
icon="el-icon-
|
252
|
-
@click="
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
287
|
+
type=""
|
288
|
+
circle=""
|
289
|
+
icon="el-icon-plus"
|
290
|
+
@click="onAddRoot"
|
291
|
+
/>
|
292
|
+
</el-tooltip>
|
293
|
+
</template>
|
294
|
+
<template #default="{ row, $index }">
|
295
|
+
<el-tooltip
|
296
|
+
:hide-after="hideAfter"
|
297
|
+
:open-delay="openDelay"
|
298
|
+
effect="dark"
|
299
|
+
content="添加兄弟节点"
|
300
|
+
placement="top"
|
301
|
+
>
|
264
302
|
<el-button
|
265
|
-
:disabled="'render' !== scope.row.formatS"
|
266
303
|
size="mini"
|
267
|
-
|
268
|
-
|
269
|
-
icon="el-icon-
|
270
|
-
@click="
|
271
|
-
|
272
|
-
</
|
273
|
-
</el-table-column>
|
274
|
-
<el-table-column label="操作" width="150" fixed="right">
|
275
|
-
<template slot="header">
|
276
|
-
<el-tooltip
|
277
|
-
:hide-after="500"
|
278
|
-
class="item"
|
279
|
-
effect="dark"
|
280
|
-
content="添加根节点"
|
281
|
-
placement="top"
|
282
|
-
>
|
283
|
-
<el-button
|
284
|
-
size="mini"
|
285
|
-
type=""
|
286
|
-
circle=""
|
287
|
-
icon="el-icon-plus"
|
288
|
-
@click="onAddRoot"
|
289
|
-
/>
|
290
|
-
</el-tooltip>
|
291
|
-
</template>
|
292
|
-
<template #default="{ row, $index }">
|
293
|
-
<el-tooltip
|
294
|
-
:hide-after="hideAfter"
|
295
|
-
:open-delay="openDelay"
|
296
|
-
effect="dark"
|
297
|
-
content="添加兄弟节点"
|
298
|
-
placement="top"
|
299
|
-
>
|
300
|
-
<el-button
|
301
|
-
size="mini"
|
302
|
-
type=""
|
303
|
-
circle=""
|
304
|
-
icon="el-icon-plus"
|
305
|
-
@click="onAddSibling(row, $index)"
|
306
|
-
/>
|
307
|
-
</el-tooltip>
|
304
|
+
type=""
|
305
|
+
circle=""
|
306
|
+
icon="el-icon-plus"
|
307
|
+
@click="onAddSibling(row, $index)"
|
308
|
+
/>
|
309
|
+
</el-tooltip>
|
308
310
|
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
</
|
311
|
+
<el-tooltip
|
312
|
+
:hide-after="hideAfter"
|
313
|
+
:open-delay="openDelay"
|
314
|
+
effect="dark"
|
315
|
+
content="添加子节点"
|
316
|
+
placement="top"
|
317
|
+
>
|
318
|
+
<el-button
|
319
|
+
size="mini"
|
320
|
+
type=""
|
321
|
+
circle=""
|
322
|
+
icon="el-icon-circle-plus-outline"
|
323
|
+
@click="onAddChild(row, $index)"
|
324
|
+
/>
|
325
|
+
</el-tooltip>
|
326
|
+
<el-tooltip
|
327
|
+
:hide-after="hideAfter"
|
328
|
+
:open-delay="openDelay"
|
329
|
+
effect="dark"
|
330
|
+
content="删除"
|
331
|
+
placement="top"
|
332
|
+
>
|
333
|
+
<el-button
|
334
|
+
size="mini"
|
335
|
+
type=""
|
336
|
+
circle=""
|
337
|
+
icon="el-icon-delete"
|
338
|
+
@click="onDelete(row, $index)"
|
339
|
+
/>
|
340
|
+
</el-tooltip>
|
341
|
+
</template>
|
342
|
+
</el-table-column>
|
343
|
+
</el-table>
|
344
|
+
<columnRenderDialog :column="currentTableColumn" v-if="showColumnRenderDialog"
|
345
|
+
:visiable.sync="showColumnRenderDialog"
|
346
|
+
@confirm="confirmWidgetRenderDialog"></columnRenderDialog>
|
347
|
+
</div>
|
348
|
+
<div class="dialog-footer" slot="footer">
|
349
|
+
<el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
|
350
|
+
{{ i18nt("designer.hint.cancel") }}
|
351
|
+
</el-button>
|
352
|
+
<el-button
|
353
|
+
type="primary"
|
354
|
+
@click="colSubmit"
|
355
|
+
class="button-sty"
|
356
|
+
icon="el-icon-check"
|
357
|
+
>
|
358
|
+
{{ i18nt("designer.hint.confirm") }}
|
359
|
+
</el-button>
|
360
|
+
</div>
|
359
361
|
<el-dialog
|
360
362
|
v-if="showRenderDialogFlag"
|
361
363
|
:title="i18nt('designer.setting.renderFunction')"
|
@@ -381,7 +383,7 @@
|
|
381
383
|
:readonly="!1"
|
382
384
|
v-model="renderJson"
|
383
385
|
></code-editor>
|
384
|
-
<el-alert type="info" :closable="!1" title="}"
|
386
|
+
<el-alert type="info" :closable="!1" title="}"/>
|
385
387
|
<div class="dialog-footer" slot="footer">
|
386
388
|
<el-button
|
387
389
|
@click="showRenderDialogFlag = !1"
|
@@ -492,13 +494,12 @@
|
|
492
494
|
</el-button>
|
493
495
|
</div>
|
494
496
|
</el-dialog>
|
495
|
-
|
496
|
-
</div>
|
497
|
+
</el-dialog>
|
497
498
|
</template>
|
498
499
|
<script>
|
499
500
|
import i18n from "../../../../../../components/xform/utils/i18n";
|
500
501
|
import Sortable from "sortablejs";
|
501
|
-
import {
|
502
|
+
import {generateId} from "../../../../../../components/xform/utils/util";
|
502
503
|
import columnRenderDialog from "./columnRenderDialog.vue"
|
503
504
|
|
504
505
|
export default {
|
@@ -512,6 +513,7 @@ export default {
|
|
512
513
|
inject: ["openWidgetPropertyDialog"],
|
513
514
|
data() {
|
514
515
|
return {
|
516
|
+
pictLoading: true,
|
515
517
|
tableColumnConfigTitle: null,
|
516
518
|
showTableColumnConfigDialog: false,
|
517
519
|
tableColumnConfigHeader: null,
|
@@ -756,14 +758,15 @@ export default {
|
|
756
758
|
footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
|
757
759
|
},
|
758
760
|
|
759
|
-
showColumnRenderDialog:false,
|
761
|
+
showColumnRenderDialog: false,
|
760
762
|
|
761
763
|
};
|
762
764
|
},
|
763
765
|
beforeDestroy() {
|
764
766
|
if (this.dragSort) this.dragSort.destroy();
|
765
767
|
},
|
766
|
-
created() {
|
768
|
+
created() {
|
769
|
+
},
|
767
770
|
mounted() {
|
768
771
|
this.init();
|
769
772
|
},
|
@@ -797,23 +800,32 @@ export default {
|
|
797
800
|
this.showFormEventDialogFlag = false;
|
798
801
|
},
|
799
802
|
init() {
|
800
|
-
|
801
|
-
this.
|
802
|
-
|
803
|
-
|
803
|
+
setTimeout(() => {
|
804
|
+
this.tableData = this.$baseLodash.cloneDeep(
|
805
|
+
this.optionModel.tableColumns
|
806
|
+
);
|
807
|
+
this.$nextTick(() => {
|
808
|
+
this.rowDrop();
|
809
|
+
setTimeout(() => {
|
810
|
+
this.pictLoading = false
|
811
|
+
}, 200)
|
812
|
+
});
|
813
|
+
}, 10)
|
814
|
+
|
815
|
+
/*this.$nextTick(() => {
|
804
816
|
this.rowDrop();
|
805
|
-
})
|
817
|
+
});*/
|
806
818
|
},
|
807
819
|
colSubmit() {
|
808
820
|
this.dialogVisible = !1;
|
809
821
|
this.optionModel.tableColumns = this.tableData;
|
810
822
|
this.closeHandle();
|
811
823
|
},
|
812
|
-
openWidgetRenderDialog(row){
|
824
|
+
openWidgetRenderDialog(row) {
|
813
825
|
this.currentTableColumn = row;
|
814
826
|
this.showColumnRenderDialog = true
|
815
827
|
},
|
816
|
-
confirmWidgetRenderDialog(widgetList){
|
828
|
+
confirmWidgetRenderDialog(widgetList) {
|
817
829
|
this.currentTableColumn.widgetList = widgetList
|
818
830
|
this.showColumnRenderDialog = false
|
819
831
|
},
|
@@ -863,7 +875,7 @@ export default {
|
|
863
875
|
* @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
|
864
876
|
*/
|
865
877
|
handleAddOneRow(row, index, type) {
|
866
|
-
const {
|
878
|
+
const {parentId, columnId} = row;
|
867
879
|
const curId = type === "SIBLING" ? parentId : columnId;
|
868
880
|
let curRow = {};
|
869
881
|
// 在 tableData 中,找到当前节点
|
@@ -880,7 +892,7 @@ export default {
|
|
880
892
|
|
881
893
|
findRow(this.tableData);
|
882
894
|
|
883
|
-
const {
|
895
|
+
const {columnId: generateParentId, children} = curRow;
|
884
896
|
|
885
897
|
let newRow = this.generateRow(generateParentId);
|
886
898
|
if (children) {
|
@@ -918,7 +930,7 @@ export default {
|
|
918
930
|
exportType: null,
|
919
931
|
footerDataType: null,
|
920
932
|
footerMethodConfg: null,
|
921
|
-
widgetList:[]
|
933
|
+
widgetList: []
|
922
934
|
// treeNode: false,
|
923
935
|
};
|
924
936
|
return row;
|
@@ -929,7 +941,7 @@ export default {
|
|
929
941
|
},
|
930
942
|
// 删除当前节点及对应子节点数据
|
931
943
|
onDelete(row) {
|
932
|
-
const {
|
944
|
+
const {parentId, columnId} = row;
|
933
945
|
// 根节点直接删除
|
934
946
|
if (!parentId) {
|
935
947
|
const delIndex = this.tableData.findIndex(
|
@@ -942,7 +954,7 @@ export default {
|
|
942
954
|
const findRow = (data) => {
|
943
955
|
data.forEach((item) => {
|
944
956
|
if (item.columnId === parentId) {
|
945
|
-
parentRow = {
|
957
|
+
parentRow = {...item};
|
946
958
|
}
|
947
959
|
if (item.children && item.children.length) {
|
948
960
|
findRow(item.children);
|
@@ -951,7 +963,7 @@ export default {
|
|
951
963
|
};
|
952
964
|
findRow(this.tableData);
|
953
965
|
|
954
|
-
const {
|
966
|
+
const {children} = parentRow;
|
955
967
|
|
956
968
|
const delIndex = children.findIndex(
|
957
969
|
(item) => item.columnId === columnId
|
@@ -986,10 +998,12 @@ export default {
|
|
986
998
|
const _this = this;
|
987
999
|
this.dragSort = Sortable.create(tbody, {
|
988
1000
|
ghostClass: "sortable-ghost",
|
1001
|
+
// draggable: ".drag-option", // 修改可拖拽元素
|
1002
|
+
handle: '.drag-option', // 指定拖动按钮
|
989
1003
|
setData: function (e) {
|
990
1004
|
e.setData("Text", "");
|
991
1005
|
},
|
992
|
-
onEnd({
|
1006
|
+
onEnd({newIndex, oldIndex}) {
|
993
1007
|
_this.rowDropEnd(newIndex, oldIndex);
|
994
1008
|
},
|
995
1009
|
});
|
@@ -1111,7 +1125,7 @@ export default {
|
|
1111
1125
|
changeFormatS(row) {
|
1112
1126
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
1113
1127
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, true);
|
1114
|
-
let {
|
1128
|
+
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1115
1129
|
if (columnSelectedWidget) {
|
1116
1130
|
row.columnOption = columnSelectedWidget.options;
|
1117
1131
|
} else {
|
@@ -1255,10 +1269,10 @@ export default {
|
|
1255
1269
|
columnSelectedWidget.options.labelHidden = true;
|
1256
1270
|
}
|
1257
1271
|
}
|
1258
|
-
return {
|
1272
|
+
return {columnSelectedWidget, columnEditFields};
|
1259
1273
|
},
|
1260
1274
|
openFormatConfigDialog(row, index) {
|
1261
|
-
if(row.formatS == 'widgetRender'){
|
1275
|
+
if (row.formatS == 'widgetRender') {
|
1262
1276
|
this.openWidgetRenderDialog(row);
|
1263
1277
|
return
|
1264
1278
|
}
|
@@ -1267,7 +1281,7 @@ export default {
|
|
1267
1281
|
let option = row.columnOption;
|
1268
1282
|
let selectedWidget;
|
1269
1283
|
let columnWidgetConfig = this.getColumnWidgetConfig(row);
|
1270
|
-
let {
|
1284
|
+
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1271
1285
|
if (columnSelectedWidget) {
|
1272
1286
|
option = columnSelectedWidget.options;
|
1273
1287
|
selectedWidget = columnSelectedWidget;
|
@@ -1308,7 +1322,7 @@ export default {
|
|
1308
1322
|
let option = row.columnOption;
|
1309
1323
|
let selectedWidget;
|
1310
1324
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, null, true);
|
1311
|
-
let {
|
1325
|
+
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1312
1326
|
if (columnSelectedWidget) {
|
1313
1327
|
option = columnSelectedWidget.options;
|
1314
1328
|
selectedWidget = columnSelectedWidget;
|