cloud-web-corejs 1.1.0-dev.6 → 1.1.0-dev.7
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/VabUpload/view.vue +27 -26
- package/src/components/excelImport/index.vue +156 -156
- package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
- package/src/components/mobile/wf/content.vue +110 -67
- package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
- package/src/components/mobile/wf/selectUserDialog.vue +122 -0
- package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
- package/src/components/mobile/wf/urgingDialog.vue +26 -3
- package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
- package/src/components/xform/form-designer/designer.js +36 -52
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +2 -2
- package/src/components/xform/form-designer/indexMixin.js +25 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -860
- package/src/components/xform/form-designer/toolbar-panel/index.vue +874 -874
- package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +15 -2
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +53 -1
- package/src/components/xform/form-render/container-item/list-h5-item.vue +154 -27
- package/src/components/xform/form-render/indexMixin.js +23 -3
- package/src/components/xform/styles/h5.scss +774 -588
- package/src/directive/append-to-body/index.js +48 -0
- package/src/index.js +4 -0
- package/src/layout/components/Sidebar/default.vue +1655 -1655
- package/src/router/index.js +48 -48
- package/src/utils/vab.js +1283 -1283
- package/src/views/bd/setting/form_template/edit.vue +378 -356
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
- package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
- package/src/views/bd/setting/form_template/list.vue +304 -303
- package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
- package/src/views/bd/setting/form_template/mixins/list.js +748 -721
- package/src/views/user/file_view_ins/list.vue +970 -970
- package/src/views/user/form/vform/designer.vue +823 -821
- package/src/views/user/home/default.vue +1117 -1117
- package/src/views/user/home/index.vue +103 -103
- package/src/views/user/notify_message/dialog.vue +139 -139
- package/src/views/user/outLink/form_view.vue +202 -202
- package/src/views/user/outLink/index.vue +110 -110
- package/src/views/user/wf/iframe/index.vue +51 -51
- package/src/views/user/wf/iframe/index2.vue +64 -64
- package/src/views/user/wf/wf_manage/list2.vue +871 -871
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -134
|
@@ -1,821 +1,823 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<!-- <el-button type="primary" @click="test">Submit</el-button> -->
|
|
4
|
-
<div class="designer-box" id="containt" style="margin-bottom: 0">
|
|
5
|
-
<v-form-designer ref="designer" :reportTemplate.sync="reportTemplate"
|
|
6
|
-
:designer-config="designerConfig" :field-list-data="fieldListData"
|
|
7
|
-
@field-widget-used="handleFWU" @field-widget-removed="handleFWR"
|
|
8
|
-
@form-json-updated="handleFJU" @reflushTemplateList="reflushTemplateList"
|
|
9
|
-
v-if="showDesinger" :readonly="readonly" :columnFlag="columnFlag"
|
|
10
|
-
:sourceData="sourceData" sourceData:="sourceData" @customConfirm="customConfirm"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
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
|
-
let
|
|
90
|
-
designer
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
this.$
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
this
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this
|
|
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
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
"
|
|
425
|
-
"
|
|
426
|
-
"
|
|
427
|
-
|
|
428
|
-
"
|
|
429
|
-
|
|
430
|
-
"
|
|
431
|
-
"
|
|
432
|
-
"
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
"
|
|
472
|
-
"
|
|
473
|
-
"
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
"
|
|
491
|
-
|
|
492
|
-
"
|
|
493
|
-
"
|
|
494
|
-
"
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
"
|
|
506
|
-
"
|
|
507
|
-
"
|
|
508
|
-
"
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
"
|
|
520
|
-
"
|
|
521
|
-
"
|
|
522
|
-
"
|
|
523
|
-
|
|
524
|
-
"
|
|
525
|
-
|
|
526
|
-
"
|
|
527
|
-
"
|
|
528
|
-
"
|
|
529
|
-
"
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
this
|
|
557
|
-
this
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
fieldSchema.
|
|
594
|
-
|
|
595
|
-
fieldSchema.
|
|
596
|
-
fieldSchema.
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
fld.
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
fieldSchema.
|
|
635
|
-
|
|
636
|
-
fieldSchema.
|
|
637
|
-
fieldSchema.
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
fldObj.type === "
|
|
689
|
-
fldObj.type === "
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
fieldSchema.options.name === "
|
|
743
|
-
fieldSchema.options.name === "
|
|
744
|
-
fieldSchema.options.name === "
|
|
745
|
-
fieldSchema.options.name === "
|
|
746
|
-
fieldSchema.options.name === "
|
|
747
|
-
fieldSchema.options.name === "
|
|
748
|
-
fieldSchema.options.name === "
|
|
749
|
-
fieldSchema.options.name === "
|
|
750
|
-
|
|
751
|
-
fieldSchema.options.
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!-- <el-button type="primary" @click="test">Submit</el-button> -->
|
|
4
|
+
<div class="designer-box" id="containt" style="margin-bottom: 0">
|
|
5
|
+
<v-form-designer ref="designer" :reportTemplate.sync="reportTemplate"
|
|
6
|
+
:designer-config="designerConfig" :field-list-data="fieldListData"
|
|
7
|
+
@field-widget-used="handleFWU" @field-widget-removed="handleFWR"
|
|
8
|
+
@form-json-updated="handleFJU" @reflushTemplateList="reflushTemplateList"
|
|
9
|
+
v-if="showDesinger" :readonly="readonly" :columnFlag="columnFlag"
|
|
10
|
+
:sourceData="sourceData" sourceData:="sourceData" @customConfirm="customConfirm"
|
|
11
|
+
:defaultLayoutType="defaultLayoutType" />
|
|
12
|
+
</div>
|
|
13
|
+
<!--
|
|
14
|
+
<el-tabs v-model="activeName" class="tab-boxCard tabCard-sty1" v-if="showDesinger">
|
|
15
|
+
<el-tab-pane label="设计器" name="first">
|
|
16
|
+
|
|
17
|
+
</el-tab-pane>
|
|
18
|
+
</el-tabs> -->
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import { loadExtension } from "@base/components/xform/extension/extension-loader";
|
|
24
|
+
|
|
25
|
+
loadExtension();
|
|
26
|
+
import VFormDesigner from "@base/components/xform/form-designer/index.vue";
|
|
27
|
+
import { deepClone, overwriteObj } from "@base/components/xform/utils/util";
|
|
28
|
+
import { formFieldMapping } from "./formFieldMapping";
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: "vform-designer:edit",
|
|
32
|
+
props: {
|
|
33
|
+
formCode: String,
|
|
34
|
+
id: [String, Number],
|
|
35
|
+
readonly: Boolean,
|
|
36
|
+
formTemplate: Object,
|
|
37
|
+
widgetList: Array,
|
|
38
|
+
columnFlag: Boolean,
|
|
39
|
+
sourceData: Object,
|
|
40
|
+
jsonFlag: Boolean,
|
|
41
|
+
defaultLayoutType: String,
|
|
42
|
+
},
|
|
43
|
+
components: {
|
|
44
|
+
VFormDesigner,
|
|
45
|
+
},
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
formJson: {},
|
|
49
|
+
formData: {},
|
|
50
|
+
optionData: {},
|
|
51
|
+
reportTemplate: {},
|
|
52
|
+
showDesinger: false,
|
|
53
|
+
activeName: "first",
|
|
54
|
+
showRequestaccessList: false,
|
|
55
|
+
showFunctionScriptList: false,
|
|
56
|
+
designerConfig: {
|
|
57
|
+
componentLib: false,
|
|
58
|
+
formTemplates: false,
|
|
59
|
+
eventCollapse: true,
|
|
60
|
+
metadataLib: true,
|
|
61
|
+
logoHeader: false,
|
|
62
|
+
exportCodeButton: false,
|
|
63
|
+
generateSFCButton: false,
|
|
64
|
+
toolbarMaxWidth: 300,
|
|
65
|
+
},
|
|
66
|
+
fieldListData: {},
|
|
67
|
+
layoutId: null,
|
|
68
|
+
formOptionData: {},
|
|
69
|
+
|
|
70
|
+
meteFieldsResult: null,
|
|
71
|
+
usedFieldNames: {},
|
|
72
|
+
entity: null,
|
|
73
|
+
entityLabel: null,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
computed: {},
|
|
77
|
+
watch: {
|
|
78
|
+
activeName(val) {
|
|
79
|
+
if (this.showRequestaccessList === false && val == "second") {
|
|
80
|
+
this.showRequestaccessList = true;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
mounted() {
|
|
85
|
+
this.getTemplate();
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
test() {
|
|
89
|
+
let that = this;
|
|
90
|
+
let designer = this.$refs.designer;
|
|
91
|
+
let json = designer.getFormJson();
|
|
92
|
+
designer.setFormJson(this.formJson);
|
|
93
|
+
},
|
|
94
|
+
getTemplate() {
|
|
95
|
+
if (this.columnFlag) {
|
|
96
|
+
this.reportTemplate = this.formTemplate;
|
|
97
|
+
this.showDesinger = true;
|
|
98
|
+
this.$nextTick(() => {
|
|
99
|
+
let formJson = this.$baseLodash.cloneDeep({
|
|
100
|
+
widgetList: this.widgetList,
|
|
101
|
+
formConfig: {},
|
|
102
|
+
});
|
|
103
|
+
this.$refs.designer.setFormJson(formJson);
|
|
104
|
+
});
|
|
105
|
+
} else if (this.jsonFlag && this.formTemplate) {
|
|
106
|
+
this.reportTemplate = this.$baseLodash.cloneDeep(this.formTemplate);
|
|
107
|
+
this.showDesinger = true;
|
|
108
|
+
this.$nextTick(() => {
|
|
109
|
+
this.$refs.designer.setFormJson(this.reportTemplate.formViewContent);
|
|
110
|
+
});
|
|
111
|
+
} else {
|
|
112
|
+
let id = this.id || this.formTemplate?.id;
|
|
113
|
+
if (id) {
|
|
114
|
+
this.$http({
|
|
115
|
+
aes: true,
|
|
116
|
+
url: USER_PREFIX + `/formTemplate/get`,
|
|
117
|
+
method: `post`,
|
|
118
|
+
data: {
|
|
119
|
+
id,
|
|
120
|
+
},
|
|
121
|
+
isLoading: true,
|
|
122
|
+
modalStrictly: true,
|
|
123
|
+
success: (res) => {
|
|
124
|
+
if (!res.objx) {
|
|
125
|
+
this.$baseAlert(this.$t1("获取报表模板失败"));
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let reportTemplate = res.objx || {};
|
|
129
|
+
this.reportTemplate = reportTemplate;
|
|
130
|
+
this.showDesinger = true;
|
|
131
|
+
this.$nextTick(() => {
|
|
132
|
+
this.$refs.designer.setFormJson(reportTemplate.formViewContent);
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
} else if (this.formCode) {
|
|
137
|
+
this.$http({
|
|
138
|
+
aes: true,
|
|
139
|
+
url: USER_PREFIX + `/formTemplate/getByFormCode`,
|
|
140
|
+
method: `post`,
|
|
141
|
+
data: {
|
|
142
|
+
stringOne: this.formCode,
|
|
143
|
+
},
|
|
144
|
+
isLoading: true,
|
|
145
|
+
modalStrictly: true,
|
|
146
|
+
success: (res) => {
|
|
147
|
+
if (!res.objx) {
|
|
148
|
+
this.$baseAlert(this.$t1("获取报表模板失败"));
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
let reportTemplate = res.objx || {};
|
|
152
|
+
this.reportTemplate = reportTemplate;
|
|
153
|
+
this.showDesinger = true;
|
|
154
|
+
this.$nextTick(() => {
|
|
155
|
+
this.$refs.designer.setFormJson(reportTemplate.formViewContent);
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
} else {
|
|
160
|
+
this.$baseAlert(this.$t1("获取报表模板失败"));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
loadFieldListData(res) {
|
|
165
|
+
this.entity = "User";
|
|
166
|
+
this.entityLabel = "用户";
|
|
167
|
+
/*res = {
|
|
168
|
+
"code": 200, "error": null, "message": "success", "data": {
|
|
169
|
+
"subFormList": [],
|
|
170
|
+
"storageSetting": [{"cloudStorage": "false"}],
|
|
171
|
+
"fieldList": [
|
|
172
|
+
/!*{
|
|
173
|
+
"name": "userId",
|
|
174
|
+
"label": "用户Id主键",
|
|
175
|
+
"type": "PrimaryKey",
|
|
176
|
+
"required": "1"
|
|
177
|
+
}, {"name": "createdOn", "label": "创建时间", "type": "DateTime", "required": "1"}, {
|
|
178
|
+
"searchDialogWidth": "520px",
|
|
179
|
+
"name": "createdBy",
|
|
180
|
+
"label": "创建用户",
|
|
181
|
+
"type": "Reference",
|
|
182
|
+
"required": "1"
|
|
183
|
+
},*!/ {
|
|
184
|
+
"name": "modifiedOn",
|
|
185
|
+
"label": "最近修改时间",
|
|
186
|
+
"type": "DateTime",
|
|
187
|
+
"required": "0"
|
|
188
|
+
}, /!*{
|
|
189
|
+
"searchDialogWidth": "520px",
|
|
190
|
+
"name": "modifiedBy",
|
|
191
|
+
"label": "修改用户",
|
|
192
|
+
"type": "Reference",
|
|
193
|
+
"required": "0"
|
|
194
|
+
}, {
|
|
195
|
+
"searchDialogWidth": "520px",
|
|
196
|
+
"name": "ownerUser",
|
|
197
|
+
"label": "所属用户",
|
|
198
|
+
"type": "Reference",
|
|
199
|
+
"required": "1"
|
|
200
|
+
}, {
|
|
201
|
+
"searchDialogWidth": "520px",
|
|
202
|
+
"name": "ownerDepartment",
|
|
203
|
+
"label": "所属部门",
|
|
204
|
+
"type": "Reference",
|
|
205
|
+
"required": "1"
|
|
206
|
+
}, {
|
|
207
|
+
"searchDialogWidth": "510px",
|
|
208
|
+
"name": "departmentId",
|
|
209
|
+
"label": "部门",
|
|
210
|
+
"type": "Reference",
|
|
211
|
+
"required": "1"
|
|
212
|
+
},*!/ {"name": "userName", "label": "用户名称", "type": "Text", "required": "1"}, {
|
|
213
|
+
"name": "loginPwd",
|
|
214
|
+
"label": "登录密码",
|
|
215
|
+
"type": "Password",
|
|
216
|
+
"required": "1"
|
|
217
|
+
}, {"name": "loginName", "label": "登录账号名", "type": "Text", "required": "1"}, {
|
|
218
|
+
"name": "jobTitle",
|
|
219
|
+
"label": "职务",
|
|
220
|
+
"type": "Option",
|
|
221
|
+
"required": "1"
|
|
222
|
+
}, {"name": "roles", "label": "权限角色", "type": "ReferenceList", "required": "0"}, {
|
|
223
|
+
"name": "disabled",
|
|
224
|
+
"label": "是否禁用",
|
|
225
|
+
"type": "Boolean",
|
|
226
|
+
"required": "1"
|
|
227
|
+
}, {"name": "mobilePhone", "label": "手机号", "type": "Text", "required": "0"}, {
|
|
228
|
+
"name": "email",
|
|
229
|
+
"label": "邮箱",
|
|
230
|
+
"type": "Text",
|
|
231
|
+
"required": "0"
|
|
232
|
+
},/!* {"name": "ownerTeam", "label": "所属团队", "type": "ReferenceList", "required": "0"}, {
|
|
233
|
+
"name": "avatar",
|
|
234
|
+
"label": "头像",
|
|
235
|
+
"type": "Picture",
|
|
236
|
+
"required": "0"
|
|
237
|
+
},*!/ {"name": "dingTalkUserId", "label": "钉钉用户ID", "type": "Text", "required": "0"}]
|
|
238
|
+
}
|
|
239
|
+
};*/
|
|
240
|
+
res = {
|
|
241
|
+
code: 200,
|
|
242
|
+
error: null,
|
|
243
|
+
message: "success",
|
|
244
|
+
data: {
|
|
245
|
+
subFormList: [{ name: "Jinjilianxiren", label: "员工-紧急联系人" }],
|
|
246
|
+
storageSetting: [{ cloudStorage: "false" }],
|
|
247
|
+
fieldList: [
|
|
248
|
+
/*{
|
|
249
|
+
"name": "yuangongdanganId",
|
|
250
|
+
"label": "id主键",
|
|
251
|
+
"type": "PrimaryKey",
|
|
252
|
+
"required": "1"
|
|
253
|
+
},*/ {
|
|
254
|
+
name: "createdOn",
|
|
255
|
+
label: "创建时间",
|
|
256
|
+
type: "DateTime",
|
|
257
|
+
required: "1",
|
|
258
|
+
},
|
|
259
|
+
/*{
|
|
260
|
+
"searchDialogWidth": "520px",
|
|
261
|
+
"name": "createdBy",
|
|
262
|
+
"label": "创建用户",
|
|
263
|
+
"type": "Reference",
|
|
264
|
+
"required": "1"
|
|
265
|
+
},*/ {
|
|
266
|
+
name: "modifiedOn",
|
|
267
|
+
label: "最近修改时间",
|
|
268
|
+
type: "DateTime",
|
|
269
|
+
required: "0",
|
|
270
|
+
},
|
|
271
|
+
/*{
|
|
272
|
+
"searchDialogWidth": "520px",
|
|
273
|
+
"name": "modifiedBy",
|
|
274
|
+
"label": "修改用户",
|
|
275
|
+
"type": "Reference",
|
|
276
|
+
"required": "0"
|
|
277
|
+
}, {
|
|
278
|
+
"searchDialogWidth": "520px",
|
|
279
|
+
"name": "ownerUser",
|
|
280
|
+
"label": "所属用户",
|
|
281
|
+
"type": "Reference",
|
|
282
|
+
"required": "1"
|
|
283
|
+
}, {
|
|
284
|
+
"searchDialogWidth": "520px",
|
|
285
|
+
"name": "ownerDepartment",
|
|
286
|
+
"label": "所属部门",
|
|
287
|
+
"type": "Reference",
|
|
288
|
+
"required": "1"
|
|
289
|
+
},*/ {
|
|
290
|
+
name: "gonghao",
|
|
291
|
+
label: "工号",
|
|
292
|
+
type: "Text",
|
|
293
|
+
required: "0",
|
|
294
|
+
maxLength: "200",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: "xingming",
|
|
298
|
+
label: "姓名",
|
|
299
|
+
type: "Text",
|
|
300
|
+
required: "1",
|
|
301
|
+
maxLength: "200",
|
|
302
|
+
},
|
|
303
|
+
/*{
|
|
304
|
+
"searchDialogWidth": "520px",
|
|
305
|
+
"name": "bumen",
|
|
306
|
+
"label": "部门",
|
|
307
|
+
"type": "Reference",
|
|
308
|
+
"required": "1"
|
|
309
|
+
},*/ {
|
|
310
|
+
name: "gangwei",
|
|
311
|
+
label: "岗位",
|
|
312
|
+
type: "Text",
|
|
313
|
+
required: "1",
|
|
314
|
+
maxLength: "200",
|
|
315
|
+
},
|
|
316
|
+
/*{
|
|
317
|
+
"searchDialogWidth": "520px",
|
|
318
|
+
"name": "yuangongchengyuan",
|
|
319
|
+
"label": "员工成员",
|
|
320
|
+
"type": "Reference",
|
|
321
|
+
"required": "0"
|
|
322
|
+
},*/ {
|
|
323
|
+
name: "shenfenzhenghao",
|
|
324
|
+
label: "身份证号",
|
|
325
|
+
type: "Text",
|
|
326
|
+
required: "0",
|
|
327
|
+
maxLength: "200",
|
|
328
|
+
},
|
|
329
|
+
{ name: "xingbie", label: "性别", type: "Option", required: "1" },
|
|
330
|
+
{
|
|
331
|
+
name: "chushengriqi",
|
|
332
|
+
label: "出生日期",
|
|
333
|
+
type: "Date",
|
|
334
|
+
required: "0",
|
|
335
|
+
},
|
|
336
|
+
/*{
|
|
337
|
+
"name": "jiguan",
|
|
338
|
+
"label": "籍贯",
|
|
339
|
+
"type": "AreaSelect",
|
|
340
|
+
"areaDataType": "2",
|
|
341
|
+
"required": "0"
|
|
342
|
+
},*/ {
|
|
343
|
+
name: "hujisuozaidi",
|
|
344
|
+
label: "户籍所在地",
|
|
345
|
+
type: "Text",
|
|
346
|
+
required: "0",
|
|
347
|
+
maxLength: "200",
|
|
348
|
+
},
|
|
349
|
+
{ name: "hujileixing", label: "户籍类型", type: "Option", required: "0" },
|
|
350
|
+
{
|
|
351
|
+
name: "minzu",
|
|
352
|
+
label: "民族",
|
|
353
|
+
type: "Text",
|
|
354
|
+
required: "0",
|
|
355
|
+
maxLength: "200",
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: "hunyinzhuangtai",
|
|
359
|
+
label: "婚姻状态",
|
|
360
|
+
type: "Option",
|
|
361
|
+
required: "0",
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: "zhengzhimianmao",
|
|
365
|
+
label: "政治面貌",
|
|
366
|
+
type: "Option",
|
|
367
|
+
required: "0",
|
|
368
|
+
},
|
|
369
|
+
/*{
|
|
370
|
+
"name": "yuangongzhaopian",
|
|
371
|
+
"label": "员工照片",
|
|
372
|
+
"type": "Picture",
|
|
373
|
+
"required": "0"
|
|
374
|
+
},*/ {
|
|
375
|
+
name: "pinyongxingshi",
|
|
376
|
+
label: "聘用形式",
|
|
377
|
+
type: "Option",
|
|
378
|
+
required: "0",
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: "yuangongzhuangtai",
|
|
382
|
+
label: "员工状态",
|
|
383
|
+
type: "Option",
|
|
384
|
+
required: "1",
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: "canjiagongzuoriqi",
|
|
388
|
+
label: "参加工作日期",
|
|
389
|
+
type: "Date",
|
|
390
|
+
required: "0",
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: "ruzhiriqi",
|
|
394
|
+
label: "入职日期",
|
|
395
|
+
type: "Date",
|
|
396
|
+
required: "1",
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
name: "shiyongqitianshu",
|
|
400
|
+
label: "试用期天数(天)",
|
|
401
|
+
type: "Integer",
|
|
402
|
+
required: "1",
|
|
403
|
+
},
|
|
404
|
+
{ name: "zhuanzhengriqi", label: "转正日期", type: "Date", required: "0" },
|
|
405
|
+
{
|
|
406
|
+
min: "-999999999",
|
|
407
|
+
max: "999999999",
|
|
408
|
+
precision: "2",
|
|
409
|
+
name: "shiyongqixinzi",
|
|
410
|
+
label: "试用期薪资",
|
|
411
|
+
type: "Money",
|
|
412
|
+
required: "0",
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
min: "-999999999",
|
|
416
|
+
max: "999999999",
|
|
417
|
+
precision: "2",
|
|
418
|
+
name: "zhengshixinzi",
|
|
419
|
+
label: "正式薪资",
|
|
420
|
+
type: "Money",
|
|
421
|
+
required: "0",
|
|
422
|
+
},
|
|
423
|
+
/*{
|
|
424
|
+
"searchDialogWidth": "520px",
|
|
425
|
+
"name": "zhijieshangji",
|
|
426
|
+
"label": "直接上级",
|
|
427
|
+
"type": "Reference",
|
|
428
|
+
"required": "0"
|
|
429
|
+
}, {
|
|
430
|
+
"searchDialogWidth": "520px",
|
|
431
|
+
"name": "fuzeHR",
|
|
432
|
+
"label": "负责HR",
|
|
433
|
+
"type": "Reference",
|
|
434
|
+
"required": "0"
|
|
435
|
+
},*/ {
|
|
436
|
+
name: "shebaozhanghao",
|
|
437
|
+
label: "社保账号",
|
|
438
|
+
type: "Text",
|
|
439
|
+
required: "0",
|
|
440
|
+
maxLength: "200",
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
name: "gongjijinzhanghao",
|
|
444
|
+
label: "公积金账号",
|
|
445
|
+
type: "Text",
|
|
446
|
+
required: "0",
|
|
447
|
+
maxLength: "200",
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
name: "yinhangkahao",
|
|
451
|
+
label: "银行卡号",
|
|
452
|
+
type: "Text",
|
|
453
|
+
required: "0",
|
|
454
|
+
maxLength: "200",
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
name: "kaihuxing",
|
|
458
|
+
label: "开户行",
|
|
459
|
+
type: "Text",
|
|
460
|
+
required: "0",
|
|
461
|
+
maxLength: "200",
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: "shoujihao",
|
|
465
|
+
label: "手机号",
|
|
466
|
+
type: "Text",
|
|
467
|
+
required: "0",
|
|
468
|
+
maxLength: "200",
|
|
469
|
+
},
|
|
470
|
+
/*{
|
|
471
|
+
"name": "changzhudizhi",
|
|
472
|
+
"label": "常住地址",
|
|
473
|
+
"type": "AreaSelect",
|
|
474
|
+
"areaDataType": "2",
|
|
475
|
+
"required": "0"
|
|
476
|
+
},*/ {
|
|
477
|
+
name: "jutidizhi",
|
|
478
|
+
label: "具体地址",
|
|
479
|
+
type: "Text",
|
|
480
|
+
required: "0",
|
|
481
|
+
maxLength: "200",
|
|
482
|
+
},
|
|
483
|
+
{ name: "zuigaoxueli", label: "最高学历", type: "Option", required: "0" },
|
|
484
|
+
{
|
|
485
|
+
name: "biyeshijian",
|
|
486
|
+
label: "毕业时间",
|
|
487
|
+
type: "Date",
|
|
488
|
+
required: "0",
|
|
489
|
+
},
|
|
490
|
+
{ name: "aa", label: "aa", type: "Integer", required: "1" },
|
|
491
|
+
/*{
|
|
492
|
+
"detailEntity": "Jinjilianxiren",
|
|
493
|
+
"name": "jinjilianxirenId",
|
|
494
|
+
"label": "员工-紧急联系人.id主键",
|
|
495
|
+
"type": "PrimaryKey",
|
|
496
|
+
"required": "1"
|
|
497
|
+
},*/ {
|
|
498
|
+
detailEntity: "Jinjilianxiren",
|
|
499
|
+
name: "createdOn",
|
|
500
|
+
label: "员工-紧急联系人.创建时间",
|
|
501
|
+
type: "DateTime",
|
|
502
|
+
required: "1",
|
|
503
|
+
},
|
|
504
|
+
/*{
|
|
505
|
+
"searchDialogWidth": "520px",
|
|
506
|
+
"detailEntity": "Jinjilianxiren",
|
|
507
|
+
"name": "createdBy",
|
|
508
|
+
"label": "员工-紧急联系人.创建用户",
|
|
509
|
+
"type": "Reference",
|
|
510
|
+
"required": "1"
|
|
511
|
+
},*/ {
|
|
512
|
+
detailEntity: "Jinjilianxiren",
|
|
513
|
+
name: "modifiedOn",
|
|
514
|
+
label: "员工-紧急联系人.最近修改时间",
|
|
515
|
+
type: "DateTime",
|
|
516
|
+
required: "0",
|
|
517
|
+
},
|
|
518
|
+
/*{
|
|
519
|
+
"searchDialogWidth": "520px",
|
|
520
|
+
"detailEntity": "Jinjilianxiren",
|
|
521
|
+
"name": "modifiedBy",
|
|
522
|
+
"label": "员工-紧急联系人.修改用户",
|
|
523
|
+
"type": "Reference",
|
|
524
|
+
"required": "0"
|
|
525
|
+
}, {
|
|
526
|
+
"searchDialogWidth": "520px",
|
|
527
|
+
"detailEntity": "Jinjilianxiren",
|
|
528
|
+
"name": "mdYuangongdanganId",
|
|
529
|
+
"label": "员工-紧急联系人.主从关联Id",
|
|
530
|
+
"type": "Reference",
|
|
531
|
+
"required": "1"
|
|
532
|
+
},*/ {
|
|
533
|
+
detailEntity: "Jinjilianxiren",
|
|
534
|
+
name: "shouji",
|
|
535
|
+
label: "员工-紧急联系人.手机",
|
|
536
|
+
type: "Text",
|
|
537
|
+
required: "0",
|
|
538
|
+
maxLength: "200",
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
detailEntity: "Jinjilianxiren",
|
|
542
|
+
name: "jinjilianxirenxingming",
|
|
543
|
+
label: "员工-紧急联系人.紧急联系人姓名",
|
|
544
|
+
type: "Text",
|
|
545
|
+
required: "0",
|
|
546
|
+
maxLength: "200",
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
},
|
|
550
|
+
};
|
|
551
|
+
if (res.data.fieldList) {
|
|
552
|
+
this.fieldListData.fieldList = res.data.fieldList;
|
|
553
|
+
if (res.data.subFormList) {
|
|
554
|
+
this.fieldListData.subFormList = res.data.subFormList;
|
|
555
|
+
}
|
|
556
|
+
this.meteFieldsResult = res;
|
|
557
|
+
const metaFields = this.buildMetaFields(this.meteFieldsResult);
|
|
558
|
+
this.$refs.designer.setFieldListData(this.fieldListData);
|
|
559
|
+
this.$refs.designer.setMetaFields(metaFields);
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
|
|
563
|
+
buildMetaFields(mdResult) {
|
|
564
|
+
const result = {
|
|
565
|
+
main: {
|
|
566
|
+
entityName: this.entity,
|
|
567
|
+
entityLabel: this.entityLabel,
|
|
568
|
+
fieldList: [],
|
|
569
|
+
},
|
|
570
|
+
detail: [],
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
if (mdResult && mdResult.data?.fieldList) {
|
|
574
|
+
mdResult.data.fieldList.forEach((fld) => {
|
|
575
|
+
if (!fld.detailEntity && fld.type !== "PrimaryKey") {
|
|
576
|
+
//跳过id主键
|
|
577
|
+
if (fld.name === "loginPwd") {
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
if (fld.type === "AnyReference" || fld.type === "ReferenceList") {
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
if (this.usedFieldNames.hasOwnProperty(fld.name)) {
|
|
586
|
+
return; //跳过本次循环
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
const fieldNewProps = deepClone(formFieldMapping[fld.type]);
|
|
590
|
+
const fieldSchema = deepClone(
|
|
591
|
+
this.$refs.designer.designer.getFieldWidgetByType(fieldNewProps.type)
|
|
592
|
+
);
|
|
593
|
+
overwriteObj(fieldSchema.options, fieldNewProps.options);
|
|
594
|
+
|
|
595
|
+
fieldSchema.displayName = fld.label;
|
|
596
|
+
fieldSchema.nameReadonly = true;
|
|
597
|
+
fieldSchema.options.name = fld.name;
|
|
598
|
+
fieldSchema.options.label = fld.label;
|
|
599
|
+
this.adjustFieldSchema(fieldSchema, fld, mdResult);
|
|
600
|
+
result.main.fieldList.push(fieldSchema);
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
if (mdResult && mdResult.data?.subFormList) {
|
|
606
|
+
mdResult.data.subFormList.forEach((sf) => {
|
|
607
|
+
const deName = sf.name;
|
|
608
|
+
const deLabel = sf.label;
|
|
609
|
+
const detailDataItem = {
|
|
610
|
+
entityName: deName,
|
|
611
|
+
entityLabel: deLabel,
|
|
612
|
+
fieldList: [],
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
mdResult.data.fieldList.forEach((fld) => {
|
|
616
|
+
if (
|
|
617
|
+
fld.detailEntity &&
|
|
618
|
+
fld.detailEntity === deName &&
|
|
619
|
+
fld.type !== "PrimaryKey"
|
|
620
|
+
) {
|
|
621
|
+
//跳过id主键
|
|
622
|
+
if (fld.type === "AnyReference" || fld.type === "ReferenceList") {
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
if (this.usedFieldNames.hasOwnProperty(fld.name)) {
|
|
627
|
+
return; //跳过本次循环
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
const fieldNewProps = deepClone(formFieldMapping[fld.type]);
|
|
631
|
+
const fieldSchema = deepClone(
|
|
632
|
+
this.$refs.designer.designer.getFieldWidgetByType(fieldNewProps.type)
|
|
633
|
+
);
|
|
634
|
+
overwriteObj(fieldSchema.options, fieldNewProps.options);
|
|
635
|
+
|
|
636
|
+
fieldSchema.displayName = fld.label;
|
|
637
|
+
fieldSchema.nameReadonly = true;
|
|
638
|
+
fieldSchema.options.name = fld.name;
|
|
639
|
+
fieldSchema.options.label = fld.label;
|
|
640
|
+
this.adjustFieldSchema(fieldSchema, fld, mdResult);
|
|
641
|
+
detailDataItem.fieldList.push(fieldSchema);
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
result.detail.push(detailDataItem);
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
return result;
|
|
650
|
+
},
|
|
651
|
+
|
|
652
|
+
adjustFieldSchema(fieldSchema, fldObj, mdResult) {
|
|
653
|
+
// 处理图片、文件上传字段!!
|
|
654
|
+
let cloudStorageFlag = false;
|
|
655
|
+
let cloudStorageType = "";
|
|
656
|
+
if (mdResult.data.storageSetting) {
|
|
657
|
+
cloudStorageFlag = mdResult.data.storageSetting[0].cloudStorage === "true";
|
|
658
|
+
if (cloudStorageFlag) {
|
|
659
|
+
cloudStorageType = mdResult.data.storageSetting[0].cloudStorageType;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
if (fldObj.type === "Picture" || fldObj.type === "File") {
|
|
664
|
+
if (cloudStorageFlag) {
|
|
665
|
+
//设置withCredentials
|
|
666
|
+
fieldSchema.options.withCredentials = false;
|
|
667
|
+
|
|
668
|
+
//设置onBeforeUpload事件代码(还需要生成uuid新文件名)
|
|
669
|
+
fieldSchema.options.onBeforeUpload =
|
|
670
|
+
"const gDSV = this.getGlobalDsv();\nconst wType = this.field.type;\nif (wType === 'picture-upload') {\n this.field.options.uploadURL = gDSV.picUploadURL;\n} else if (wType === 'file-upload') {\n this.field.options.uploadURL = gDSV.fileUploadURL;\n}\n\nconst cloudStorage = gDSV.cloudStorage;\nif (cloudStorage === \"true\") {\n this.field.options.withCredentials = false\n const token = gDSV.cloudUploadToken;\n this.setUploadData('token', token);\n \n const randomNum = Math.floor(Math.random() * 100);\n const newFileName = new Date().getTime() + randomNum+ '_' + file.name;\n this.setUploadData('key', newFileName);\n} else {\n //this.field.options.withCredentials = true\n}\n";
|
|
671
|
+
|
|
672
|
+
//设置onUploadSuccess事件代码(上传返回结果需要设置QiNiu=前缀)
|
|
673
|
+
fieldSchema.options.onUploadSuccess =
|
|
674
|
+
"const gDSV = this.getGlobalDsv();\nconst cloudStorage = gDSV.cloudStorage;\nif (cloudStorage === \"true\") {\n const wType = this.field.type;\n let downloadPrefix = \"\"\n if (wType === 'picture-upload') {\n downloadPrefix = gDSV.picDownloadPrefix;\n } else if (wType === 'file-upload') {\n downloadPrefix = gDSV.fileDownloadPrefix;\n }\n \n let downUrl = downloadPrefix + result.key;\n const paramName = (downUrl.indexOf(\"?\") === -1) ? '?fileName=' : '&fileName=';\n return {\n name: file.name,\n url: downUrl + paramName + file.name\n }\n} else {\n const paramName = (result.url.indexOf(\"?\") === -1) ? '?fileName=' : '&fileName=';\n return {\n name: file.name,\n url: result.url + paramName + file.name\n }\n}\n";
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
// 处理图片、文件上传字段 -- 结束
|
|
678
|
+
|
|
679
|
+
/* 处理文本、长文本字段 */
|
|
680
|
+
if (fldObj.type === "Text" || fldObj.type === "TextArea") {
|
|
681
|
+
fieldSchema.options.maxLength = !fldObj.maxLength
|
|
682
|
+
? fieldSchema.options.maxLength
|
|
683
|
+
: fldObj.maxLength * 1;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/* 处理精度小数字段 */
|
|
687
|
+
if (
|
|
688
|
+
fldObj.type === "Integer" ||
|
|
689
|
+
fldObj.type === "Percent" ||
|
|
690
|
+
fldObj.type === "Money" ||
|
|
691
|
+
fldObj.type === "Decimal"
|
|
692
|
+
) {
|
|
693
|
+
fieldSchema.options.precision = !fldObj.precision
|
|
694
|
+
? fieldSchema.options.precision
|
|
695
|
+
: fldObj.precision * 1;
|
|
696
|
+
fieldSchema.options.min = !fldObj.min ? fieldSchema.options.min : fldObj.min * 1;
|
|
697
|
+
fieldSchema.options.max = !fldObj.max ? fieldSchema.options.max : fldObj.max * 1;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/* 处理地区选择字段 */
|
|
701
|
+
if (fldObj.type === "AreaSelect") {
|
|
702
|
+
fieldSchema.options.areaDataType = !fldObj.areaDataType
|
|
703
|
+
? fieldSchema.options.areaDataType
|
|
704
|
+
: fldObj.areaDataType * 1;
|
|
705
|
+
if (fldObj.areaName) {
|
|
706
|
+
fieldSchema.options.areaName = fldObj.areaName;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/* 处理一对一字段 */
|
|
711
|
+
if (fldObj.type === "Reference") {
|
|
712
|
+
fieldSchema.options.searchDialogWidth = !fldObj.searchDialogWidth
|
|
713
|
+
? fieldSchema.options.searchDialogWidth
|
|
714
|
+
: fldObj.searchDialogWidth;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/* 处理单选项字段 */
|
|
718
|
+
if (fieldSchema.options.hasOwnProperty("optionItems")) {
|
|
719
|
+
if (this.formOptionData.hasOwnProperty(fieldSchema.options.name)) {
|
|
720
|
+
fieldSchema.options.optionItems = deepClone(
|
|
721
|
+
this.formOptionData[fieldSchema.options.name]
|
|
722
|
+
);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
if (fldObj.type === "Boolean") {
|
|
726
|
+
fieldSchema.options.optionItems = [
|
|
727
|
+
{ value: true, label: "是" },
|
|
728
|
+
{ value: false, label: "否" },
|
|
729
|
+
];
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
fieldSchema.optionItemsReadonly = true;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/* 设置字段必填校验 */
|
|
736
|
+
if (fldObj.hasOwnProperty("required")) {
|
|
737
|
+
fieldSchema.options.required = fldObj["required"] === "1";
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/* 取消系统字段的必填校验 */
|
|
741
|
+
if (
|
|
742
|
+
fieldSchema.options.name === "createdOn" ||
|
|
743
|
+
fieldSchema.options.name === "createdBy" ||
|
|
744
|
+
fieldSchema.options.name === "modifiedOn" ||
|
|
745
|
+
fieldSchema.options.name === "modifiedBy" ||
|
|
746
|
+
fieldSchema.options.name === "ownerUser" ||
|
|
747
|
+
fieldSchema.options.name === "ownerDepartment" ||
|
|
748
|
+
fieldSchema.options.name === "approvalConfigId" ||
|
|
749
|
+
fieldSchema.options.name === "approvalStatus" ||
|
|
750
|
+
fieldSchema.options.name === "lastApprovedBy" ||
|
|
751
|
+
fieldSchema.options.name === "lastApprovedOn"
|
|
752
|
+
) {
|
|
753
|
+
fieldSchema.options.required = false;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
//
|
|
757
|
+
},
|
|
758
|
+
|
|
759
|
+
handleFWU(fwName) {
|
|
760
|
+
this.usedFieldNames[fwName] = 1;
|
|
761
|
+
|
|
762
|
+
/* 必须延时处理,否则draggable会报错 */
|
|
763
|
+
setTimeout(() => {
|
|
764
|
+
const metaFields = this.buildMetaFields(this.meteFieldsResult);
|
|
765
|
+
this.$refs.designer.setMetaFields(metaFields);
|
|
766
|
+
}, 800);
|
|
767
|
+
},
|
|
768
|
+
|
|
769
|
+
handleFWR(fwName) {
|
|
770
|
+
delete this.usedFieldNames[fwName];
|
|
771
|
+
|
|
772
|
+
/* 必须延时处理,否则draggable会报错 */
|
|
773
|
+
setTimeout(() => {
|
|
774
|
+
const metaFields = this.buildMetaFields(this.meteFieldsResult);
|
|
775
|
+
this.$refs.designer.setMetaFields(metaFields);
|
|
776
|
+
}, 800);
|
|
777
|
+
},
|
|
778
|
+
|
|
779
|
+
handleFJU() {
|
|
780
|
+
this.handleUsedFields();
|
|
781
|
+
setTimeout(() => {
|
|
782
|
+
const metaFields = this.buildMetaFields(this.meteFieldsResult);
|
|
783
|
+
this.$refs.designer.setMetaFields(metaFields);
|
|
784
|
+
}, 300);
|
|
785
|
+
},
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* 过滤已使用字段组件
|
|
789
|
+
*/
|
|
790
|
+
handleUsedFields() {
|
|
791
|
+
this.usedFieldNames = {};
|
|
792
|
+
const allFieldWidgets = this.$refs.designer.getFieldWidgets();
|
|
793
|
+
allFieldWidgets.forEach((fwItem) => {
|
|
794
|
+
this.usedFieldNames[fwItem.name] = 1;
|
|
795
|
+
});
|
|
796
|
+
},
|
|
797
|
+
initField() {
|
|
798
|
+
this.$http({
|
|
799
|
+
aes: true,
|
|
800
|
+
url: USER_PREFIX + "/szTaMb/listPage",
|
|
801
|
+
data: {},
|
|
802
|
+
success: (res) => {},
|
|
803
|
+
});
|
|
804
|
+
},
|
|
805
|
+
reflushTemplateList() {
|
|
806
|
+
this.$emit("reflushTemplateList");
|
|
807
|
+
},
|
|
808
|
+
customConfirm(json) {
|
|
809
|
+
this.$emit("customConfirm", json);
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
};
|
|
813
|
+
</script>
|
|
814
|
+
|
|
815
|
+
<style lang="scss" scoped>
|
|
816
|
+
body {
|
|
817
|
+
margin: 0; /* 如果页面出现垂直滚动条,则加入此行CSS以消除之 */
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
#app .main-container {
|
|
821
|
+
margin-left: 0px;
|
|
822
|
+
}
|
|
823
|
+
</style>
|