zhangyanpeng
2024-05-29 1f227a1cf627526701c652ba84bae3e430bba8d3
1
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
28
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<!doctype html>
<html>
    <head>
        <meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache">
        <title>克隆测试(表单设计)</title>
        <script type="text/javascript">
            var pageVue = null;
            function loadJsCss(callback) {
                var jscss_urls = [
                    {id: "js6", type: "js", url: "root/js/vuedraggable.umd.min.js"},
                ];
                window.top.initJsCss(document, jscss_urls, callback);
            };
            
            function initVue() {
                new BasicsVue({
                    el: "#vbody",
                    // components: {
                    //     vuedraggable: window.vuedraggable,//当前页面注册组件
                    // },
                    data: {
                        title: "表单设计器",
                        
                        tabs: [
                            {code: "form", name: "表单"},
                            {code: "list", name: "表格"},
                        ],
                        tabs_attr: [
                            {code: "field", name: "字段属性"},
                            {code: "attr", name: "配置属性"},
                        ],
                        activeTabName: "",
                        activeTabName_attr: "",
                        drag: false,
                        unitArray: [
                            {isshow: "T", field: "type_name", name: '输入框', type: "input"},
                            {isshow: "T", field: "type_name", name: '下拉选择器', type: "select"},
                            {isshow: "T", field: "type_name", name: '日期选择器', type: "date"},
                            {isshow: "T", field: "type_name", name: '文本输入框', type: "textarea"},
                            
                        ],
                        formFields: [
                            {isshow: "T", field: "field1", name: '输入框', type: "input"},
                            {isshow: "T", field: "field2", name: '文本输入框', type: "textarea"}
                        ],
                        formfieldClick: {},
                        formData: {},
                        //表单
                        formAttr: {
                            istitle: false,
                            title: "表单名称",
                            columnnumber: 2,
                            labelwidth: "100px",
                            labelposition: "left",//"left",// right//top
                            size: "mini",
                            border: "0px solid #c6c6c600"
                        },
                        formAttr_p: {
                            istitle: false,
                            title: "表单名称",
                            columnnumber: 1,
                            labelwidth: "100px",
                            labelposition: "left",//"left",// right//top
                            size: "mini",
                            border: "0px solid #c6c6c600"
                        },
                        
                        formFields_p: [
                            {isshow: "T", "field": "view_id", "code": "view_id", "labelchinese": "场景ID", "labelenglish": "view_id", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 0, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""},
                            {isshow: "T", "field": "code", "code": "code", "labelchinese": "字段编码", "labelenglish": "code", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 1, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "field", "code": "field", "labelchinese": "字段", "labelenglish": "field", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": true, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 2, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""},
                            {isshow: "T", "field": "label_chinese", "code": "label_chinese", "labelchinese": "中文显示名", "labelenglish": "label_chinese", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": true, "width": 140.0000, "isminwidth": true, "headercolor": "", "orderno": 3, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""},
                            {isshow: "T", "field": "label_english", "code": "label_english", "labelchinese": "英文名", "labelenglish": "label_english", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 4, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "is_filter", "code": "is_filter", "labelchinese": "是否筛选字段", "labelenglish": "is_filter", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 5, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "filter_field", "code": "filter_field", "labelchinese": "SQL字段名", "labelenglish": "filter_field", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 6, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "filter_operator", "code": "filter_operator", "labelchinese": "查询条件类型", "labelenglish": "filter_operator", "inputtype": "select", "optionsgroup": "filterOperator", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 7, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "align", "code": "align", "labelchinese": "对齐方式", "labelenglish": "align", "inputtype": "select", "optionsgroup": "dataAlign", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 140.0000, "isminwidth": true, "headercolor": "", "orderno": 11, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "width", "code": "width", "labelchinese": "列宽", "labelenglish": "width", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "right", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 12, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "is_min_width", "code": "is_min_width", "labelchinese": "是否最小列宽", "labelenglish": "is_min_width", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 13, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "input_type", "code": "input_type", "labelchinese": "输入类型", "labelenglish": "input_type", "inputtype": "select", "optionsgroup": "inputType", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 140.0000, "isminwidth": true, "headercolor": "", "orderno": 14, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "options_group", "code": "options_group", "labelchinese": "下拉项组名", "labelenglish": "options_group", "inputtype": "select", "optionsgroup": "sysdictionary", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 150.0000, "isminwidth": true, "headercolor": "", "orderno": 15, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "formatter", "code": "formatter", "labelchinese": "格式化函数", "labelenglish": "formatter", "inputtype": "select", "optionsgroup": "formatterEvent", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 160.0000, "isminwidth": true, "headercolor": "", "orderno": 20, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "format_pattern", "code": "format_pattern", "labelchinese": "格式化参数", "labelenglish": "format_pattern", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 21, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "prefix", "code": "prefix", "labelchinese": "前缀", "labelenglish": "prefix", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 22, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "suffix", "code": "suffix", "labelchinese": "后缀", "labelenglish": "suffix", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 23, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "is_list", "code": "is_list", "labelchinese": "是否表格", "labelenglish": "is_list", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 30, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "list_is_visible", "code": "list_is_visible", "labelchinese": "表格是否可见", "labelenglish": "list_is_visible", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 31, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "list_order_no", "code": "list_order_no", "labelchinese": "表格顺序", "labelenglish": "list_order_no", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "right", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 33, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "is_fixed", "code": "is_fixed", "labelchinese": "是否固定列", "labelenglish": "is_fixed", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 34, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "header_color", "code": "header_color", "labelchinese": "表头颜色", "labelenglish": "header_color", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 35, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "is_form", "code": "is_form", "labelchinese": "是否表单", "labelenglish": "is_form", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 40, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "form_is_visible", "code": "form_is_visible", "labelchinese": "表单是否可见", "labelenglish": "form_is_visible", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 41, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "form_order_no", "code": "form_order_no", "labelchinese": "表单顺序", "labelenglish": "form_order_no", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "right", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 42, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "label_width", "code": "label_width", "labelchinese": "标签宽度", "labelenglish": "label_width", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "right", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 43, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "colspan", "code": "colspan", "labelchinese": "表单合并列", "labelenglish": "colspan", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "right", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 44, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "is_required", "code": "is_required", "labelchinese": "是否必填", "labelenglish": "is_required", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 45, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "appendix", "code": "appendix", "labelchinese": "描述", "labelenglish": "appendix", "inputtype": "", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 46, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "is_readonly", "code": "is_readonly", "labelchinese": "是否只读", "labelenglish": "is_readonly", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "center", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": true, "headercolor": "", "orderno": 47, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "input_type_filter", "code": "input_type_filter", "labelchinese": "筛选输入类型", "labelenglish": "input_type_filter", "inputtype": "select", "optionsgroup": "inputType", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 52, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "min_val", "code": "min_val", "labelchinese": "数值最小值", "labelenglish": "min_val", "inputtype": "Input", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "right", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 53, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "max_val", "code": "max_val", "labelchinese": "数值最大值", "labelenglish": "max_val", "inputtype": "Input", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "right", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 54, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "pattern", "code": "pattern", "labelchinese": "正则校验", "labelenglish": "pattern", "inputtype": "Input", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 55, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "align_form", "code": "align_form", "labelchinese": "表单对齐方式", "labelenglish": "align_form", "inputtype": "Input", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 56, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "is_sortable", "code": "is_sortable", "labelchinese": "是否允许排序", "labelenglish": "is_sortable", "inputtype": "switch", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 57, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "props", "code": "props", "labelchinese": "下拉项定义", "labelenglish": "props", "inputtype": "Input", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 58, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "group_name", "code": "group_name", "labelchinese": "字段头中分组", "labelenglish": "group_name", "inputtype": "Input", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 59, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "table_formgroup_name", "code": "table_formgroup_name", "labelchinese": "字段列中分组", "labelenglish": "table_formgroup_name", "inputtype": "Input", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 100.0000, "isminwidth": false, "headercolor": "", "orderno": 60, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}, 
                            {isshow: "T", "field": "tag_type", "code": "tag_type", "labelchinese": "标签类型", "labelenglish": "tag_type", "inputtype": "input", "optionsgroup": "", "formatter": "", "formatpattern": "", "align": "left", "required": false, "readonly": false, "prefix": "", "suffix": "", "props": "", "group_name": "", "table_formgroup_name": "", "isfilter": false, "filterfield": "", "filtercontrol": "", "filteroperator": "", "isfixed": false, "width": 400.0000, "isminwidth": false, "headercolor": "", "orderno": 61, "visible": "T", "inputtypefilter": "", "minval": null, "maxval": null, "sortable": false, "tagtype": ""}
                            
                        ],
                        formData_p: {},
                        
                        
                    },
                    created() {
                        this.popupParames = clone(Root.popupParames);
                        
                        if (this.popupParames.data) {
                            this.formData = clone(this.popupParames.data);
                        }
                    },
                    
                    mounted() {
                        var me = this;
                        this.activeTabName = "form";
                        this.activeTabName_attr = "field";
                        this.initData();
                        
                        this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
                            hideLoading();
                            
                            //重新设置弹窗宽高
                            this.$nextTick(function(){
                                //let w_ = this.$refs.popup_body.offsetWidth + "px";
                                let w_ = "90vw";
                                let h_ = this.$refs.popup_body.offsetHeight + "px";
                                Root.setPopupWH(w_, h_);
                            })
                        });
                    },
                    
                    methods:{
                        closeDialog() {
                            var me = this;
                            if (me.popupParames.totab){
                                Root.tab.removeItem(Root.tab.selected);
                                Root.tab.open(me.popupParames.parentOption, false); 
                            }
                            else {
                                Root.hidePopup();
                            }
                        },
                        saveAfter() {//调回调的关闭
                            var me = this;
                            if(this.popupParames.callback) {
                                let obj = {
                                    //row: this.formData
                                }
                                this.popupParames.callback(obj, function() {
                                    me.closeDialog();
                                });
                            }
                            else {
                                me.closeDialog();
                            }
                        },
                        
                        initData() {
                            let me = this
                            //tableData
                            
                            // if (this.formData.id) {
                            //     filter_table = "parentid = '" + this.formData.id + "'";
                            // }
                            
                            // let param_table = {
                            //     isClientMode: false,
                            //     dataname: this.table_dataname,
                            //     filter: filter_table,
                            // }
                            
                            // Server.call("root/data/getEntitySet", param_table, function(result) {
                            //     if (result && result.data) {
                            //         me.tableData2= result.data.entityset;
                            //     }
                            // });
                        },
                        
                        handleClick() {
                            
                        },
                        
                        handleClick_attr() {
                            
                        },
                        
                        onItemClick(el, item) {
                            var type_ = item.type;//输入类型
                            
                            this.activeTabName = "form";
                            this.activeTabName_attr = "field";
                            
                            this.setFieldAttr();
                            
                        },
                        
                        setFieldAttr() {
                            
                        },
                        
                        onStart() {
                            this.drag = true;
                        },
                        onEnd() {
                            this.drag = false;
                        },
                        end1(e){
                            // console.log(e)
                            // var that=this;
                            // var  items=this.formFields.filter(function(m){
                            //     return  m.id==that.moveId
                            // })
                            // //如果左边
                            // if(items.length<2) return;
                            // this.formFields.splice(e.newDraggableIndex, 1)
                        },
                        end2(e){
                            
                        },
                        //move回调方法
                        onMove(e,originalEvent){
                            // this.moveId = e.relatedContext.element.id;
                            // //不允许停靠
                            // if (e.relatedContext.element.id == 1) return false;
                            // //不允许拖拽
                            // if (e.draggedContext.element.id == 4) return false;
                            // if (e.draggedContext.element.id == 11) return false;
                            // return true;
                        }, 
                        
                    }
                });
            };
            
            loadJsCss(function () {
                initVue();
            });
        </script>
        <style>
            /*  在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */
            [v-cloak] {
                display: none !important;
            }
            html {
                overflow: hidden;
            }
        </style>
        
        <style scoped>
            .item {
                padding: 6px;
                background-color: #fdfdfd;
                border: solid 1px #eee;
                margin-bottom: 10px;
                cursor: move;
            }
    
            .item:hover {
                background-color: #f1f1f1;
                cursor: move;
            }
    
            .chosen {
                border: solid 2px #3089dc !important;
            }
            .form_draggable > div {
                height: 500px;
            }
        </style>
        
    </head>
    
    
    <body style="margin: 0px;">
        <div v-cloak id="vbody">
            <div id="page_root">
                <div ref="popup_body" style="padding: 0px 20px;">
                    <div class="el-dialog__header">
                        <div class="dialog-title">
                          <span> {{title}} </span>
                          <span> {{drag?'拖拽中':'拖拽停止'}} </span>
                        </div>
                    </div>    
                    <div style="height: 550px; position: relative;">
                        <div style="position: absolute; left: 10px; top: 10px; bottom: 10px; width: 200px; border: 1px solid #aaa;">
                            <el-tabs v-model="activeTabName" @tab-click="handleClick">
                                <el-tab-pane v-for="(tab, k) in tabs" :label="tab.name" :name="tab.code" :key="k"></el-tab-pane>
                            </el-tabs>
                            
                            <draggable v-model="unitArray" @end="end1" :options="{group:{name: 'itxst',pull:'clone'},sort: true}"  animation="300"  :move="onMove">
                                <transition-group>
                                 <div :class="item.id==1?'item forbid':'item'" v-for="(item, index1) in unitArray" :key="index1">{{item.name}}</div>
                                </transition-group>
                            </draggable>
                            
                        </div>
                        <div class="form_draggable" style="position: absolute; left: 220px; right: 320px; top: 10px; bottom: 10px; border: 1px solid #aaa;">
                            <div style="">
                               <h-form-draggable
                                ref="form1"
                                :form-attr="formAttr"
                                :table-fields="formFields"
                                :form-data="formData"
                               >
                               </h-form-draggable>
                            </div>
                            
                            <!-- <el-form label-width="100px">
                                <draggable v-model="formFields" @end="end2" group="itxst" animation="300" :move="onMove">
                                   <transition-group>
                                        <div class="item" v-for="(item, index) in formFields" :key="index" @click="onItemClick($event, item)">
                                        <el-form-item :label="item.name">
                                            <el-input v-if="item.type == 'input'" style="width: 100%;"></el-input>
                                            <el-input v-if="item.type == 'textarea'" type="textarea"></el-input>
                                            <el-select v-if="item.type == 'select'" placeholder="请选择" style="width: 100%;">
                                                <el-option label="选项一" value="option1"></el-option>
                                                <el-option label="选项二" value="option2"></el-option>
                                            </el-select>
                                            <el-date-picker v-if="item.type == 'date'" type="date" placeholder="选择日期" style="width: 100%;"></el-date-picker>
                                            <el-switch v-if="item.type == 'switch'"></el-switch>
                                            <el-checkbox-group v-if="item.type == 'checkbox'">
                                                <el-checkbox label="选项一" name="option1"></el-checkbox>
                                                <el-checkbox label="选项二" name="option2"></el-checkbox>
                                            </el-checkbox-group>
                                            <el-radio-group v-if="item.type == 'radio'">
                                                <el-radio label="选项一"></el-radio>
                                                <el-radio label="选项二"></el-radio>
                                            </el-radio-group>
                                        </el-form-item>
                                        </div>
                                   </transition-group>
                                </draggable>
                            </el-form> -->
                        </div>
                        
                        <div style="position: absolute; width: 300px; right: 10px; top: 10px; bottom: 10px; border: 1px solid #aaa;">
                            <el-tabs v-model="activeTabName_attr" @tab-click="handleClick_attr">
                                <el-tab-pane v-for="(tab, k) in tabs_attr" :label="tab.name" :name="tab.code" :key="k"></el-tab-pane>
                            </el-tabs>
                            <div style="position: absolute; top: 40px; bottom: 10px; overflow: auto;">
                                <h-form
                                    ref="form1"
                                    :form-attr="formAttr_p"
                                    :table-fields="formFields_p"
                                    :form-data="formData_p"
                                >
                                </h-form>
                            </div>
                            
                        </div>
                        
                    </div>
                    <div class="el-dialog__footer">
                        <el-button size="small" type="default" @click="closeDialog">关 闭</el-button>
                    </div>
                </div>
            </div>
            
            <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;">
                <div class="spinner">
                  <div class="cube1"></div>
                  <div class="cube2"></div>
                </div>
            </div>
        </div>
            
    </body>
</html>