cloud-web-corejs 1.0.54-dev.340 → 1.0.54-dev.341
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/mixins.js +1490 -1
- package/src/components/excelExport/mixins.js +936 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +364 -255
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -1
- package/src/components/xform/form-render/container-item/data-table-mixin.js +3 -0
- package/src/views/bd/setting/request_async_setting/list.vue +171 -116
- package/src/views/bd/setting/request_setting/list.vue +148 -105
@@ -35,24 +35,50 @@
|
|
35
35
|
<el-switch v-model="isQueryAllPage"></el-switch>
|
36
36
|
</el-form-item>
|
37
37
|
<el-form-item label="默认每页查询数">
|
38
|
-
<base-input-number v-model="optionModel.gridPageSize" size="mini" :
|
38
|
+
<base-input-number v-model="optionModel.gridPageSize" size="mini" :max="10000" />
|
39
39
|
</el-form-item>
|
40
40
|
<el-form-item :label="i18nt('可选择每页查询数')"></el-form-item>
|
41
41
|
<el-form-item label-width="0">
|
42
42
|
<template v-if="optionModel.gridPageSizeList">
|
43
|
-
<draggable
|
44
|
-
|
45
|
-
|
43
|
+
<draggable
|
44
|
+
tag="ul"
|
45
|
+
class="draggable-box"
|
46
|
+
:list="optionModel.gridPageSizeList"
|
47
|
+
v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.drag-option' }"
|
48
|
+
>
|
49
|
+
<li
|
50
|
+
v-for="(item, index) in optionModel.gridPageSizeList"
|
51
|
+
:key="index"
|
52
|
+
class="col-item"
|
53
|
+
>
|
46
54
|
<i class="el-icon-s-operation drag-option"></i>
|
47
|
-
<base-input-number
|
48
|
-
|
49
|
-
|
55
|
+
<base-input-number
|
56
|
+
v-model="item.value"
|
57
|
+
:min="1"
|
58
|
+
:max="10000"
|
59
|
+
style="width: 200px"
|
60
|
+
></base-input-number>
|
61
|
+
<el-button
|
62
|
+
circle
|
63
|
+
plain
|
64
|
+
size="mini"
|
65
|
+
type="danger"
|
66
|
+
@click="optionModel.gridPageSizeList.splice(index, 1)"
|
67
|
+
icon="el-icon-minus"
|
68
|
+
class="col-delete-button"
|
69
|
+
style="position: unset"
|
70
|
+
></el-button>
|
50
71
|
</li>
|
51
72
|
</draggable>
|
52
73
|
</template>
|
53
74
|
<div>
|
54
|
-
<el-button
|
55
|
-
|
75
|
+
<el-button
|
76
|
+
type="text"
|
77
|
+
@click="addGridPageSizeList"
|
78
|
+
icon="el-icon-circle-plus-outline"
|
79
|
+
class="add-option"
|
80
|
+
>
|
81
|
+
{{ i18nt("新增分页数") }}
|
56
82
|
</el-button>
|
57
83
|
</div>
|
58
84
|
</el-form-item>
|
@@ -75,14 +101,16 @@
|
|
75
101
|
</el-select>
|
76
102
|
</el-form-item> -->
|
77
103
|
<el-form-item :label="i18nt('designer.setting.tableColEdit')">
|
78
|
-
<el-button type="primary" plain="" round="" @click="openSetting"
|
79
|
-
|
80
|
-
}}
|
104
|
+
<el-button type="primary" plain="" round="" @click="openSetting"
|
105
|
+
>{{ i18nt("designer.setting.editAction") }}
|
81
106
|
</el-button>
|
82
107
|
</el-form-item>
|
83
108
|
<el-form-item label="自定义表格配置" label-width="150px">
|
84
|
-
<a
|
85
|
-
|
109
|
+
<a
|
110
|
+
href="javascript:void(0);"
|
111
|
+
class="a-link link-oneLind"
|
112
|
+
@click="editEventHandler('tableConfig', tableConfigParams)"
|
113
|
+
>
|
86
114
|
<span>{{ optionModel.tableConfig }}</span>
|
87
115
|
<i class="el-icon-edit"></i>
|
88
116
|
</a>
|
@@ -163,11 +191,21 @@
|
|
163
191
|
>
|
164
192
|
<template slot="footer">
|
165
193
|
<div class="dialog-footer">
|
166
|
-
<el-button
|
167
|
-
|
194
|
+
<el-button
|
195
|
+
type=""
|
196
|
+
@click="dataDialogVisible = !1"
|
197
|
+
class="button-sty"
|
198
|
+
icon="el-icon-close"
|
199
|
+
>
|
200
|
+
{{ i18nt("designer.hint.cancel") }}
|
168
201
|
</el-button>
|
169
|
-
<el-button
|
170
|
-
|
202
|
+
<el-button
|
203
|
+
type="primary"
|
204
|
+
@click="saveTableData"
|
205
|
+
class="button-sty"
|
206
|
+
icon="el-icon-check"
|
207
|
+
>
|
208
|
+
{{ i18nt("designer.hint.confirm") }}
|
171
209
|
</el-button>
|
172
210
|
</div>
|
173
211
|
</template>
|
@@ -341,21 +379,39 @@
|
|
341
379
|
:destroy-on-close="!0"
|
342
380
|
v-dialog-drag
|
343
381
|
>
|
344
|
-
<el-alert type="info" :closable="!1"/>
|
345
|
-
<code-editor
|
346
|
-
|
382
|
+
<el-alert type="info" :closable="!1" />
|
383
|
+
<code-editor
|
384
|
+
ref="dsResultEditor"
|
385
|
+
mode="javascript"
|
386
|
+
:readonly="!1"
|
387
|
+
v-model="dataSourceSql"
|
388
|
+
></code-editor>
|
389
|
+
<el-alert type="info" :closable="!1" />
|
347
390
|
<div class="dialog-footer" slot="footer">
|
348
|
-
<el-button
|
349
|
-
|
391
|
+
<el-button
|
392
|
+
@click="showSqlEditDialog = !1"
|
393
|
+
class="button-sty"
|
394
|
+
icon="el-icon-close"
|
395
|
+
>
|
396
|
+
{{ i18nt("designer.hint.cancel") }}
|
350
397
|
</el-button>
|
351
|
-
<el-button
|
352
|
-
|
398
|
+
<el-button
|
399
|
+
type="primary"
|
400
|
+
@click="saveDataSourceSql"
|
401
|
+
class="button-sty"
|
402
|
+
icon="el-icon-check"
|
403
|
+
>
|
404
|
+
{{ i18nt("designer.hint.confirm") }}
|
353
405
|
</el-button>
|
354
406
|
</div>
|
355
407
|
</el-dialog>
|
356
|
-
<requestaccessDialog
|
357
|
-
|
358
|
-
|
408
|
+
<requestaccessDialog
|
409
|
+
v-if="showRequestaccessDialog"
|
410
|
+
:visiable.sync="showRequestaccessDialog"
|
411
|
+
@confirm="confirmInsertRequestaccess"
|
412
|
+
multi="false"
|
413
|
+
:param="{ reportCode: reportTemplate.reportCode }"
|
414
|
+
/>
|
359
415
|
|
360
416
|
<el-dialog
|
361
417
|
v-if="showFieldTreeDialog"
|
@@ -371,7 +427,7 @@
|
|
371
427
|
width="500px"
|
372
428
|
v-dialog-drag
|
373
429
|
>
|
374
|
-
<div class="cont" style="height: 500px
|
430
|
+
<div class="cont" style="height: 500px">
|
375
431
|
<el-tree
|
376
432
|
ref="tree"
|
377
433
|
:data="treeData"
|
@@ -381,19 +437,25 @@
|
|
381
437
|
:check-on-click-node="true"
|
382
438
|
:expand-on-click-node="false"
|
383
439
|
:default-checked-keys="defaultCheckedKeys"
|
384
|
-
:props="defaultProps"
|
440
|
+
:props="defaultProps"
|
441
|
+
>
|
385
442
|
</el-tree>
|
386
443
|
</div>
|
387
444
|
<span slot="footer" class="dialog-footer">
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
445
|
+
<el-button
|
446
|
+
type="primary"
|
447
|
+
plain
|
448
|
+
class="button-sty"
|
449
|
+
@click="showFieldTreeDialog = false"
|
450
|
+
>
|
451
|
+
<i class="el-icon-close el-icon"></i>
|
452
|
+
取 消
|
453
|
+
</el-button>
|
454
|
+
<el-button type="primary" @click="confirmFieldTreeDialog" class="button-sty">
|
455
|
+
<i class="el-icon-check el-icon"></i>
|
456
|
+
确 定
|
457
|
+
</el-button>
|
458
|
+
</span>
|
397
459
|
</el-dialog>
|
398
460
|
<!-- <el-dialog
|
399
461
|
v-if="showDateConfigDialog"
|
@@ -500,42 +562,43 @@
|
|
500
562
|
</el-button>
|
501
563
|
</div>
|
502
564
|
</el-dialog>-->
|
503
|
-
<tableColumnDialog
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
565
|
+
<tableColumnDialog
|
566
|
+
v-if="dialogVisible"
|
567
|
+
:visiable.sync="dialogVisible"
|
568
|
+
:designer="designer"
|
569
|
+
:selectedWidget="selectedWidget"
|
570
|
+
:optionModel="optionModel"
|
571
|
+
/>
|
508
572
|
</div>
|
509
573
|
</template>
|
510
574
|
|
511
575
|
<script>
|
512
|
-
import i18n from
|
513
|
-
import Draggable from
|
514
|
-
import {deepClone, generateId} from
|
515
|
-
import Sortable from
|
516
|
-
import requestaccessDialog from
|
517
|
-
import conditionEditor from
|
576
|
+
import i18n from "../../../../../../components/xform/utils/i18n";
|
577
|
+
import Draggable from "vuedraggable";
|
578
|
+
import { deepClone, generateId } from "../../../../../../components/xform/utils/util";
|
579
|
+
import Sortable from "sortablejs";
|
580
|
+
import requestaccessDialog from "../../../../../../views/user/form/report_requestaccess/dialog.vue";
|
581
|
+
import conditionEditor from "./condition-editor.vue";
|
518
582
|
import tableColumnDialog from "./table-column-dialog.vue";
|
519
|
-
import eventMixin
|
520
|
-
from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
583
|
+
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
521
584
|
import setttingConfig from "@/settings";
|
522
585
|
|
523
586
|
export default {
|
524
|
-
name:
|
525
|
-
componentName:
|
587
|
+
name: "data-table-editor",
|
588
|
+
componentName: "PropertyEditor",
|
526
589
|
mixins: [i18n, eventMixin],
|
527
590
|
components: {
|
528
591
|
Draggable,
|
529
592
|
requestaccessDialog,
|
530
593
|
conditionEditor,
|
531
|
-
tableColumnDialog
|
594
|
+
tableColumnDialog,
|
532
595
|
},
|
533
596
|
props: {
|
534
597
|
designer: Object,
|
535
598
|
selectedWidget: Object,
|
536
|
-
optionModel: Object
|
599
|
+
optionModel: Object,
|
537
600
|
},
|
538
|
-
inject: [
|
601
|
+
inject: ["getReportTemplate", "showEventCollapse", "openWidgetPropertyDialog"],
|
539
602
|
data: function () {
|
540
603
|
return {
|
541
604
|
showTableConfigDialog: false,
|
@@ -543,168 +606,168 @@ export default {
|
|
543
606
|
dialogVisible: !1,
|
544
607
|
dataDialogVisible: !1,
|
545
608
|
showButtonsEditDialog: !1,
|
546
|
-
oldButtonName:
|
609
|
+
oldButtonName: "",
|
547
610
|
cssClassList: [],
|
548
611
|
tableDataOptions: [],
|
549
612
|
widgetSizes: [
|
550
613
|
{
|
551
|
-
label:
|
552
|
-
value:
|
614
|
+
label: "default",
|
615
|
+
value: "",
|
553
616
|
},
|
554
617
|
{
|
555
|
-
label:
|
556
|
-
value:
|
618
|
+
label: "large",
|
619
|
+
value: "large",
|
557
620
|
},
|
558
621
|
{
|
559
|
-
label:
|
560
|
-
value:
|
622
|
+
label: "medium",
|
623
|
+
value: "medium",
|
561
624
|
},
|
562
625
|
{
|
563
|
-
label:
|
564
|
-
value:
|
626
|
+
label: "small",
|
627
|
+
value: "small",
|
565
628
|
},
|
566
629
|
{
|
567
|
-
label:
|
568
|
-
value:
|
569
|
-
}
|
630
|
+
label: "mini",
|
631
|
+
value: "mini",
|
632
|
+
},
|
570
633
|
],
|
571
634
|
alignOptions: [
|
572
635
|
{
|
573
|
-
value:
|
574
|
-
label:
|
636
|
+
value: "left",
|
637
|
+
label: "left",
|
575
638
|
},
|
576
639
|
{
|
577
|
-
value:
|
578
|
-
label:
|
640
|
+
value: "center",
|
641
|
+
label: "center",
|
579
642
|
},
|
580
643
|
{
|
581
|
-
value:
|
582
|
-
label:
|
583
|
-
}
|
644
|
+
value: "right",
|
645
|
+
label: "right",
|
646
|
+
},
|
584
647
|
],
|
585
648
|
fieldTypeOptions: [
|
586
649
|
{
|
587
|
-
value:
|
588
|
-
label:
|
650
|
+
value: "text",
|
651
|
+
label: "Text",
|
589
652
|
},
|
590
653
|
{
|
591
|
-
value:
|
592
|
-
label:
|
654
|
+
value: "number",
|
655
|
+
label: "Number",
|
593
656
|
},
|
594
657
|
{
|
595
|
-
value:
|
596
|
-
label:
|
597
|
-
}
|
658
|
+
value: "date",
|
659
|
+
label: "Date",
|
660
|
+
},
|
598
661
|
],
|
599
662
|
op: [
|
600
663
|
{
|
601
|
-
label:
|
664
|
+
label: "Date Format",
|
602
665
|
options: [
|
603
666
|
{
|
604
|
-
value:
|
605
|
-
label:
|
667
|
+
value: "d1",
|
668
|
+
label: "yyyy-MM-dd",
|
606
669
|
},
|
607
670
|
{
|
608
|
-
value:
|
609
|
-
label:
|
671
|
+
value: "d2",
|
672
|
+
label: "yyyy/MM/dd",
|
610
673
|
},
|
611
674
|
{
|
612
|
-
value:
|
613
|
-
label:
|
675
|
+
value: "d3",
|
676
|
+
label: "yyyy年MM月dd日",
|
614
677
|
},
|
615
678
|
{
|
616
|
-
value:
|
617
|
-
label:
|
679
|
+
value: "d4",
|
680
|
+
label: "yyyy-MM-dd HH:mm:ss",
|
618
681
|
},
|
619
682
|
{
|
620
|
-
value:
|
621
|
-
label:
|
622
|
-
}
|
623
|
-
]
|
683
|
+
value: "d5",
|
684
|
+
label: "yyyy-MM-dd hh:mm:ss",
|
685
|
+
},
|
686
|
+
],
|
624
687
|
},
|
625
688
|
{
|
626
|
-
label:
|
689
|
+
label: "Number Format",
|
627
690
|
options: [
|
628
691
|
{
|
629
|
-
value:
|
630
|
-
label:
|
692
|
+
value: "n1",
|
693
|
+
label: "###,###,###,##0.######",
|
631
694
|
},
|
632
695
|
{
|
633
|
-
value:
|
634
|
-
label:
|
696
|
+
value: "n2",
|
697
|
+
label: "###,###,###,##0.00####",
|
635
698
|
},
|
636
699
|
{
|
637
|
-
value:
|
638
|
-
label:
|
700
|
+
value: "n3",
|
701
|
+
label: "###,###,###,##0.000000",
|
639
702
|
},
|
640
703
|
{
|
641
|
-
value:
|
642
|
-
label:
|
704
|
+
value: "n4",
|
705
|
+
label: "###,###,###,##0.000",
|
643
706
|
},
|
644
707
|
{
|
645
|
-
value:
|
646
|
-
label:
|
708
|
+
value: "n5",
|
709
|
+
label: "###,###,###,##0.00",
|
647
710
|
},
|
648
711
|
{
|
649
|
-
value:
|
650
|
-
label:
|
712
|
+
value: "n6",
|
713
|
+
label: "###,###,###,##0",
|
651
714
|
},
|
652
715
|
{
|
653
|
-
value:
|
654
|
-
label:
|
655
|
-
}
|
656
|
-
]
|
716
|
+
value: "n7",
|
717
|
+
label: "###,##0.00##%",
|
718
|
+
},
|
719
|
+
],
|
657
720
|
},
|
658
721
|
{
|
659
|
-
label:
|
722
|
+
label: "edit Format",
|
660
723
|
options: [
|
661
724
|
{
|
662
|
-
value:
|
663
|
-
label:
|
725
|
+
value: "editInput",
|
726
|
+
label: "文本输入框",
|
664
727
|
},
|
665
728
|
{
|
666
|
-
value:
|
667
|
-
label:
|
729
|
+
value: "editNumber",
|
730
|
+
label: "数字输入框",
|
668
731
|
},
|
669
732
|
{
|
670
|
-
value:
|
671
|
-
label:
|
733
|
+
value: "editDate",
|
734
|
+
label: "日期输入框",
|
672
735
|
},
|
673
736
|
{
|
674
|
-
value:
|
675
|
-
label:
|
737
|
+
value: "editSelect",
|
738
|
+
label: "下拉框",
|
676
739
|
},
|
677
740
|
{
|
678
|
-
value:
|
679
|
-
label:
|
741
|
+
value: "editSearch",
|
742
|
+
label: "搜索框",
|
680
743
|
},
|
681
744
|
{
|
682
|
-
value:
|
683
|
-
label:
|
745
|
+
value: "editDelete",
|
746
|
+
label: "删除按钮",
|
684
747
|
},
|
685
748
|
{
|
686
|
-
value:
|
687
|
-
label:
|
688
|
-
}
|
689
|
-
]
|
749
|
+
value: "editButton",
|
750
|
+
label: "查看按钮",
|
751
|
+
},
|
752
|
+
],
|
690
753
|
},
|
691
754
|
],
|
692
755
|
columnFormatMap: {
|
693
|
-
editInput:
|
694
|
-
editNumber:
|
695
|
-
editDate:
|
696
|
-
editSelect:
|
697
|
-
editSearch:
|
756
|
+
editInput: "input",
|
757
|
+
editNumber: "number",
|
758
|
+
editDate: "date",
|
759
|
+
editSelect: "select",
|
760
|
+
editSearch: "vabsearch",
|
698
761
|
},
|
699
762
|
showRenderDialogFlag: !1,
|
700
|
-
renderJson:
|
763
|
+
renderJson: "",
|
701
764
|
currentTableColumn: null,
|
702
765
|
nameRules: [
|
703
766
|
{
|
704
767
|
required: !0,
|
705
|
-
trigger: [
|
706
|
-
message: this.i18nt(
|
707
|
-
}
|
768
|
+
trigger: ["blur", "change"],
|
769
|
+
message: this.i18nt("designer.setting.fieldValueRequired"),
|
770
|
+
},
|
708
771
|
],
|
709
772
|
showSqlEditDialog: false,
|
710
773
|
dataSourceSql: "",
|
@@ -718,74 +781,82 @@ export default {
|
|
718
781
|
showFieldTreeDialog: false,
|
719
782
|
treeData: [],
|
720
783
|
defaultProps: {
|
721
|
-
children:
|
722
|
-
label:
|
784
|
+
children: "children",
|
785
|
+
label: "label",
|
723
786
|
},
|
724
787
|
defaultCheckedKeys: [],
|
725
|
-
tableConfigParams: ["dataId", "formCode"]
|
788
|
+
tableConfigParams: ["dataId", "formCode"],
|
726
789
|
};
|
727
790
|
},
|
728
791
|
computed: {
|
729
792
|
dataSourceList: function () {
|
730
|
-
return this.designer.formConfig && this.designer.formConfig.dataSources
|
793
|
+
return this.designer.formConfig && this.designer.formConfig.dataSources
|
794
|
+
? this.designer.formConfig.dataSources
|
795
|
+
: [];
|
731
796
|
},
|
732
797
|
reportTemplate: function () {
|
733
798
|
return this.getReportTemplate();
|
734
799
|
},
|
735
800
|
isQueryAllPage: {
|
736
|
-
get(){
|
801
|
+
get() {
|
737
802
|
return !this.optionModel.isNotQueryAllPage;
|
738
803
|
},
|
739
|
-
set(val){
|
804
|
+
set(val) {
|
740
805
|
this.optionModel.isNotQueryAllPage = !val;
|
741
|
-
}
|
742
|
-
}
|
806
|
+
},
|
807
|
+
},
|
743
808
|
},
|
744
809
|
created: function () {
|
745
810
|
// this.reportTemplate = this.getReportTemplate();
|
746
811
|
var e = this;
|
747
812
|
(this.cssClassList = deepClone(this.designer.getCssClassList())),
|
748
|
-
this.designer.handleEvent(
|
813
|
+
this.designer.handleEvent("form-css-updated", function (t) {
|
749
814
|
e.cssClassList = t;
|
750
815
|
});
|
751
|
-
if (this.optionModel.showExportBtn == null)
|
752
|
-
|
816
|
+
if (this.optionModel.showExportBtn == null)
|
817
|
+
this.$set(this.optionModel, "showExportBtn", true);
|
818
|
+
if (this.optionModel.tableConfig === void 0)
|
819
|
+
this.$set(this.optionModel, "tableConfig", "");
|
753
820
|
},
|
754
821
|
mounted: function () {
|
755
822
|
/*let dateFieldList = Object.keys(dateFieldComponents);
|
756
823
|
this.dateFieldList = dateFieldList;*/
|
757
824
|
},
|
758
825
|
methods: {
|
759
|
-
|
760
826
|
dragSort: function () {
|
761
|
-
var e = this.$refs.singleTable.$el.querySelectorAll(
|
827
|
+
var e = this.$refs.singleTable.$el.querySelectorAll(
|
828
|
+
".el-table__body-wrapper > table > tbody"
|
829
|
+
)[0],
|
762
830
|
t = this.optionModel.tableColumns;
|
763
831
|
this.sortable = Sortable.create(e, {
|
764
|
-
ghostClass:
|
832
|
+
ghostClass: "sortable-ghost",
|
765
833
|
setData: function (e) {
|
766
|
-
e.setData(
|
834
|
+
e.setData("Text", "");
|
767
835
|
},
|
768
836
|
onEnd: function (e) {
|
769
837
|
var i = t.splice(e.oldIndex, 1)[0];
|
770
838
|
t.splice(e.newIndex, 0, i);
|
771
839
|
t[e.newIndex].id;
|
772
|
-
t[e.newIndex - 1] && t[e.newIndex - 1].id,
|
773
|
-
|
840
|
+
t[e.newIndex - 1] && t[e.newIndex - 1].id,
|
841
|
+
t[e.newIndex + 1] && t[e.newIndex + 1].id;
|
842
|
+
},
|
774
843
|
});
|
775
844
|
},
|
776
845
|
openTableDataEdit: function () {
|
777
|
-
(this.dataDialogVisible = !0),
|
846
|
+
(this.dataDialogVisible = !0),
|
847
|
+
(this.tableDataOptions = JSON.stringify(this.optionModel.tableData, null, " "));
|
778
848
|
},
|
779
849
|
saveTableData: function () {
|
780
850
|
try {
|
781
|
-
(this.optionModel.tableData = JSON.parse(this.tableDataOptions)),
|
851
|
+
(this.optionModel.tableData = JSON.parse(this.tableDataOptions)),
|
852
|
+
(this.dataDialogVisible = !1);
|
782
853
|
} catch (e) {
|
783
|
-
this.$message.error(this.i18nt(
|
854
|
+
this.$message.error(this.i18nt("designer.hint.invalidOptionsData") + e.message);
|
784
855
|
}
|
785
856
|
},
|
786
857
|
openSetting: function () {
|
787
858
|
var e = this;
|
788
|
-
|
859
|
+
this.dialogVisible = !0; /*,
|
789
860
|
this.$nextTick(function () {
|
790
861
|
e.dragSort();
|
791
862
|
});*/
|
@@ -794,7 +865,7 @@ export default {
|
|
794
865
|
this.dialogVisible = !1;
|
795
866
|
},
|
796
867
|
addCol: function () {
|
797
|
-
let tmpId =
|
868
|
+
let tmpId = "column" + generateId();
|
798
869
|
var e = {
|
799
870
|
columnId: new Date().getTime(),
|
800
871
|
required: false,
|
@@ -803,81 +874,103 @@ export default {
|
|
803
874
|
label: tmpId,
|
804
875
|
align: "left",
|
805
876
|
show: true,
|
806
|
-
sortable: true
|
877
|
+
sortable: true,
|
807
878
|
};
|
808
879
|
this.optionModel.tableColumns.push(e), this.designer.emitHistoryChange();
|
809
880
|
},
|
810
881
|
handleDelete: function (e, t) {
|
811
|
-
if (1 === this.optionModel.tableColumns.length)
|
882
|
+
if (1 === this.optionModel.tableColumns.length)
|
883
|
+
return (
|
884
|
+
this.$message.warning(
|
885
|
+
this.i18nt("designer.setting.onlyOneColumnCannotBeDeleted")
|
886
|
+
),
|
887
|
+
!1
|
888
|
+
);
|
812
889
|
this.optionModel.tableColumns.splice(e, 1);
|
813
890
|
},
|
814
891
|
showRenderDialog: function (e) {
|
815
|
-
(this.currentTableColumn = e),
|
892
|
+
(this.currentTableColumn = e),
|
893
|
+
(this.renderJson = e.render || ""),
|
894
|
+
(this.showRenderDialogFlag = !0);
|
816
895
|
},
|
817
896
|
saveColumnRender: function () {
|
818
|
-
this.$set(this.currentTableColumn,
|
897
|
+
this.$set(this.currentTableColumn, "render", this.renderJson),
|
898
|
+
(this.showRenderDialogFlag = !1);
|
819
899
|
},
|
820
900
|
handleShowButtonsColumnChange: function (e) {
|
821
901
|
if (e) {
|
822
902
|
var t = this.designer.formWidget.getSelectedWidgetRef();
|
823
903
|
t &&
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
904
|
+
t.refreshLayout &&
|
905
|
+
this.$nextTick(function () {
|
906
|
+
t.refreshLayout();
|
907
|
+
});
|
828
908
|
}
|
829
909
|
},
|
830
910
|
onButtonNameFocus: function (e) {
|
831
|
-
console.log(
|
911
|
+
console.log("test", e), (this.oldButtonName = e.target.value);
|
832
912
|
},
|
833
913
|
onButtonNameChange: function (e, t) {
|
834
914
|
var i = !1;
|
835
915
|
this.optionModel.operationButtons.map(function (n, o) {
|
836
916
|
n.name === e && o !== t && (i = !0);
|
837
917
|
}),
|
838
|
-
|
918
|
+
i &&
|
919
|
+
(this.$message.error(
|
920
|
+
this.i18nt("designer.setting.operationButtonDuplicatedNameError")
|
921
|
+
),
|
922
|
+
(this.optionModel.operationButtons[t].name = this.oldButtonName));
|
839
923
|
},
|
840
924
|
editButtonsColumn: function () {
|
841
925
|
this.showButtonsEditDialog = !0;
|
842
926
|
},
|
843
927
|
deleteOperationButton: function (e) {
|
844
928
|
var t = this;
|
845
|
-
this.$confirm(
|
846
|
-
|
847
|
-
|
848
|
-
|
929
|
+
this.$confirm(
|
930
|
+
this.i18nt("designer.setting.deleteOperationButtonHint"),
|
931
|
+
this.i18nt("render.hint.prompt"),
|
932
|
+
{
|
933
|
+
confirmButtonText: this.i18nt("render.hint.confirm"),
|
934
|
+
cancelButtonText: this.i18nt("render.hint.cancel"),
|
935
|
+
}
|
936
|
+
)
|
849
937
|
.then(function () {
|
850
938
|
t.optionModel.operationButtons.splice(e, 1);
|
851
939
|
})
|
852
|
-
.catch(function (e) {
|
853
|
-
});
|
940
|
+
.catch(function (e) {});
|
854
941
|
},
|
855
942
|
addOperationButton: function () {
|
856
|
-
this.$set(
|
943
|
+
this.$set(
|
944
|
+
this.optionModel,
|
945
|
+
"operationButtons",
|
946
|
+
this.optionModel.operationButtons || []
|
947
|
+
),
|
857
948
|
this.optionModel.operationButtons.push({
|
858
|
-
name:
|
859
|
-
label:
|
860
|
-
type:
|
861
|
-
size:
|
949
|
+
name: "btn" + generateId(),
|
950
|
+
label: "new btn",
|
951
|
+
type: "text",
|
952
|
+
size: "small",
|
862
953
|
round: !1,
|
863
954
|
hidden: !1,
|
864
|
-
disabled: !1
|
955
|
+
disabled: !1,
|
865
956
|
});
|
866
957
|
},
|
867
958
|
refreshTableLayout: function () {
|
868
959
|
var e = this.designer.formWidget.getSelectedWidgetRef();
|
869
960
|
e &&
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
961
|
+
e.refreshLayout &&
|
962
|
+
this.$nextTick(function () {
|
963
|
+
e.refreshLayout();
|
964
|
+
});
|
874
965
|
},
|
875
966
|
saveDataSourceSql() {
|
876
967
|
this.optionModel.dataSourceSql = this.dataSourceSql;
|
877
968
|
this.showSqlEditDialog = false;
|
878
969
|
},
|
879
970
|
openSqlEditDialog() {
|
880
|
-
this.dataSourceSql = this.optionModel.dataSourceSql
|
971
|
+
this.dataSourceSql = this.optionModel.dataSourceSql
|
972
|
+
? deepClone(this.optionModel.dataSourceSql)
|
973
|
+
: "";
|
881
974
|
this.showSqlEditDialog = true;
|
882
975
|
},
|
883
976
|
confirmInsertRequestaccess(rows) {
|
@@ -889,19 +982,19 @@ export default {
|
|
889
982
|
},
|
890
983
|
changeFormatS(row) {
|
891
984
|
let columnWidgetConfig = this.getColumnWidgetConfig(row, true);
|
892
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
985
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
893
986
|
if (columnSelectedWidget) {
|
894
987
|
row.columnOption = columnSelectedWidget.options;
|
895
988
|
} else {
|
896
|
-
row.columnOption = {}
|
989
|
+
row.columnOption = {};
|
897
990
|
}
|
898
|
-
if (row.formatS ==
|
991
|
+
if (row.formatS == "editDelete" || row.formatS == "editButton") {
|
899
992
|
row.width = 47;
|
900
993
|
row.prop = null;
|
901
994
|
row.label = null;
|
902
995
|
row.sortable = false;
|
903
996
|
} else {
|
904
|
-
let tmpId =
|
997
|
+
let tmpId = "column" + generateId();
|
905
998
|
if (!row.width || row.width == 47) row.width = 150;
|
906
999
|
if (!row.prop) row.prop = tmpId;
|
907
1000
|
if (!row.label) row.label = tmpId;
|
@@ -909,16 +1002,18 @@ export default {
|
|
909
1002
|
}
|
910
1003
|
},
|
911
1004
|
getColumnWidgetConfig(row, isChange) {
|
912
|
-
let formatS = row.formatS
|
1005
|
+
let formatS = row.formatS;
|
913
1006
|
let columnSelectedWidget = null;
|
914
1007
|
let columnEditFields = null;
|
915
1008
|
|
916
1009
|
let type = this.columnFormatMap[row.formatS];
|
917
1010
|
|
918
1011
|
if (type) {
|
919
|
-
columnSelectedWidget = this.$baseLodash.cloneDeep(
|
1012
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(
|
1013
|
+
this.designer.getFieldWidgetByType(type)
|
1014
|
+
);
|
920
1015
|
let tmpId = generateId();
|
921
|
-
let idVal = row.prop ? row.prop :
|
1016
|
+
let idVal = row.prop ? row.prop : type + tmpId;
|
922
1017
|
columnSelectedWidget.id = idVal;
|
923
1018
|
columnSelectedWidget.options.name = idVal;
|
924
1019
|
if (!isChange && row.columnOption && Object.keys(row.columnOption).length) {
|
@@ -931,20 +1026,19 @@ export default {
|
|
931
1026
|
columnSelectedWidget.options.name = row.prop;
|
932
1027
|
columnSelectedWidget.options.label = row.label;
|
933
1028
|
columnSelectedWidget.options.labelHidden = true;
|
934
|
-
|
935
1029
|
}
|
936
|
-
return {columnSelectedWidget, columnEditFields};
|
1030
|
+
return { columnSelectedWidget, columnEditFields };
|
937
1031
|
},
|
938
1032
|
openFormatConfigDialog(row, index) {
|
939
1033
|
let option = row.columnOption;
|
940
1034
|
let selectedWidget;
|
941
1035
|
let columnWidgetConfig = this.getColumnWidgetConfig(row);
|
942
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
1036
|
+
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
943
1037
|
if (columnSelectedWidget) {
|
944
1038
|
option = columnSelectedWidget.options;
|
945
1039
|
selectedWidget = columnSelectedWidget;
|
946
1040
|
} else {
|
947
|
-
option = {}
|
1041
|
+
option = {};
|
948
1042
|
selectedWidget = {};
|
949
1043
|
}
|
950
1044
|
|
@@ -959,8 +1053,8 @@ export default {
|
|
959
1053
|
columnEditFields: columnEditFields,
|
960
1054
|
callback: (columnOption) => {
|
961
1055
|
this.confirmFormatConfigDialog(columnOption);
|
962
|
-
}
|
963
|
-
})
|
1056
|
+
},
|
1057
|
+
});
|
964
1058
|
},
|
965
1059
|
confirmFormatConfigDialog(columnOption) {
|
966
1060
|
let row = this.optionModel.tableColumns[this.operateIndex];
|
@@ -970,17 +1064,19 @@ export default {
|
|
970
1064
|
row.required = columnOption.required;
|
971
1065
|
},
|
972
1066
|
openFieldTreeDialog() {
|
973
|
-
this.treeData = [
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
1067
|
+
this.treeData = [
|
1068
|
+
{
|
1069
|
+
name: "Jinjilianxiren",
|
1070
|
+
label: "员工-紧急联系人",
|
1071
|
+
children: [
|
1072
|
+
{
|
1073
|
+
detailEntity: "Jinjilianxiren",
|
1074
|
+
name: "createdOn",
|
1075
|
+
label: "员工-紧急联系人.创建时间",
|
1076
|
+
type: "DateTime",
|
1077
|
+
required: "1",
|
1078
|
+
},
|
1079
|
+
/*{
|
984
1080
|
"searchDialogWidth": "520px",
|
985
1081
|
"detailEntity": "Jinjilianxiren",
|
986
1082
|
"name": "createdBy",
|
@@ -988,12 +1084,13 @@ export default {
|
|
988
1084
|
"type": "Reference",
|
989
1085
|
"required": "1"
|
990
1086
|
},*/ {
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
1087
|
+
detailEntity: "Jinjilianxiren",
|
1088
|
+
name: "modifiedOn",
|
1089
|
+
label: "员工-紧急联系人.最近修改时间",
|
1090
|
+
type: "DateTime",
|
1091
|
+
required: "0",
|
1092
|
+
},
|
1093
|
+
/*{
|
997
1094
|
"searchDialogWidth": "520px",
|
998
1095
|
"detailEntity": "Jinjilianxiren",
|
999
1096
|
"name": "modifiedBy",
|
@@ -1008,46 +1105,55 @@ export default {
|
|
1008
1105
|
"type": "Reference",
|
1009
1106
|
"required": "1"
|
1010
1107
|
},*/ {
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1108
|
+
detailEntity: "Jinjilianxiren",
|
1109
|
+
name: "shouji",
|
1110
|
+
label: "员工-紧急联系人.手机",
|
1111
|
+
type: "Text",
|
1112
|
+
required: "0",
|
1113
|
+
maxLength: "200",
|
1114
|
+
},
|
1115
|
+
{
|
1116
|
+
detailEntity: "Jinjilianxiren",
|
1117
|
+
name: "jinjilianxirenxingming",
|
1118
|
+
label: "员工-紧急联系人.紧急联系人姓名",
|
1119
|
+
type: "Text",
|
1120
|
+
required: "0",
|
1121
|
+
maxLength: "200",
|
1122
|
+
},
|
1123
|
+
],
|
1124
|
+
},
|
1125
|
+
];
|
1026
1126
|
|
1027
|
-
let fields = this.optionModel.tableColumns
|
1127
|
+
let fields = this.optionModel.tableColumns
|
1128
|
+
.filter((item) => !!item.prop)
|
1129
|
+
.map((item) => item.prop);
|
1028
1130
|
let defaultCheckedKeys = [];
|
1029
|
-
this.treeData.forEach(item1 => {
|
1030
|
-
item1.children.forEach(item2 => {
|
1131
|
+
this.treeData.forEach((item1) => {
|
1132
|
+
item1.children.forEach((item2) => {
|
1031
1133
|
if (fields.includes(item2.name) && !defaultCheckedKeys.includes(item2.name)) {
|
1032
|
-
defaultCheckedKeys.push(item2.name)
|
1134
|
+
defaultCheckedKeys.push(item2.name);
|
1033
1135
|
}
|
1034
|
-
})
|
1035
|
-
})
|
1036
|
-
this.defaultCheckedKeys = defaultCheckedKeys
|
1136
|
+
});
|
1137
|
+
});
|
1138
|
+
this.defaultCheckedKeys = defaultCheckedKeys;
|
1037
1139
|
this.showFieldTreeDialog = true;
|
1038
1140
|
},
|
1039
1141
|
confirmFieldTreeDialog() {
|
1040
1142
|
// defaultCheckedKeys
|
1041
|
-
let fields = this.optionModel.tableColumns
|
1143
|
+
let fields = this.optionModel.tableColumns
|
1144
|
+
.filter((item) => !!item.prop)
|
1145
|
+
.map((item) => item.prop);
|
1042
1146
|
let datas = this.$refs.tree.getCheckedNodes(true, false);
|
1043
|
-
datas
|
1044
|
-
|
1045
|
-
|
1147
|
+
datas
|
1148
|
+
.filter((item) => !fields.includes(item.name))
|
1149
|
+
.forEach((item) => {
|
1150
|
+
this.addCol2(item);
|
1151
|
+
});
|
1046
1152
|
this.designer.emitHistoryChange();
|
1047
1153
|
this.showFieldTreeDialog = false;
|
1048
1154
|
},
|
1049
1155
|
addCol2: function (item) {
|
1050
|
-
let tmpId =
|
1156
|
+
let tmpId = "column" + generateId();
|
1051
1157
|
var e = {
|
1052
1158
|
columnId: new Date().getTime(),
|
1053
1159
|
required: false,
|
@@ -1055,33 +1161,36 @@ export default {
|
|
1055
1161
|
prop: item.name,
|
1056
1162
|
label: item.label,
|
1057
1163
|
show: true,
|
1058
|
-
sortable: true
|
1164
|
+
sortable: true,
|
1059
1165
|
};
|
1060
|
-
this.optionModel.tableColumns.push(e)
|
1166
|
+
this.optionModel.tableColumns.push(e);
|
1061
1167
|
},
|
1062
1168
|
openTableConfigDialog() {
|
1063
|
-
this.eventHeader = `${this.optionModel.name}.${eventName}(${eventParams.join(
|
1064
|
-
|
1169
|
+
this.eventHeader = `${this.optionModel.name}.${eventName}(${eventParams.join(
|
1170
|
+
", "
|
1171
|
+
)}) {`;
|
1172
|
+
this.eventHandlerCode = selectedWidget.options[eventName] || "";
|
1065
1173
|
this.showTableConfigDialog = true;
|
1066
1174
|
},
|
1067
1175
|
downloadExcel() {
|
1068
|
-
let defaultUrl =
|
1176
|
+
let defaultUrl =
|
1177
|
+
"http://file.sc.5mall.com/download/repo1/b/mk1/2024/12/13/b2aea548-a9a8-4dca-bba7-8d9c6134ebe3.xlsx";
|
1069
1178
|
let xformImportTemplateFile = setttingConfig.xformImportTemplateFile || defaultUrl;
|
1070
1179
|
if (!xformImportTemplateFile) return;
|
1071
1180
|
this.$commonFileUtil.downloadFile(xformImportTemplateFile, "通用导入模板.xlsx");
|
1072
1181
|
},
|
1073
1182
|
addGridPageSizeList() {
|
1074
1183
|
if (this.optionModel.gridPageSizeList === undefined) {
|
1075
|
-
this.$set(this.optionModel, "gridPageSizeList", [])
|
1184
|
+
this.$set(this.optionModel, "gridPageSizeList", []);
|
1076
1185
|
}
|
1077
|
-
this.optionModel.gridPageSizeList.push({value: 50})
|
1078
|
-
}
|
1079
|
-
}
|
1186
|
+
this.optionModel.gridPageSizeList.push({ value: 50 });
|
1187
|
+
},
|
1188
|
+
},
|
1080
1189
|
};
|
1081
1190
|
</script>
|
1082
1191
|
|
1083
1192
|
<style>
|
1084
1193
|
.icon-drag:before {
|
1085
|
-
content:
|
1194
|
+
content: "\e61d";
|
1086
1195
|
}
|
1087
1196
|
</style>
|