cloud-web-corejs 1.0.54-dev.135 → 1.0.54-dev.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1171 -1041
- package/src/components/xform/form-render/container-item/data-table-item.vue +1 -1
- package/src/components/xform/form-render/container-item/data-table-mixin.js +25 -0
- package/src/views/support/export_template/edit.vue +2 -17
- package/src/views/support/export_template/list.vue +0 -14
- package/src/views/user/notify_template/edit.vue +188 -187
- package/src/views/user/notify_template/edit2.vue +176 -0
- package/src/views/user/notify_template/list.vue +4 -1
- package/src/views/user/notify_template/list2.vue +190 -0
@@ -1,1041 +1,1171 @@
|
|
1
|
-
import {
|
2
|
-
deepClone,
|
3
|
-
translateOptionItems,
|
4
|
-
getDSByName,
|
5
|
-
overwriteObj,
|
6
|
-
runDataSourceRequest,
|
7
|
-
getReportGlobalMap,
|
8
|
-
getAccessUrl
|
9
|
-
} from "../../../../../components/xform/utils/util"
|
10
|
-
import FormValidators from
|
11
|
-
import scriptHttpMixin from "../../../../../components/xform/mixins/scriptHttp";
|
12
|
-
import defaultHandleMixin from "../../../../../components/xform/mixins/defaultHandle";
|
13
|
-
|
14
|
-
let modules = {};
|
15
|
-
const baseRefUtil = {
|
16
|
-
deepClone,
|
17
|
-
translateOptionItems,
|
18
|
-
getDSByName,
|
19
|
-
overwriteObj,
|
20
|
-
runDataSourceRequest,
|
21
|
-
FormValidators,
|
22
|
-
getReportGlobalMap,
|
23
|
-
getAccessUrl
|
24
|
-
};
|
25
|
-
modules = {
|
26
|
-
mixins: [scriptHttpMixin, defaultHandleMixin],
|
27
|
-
props: {
|
28
|
-
columnConfig: {
|
29
|
-
type: Object,
|
30
|
-
default: null
|
31
|
-
},
|
32
|
-
tableParam: {
|
33
|
-
type: Object,
|
34
|
-
default: null
|
35
|
-
},
|
36
|
-
formItemProp: {
|
37
|
-
type: String,
|
38
|
-
default: null
|
39
|
-
}
|
40
|
-
},
|
41
|
-
provide() {
|
42
|
-
return {
|
43
|
-
tableParam: this.tableParam,
|
44
|
-
formItemProp: this.formItemProp
|
45
|
-
};
|
46
|
-
},
|
47
|
-
inject: [
|
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
|
-
if (
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
}),
|
295
|
-
|
296
|
-
if (
|
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
|
-
}else
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
this.
|
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
|
-
this.
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
this.
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
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
|
-
this.
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
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
|
-
|
689
|
-
|
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
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
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
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
.
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
this.
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
this.
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
}
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1
|
+
import {
|
2
|
+
deepClone,
|
3
|
+
translateOptionItems,
|
4
|
+
getDSByName,
|
5
|
+
overwriteObj,
|
6
|
+
runDataSourceRequest,
|
7
|
+
getReportGlobalMap,
|
8
|
+
getAccessUrl,
|
9
|
+
} from "../../../../../components/xform/utils/util";
|
10
|
+
import FormValidators from "../../../../../components/xform/utils/validators";
|
11
|
+
import scriptHttpMixin from "../../../../../components/xform/mixins/scriptHttp";
|
12
|
+
import defaultHandleMixin from "../../../../../components/xform/mixins/defaultHandle";
|
13
|
+
|
14
|
+
let modules = {};
|
15
|
+
const baseRefUtil = {
|
16
|
+
deepClone,
|
17
|
+
translateOptionItems,
|
18
|
+
getDSByName,
|
19
|
+
overwriteObj,
|
20
|
+
runDataSourceRequest,
|
21
|
+
FormValidators,
|
22
|
+
getReportGlobalMap,
|
23
|
+
getAccessUrl,
|
24
|
+
};
|
25
|
+
modules = {
|
26
|
+
mixins: [scriptHttpMixin, defaultHandleMixin],
|
27
|
+
props: {
|
28
|
+
columnConfig: {
|
29
|
+
type: Object,
|
30
|
+
default: null,
|
31
|
+
},
|
32
|
+
tableParam: {
|
33
|
+
type: Object,
|
34
|
+
default: null,
|
35
|
+
},
|
36
|
+
formItemProp: {
|
37
|
+
type: String,
|
38
|
+
default: null,
|
39
|
+
},
|
40
|
+
},
|
41
|
+
provide() {
|
42
|
+
return {
|
43
|
+
tableParam: this.tableParam,
|
44
|
+
formItemProp: this.formItemProp,
|
45
|
+
};
|
46
|
+
},
|
47
|
+
inject: [
|
48
|
+
"refList",
|
49
|
+
"getFormConfig",
|
50
|
+
"globalOptionData",
|
51
|
+
"globalModel",
|
52
|
+
"getOptionData",
|
53
|
+
"getGlobalDsv",
|
54
|
+
"getReadMode",
|
55
|
+
"getSubFormFieldFlag",
|
56
|
+
"getSubFormName",
|
57
|
+
"getReportTemplate",
|
58
|
+
"getObjectFieldFlag",
|
59
|
+
"getObjectName",
|
60
|
+
],
|
61
|
+
data: function () {
|
62
|
+
return {
|
63
|
+
fieldReadonlyFlag: !1,
|
64
|
+
requestAccess: null,
|
65
|
+
extraAccessData: {},
|
66
|
+
timerMap: {},
|
67
|
+
};
|
68
|
+
},
|
69
|
+
beforeDestroy() {
|
70
|
+
this.clearAllInterval();
|
71
|
+
},
|
72
|
+
created() {
|
73
|
+
if (this.field.options.searchDialogConfig) {
|
74
|
+
if (this.field.options.searchDialogConfig.multipleChoices === void 0) {
|
75
|
+
if (this.field.type == "vabsearch") {
|
76
|
+
this.$set(
|
77
|
+
this.field.options.searchDialogConfig,
|
78
|
+
"multipleChoices",
|
79
|
+
false
|
80
|
+
);
|
81
|
+
} else {
|
82
|
+
this.$set(
|
83
|
+
this.field.options.searchDialogConfig,
|
84
|
+
"multipleChoices",
|
85
|
+
true
|
86
|
+
);
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
},
|
91
|
+
mounted() {},
|
92
|
+
watch: {
|
93
|
+
currentValue(val) {
|
94
|
+
this.initFieldModel(true);
|
95
|
+
},
|
96
|
+
},
|
97
|
+
computed: {
|
98
|
+
currentValue() {
|
99
|
+
let currentData =
|
100
|
+
this.tableParam && this.tableParam.row
|
101
|
+
? this.tableParam.row
|
102
|
+
: this.formModel;
|
103
|
+
let currentValue = currentData[this.fieldKeyName];
|
104
|
+
return currentValue;
|
105
|
+
},
|
106
|
+
formConfig: function () {
|
107
|
+
return this.getFormConfig();
|
108
|
+
},
|
109
|
+
subFormName: function () {
|
110
|
+
return this.getSubFormName ? this.getSubFormName() : "";
|
111
|
+
},
|
112
|
+
subFormItemFlag: function () {
|
113
|
+
return !!this.getSubFormFieldFlag && this.getSubFormFieldFlag();
|
114
|
+
},
|
115
|
+
formModel: {
|
116
|
+
cache: !1,
|
117
|
+
get: function () {
|
118
|
+
return this.globalModel.formModel;
|
119
|
+
},
|
120
|
+
},
|
121
|
+
isReadMode: function () {
|
122
|
+
return !!this.getReadMode() || this.fieldReadonlyFlag;
|
123
|
+
},
|
124
|
+
optionLabel: function () {
|
125
|
+
var e = this;
|
126
|
+
if (null === this.fieldModel) return "--";
|
127
|
+
var t = "--";
|
128
|
+
return (
|
129
|
+
this.field.options.optionItems.forEach(function (i) {
|
130
|
+
(i.value !== e.fieldModel &&
|
131
|
+
-1 === e.findInArray(e.fieldModel, i.value)) ||
|
132
|
+
(t = "--" === t ? i.label : t + " " + i.label);
|
133
|
+
}),
|
134
|
+
t
|
135
|
+
);
|
136
|
+
},
|
137
|
+
tableRow() {
|
138
|
+
let tableParam = this.tableParam;
|
139
|
+
return tableParam && tableParam.row ? tableParam.row : null;
|
140
|
+
},
|
141
|
+
fieldKeyName() {
|
142
|
+
let o = this.field.options.name;
|
143
|
+
return (
|
144
|
+
(this.field.options.keyNameEnabled && this.field.options.keyName) || o
|
145
|
+
);
|
146
|
+
},
|
147
|
+
},
|
148
|
+
methods: {
|
149
|
+
initConfig() {
|
150
|
+
let config = this.designer.getFieldWidgetByType(this.field.type);
|
151
|
+
this.field.options = Object.assign(
|
152
|
+
{},
|
153
|
+
config.options,
|
154
|
+
this.field.options
|
155
|
+
);
|
156
|
+
},
|
157
|
+
findInArray: function (e, t) {
|
158
|
+
if (!Array.isArray(e)) return -1;
|
159
|
+
var i = -1;
|
160
|
+
return (
|
161
|
+
e.forEach(function (e, n) {
|
162
|
+
e === t && (i = n);
|
163
|
+
}),
|
164
|
+
i
|
165
|
+
);
|
166
|
+
},
|
167
|
+
getPropName: function () {
|
168
|
+
if (this.formItemProp) {
|
169
|
+
return this.formItemProp;
|
170
|
+
} else {
|
171
|
+
return this.subFormItemFlag && !this.designState
|
172
|
+
? this.subFormName +
|
173
|
+
"." +
|
174
|
+
this.subFormRowIndex +
|
175
|
+
"." +
|
176
|
+
this.fieldKeyName
|
177
|
+
: this.getObjectFieldFlag() && !this.designState
|
178
|
+
? this.getObjectName() + "." + this.fieldKeyName
|
179
|
+
: this.fieldKeyName;
|
180
|
+
}
|
181
|
+
},
|
182
|
+
initFieldModel: function (flag) {
|
183
|
+
var e = this;
|
184
|
+
if (this.field.formItemFlag) {
|
185
|
+
let currentData =
|
186
|
+
this.tableParam && this.tableParam.row
|
187
|
+
? this.tableParam.row
|
188
|
+
: this.formModel;
|
189
|
+
/*if (this.subFormItemFlag && !this.designState) {
|
190
|
+
var t = currentData[this.subFormName];
|
191
|
+
return void 0 !== t && void 0 !== t[this.subFormRowIndex] && void 0 !== t[this.subFormRowIndex][
|
192
|
+
this.fieldKeyName
|
193
|
+
] || void 0 === this.field.options.defaultValue ? void 0 === t[this.subFormRowIndex][this
|
194
|
+
.fieldKeyName
|
195
|
+
] ? (this.fieldModel = null,
|
196
|
+
t[this.subFormRowIndex][this.fieldKeyName] = null) : this.fieldModel = t[this
|
197
|
+
.subFormRowIndex][this.fieldKeyName] : (this.fieldModel = this.field.options
|
198
|
+
.defaultValue,
|
199
|
+
t[this.subFormRowIndex][this.fieldKeyName] = this.field.options.defaultValue),
|
200
|
+
setTimeout((function () {
|
201
|
+
e.handleOnChangeForSubForm(e.fieldModel, e.oldFieldValue, t, e.subFormRowId)
|
202
|
+
}), 800),
|
203
|
+
this.oldFieldValue = baseRefUtil.deepClone(this.fieldModel),
|
204
|
+
void this.initFileList();
|
205
|
+
}*/
|
206
|
+
let defaultValue = this.field.options.defaultValue;
|
207
|
+
let dataId = this.getFormRef()?.dataId ?? null;
|
208
|
+
if (void 0 === currentData[this.fieldKeyName]) {
|
209
|
+
this.$set(currentData, this.fieldKeyName, null);
|
210
|
+
}
|
211
|
+
if (flag) {
|
212
|
+
this.fieldModel = currentData[this.fieldKeyName];
|
213
|
+
} else if (currentData[this.fieldKeyName] !== null) {
|
214
|
+
this.fieldModel = currentData[this.fieldKeyName];
|
215
|
+
} else {
|
216
|
+
if (!dataId) {
|
217
|
+
//新增
|
218
|
+
if (!this.tableParam) {
|
219
|
+
//主表
|
220
|
+
if (this.isNotNullVal(defaultValue)) {
|
221
|
+
this.setValue(defaultValue);
|
222
|
+
}
|
223
|
+
} else {
|
224
|
+
//明细
|
225
|
+
if (!this.tableParam.row.id && this.isNotNullVal(defaultValue)) {
|
226
|
+
this.setValue(defaultValue);
|
227
|
+
}
|
228
|
+
}
|
229
|
+
} else {
|
230
|
+
//编辑
|
231
|
+
if (!this.tableParam) {
|
232
|
+
//主表
|
233
|
+
} else {
|
234
|
+
//明细
|
235
|
+
if (!this.tableParam.row.id && this.isNotNullVal(defaultValue)) {
|
236
|
+
this.setValue(defaultValue);
|
237
|
+
}
|
238
|
+
}
|
239
|
+
}
|
240
|
+
}
|
241
|
+
|
242
|
+
/*if (this.fieldKeyName == "f_mobile" && !this.fieldModel) {
|
243
|
+
}*/
|
244
|
+
/*void 0 === currentData[this.fieldKeyName] && void 0 !== this.field.options.defaultValue
|
245
|
+
? this.fieldModel = this.field.options.defaultValue :
|
246
|
+
void 0 === currentData[this.fieldKeyName] ? currentData[this.fieldKeyName] = null : this.fieldModel = currentData[this.fieldKeyName];*/
|
247
|
+
this.oldFieldValue = baseRefUtil.deepClone(this.fieldModel);
|
248
|
+
/*if (this.fieldKeyName == "f_contract" && !this.fieldModel) {
|
249
|
+
}*/
|
250
|
+
this.initFileList();
|
251
|
+
}
|
252
|
+
},
|
253
|
+
isNotNullVal(val) {
|
254
|
+
return val !== null && val !== undefined && val !== "";
|
255
|
+
},
|
256
|
+
initFileList: function () {
|
257
|
+
("picture-upload" !== this.field.type &&
|
258
|
+
"file-upload" !== this.field.type) ||
|
259
|
+
!0 === this.designState ||
|
260
|
+
(this.fieldModel &&
|
261
|
+
(Array.isArray(this.fieldModel)
|
262
|
+
? (this.fileList = baseRefUtil.deepClone(this.fieldModel))
|
263
|
+
: this.fileList.splice(
|
264
|
+
0,
|
265
|
+
0,
|
266
|
+
baseRefUtil.deepClone(this.fieldModel)
|
267
|
+
)));
|
268
|
+
},
|
269
|
+
handleCreatedEnterEvent() {
|
270
|
+
this.handleCustomEvent(this.field.options.onCreatedEnter);
|
271
|
+
},
|
272
|
+
initEventHandler() {
|
273
|
+
this.designState ||
|
274
|
+
(this.$on("setFormData", (o) => {
|
275
|
+
/*if (!this.subFormItemFlag)
|
276
|
+
if (
|
277
|
+
!!this.getObjectFieldFlag()
|
278
|
+
&& !this.designState
|
279
|
+
) {
|
280
|
+
const e = this.getObjectModel();
|
281
|
+
this.setValue(
|
282
|
+
e === void 0
|
283
|
+
? null
|
284
|
+
: e[this.fieldKeyName]
|
285
|
+
);
|
286
|
+
} else this.setValue(o[this.fieldKeyName]);*/
|
287
|
+
this.subFormItemFlag || this.setValue(o[this.fieldKeyName]);
|
288
|
+
}),
|
289
|
+
this.$on("field-value-changed", (o) => {
|
290
|
+
if (this.subFormItemFlag) {
|
291
|
+
let e = this.formModel[this.subFormName];
|
292
|
+
this.handleOnChangeForSubForm(o[0], o[1], e, this.subFormRowId);
|
293
|
+
} else this.handleOnChange(o[0], o[1]);
|
294
|
+
}),
|
295
|
+
this.$on("field-value-changed", function (e) {
|
296
|
+
if (this.subFormItemFlag) {
|
297
|
+
var t = this.formModel[this.subFormName];
|
298
|
+
this.handleOnChangeForSubForm(e[0], e[1], t, this.subFormRowId);
|
299
|
+
} else this.handleOnChange(e[0], e[1]);
|
300
|
+
}),
|
301
|
+
this.$on("sync-field-value", (o) => {
|
302
|
+
const e = o[0],
|
303
|
+
n = o[1];
|
304
|
+
if (
|
305
|
+
this.field.options.name === e ||
|
306
|
+
(!n && this.field.options.keyName !== e) ||
|
307
|
+
(!this.field.options.keyName && this.field.options.name !== n) ||
|
308
|
+
(!!this.field.options.keyName &&
|
309
|
+
!!n &&
|
310
|
+
this.field.options.keyName !== n) ||
|
311
|
+
o[5] !== this.getObjectName()
|
312
|
+
)
|
313
|
+
return;
|
314
|
+
const s = o[2],
|
315
|
+
c = o[3],
|
316
|
+
u = o[4];
|
317
|
+
!this.subFormName && !s
|
318
|
+
? this.setValue(u, !0)
|
319
|
+
: this.subFormName === s &&
|
320
|
+
this.subFormRowId === c &&
|
321
|
+
this.setValue(u, !0);
|
322
|
+
}),
|
323
|
+
/*this.$on("calculate-formula", (o) => {
|
324
|
+
if (
|
325
|
+
!!this.field.options.formulaEnabled
|
326
|
+
&& !!this.field.options.formula
|
327
|
+
) {
|
328
|
+
let e = o[1];
|
329
|
+
const n = o[1].field.options.name;
|
330
|
+
fieldIsUsedInFormula(
|
331
|
+
n,
|
332
|
+
this.field.options.formula,
|
333
|
+
this.getFormRef()
|
334
|
+
)
|
335
|
+
&& calculateFormula(
|
336
|
+
this.getFormRef(),
|
337
|
+
this.getGlobalDsv(),
|
338
|
+
formulajs,
|
339
|
+
this,
|
340
|
+
e
|
341
|
+
);
|
342
|
+
}
|
343
|
+
}),
|
344
|
+
this.$on("calculate-formula-sfRowDeleted", (o) => {
|
345
|
+
if (
|
346
|
+
!!this.field.options.formulaEnabled
|
347
|
+
&& !!this.field.options.formula
|
348
|
+
) {
|
349
|
+
const e = o[1];
|
350
|
+
fieldIsUsedInFormula(
|
351
|
+
e,
|
352
|
+
this.field.options.formula,
|
353
|
+
this.getFormRef()
|
354
|
+
);
|
355
|
+
}
|
356
|
+
}),*/
|
357
|
+
this.$on("loadOptionItemsFromDataSet", (o) => {
|
358
|
+
this.loadOptionItemsFromDataSet(o), (this.dataSetLoadedFlag = !0);
|
359
|
+
}),
|
360
|
+
this.$on("reloadOptionItems", (o) => {
|
361
|
+
(o.length === 0 || o.indexOf(this.field.options.name) > -1) &&
|
362
|
+
this.initOptionItems(!0);
|
363
|
+
}));
|
364
|
+
},
|
365
|
+
getEventParam() {
|
366
|
+
let formRef = this.getFormRef();
|
367
|
+
let dataId = formRef?.dataId;
|
368
|
+
let formCode = formRef?.reportTemplate?.formCode;
|
369
|
+
return {
|
370
|
+
eventParamNames: ["dataId", "formCode"],
|
371
|
+
eventParamValues: [dataId, formCode],
|
372
|
+
};
|
373
|
+
},
|
374
|
+
handleCustomEvent(funtionStr, eventParamNames = [], eventParamValues = []) {
|
375
|
+
if (!this.designState && funtionStr) {
|
376
|
+
let eventParam = this.getEventParam();
|
377
|
+
var e = new Function(
|
378
|
+
...eventParam.eventParamNames,
|
379
|
+
...eventParamNames,
|
380
|
+
funtionStr
|
381
|
+
);
|
382
|
+
return e.call(
|
383
|
+
this,
|
384
|
+
...eventParam.eventParamValues,
|
385
|
+
...eventParamValues
|
386
|
+
);
|
387
|
+
}
|
388
|
+
},
|
389
|
+
handleOnCreated: function () {
|
390
|
+
this.handleCustomEvent(this.field.options.onCreated);
|
391
|
+
},
|
392
|
+
handleOnMounted: function () {
|
393
|
+
this.handleCustomEvent(this.field.options.onMounted);
|
394
|
+
this.autoExcScript();
|
395
|
+
},
|
396
|
+
registerToRefList: function (e) {
|
397
|
+
/* null !== this.refList && this.field.options.name && (this.tableParam && !this.designState ? (e
|
398
|
+
&& delete this.refList[e + "@row" + this.tableParam.rowIndex],
|
399
|
+
this.refList[this.field.options.name + "@row" + this.tableParam.rowIndex] = this) : (e
|
400
|
+
&& delete this.refList[e],
|
401
|
+
this.refList[this.field.options.name] = this)); */
|
402
|
+
if (null !== this.refList && this.field.options.name) {
|
403
|
+
if (this.tableParam && !this.designState) {
|
404
|
+
let row = this.tableParam.row;
|
405
|
+
let keyVal = row._X_ROW_KEY;
|
406
|
+
e && delete this.refList[e + "_" + keyVal],
|
407
|
+
(this.refList[this.field.options.name + "_" + keyVal] = this);
|
408
|
+
} else {
|
409
|
+
e && delete this.refList[e],
|
410
|
+
(this.refList[this.field.options.name] = this);
|
411
|
+
}
|
412
|
+
}
|
413
|
+
},
|
414
|
+
getTableRowWidgetRef(index,name){
|
415
|
+
let tableRef = this.getWidgetRef(this.parentWidget.options.name)
|
416
|
+
tableRef.getTableRowWidgetRef(index,name)
|
417
|
+
},
|
418
|
+
unregisterFromRefList: function () {
|
419
|
+
if (null !== this.refList && this.field.options.name) {
|
420
|
+
var e = this.field.options.name;
|
421
|
+
this.tableParam && !this.designState
|
422
|
+
? delete this.refList[e + "@row" + this.tableParam.rowIndex]
|
423
|
+
: delete this.refList[e];
|
424
|
+
}
|
425
|
+
},
|
426
|
+
async initOptionItems(keepSelected) {
|
427
|
+
var t = this;
|
428
|
+
if (this.designState) {
|
429
|
+
return;
|
430
|
+
}
|
431
|
+
|
432
|
+
if (
|
433
|
+
this.field.type === "radio" ||
|
434
|
+
this.field.type === "checkbox" ||
|
435
|
+
this.field.type === "select" ||
|
436
|
+
this.field.type === "cascader"
|
437
|
+
) {
|
438
|
+
let reportTemplate = this.getFormRef().reportTemplate;
|
439
|
+
let formCode = reportTemplate.formCode;
|
440
|
+
let formScriptEnabled = this.field.options.formScriptEnabled || false;
|
441
|
+
let scriptCode = this.field.options.formScriptCode || "getList";
|
442
|
+
if (formScriptEnabled) {
|
443
|
+
let accessParam = this.handleCustomEvent(
|
444
|
+
this.field.options.formScriptParam
|
445
|
+
);
|
446
|
+
return this.formHttp({
|
447
|
+
scriptCode: scriptCode,
|
448
|
+
data: {
|
449
|
+
formCode: formCode,
|
450
|
+
formVersion: reportTemplate.formVersion,
|
451
|
+
taBm: this.fieldKeyName,
|
452
|
+
data: {
|
453
|
+
...accessParam,
|
454
|
+
},
|
455
|
+
},
|
456
|
+
callback: (res) => {
|
457
|
+
let rows = res.objx || [];
|
458
|
+
this.loadOptions(rows);
|
459
|
+
this.handleCustomEvent(
|
460
|
+
this.field.options.formScriptSuccess,
|
461
|
+
["res"],
|
462
|
+
[res]
|
463
|
+
);
|
464
|
+
},
|
465
|
+
});
|
466
|
+
} else if (this.field.options.commonAttributeEnabled) {
|
467
|
+
let commonAttributeCode = this.field.options.commonAttributeCode;
|
468
|
+
if (!commonAttributeCode) return;
|
469
|
+
this.$getBaseDicts({
|
470
|
+
code: commonAttributeCode,
|
471
|
+
success: ({ dicts, dictMap }) => {
|
472
|
+
this.loadOptions(dicts);
|
473
|
+
this.handleCustomEvent(
|
474
|
+
this.field.options.formScriptSuccess,
|
475
|
+
["res"],
|
476
|
+
[dicts]
|
477
|
+
);
|
478
|
+
},
|
479
|
+
});
|
480
|
+
}
|
481
|
+
|
482
|
+
return;
|
483
|
+
/*if (t.field.options.isLoadDataByAccess && t.field.options.scriptUuid) {
|
484
|
+
this.scriptHttp(
|
485
|
+
{
|
486
|
+
options: t.field.options,
|
487
|
+
params: {},
|
488
|
+
callback: (res) => {
|
489
|
+
let rows = res && res.objx ? res.objx : [];
|
490
|
+
t.loadOptions(rows);
|
491
|
+
}
|
492
|
+
});
|
493
|
+
} else if (!t.field.options.dsEnabled) {
|
494
|
+
/!* 异步更新option-data之后globalOptionData不能获取到最新值,改用provide的getOptionData()方法 *!/
|
495
|
+
const newOptionItems = this.getOptionData();
|
496
|
+
if (!!newOptionItems && newOptionItems.hasOwnProperty(this.fieldKeyName)) {
|
497
|
+
if (!!keepSelected) {
|
498
|
+
this.reloadOptions(newOptionItems[this.fieldKeyName]);
|
499
|
+
} else {
|
500
|
+
this.loadOptions(newOptionItems[this.fieldKeyName]);
|
501
|
+
}
|
502
|
+
}
|
503
|
+
} else {
|
504
|
+
var n, a, l, s, r, d;
|
505
|
+
|
506
|
+
await this.initAccess();
|
507
|
+
|
508
|
+
let requestAccess = this.requestAccess;
|
509
|
+
if (!requestAccess) {
|
510
|
+
return;
|
511
|
+
}
|
512
|
+
return l = t.getGlobalDsv() || {},
|
513
|
+
s = new Object({}),
|
514
|
+
baseRefUtil.overwriteObj(s, l),
|
515
|
+
s["widgetName"] = t.field.options.name,
|
516
|
+
s.widgetKeyName = this.fieldKeyName,
|
517
|
+
s["requestAccess"] = requestAccess,
|
518
|
+
a = requestAccess.dsModel,
|
519
|
+
// r = i.sent,
|
520
|
+
baseRefUtil.runDataSourceRequest(a, s, t.getFormRef(), !1, t
|
521
|
+
.$message).then(res => {
|
522
|
+
t.loadOptions(res || []);
|
523
|
+
});
|
524
|
+
}*/
|
525
|
+
}
|
526
|
+
},
|
527
|
+
refreshDefaultValue: function () {
|
528
|
+
!0 === this.designState &&
|
529
|
+
void 0 !== this.field.options.defaultValue &&
|
530
|
+
(this.fieldModel = this.field.options.defaultValue);
|
531
|
+
},
|
532
|
+
clearFieldRules: function () {
|
533
|
+
this.field.formItemFlag && this.rules.splice(0, this.rules.length);
|
534
|
+
},
|
535
|
+
buildFieldRules: function () {
|
536
|
+
var e = this;
|
537
|
+
if (this.field.formItemFlag) {
|
538
|
+
if (
|
539
|
+
(this.rules.splice(0, this.rules.length),
|
540
|
+
this.field.options.required &&
|
541
|
+
this.rules.push({
|
542
|
+
required: !0,
|
543
|
+
trigger: ["blur"],
|
544
|
+
message:
|
545
|
+
this.field.options.requiredHint ||
|
546
|
+
this.i18nt("render.hint.fieldRequired"),
|
547
|
+
}),
|
548
|
+
this.field.options.validation)
|
549
|
+
) {
|
550
|
+
var t = this.field.options.validation;
|
551
|
+
a["a"][t]
|
552
|
+
? this.rules.push({
|
553
|
+
validator: a["a"][t],
|
554
|
+
trigger: ["blur", "change"],
|
555
|
+
label: this.field.options.label,
|
556
|
+
errorMsg: this.field.options.validationHint,
|
557
|
+
})
|
558
|
+
: this.rules.push({
|
559
|
+
validator: a["a"]["regExp"],
|
560
|
+
trigger: ["blur", "change"],
|
561
|
+
regExp: t,
|
562
|
+
label: this.field.options.label,
|
563
|
+
errorMsg: this.field.options.validationHint,
|
564
|
+
});
|
565
|
+
}
|
566
|
+
if (this.field.options.onValidate) {
|
567
|
+
var i = function (t, i, n) {
|
568
|
+
var o = new Function(
|
569
|
+
"rule",
|
570
|
+
"value",
|
571
|
+
"callback",
|
572
|
+
e.field.options.onValidate
|
573
|
+
);
|
574
|
+
return o.call(e, t, i, n);
|
575
|
+
};
|
576
|
+
this.rules.push({
|
577
|
+
validator: i,
|
578
|
+
trigger: ["blur", "change"],
|
579
|
+
label: this.field.options.label,
|
580
|
+
});
|
581
|
+
}
|
582
|
+
}
|
583
|
+
},
|
584
|
+
disableChangeValidate: function () {
|
585
|
+
this.rules &&
|
586
|
+
this.rules.forEach(function (e) {
|
587
|
+
e.trigger && e.trigger.splice(0, e.trigger.length);
|
588
|
+
});
|
589
|
+
},
|
590
|
+
enableChangeValidate: function () {
|
591
|
+
this.rules &&
|
592
|
+
this.rules.forEach(function (e) {
|
593
|
+
e.trigger && (e.trigger.push("blur"), e.trigger.push("change"));
|
594
|
+
});
|
595
|
+
},
|
596
|
+
disableOptionOfList: function (e, t) {
|
597
|
+
e &&
|
598
|
+
e.length > 0 &&
|
599
|
+
e.forEach(function (e) {
|
600
|
+
e.value === t && (e.disabled = !0);
|
601
|
+
});
|
602
|
+
},
|
603
|
+
enableOptionOfList: function (e, t) {
|
604
|
+
e &&
|
605
|
+
e.length > 0 &&
|
606
|
+
e.forEach(function (e) {
|
607
|
+
e.value === t && (e.disabled = !1);
|
608
|
+
});
|
609
|
+
},
|
610
|
+
emitFieldDataChange(o, e) {
|
611
|
+
this.$emit("field-value-changed", [o, e]),
|
612
|
+
this.broadcast("FieldWidget", "sync-field-value", [
|
613
|
+
this.field.options.name,
|
614
|
+
this.field.options.keyName,
|
615
|
+
this.subFormName,
|
616
|
+
this.subFormRowId,
|
617
|
+
o,
|
618
|
+
this.getObjectName(),
|
619
|
+
]),
|
620
|
+
/*this.getFormRef().broadcast(
|
621
|
+
"FieldWidget",
|
622
|
+
"calculate-formula",
|
623
|
+
[o, this]
|
624
|
+
),*/
|
625
|
+
this.dispatch("VFormRender", "fieldChange", [
|
626
|
+
this.field.options.name,
|
627
|
+
o,
|
628
|
+
e,
|
629
|
+
this.subFormName,
|
630
|
+
this.subFormRowIndex,
|
631
|
+
]);
|
632
|
+
},
|
633
|
+
syncUpdateFormModel: function (e) {
|
634
|
+
if (!this.designState)
|
635
|
+
if (this.tableRow) {
|
636
|
+
this.tableRow[this.fieldKeyName] = e;
|
637
|
+
} else if (this.subFormItemFlag) {
|
638
|
+
var t = this.formModel[this.subFormName] || [{}],
|
639
|
+
i = t[this.subFormRowIndex];
|
640
|
+
i[this.fieldKeyName] = e;
|
641
|
+
} else this.formModel[this.fieldKeyName] = e;
|
642
|
+
},
|
643
|
+
handleChangeEvent: function (e) {
|
644
|
+
this.syncUpdateFormModel(e),
|
645
|
+
this.emitFieldDataChange(e, this.oldFieldValue),
|
646
|
+
(this.oldFieldValue = baseRefUtil.deepClone(e)),
|
647
|
+
this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]);
|
648
|
+
},
|
649
|
+
handleFocusCustomEvent: function (e) {
|
650
|
+
if (
|
651
|
+
((this.oldFieldValue = baseRefUtil.deepClone(this.fieldModel)),
|
652
|
+
this.field.options.onFocus)
|
653
|
+
) {
|
654
|
+
var t = new Function("event", this.field.options.onFocus);
|
655
|
+
t.call(this, e);
|
656
|
+
}
|
657
|
+
},
|
658
|
+
handleBlurCustomEvent: function (e) {
|
659
|
+
if (this.field.options.onBlur) {
|
660
|
+
var t = new Function("event", this.field.options.onBlur);
|
661
|
+
t.call(this, e);
|
662
|
+
}
|
663
|
+
},
|
664
|
+
handleInputCustomEvent: function (e) {
|
665
|
+
if (
|
666
|
+
(this.syncUpdateFormModel(e),
|
667
|
+
this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]),
|
668
|
+
this.field.options.onInput)
|
669
|
+
) {
|
670
|
+
var t = new Function("value", this.field.options.onInput);
|
671
|
+
t.call(this, e);
|
672
|
+
}
|
673
|
+
},
|
674
|
+
emitAppendButtonClick: function () {
|
675
|
+
if (!this.designState) {
|
676
|
+
if (this.field.options.onAppendButtonClick) {
|
677
|
+
let tableParam = this.tableParam;
|
678
|
+
let eventParamNames = [];
|
679
|
+
let eventParamValues = [];
|
680
|
+
if (tableParam) {
|
681
|
+
eventParamNames = ["rowData", "rowIndex"];
|
682
|
+
eventParamValues = [tableParam.row, tableParam.rowIndex];
|
683
|
+
}
|
684
|
+
|
685
|
+
this.handleCustomEvent(
|
686
|
+
this.field.options.onAppendButtonClick,
|
687
|
+
eventParamNames,
|
688
|
+
eventParamValues
|
689
|
+
);
|
690
|
+
|
691
|
+
// this.handleCustomEvent(this.field.options.onAppendButtonClick)
|
692
|
+
} else {
|
693
|
+
this.dispatch("VFormRender", "appendButtonClick", [this]);
|
694
|
+
}
|
695
|
+
this.handleCustomClickEvent();
|
696
|
+
}
|
697
|
+
},
|
698
|
+
handleCustomClickEvent: function () {
|
699
|
+
let tableParam = this.tableParam;
|
700
|
+
let clickBindEvent = this.field.options.clickBindEvent;
|
701
|
+
if (clickBindEvent == "1") {
|
702
|
+
//打开选择弹框
|
703
|
+
this.openSearchDialog(tableParam);
|
704
|
+
} else if (clickBindEvent == "2") {
|
705
|
+
//列表插入数据
|
706
|
+
this.handleAddTableDataEvent();
|
707
|
+
}
|
708
|
+
},
|
709
|
+
handleAddTableDataEvent() {
|
710
|
+
let addTableDataConfig = this.field.options.addTableDataConfig || {};
|
711
|
+
if (!addTableDataConfig.tableRef) return;
|
712
|
+
let tableData = addTableDataConfig.tableData || {};
|
713
|
+
this.getWidgetRef(addTableDataConfig.tableRef).addTableData([tableData]);
|
714
|
+
},
|
715
|
+
handleOnChange: function (e, t) {
|
716
|
+
if (this.field.options.onChange) {
|
717
|
+
var i = new Function("value", "oldValue", this.field.options.onChange);
|
718
|
+
i.call(this, e, t);
|
719
|
+
}
|
720
|
+
},
|
721
|
+
handleOnChangeForSubForm: function (e, t, i, n) {
|
722
|
+
if (this.field.options.onChange) {
|
723
|
+
var o = new Function(
|
724
|
+
"value",
|
725
|
+
"oldValue",
|
726
|
+
"subFormData",
|
727
|
+
"rowId",
|
728
|
+
this.field.options.onChange
|
729
|
+
);
|
730
|
+
o.call(this, e, t, i, n);
|
731
|
+
}
|
732
|
+
},
|
733
|
+
handleButtonWidgetClick: function (event) {
|
734
|
+
if (!this.designState) {
|
735
|
+
if (this.field.options.onClick) {
|
736
|
+
let tableParam = this.tableParam;
|
737
|
+
let eventParamNames = ["event"];
|
738
|
+
let eventParamValues = [event];
|
739
|
+
if (tableParam) {
|
740
|
+
eventParamNames = ["row", "rowIndex", "event"];
|
741
|
+
eventParamValues = [tableParam.row, tableParam.rowIndex, event];
|
742
|
+
}
|
743
|
+
this.handleCustomEvent(
|
744
|
+
this.field.options.onClick,
|
745
|
+
eventParamNames,
|
746
|
+
eventParamValues
|
747
|
+
);
|
748
|
+
} else {
|
749
|
+
this.dispatch("VFormRender", "buttonClick", [this]);
|
750
|
+
}
|
751
|
+
this.handleCustomClickEvent();
|
752
|
+
}
|
753
|
+
},
|
754
|
+
getSearchDialogSourceField(targetField) {
|
755
|
+
let searchDialogConfig = this.field.options.searchDialogConfig || {};
|
756
|
+
let tableData = searchDialogConfig.tableData || [];
|
757
|
+
},
|
758
|
+
openSearchDialog(tableParam) {
|
759
|
+
let searchDialogConfig = this.field.options.searchDialogConfig || {};
|
760
|
+
let formCode = searchDialogConfig.formCode;
|
761
|
+
let tableData = searchDialogConfig.tableData || [];
|
762
|
+
let formModel = this.formModel;
|
763
|
+
|
764
|
+
let rows = [];
|
765
|
+
if (this.field.type == "vabsearch") {
|
766
|
+
if (this.field.options.multipleChoices) {
|
767
|
+
let fieldKeyName = this.fieldKeyName;
|
768
|
+
let valueField = this.field.options.valueField || fieldKeyName;
|
769
|
+
let vabSearchName = this.field.options.vabSearchName || fieldKeyName;
|
770
|
+
|
771
|
+
rows = (this.fieldModel || []).map((row) => {
|
772
|
+
return {
|
773
|
+
[searchDialogConfig.valueSourceField]: row[valueField],
|
774
|
+
[searchDialogConfig.labelSourceField]: row[vabSearchName],
|
775
|
+
};
|
776
|
+
});
|
777
|
+
}
|
778
|
+
}
|
779
|
+
|
780
|
+
this.getFormRef().openSearchDialog({
|
781
|
+
formCode: formCode,
|
782
|
+
rows,
|
783
|
+
multiple: searchDialogConfig.multipleChoices || false,
|
784
|
+
confirm: (rows) => {
|
785
|
+
this.handleConfirmSearchDialog(rows, false);
|
786
|
+
/*if(rows.length){
|
787
|
+
let row = rows[0];
|
788
|
+
if(this.field.type == "vabsearch"){
|
789
|
+
let fieldKeyName = this.fieldKeyName;
|
790
|
+
let vabSearchName = this.field.options.vabSearchName || fieldKeyName;
|
791
|
+
if(tableParam){
|
792
|
+
let rowData = tableParam.row;
|
793
|
+
rowData[fieldKeyName] = row[searchDialogConfig.valueSourceField]
|
794
|
+
if(searchDialogConfig.labelSourceField)rowData[vabSearchName] = row[searchDialogConfig.labelSourceField]
|
795
|
+
tableData.forEach(item=>{
|
796
|
+
rowData[item.targetField] = row[item.sourceField]
|
797
|
+
})
|
798
|
+
}else{
|
799
|
+
this.fieldModel = row[searchDialogConfig.valueSourceField];
|
800
|
+
if(searchDialogConfig.labelSourceField)this.showValue = row[searchDialogConfig.labelSourceField];
|
801
|
+
tableData.forEach(item=>{
|
802
|
+
// formModel[item.targetField] = row[item.sourceField]
|
803
|
+
this.getWidgetRef(item.targetField).setValue(row[item.sourceField]??null)
|
804
|
+
})
|
805
|
+
}
|
806
|
+
}else{
|
807
|
+
if(searchDialogConfig.tableEnabled){
|
808
|
+
if(!searchDialogConfig.tableRef || !tableData.length)return
|
809
|
+
let addRows = rows.map(rowData=>{
|
810
|
+
let itemData = {};
|
811
|
+
tableData.forEach(item=>{
|
812
|
+
itemData[item.targetField] = rowData[item.sourceField]
|
813
|
+
})
|
814
|
+
return itemData;
|
815
|
+
});
|
816
|
+
this.getWidgetRef(searchDialogConfig.tableRef).addTableData(addRows,searchDialogConfig.tableUniqueKey);
|
817
|
+
}
|
818
|
+
}
|
819
|
+
}*/
|
820
|
+
},
|
821
|
+
});
|
822
|
+
},
|
823
|
+
handleClearSearchDialog() {
|
824
|
+
let clickBindEvent = this.field.options.clickBindEvent;
|
825
|
+
if (clickBindEvent == "1") {
|
826
|
+
this.handleConfirmSearchDialog(null, true);
|
827
|
+
}
|
828
|
+
},
|
829
|
+
getMultipleChoices() {
|
830
|
+
let multipleChoices = this.field.options.multipleChoices;
|
831
|
+
return multipleChoices;
|
832
|
+
},
|
833
|
+
handleConfirmSearchDialog(rows, isClear) {
|
834
|
+
if (!isClear && !rows.length) return;
|
835
|
+
let tableParam = this.tableParam;
|
836
|
+
let searchDialogConfig = this.field.options.searchDialogConfig || {};
|
837
|
+
let formCode = searchDialogConfig.formCode;
|
838
|
+
let tableData = searchDialogConfig.tableData || [];
|
839
|
+
let formModel = this.formModel;
|
840
|
+
let row = rows && rows.length ? rows[0] : null;
|
841
|
+
let multipleChoices =
|
842
|
+
this.field.options.searchDialogConfig.multipleChoices || false;
|
843
|
+
if (this.field.type == "vabsearch") {
|
844
|
+
let fieldKeyName = this.fieldKeyName;
|
845
|
+
let valueField = this.field.options.valueField || fieldKeyName;
|
846
|
+
let vabSearchName = this.field.options.vabSearchName || fieldKeyName;
|
847
|
+
|
848
|
+
if (tableParam) {
|
849
|
+
let rowData = tableParam.row;
|
850
|
+
if (multipleChoices) {
|
851
|
+
if (isClear) {
|
852
|
+
rowData[fieldKeyName] = [];
|
853
|
+
} else {
|
854
|
+
rowData[fieldKeyName] = rows.map((item) => {
|
855
|
+
let newData = {};
|
856
|
+
newData[valueField] =
|
857
|
+
item[searchDialogConfig.valueSourceField] ?? null;
|
858
|
+
newData[vabSearchName] =
|
859
|
+
item[searchDialogConfig.labelSourceField] ?? null;
|
860
|
+
tableData.forEach((item1) => {
|
861
|
+
newData[item1.targetField] = item[item1.sourceField];
|
862
|
+
});
|
863
|
+
return newData;
|
864
|
+
});
|
865
|
+
}
|
866
|
+
} else {
|
867
|
+
rowData[fieldKeyName] = !isClear
|
868
|
+
? row[searchDialogConfig.valueSourceField]
|
869
|
+
: null;
|
870
|
+
if (searchDialogConfig.labelSourceField)
|
871
|
+
rowData[vabSearchName] = !isClear
|
872
|
+
? row[searchDialogConfig.labelSourceField]
|
873
|
+
: null;
|
874
|
+
tableData.forEach((item) => {
|
875
|
+
if (!isClear) {
|
876
|
+
rowData[item.targetField] = row[item.sourceField];
|
877
|
+
} else {
|
878
|
+
rowData[item.targetField] = null;
|
879
|
+
}
|
880
|
+
});
|
881
|
+
}
|
882
|
+
} else {
|
883
|
+
this.fieldModel = !isClear
|
884
|
+
? row[searchDialogConfig.valueSourceField]
|
885
|
+
: null;
|
886
|
+
if (searchDialogConfig.labelSourceField) {
|
887
|
+
this.setShowValue(
|
888
|
+
!isClear ? row[searchDialogConfig.labelSourceField] : null
|
889
|
+
);
|
890
|
+
}
|
891
|
+
tableData.forEach((item) => {
|
892
|
+
// formModel[item.targetField] = row[item.sourceField]
|
893
|
+
let value = !isClear ? row[item.sourceField] ?? null : null;
|
894
|
+
this.getWidgetRef(item.targetField).setValue(value);
|
895
|
+
// formModel[item.targetField] = value;
|
896
|
+
});
|
897
|
+
// this.$forceUpdate();
|
898
|
+
}
|
899
|
+
} else {
|
900
|
+
if (searchDialogConfig.tableEnabled) {
|
901
|
+
if (!searchDialogConfig.tableRef || !tableData.length) return;
|
902
|
+
let addRows = rows.map((rowData) => {
|
903
|
+
let itemData = {};
|
904
|
+
tableData.forEach((item) => {
|
905
|
+
itemData[item.targetField] = rowData[item.sourceField];
|
906
|
+
});
|
907
|
+
return itemData;
|
908
|
+
});
|
909
|
+
this.getWidgetRef(searchDialogConfig.tableRef).addTableData(
|
910
|
+
addRows,
|
911
|
+
searchDialogConfig.tableUniqueKey
|
912
|
+
);
|
913
|
+
} else if (!multipleChoices) {
|
914
|
+
tableData.forEach((item) => {
|
915
|
+
let value = row[item.sourceField] ?? null;
|
916
|
+
// formModel[item.targetField] = value
|
917
|
+
this.getWidgetRef(item.targetField).setValue(value);
|
918
|
+
});
|
919
|
+
// this.$forceUpdate();
|
920
|
+
}
|
921
|
+
}
|
922
|
+
|
923
|
+
if (!isClear) {
|
924
|
+
this.$nextTick(() => {
|
925
|
+
this.handleCustomEvent(
|
926
|
+
searchDialogConfig.confirmCallback,
|
927
|
+
["rows"],
|
928
|
+
[rows]
|
929
|
+
);
|
930
|
+
});
|
931
|
+
}
|
932
|
+
},
|
933
|
+
remoteQuery: function (e) {
|
934
|
+
if (this.field.options.onRemoteQuery) {
|
935
|
+
var t = new Function("keyword", this.field.options.onRemoteQuery);
|
936
|
+
t.call(this, e);
|
937
|
+
}
|
938
|
+
},
|
939
|
+
getFormRef: function () {
|
940
|
+
return this.refList ? this.refList["v_form_ref"] : null;
|
941
|
+
},
|
942
|
+
getWidgetRef: function (e, t) {
|
943
|
+
var i = this.refList[e];
|
944
|
+
return (
|
945
|
+
!i &&
|
946
|
+
t &&
|
947
|
+
this.$message.error(this.i18nt("render.hint.refNotFound") + e),
|
948
|
+
i
|
949
|
+
);
|
950
|
+
},
|
951
|
+
getFieldEditor: function () {
|
952
|
+
return this.$refs["fieldEditor"];
|
953
|
+
},
|
954
|
+
setValue: function (e) {
|
955
|
+
if (this.field.formItemFlag) {
|
956
|
+
let value = e ?? null;
|
957
|
+
var t = baseRefUtil.deepClone(this.fieldModel);
|
958
|
+
(this.fieldModel = value),
|
959
|
+
this.initFileList(),
|
960
|
+
this.syncUpdateFormModel(value),
|
961
|
+
this.emitFieldDataChange(value, t);
|
962
|
+
}
|
963
|
+
},
|
964
|
+
getValue: function () {
|
965
|
+
return this.fieldModel;
|
966
|
+
},
|
967
|
+
resetField: function () {
|
968
|
+
if (!this.subFormItemFlag) {
|
969
|
+
var e = this.field.options.defaultValue;
|
970
|
+
this.setValue(e),
|
971
|
+
("picture-upload" !== this.field.type &&
|
972
|
+
"file-upload" !== this.field.type) ||
|
973
|
+
(this.$refs["fieldEditor"].clearFiles(),
|
974
|
+
this.fileList.splice(0, this.fileList.length));
|
975
|
+
}
|
976
|
+
},
|
977
|
+
setWidgetOption: function (e, t) {
|
978
|
+
this.field.options.hasOwnProperty(e) && (this.field.options[e] = t);
|
979
|
+
},
|
980
|
+
setReadonly: function (e) {
|
981
|
+
this.field.options.readonly = e;
|
982
|
+
},
|
983
|
+
setDisabled: function (e) {
|
984
|
+
this.field.options.disabled = e;
|
985
|
+
},
|
986
|
+
setAppendButtonVisible: function (e) {
|
987
|
+
this.field.options.appendButton = e;
|
988
|
+
},
|
989
|
+
setAppendButtonDisabled: function (e) {
|
990
|
+
this.field.options.appendButtonDisabled = e;
|
991
|
+
},
|
992
|
+
setHidden: function (e) {
|
993
|
+
(this.field.options.hidden = e),
|
994
|
+
e ? this.clearFieldRules() : this.buildFieldRules();
|
995
|
+
},
|
996
|
+
setRequired: function (e) {
|
997
|
+
(this.field.options.required = e), this.buildFieldRules();
|
998
|
+
},
|
999
|
+
setLabel: function (e) {
|
1000
|
+
this.field.options.label = e;
|
1001
|
+
},
|
1002
|
+
focus: function () {
|
1003
|
+
this.getFieldEditor() &&
|
1004
|
+
this.getFieldEditor().focus &&
|
1005
|
+
this.getFieldEditor().focus();
|
1006
|
+
},
|
1007
|
+
clearSelectedOptions: function () {
|
1008
|
+
("checkbox" !== this.field.type &&
|
1009
|
+
"radio" !== this.field.type &&
|
1010
|
+
"select" !== this.field.type) ||
|
1011
|
+
("checkbox" === this.field.type ||
|
1012
|
+
("select" === this.field.type && this.field.options.multiple)
|
1013
|
+
? (this.fieldModel = [])
|
1014
|
+
: (this.fieldModel = ""));
|
1015
|
+
},
|
1016
|
+
loadOptions: function (e) {
|
1017
|
+
this.field.options.optionItems = baseRefUtil.translateOptionItems(
|
1018
|
+
e,
|
1019
|
+
this.field.type,
|
1020
|
+
this.field.options.labelKey || "label",
|
1021
|
+
this.field.options.valueKey || "value"
|
1022
|
+
);
|
1023
|
+
},
|
1024
|
+
reloadOptions: function (e) {
|
1025
|
+
this.field.options.optionItems = baseRefUtil.translateOptionItems(
|
1026
|
+
e,
|
1027
|
+
this.field.type,
|
1028
|
+
this.field.options.labelKey || "label",
|
1029
|
+
this.field.options.valueKey || "value"
|
1030
|
+
);
|
1031
|
+
},
|
1032
|
+
getOptions: function () {
|
1033
|
+
return this.field.options.optionItems;
|
1034
|
+
},
|
1035
|
+
disableOption: function (e) {
|
1036
|
+
this.disableOptionOfList(this.field.options.optionItems, e);
|
1037
|
+
},
|
1038
|
+
enableOption: function (e) {
|
1039
|
+
this.enableOptionOfList(this.field.options.optionItems, e);
|
1040
|
+
},
|
1041
|
+
getOptionItems: function () {
|
1042
|
+
return this.field.options.optionItems;
|
1043
|
+
},
|
1044
|
+
setUploadHeader: function (e, t) {
|
1045
|
+
this.$set(this.uploadHeaders, e, t);
|
1046
|
+
},
|
1047
|
+
setUploadData: function (e, t) {
|
1048
|
+
this.$set(this.uploadData, e, t);
|
1049
|
+
},
|
1050
|
+
setToolbar: function (e) {
|
1051
|
+
this.customToolbar = e;
|
1052
|
+
},
|
1053
|
+
isSubFormItem: function () {
|
1054
|
+
return this.subFormItemFlag;
|
1055
|
+
},
|
1056
|
+
isSubFormField: function () {
|
1057
|
+
return this.subFormItemFlag;
|
1058
|
+
},
|
1059
|
+
setReadMode: function () {
|
1060
|
+
var e =
|
1061
|
+
!(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
|
1062
|
+
this.fieldReadonlyFlag = e;
|
1063
|
+
},
|
1064
|
+
addCssClass: function (e) {
|
1065
|
+
this.field.options.customClass
|
1066
|
+
? this.field.options.customClass.push(e)
|
1067
|
+
: (this.field.options.customClass = [e]);
|
1068
|
+
},
|
1069
|
+
removeCssClass: function (e) {
|
1070
|
+
if (this.field.options.customClass) {
|
1071
|
+
var t = -1;
|
1072
|
+
this.field.options.customClass.map(function (i, n) {
|
1073
|
+
i === e && (t = n);
|
1074
|
+
}),
|
1075
|
+
t > -1 && this.field.options.customClass.splice(t, 1);
|
1076
|
+
}
|
1077
|
+
},
|
1078
|
+
async initAccess() {
|
1079
|
+
if (this.field.options.accessCode) {
|
1080
|
+
return this.$http({
|
1081
|
+
url: SUPPORT_PREFIX + `/report_requestaccess/getByCode`,
|
1082
|
+
method: `post`,
|
1083
|
+
data: {
|
1084
|
+
stringOne: this.field.options.accessCode,
|
1085
|
+
},
|
1086
|
+
isLoading: true,
|
1087
|
+
// modalStrictly: true,
|
1088
|
+
success: (res) => {
|
1089
|
+
let requestAccess = res.objx || {};
|
1090
|
+
|
1091
|
+
let dsModel = {};
|
1092
|
+
if (requestAccess.accessViewContent) {
|
1093
|
+
dsModel = JSON.parse(requestAccess.accessViewContent);
|
1094
|
+
}
|
1095
|
+
if (!dsModel.headers) dsModel.headers = [];
|
1096
|
+
if (!dsModel.params) dsModel.params = [];
|
1097
|
+
if (!dsModel.data) dsModel.data = [];
|
1098
|
+
if (dsModel.dataHandlerCode == null) dsModel.dataHandlerCode = "";
|
1099
|
+
if (dsModel.configHandlerCode == null)
|
1100
|
+
dsModel.configHandlerCode = "";
|
1101
|
+
if (dsModel.errorHandlerCode == null) dsModel.errorHandlerCode = "";
|
1102
|
+
|
1103
|
+
requestAccess.dsModel = dsModel;
|
1104
|
+
this.requestAccess = requestAccess;
|
1105
|
+
},
|
1106
|
+
});
|
1107
|
+
} else {
|
1108
|
+
return null;
|
1109
|
+
}
|
1110
|
+
},
|
1111
|
+
addExtraAccessData(data) {
|
1112
|
+
if (data) {
|
1113
|
+
Object.keys(data).forEach((field) => {
|
1114
|
+
this.extraAccessData[field] = data[field];
|
1115
|
+
});
|
1116
|
+
}
|
1117
|
+
},
|
1118
|
+
clearExtraAccessData() {
|
1119
|
+
this.extraAccessData = {};
|
1120
|
+
},
|
1121
|
+
doAccess(accessCode, conditions, callback) {
|
1122
|
+
let path = baseRefUtil.getAccessUrl();
|
1123
|
+
let globalReqData = baseRefUtil.getReportGlobalMap(); //全局请求参数
|
1124
|
+
return this.$http({
|
1125
|
+
url: path,
|
1126
|
+
method: `post`,
|
1127
|
+
loadingTarget: document.body,
|
1128
|
+
data: {
|
1129
|
+
accessCode: accessCode,
|
1130
|
+
conditions: {
|
1131
|
+
...conditions,
|
1132
|
+
...globalReqData,
|
1133
|
+
},
|
1134
|
+
},
|
1135
|
+
isLoading: true,
|
1136
|
+
success: (res) => {
|
1137
|
+
callback && callback(res);
|
1138
|
+
},
|
1139
|
+
});
|
1140
|
+
},
|
1141
|
+
autoExcScript() {
|
1142
|
+
if (!this.designState && this.field.options.accessAutoExc) {
|
1143
|
+
this.scriptHttp({
|
1144
|
+
options: this.field.options,
|
1145
|
+
});
|
1146
|
+
}
|
1147
|
+
},
|
1148
|
+
addInterval(handler, timeout) {
|
1149
|
+
let timer = setInterval(handler, timeout);
|
1150
|
+
this.timerMap[timer] = timer;
|
1151
|
+
return timer;
|
1152
|
+
},
|
1153
|
+
clearAllInterval() {
|
1154
|
+
let timerMap = this.timerMap;
|
1155
|
+
for (let key in timerMap) {
|
1156
|
+
let timer = timerMap[key];
|
1157
|
+
clearInterval(timer);
|
1158
|
+
}
|
1159
|
+
this.timerMap = {};
|
1160
|
+
},
|
1161
|
+
getI18nLabel(label, path, param) {
|
1162
|
+
return !this.designState && label ? this.$t2(label, path, param) : label;
|
1163
|
+
},
|
1164
|
+
getParentTarget() {
|
1165
|
+
let name = this.parentWidget?.options?.name ?? null;
|
1166
|
+
return name ? this.getWidgetRef(name) : null;
|
1167
|
+
},
|
1168
|
+
},
|
1169
|
+
};
|
1170
|
+
|
1171
|
+
export default modules;
|