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