cloud-web-corejs 1.0.80 → 1.0.81
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/baseAttachment/index.vue +22 -13
- package/src/components/baseAttachment/mixins.js +1 -1
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +328 -203
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +27 -23
- package/src/components/table/CellSlot.vue +1 -0
- package/src/components/table/vxeFilter/mixin.js +1 -1
- package/src/components/vb-tabs/x-tabs.vue +3 -2
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +11 -3
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +2 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +12 -5
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +28 -3
- package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +5 -2
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +138 -6
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +4 -7
- package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +80 -0
- package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +5 -2
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +4 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +6 -0
- package/src/components/xform/form-designer/indexMixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +8 -0
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +415 -354
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +7 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +16 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +80 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +30 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +170 -20
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +132 -110
- package/src/components/xform/form-render/container-item/containerItemMixin.js +1 -1
- package/src/components/xform/form-render/container-item/data-table-item.vue +42 -20
- package/src/components/xform/form-render/container-item/data-table-mixin.js +3 -3
- package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
- package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
- package/src/components/xform/form-render/container-item/tab-item.vue +11 -6
- package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
- package/src/components/xform/form-render/container-item/table-item.vue +4 -2
- package/src/components/xform/form-render/indexMixin.js +1 -1
- package/src/components/xform/lang/zh-CN.js +1 -0
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/mixins/scriptHttp.js +3 -1
- package/src/components/xform/utils/util.js +1 -1
- package/src/store/modules/permission.js +1 -1
- package/src/views/bd/setting/table_model/edit.vue +835 -484
- package/src/views/bd/setting/table_model/mixins/edit.js +3 -3
- package/src/views/user/form/vform/designer.vue +772 -753
- package/src/views/user/form/view/list.vue +27 -9
@@ -1,359 +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
|
-
|
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>
|
357
361
|
<el-dialog
|
358
362
|
v-if="showRenderDialogFlag"
|
359
363
|
:title="i18nt('designer.setting.renderFunction')"
|
@@ -366,6 +370,7 @@
|
|
366
370
|
:destroy-on-close="!0"
|
367
371
|
v-dialog-drag
|
368
372
|
top="7vh"
|
373
|
+
:append-to-body="true"
|
369
374
|
>
|
370
375
|
<el-alert
|
371
376
|
type="info"
|
@@ -378,7 +383,7 @@
|
|
378
383
|
:readonly="!1"
|
379
384
|
v-model="renderJson"
|
380
385
|
></code-editor>
|
381
|
-
<el-alert type="info" :closable="!1" title="}"
|
386
|
+
<el-alert type="info" :closable="!1" title="}"/>
|
382
387
|
<div class="dialog-footer" slot="footer">
|
383
388
|
<el-button
|
384
389
|
@click="showRenderDialogFlag = !1"
|
@@ -489,12 +494,13 @@
|
|
489
494
|
</el-button>
|
490
495
|
</div>
|
491
496
|
</el-dialog>
|
492
|
-
</
|
497
|
+
</el-dialog>
|
493
498
|
</template>
|
494
499
|
<script>
|
495
500
|
import i18n from "../../../../../../components/xform/utils/i18n";
|
496
501
|
import Sortable from "sortablejs";
|
497
|
-
import {
|
502
|
+
import {generateId} from "../../../../../../components/xform/utils/util";
|
503
|
+
import columnRenderDialog from "./columnRenderDialog.vue"
|
498
504
|
|
499
505
|
export default {
|
500
506
|
mixins: [i18n],
|
@@ -503,10 +509,11 @@ export default {
|
|
503
509
|
selectedWidget: Object,
|
504
510
|
optionModel: Object,
|
505
511
|
},
|
506
|
-
components: {},
|
512
|
+
components: {columnRenderDialog},
|
507
513
|
inject: ["openWidgetPropertyDialog"],
|
508
514
|
data() {
|
509
515
|
return {
|
516
|
+
pictLoading: true,
|
510
517
|
tableColumnConfigTitle: null,
|
511
518
|
showTableColumnConfigDialog: false,
|
512
519
|
tableColumnConfigHeader: null,
|
@@ -547,6 +554,14 @@ export default {
|
|
547
554
|
value: "editSelect",
|
548
555
|
label: "下拉框",
|
549
556
|
},
|
557
|
+
{
|
558
|
+
value: "checkbox",
|
559
|
+
label: "复选框",
|
560
|
+
},
|
561
|
+
{
|
562
|
+
value: "radio",
|
563
|
+
label: "单选框",
|
564
|
+
},
|
550
565
|
{
|
551
566
|
value: "editAttachment",
|
552
567
|
label: "附件",
|
@@ -559,6 +574,10 @@ export default {
|
|
559
574
|
value: "editStatus",
|
560
575
|
label: "状态",
|
561
576
|
},
|
577
|
+
{
|
578
|
+
value: "text",
|
579
|
+
label: "文本",
|
580
|
+
},
|
562
581
|
{
|
563
582
|
value: "editDelete",
|
564
583
|
label: "删除按钮",
|
@@ -583,6 +602,10 @@ export default {
|
|
583
602
|
value: "editTreeButtonGroup",
|
584
603
|
label: "编辑行按钮组",
|
585
604
|
},
|
605
|
+
{
|
606
|
+
value: "widgetRender",
|
607
|
+
label: "自定义组件",
|
608
|
+
},
|
586
609
|
],
|
587
610
|
},
|
588
611
|
{
|
@@ -722,6 +745,9 @@ export default {
|
|
722
745
|
moveUpRow: "a-link",
|
723
746
|
moveDownRow: "a-link",
|
724
747
|
removeTreeRow: "a-link",
|
748
|
+
text: "text",
|
749
|
+
checkbox: "checkbox",
|
750
|
+
radio: "radio",
|
725
751
|
},
|
726
752
|
|
727
753
|
showFormEventDialogFlag: false,
|
@@ -731,12 +757,16 @@ export default {
|
|
731
757
|
eventParamsMap: {
|
732
758
|
footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
|
733
759
|
},
|
760
|
+
|
761
|
+
showColumnRenderDialog: false,
|
762
|
+
|
734
763
|
};
|
735
764
|
},
|
736
765
|
beforeDestroy() {
|
737
766
|
if (this.dragSort) this.dragSort.destroy();
|
738
767
|
},
|
739
|
-
created() {
|
768
|
+
created() {
|
769
|
+
},
|
740
770
|
mounted() {
|
741
771
|
this.init();
|
742
772
|
},
|
@@ -770,19 +800,41 @@ export default {
|
|
770
800
|
this.showFormEventDialogFlag = false;
|
771
801
|
},
|
772
802
|
init() {
|
773
|
-
|
774
|
-
this.
|
775
|
-
|
776
|
-
|
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(() => {
|
777
816
|
this.rowDrop();
|
778
|
-
})
|
817
|
+
});*/
|
779
818
|
},
|
780
819
|
colSubmit() {
|
781
820
|
this.dialogVisible = !1;
|
782
821
|
this.optionModel.tableColumns = this.tableData;
|
783
822
|
this.closeHandle();
|
784
823
|
},
|
824
|
+
openWidgetRenderDialog(row) {
|
825
|
+
this.currentTableColumn = row;
|
826
|
+
this.showColumnRenderDialog = true
|
827
|
+
},
|
828
|
+
confirmWidgetRenderDialog(widgetList) {
|
829
|
+
this.currentTableColumn.widgetList = widgetList
|
830
|
+
this.showColumnRenderDialog = false
|
831
|
+
},
|
785
832
|
showRenderDialog: function (e) {
|
833
|
+
/*if(e.formatS == 'widgetRender'){
|
834
|
+
this.openWidgetRenderDialog(e);
|
835
|
+
return
|
836
|
+
}*/
|
837
|
+
|
786
838
|
(this.currentTableColumn = e),
|
787
839
|
(this.renderJson = e.render || ""),
|
788
840
|
(this.showRenderDialogFlag = !0);
|
@@ -823,7 +875,7 @@ export default {
|
|
823
875
|
* @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
|
824
876
|
*/
|
825
877
|
handleAddOneRow(row, index, type) {
|
826
|
-
const {
|
878
|
+
const {parentId, columnId} = row;
|
827
879
|
const curId = type === "SIBLING" ? parentId : columnId;
|
828
880
|
let curRow = {};
|
829
881
|
// 在 tableData 中,找到当前节点
|
@@ -840,7 +892,7 @@ export default {
|
|
840
892
|
|
841
893
|
findRow(this.tableData);
|
842
894
|
|
843
|
-
const {
|
895
|
+
const {columnId: generateParentId, children} = curRow;
|
844
896
|
|
845
897
|
let newRow = this.generateRow(generateParentId);
|
846
898
|
if (children) {
|
@@ -878,6 +930,7 @@ export default {
|
|
878
930
|
exportType: null,
|
879
931
|
footerDataType: null,
|
880
932
|
footerMethodConfg: null,
|
933
|
+
widgetList: []
|
881
934
|
// treeNode: false,
|
882
935
|
};
|
883
936
|
return row;
|
@@ -888,7 +941,7 @@ export default {
|
|
888
941
|
},
|
889
942
|
// 删除当前节点及对应子节点数据
|
890
943
|
onDelete(row) {
|
891
|
-
const {
|
944
|
+
const {parentId, columnId} = row;
|
892
945
|
// 根节点直接删除
|
893
946
|
if (!parentId) {
|
894
947
|
const delIndex = this.tableData.findIndex(
|
@@ -901,7 +954,7 @@ export default {
|
|
901
954
|
const findRow = (data) => {
|
902
955
|
data.forEach((item) => {
|
903
956
|
if (item.columnId === parentId) {
|
904
|
-
parentRow = {
|
957
|
+
parentRow = {...item};
|
905
958
|
}
|
906
959
|
if (item.children && item.children.length) {
|
907
960
|
findRow(item.children);
|
@@ -910,7 +963,7 @@ export default {
|
|
910
963
|
};
|
911
964
|
findRow(this.tableData);
|
912
965
|
|
913
|
-
const {
|
966
|
+
const {children} = parentRow;
|
914
967
|
|
915
968
|
const delIndex = children.findIndex(
|
916
969
|
(item) => item.columnId === columnId
|
@@ -945,10 +998,12 @@ export default {
|
|
945
998
|
const _this = this;
|
946
999
|
this.dragSort = Sortable.create(tbody, {
|
947
1000
|
ghostClass: "sortable-ghost",
|
1001
|
+
// draggable: ".drag-option", // 修改可拖拽元素
|
1002
|
+
handle: '.drag-option', // 指定拖动按钮
|
948
1003
|
setData: function (e) {
|
949
1004
|
e.setData("Text", "");
|
950
1005
|
},
|
951
|
-
onEnd({
|
1006
|
+
onEnd({newIndex, oldIndex}) {
|
952
1007
|
_this.rowDropEnd(newIndex, oldIndex);
|
953
1008
|
},
|
954
1009
|
});
|
@@ -1070,7 +1125,7 @@ export default {
|
|
1070
1125
|
changeFormatS(row) {
|
1071
1126
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
1072
1127
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, true);
|
1073
|
-
let {
|
1128
|
+
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1074
1129
|
if (columnSelectedWidget) {
|
1075
1130
|
row.columnOption = columnSelectedWidget.options;
|
1076
1131
|
} else {
|
@@ -1214,13 +1269,19 @@ export default {
|
|
1214
1269
|
columnSelectedWidget.options.labelHidden = true;
|
1215
1270
|
}
|
1216
1271
|
}
|
1217
|
-
return {
|
1272
|
+
return {columnSelectedWidget, columnEditFields};
|
1218
1273
|
},
|
1219
1274
|
openFormatConfigDialog(row, index) {
|
1275
|
+
if (row.formatS == 'widgetRender') {
|
1276
|
+
this.openWidgetRenderDialog(row);
|
1277
|
+
return
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
|
1220
1281
|
let option = row.columnOption;
|
1221
1282
|
let selectedWidget;
|
1222
1283
|
let columnWidgetConfig = this.getColumnWidgetConfig(row);
|
1223
|
-
let {
|
1284
|
+
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1224
1285
|
if (columnSelectedWidget) {
|
1225
1286
|
option = columnSelectedWidget.options;
|
1226
1287
|
selectedWidget = columnSelectedWidget;
|
@@ -1261,7 +1322,7 @@ export default {
|
|
1261
1322
|
let option = row.columnOption;
|
1262
1323
|
let selectedWidget;
|
1263
1324
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, null, true);
|
1264
|
-
let {
|
1325
|
+
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1265
1326
|
if (columnSelectedWidget) {
|
1266
1327
|
option = columnSelectedWidget.options;
|
1267
1328
|
selectedWidget = columnSelectedWidget;
|