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.
Files changed (63) hide show
  1. package/package.json +1 -1
  2. package/src/components/baseAttachment/index.vue +22 -13
  3. package/src/components/baseAttachment/mixins.js +1 -1
  4. package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
  5. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +328 -203
  6. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +27 -23
  7. package/src/components/table/CellSlot.vue +1 -0
  8. package/src/components/table/vxeFilter/mixin.js +1 -1
  9. package/src/components/vb-tabs/x-tabs.vue +3 -2
  10. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +11 -3
  11. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +2 -1
  12. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1
  13. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +12 -5
  14. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +28 -3
  15. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
  16. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +5 -2
  17. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
  18. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +138 -6
  19. package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +4 -7
  20. package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +80 -0
  21. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +5 -2
  22. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +4 -1
  23. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +6 -0
  24. package/src/components/xform/form-designer/indexMixin.js +1 -1
  25. package/src/components/xform/form-designer/setting-panel/form-setting.vue +8 -0
  26. package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
  27. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
  28. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +3 -0
  29. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +415 -354
  30. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
  31. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
  32. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
  33. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
  34. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +7 -1
  35. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +16 -8
  36. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +80 -0
  37. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
  38. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +30 -1
  39. package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
  40. package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
  41. package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
  42. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +170 -20
  43. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
  44. package/src/components/xform/form-designer/widget-panel/indexMixin.js +1 -1
  45. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +132 -110
  46. package/src/components/xform/form-render/container-item/containerItemMixin.js +1 -1
  47. package/src/components/xform/form-render/container-item/data-table-item.vue +42 -20
  48. package/src/components/xform/form-render/container-item/data-table-mixin.js +3 -3
  49. package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
  50. package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
  51. package/src/components/xform/form-render/container-item/tab-item.vue +11 -6
  52. package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
  53. package/src/components/xform/form-render/container-item/table-item.vue +4 -2
  54. package/src/components/xform/form-render/indexMixin.js +1 -1
  55. package/src/components/xform/lang/zh-CN.js +1 -0
  56. package/src/components/xform/mixins/defaultHandle.js +1 -1
  57. package/src/components/xform/mixins/scriptHttp.js +3 -1
  58. package/src/components/xform/utils/util.js +1 -1
  59. package/src/store/modules/permission.js +1 -1
  60. package/src/views/bd/setting/table_model/edit.vue +835 -484
  61. package/src/views/bd/setting/table_model/mixins/edit.js +3 -3
  62. package/src/views/user/form/vform/designer.vue +772 -753
  63. package/src/views/user/form/view/list.vue +27 -9
@@ -1,359 +1,363 @@
1
1
  <template>
2
- <div>
3
- <el-dialog
4
- custom-class="dialog-style list-dialog"
5
- :title="i18nt('designer.setting.tableColEdit')"
6
- :visible.sync="showDialog"
7
- :modal="false"
8
- :show-close="!0"
9
- :close-on-click-modal="!1"
10
- :close-on-press-escape="!1"
11
- :destroy-on-close="!0"
12
- top="5vh"
13
- width="1220px"
14
- v-dialog-drag
15
- @closed="closeHandle"
16
- >
17
- <div class="cont">
18
- <el-table
19
- ref="singleTable"
20
- width="100%"
21
- :data="tableData"
22
- height="500"
23
- border=""
24
- row-key="columnId"
25
- stripe=""
26
- :tree-props="{ children: 'children' }"
27
- default-expand-all
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
- <el-table-column label="" min-width="80" fixed="left">
30
- <template slot-scope="scope">
31
- <span>{{ scope.$index + 1 }}</span>
32
- </template>
33
- </el-table-column>
34
- <el-table-column label="" width="35" fixed="left"
35
- ><i class="el-icon-s-operation drag-option"></i>
36
- </el-table-column>
37
- <el-table-column
38
- :label="i18nt('designer.setting.columnLabel')"
39
- width="150"
40
- prop="label"
41
- fixed="left"
42
- >
43
- <template slot-scope="scope">
44
- <el-input v-model="scope.row.label"></el-input>
45
- </template>
46
- </el-table-column>
47
- <el-table-column
48
- :label="i18nt('designer.setting.columnName')"
49
- width="150"
50
- prop="prop"
51
- >
52
- <template slot-scope="scope">
53
- <el-input
54
- v-model="scope.row.prop"
55
- :disabled="'editAttachment' == scope.row.formatS"
56
- ></el-input>
57
- </template>
58
- </el-table-column>
59
- <el-table-column
60
- :label="i18nt('designer.setting.columnWidth')"
61
- width="100"
62
- prop="width"
63
- >
64
- <template slot-scope="scope">
65
- <el-input v-model="scope.row.width"></el-input>
66
- </template>
67
- </el-table-column>
68
- <el-table-column
69
- :label="i18nt('designer.setting.visibleColumn')"
70
- width="70"
71
- prop="show"
72
- >
73
- <template slot-scope="scope">
74
- <el-switch v-model="scope.row.show"></el-switch>
75
- </template>
76
- </el-table-column>
77
- <el-table-column :label="i18nt('必填')" width="70" prop="required">
78
- <template slot-scope="scope">
79
- <el-switch v-model="scope.row.required"></el-switch>
80
- </template>
81
- </el-table-column>
82
- <el-table-column
83
- :label="i18nt('designer.setting.sortableColumn')"
84
- width="70"
85
- prop="sortable"
86
- >
87
- <template slot-scope="scope">
88
- <el-switch v-model="scope.row.sortable"></el-switch>
89
- </template>
90
- </el-table-column>
91
- <el-table-column :label="i18nt('明细行')" width="70" prop="sortable">
92
- <template slot-scope="scope">
93
- <el-switch v-model="scope.row.isItemLine"></el-switch>
94
- </template>
95
- </el-table-column>
96
- <el-table-column
97
- :label="i18nt('designer.setting.fixedColumn')"
98
- width="100"
99
- prop="fixed"
100
- >
101
- <template slot-scope="scope">
102
- <el-select v-model="scope.row.fixed" clearable>
103
- <el-option value="left">left</el-option>
104
- <el-option value="right">right</el-option>
105
- </el-select>
106
- </template>
107
- </el-table-column>
108
- <!-- <el-table-column :label="i18nt('designer.setting.alignTypeOfColumn')" width="100" prop="align">
109
- <template slot-scope="scope">
110
- <el-select v-model="scope.row.align">
111
- <el-option v-for="(e,index) in alignOptions" :key="index" :value="e.value" :label="e.label"></el-option>
112
- </el-select>
113
- </template>
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
- <span>{{ scope.row.tableColumnConfig }}</span>
154
- <i class="el-icon-edit"></i>
155
- </a>
156
- </template>
157
- </el-table-column>
158
- <el-table-column :label="i18nt('下拉列')" width="70" prop="sortable">
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 editOp"
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-select>
181
- </template>
182
- </el-table-column>
183
- <el-table-column label="编辑插槽配置" width="150" align="center">
184
- <template slot-scope="scope">
185
- <el-button
186
- size="mini"
187
- plain=""
188
- round=""
189
- icon="el-icon-edit"
190
- @click="openEditFormatConfigDialog(scope.row, scope.$index)"
191
- :disabled="!scope.row.editFormatS"
192
- ></el-button>
193
- </template>
194
- </el-table-column>
195
- <el-table-column
196
- :label="i18nt('导出类型')"
197
- width="200"
198
- prop="formatS"
199
- >
200
- <template slot-scope="scope">
201
- <el-select v-model="scope.row.exportType" clearable>
202
- <el-option value="Image2" label="图片"></el-option>
203
- <el-option value="Number" label="数值"></el-option>
204
- </el-select>
205
- </template>
206
- </el-table-column>
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
- <el-table-column
209
- :label="i18nt('表尾统计行类型')"
210
- width="200"
211
- prop="formatS"
212
- >
213
- <template slot-scope="scope">
214
- <el-select v-model="scope.row.footerDataType" clearable>
215
- <el-option value="1" label="合计"></el-option>
216
- <el-option value="2" label="平均"></el-option>
217
- <el-option value="3" label="自定义"></el-option>
218
- </el-select>
219
- </template>
220
- </el-table-column>
221
- <el-table-column label="表尾统计行配置" width="150" align="center">
222
- <template slot-scope="scope">
223
- <el-button
224
- size="mini"
225
- plain=""
226
- round=""
227
- icon="el-icon-edit"
228
- @click="
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
- :disabled="scope.row.footerDataType !== '3'"
236
- ></el-button>
237
- </template>
238
- </el-table-column>
270
+ :disabled="scope.row.footerDataType !== '3'"
271
+ ></el-button>
272
+ </template>
273
+ </el-table-column>
239
274
 
240
- <el-table-column
241
- label="格式化配置"
242
- width="90"
243
- fixed="right"
244
- align="center"
245
- >
246
- <template slot-scope="scope">
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
- plain=""
250
- round=""
251
- icon="el-icon-edit"
252
- @click="openFormatConfigDialog(scope.row, scope.$index)"
253
- :disabled="!columnFormatMap[scope.row.formatS]"
254
- ></el-button>
255
- </template>
256
- </el-table-column>
257
- <el-table-column
258
- :label="i18nt('designer.setting.renderFunction')"
259
- width="70"
260
- fixed="right"
261
- align="center"
262
- >
263
- <template slot-scope="scope">
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
- plain=""
268
- round=""
269
- icon="el-icon-edit"
270
- @click="showRenderDialog(scope.row)"
271
- ></el-button>
272
- </template>
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
- <el-tooltip
310
- :hide-after="hideAfter"
311
- :open-delay="openDelay"
312
- effect="dark"
313
- content="添加子节点"
314
- placement="top"
315
- >
316
- <el-button
317
- size="mini"
318
- type=""
319
- circle=""
320
- icon="el-icon-circle-plus-outline"
321
- @click="onAddChild(row, $index)"
322
- />
323
- </el-tooltip>
324
- <el-tooltip
325
- :hide-after="hideAfter"
326
- :open-delay="openDelay"
327
- effect="dark"
328
- content="删除"
329
- placement="top"
330
- >
331
- <el-button
332
- size="mini"
333
- type=""
334
- circle=""
335
- icon="el-icon-delete"
336
- @click="onDelete(row, $index)"
337
- />
338
- </el-tooltip>
339
- </template>
340
- </el-table-column>
341
- </el-table>
342
- </div>
343
- <div class="dialog-footer" slot="footer">
344
- <el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
345
- {{ i18nt("designer.hint.cancel") }}
346
- </el-button>
347
- <el-button
348
- type="primary"
349
- @click="colSubmit"
350
- class="button-sty"
351
- icon="el-icon-check"
352
- >
353
- {{ i18nt("designer.hint.confirm") }}
354
- </el-button>
355
- </div>
356
- </el-dialog>
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
- </div>
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 { generateId } from "../../../../../../components/xform/utils/util";
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
- this.tableData = this.$baseLodash.cloneDeep(
774
- this.optionModel.tableColumns
775
- );
776
- this.$nextTick(() => {
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 { parentId, columnId } = row;
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 { columnId: generateParentId, children } = curRow;
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 { parentId, columnId } = row;
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 = { ...item };
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 { children } = parentRow;
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({ newIndex, oldIndex }) {
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 { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
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 { columnSelectedWidget, columnEditFields };
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 { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
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 { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
1325
+ let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
1265
1326
  if (columnSelectedWidget) {
1266
1327
  option = columnSelectedWidget.options;
1267
1328
  selectedWidget = columnSelectedWidget;