cloud-web-corejs 1.0.54-dev.653 → 1.0.54-dev.655
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/date-range-widget.vue +6 -5
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +6 -2
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin.js +59 -0
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +6 -2
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -1
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +2 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +14 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +221 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/utcTransformEnabled-editor.vue +19 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +5 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +95 -25
- package/src/components/xform/form-render/container-item/list-h5-item.vue +72 -28
package/package.json
CHANGED
|
@@ -25,11 +25,12 @@ import FormItemWrapper from './form-item-wrapper'
|
|
|
25
25
|
import emitter from '../../../../../components/xform/utils/emitter'
|
|
26
26
|
import i18n from "../../../../../components/xform/utils/i18n";
|
|
27
27
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
28
|
+
import utcTransformMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin";
|
|
28
29
|
|
|
29
30
|
export default {
|
|
30
31
|
name: "date-range-widget",
|
|
31
32
|
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
32
|
-
mixins: [emitter, fieldMixin, i18n],
|
|
33
|
+
mixins: [emitter, fieldMixin, i18n, utcTransformMixin],
|
|
33
34
|
props: {
|
|
34
35
|
field: Object,
|
|
35
36
|
parentWidget: Object,
|
|
@@ -69,11 +70,11 @@ export default {
|
|
|
69
70
|
},
|
|
70
71
|
computed: {
|
|
71
72
|
contentForReadMode() {
|
|
72
|
-
if (!this.fieldModel) {
|
|
73
|
-
return ''
|
|
74
|
-
} else {
|
|
75
|
-
return this.fieldModel[0] + ' - ' + this.fieldModel[1]
|
|
73
|
+
if (!this.fieldModel || !this.fieldModel.length) {
|
|
74
|
+
return '';
|
|
76
75
|
}
|
|
76
|
+
const values = this.transformUtcToLocalValue(this.fieldModel);
|
|
77
|
+
return values[0] + ' - ' + values[1];
|
|
77
78
|
},
|
|
78
79
|
},
|
|
79
80
|
beforeCreate() {
|
|
@@ -26,11 +26,12 @@ import emitter from '../../../../../components/xform/utils/emitter'
|
|
|
26
26
|
import i18n from "../../../../../components/xform/utils/i18n";
|
|
27
27
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
28
28
|
import dateLimitMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin";
|
|
29
|
+
import utcTransformMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin";
|
|
29
30
|
|
|
30
31
|
export default {
|
|
31
32
|
name: "date-widget",
|
|
32
33
|
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
33
|
-
mixins: [emitter, fieldMixin, i18n, dateLimitMixin],
|
|
34
|
+
mixins: [emitter, fieldMixin, i18n, dateLimitMixin, utcTransformMixin],
|
|
34
35
|
props: {
|
|
35
36
|
field: Object,
|
|
36
37
|
parentWidget: Object,
|
|
@@ -71,7 +72,10 @@ export default {
|
|
|
71
72
|
},
|
|
72
73
|
computed: {
|
|
73
74
|
contentForReadMode() {
|
|
74
|
-
|
|
75
|
+
if (!this.fieldModel) {
|
|
76
|
+
return '';
|
|
77
|
+
}
|
|
78
|
+
return this.transformUtcToLocalValue(this.fieldModel);
|
|
75
79
|
},
|
|
76
80
|
},
|
|
77
81
|
watch: {
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const DATE_FORMAT_TYPES = ["d1", "d2", "d3", "d4", "d5"];
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
methods: {
|
|
5
|
+
isUtcTransformEnabled() {
|
|
6
|
+
return !!this.field?.options?.utcTransformEnabled;
|
|
7
|
+
},
|
|
8
|
+
transformUtcToLocalValue(value) {
|
|
9
|
+
if (value == null || value === "" || !this.isUtcTransformEnabled()) {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
if (Array.isArray(value)) {
|
|
13
|
+
return value.map((item) => this.transformUtcToLocalSingle(item));
|
|
14
|
+
}
|
|
15
|
+
return this.transformUtcToLocalSingle(value);
|
|
16
|
+
},
|
|
17
|
+
transformUtcToLocalSingle(value) {
|
|
18
|
+
if (value == null || value === "") {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
const localValue = this.$utcToLocal(value);
|
|
22
|
+
if (!localValue) {
|
|
23
|
+
return localValue;
|
|
24
|
+
}
|
|
25
|
+
const widgetType = this.field?.type;
|
|
26
|
+
const options = this.field?.options || {};
|
|
27
|
+
if (widgetType === "time") {
|
|
28
|
+
const parts = String(localValue).split(" ");
|
|
29
|
+
return parts.length > 1 ? parts[1] : localValue;
|
|
30
|
+
}
|
|
31
|
+
if (widgetType === "time-range") {
|
|
32
|
+
return localValue;
|
|
33
|
+
}
|
|
34
|
+
const dateType = options.type;
|
|
35
|
+
const valueFormat = options.valueFormat || "";
|
|
36
|
+
if (widgetType === "date" || widgetType === "date-range") {
|
|
37
|
+
if (
|
|
38
|
+
dateType === "datetime" ||
|
|
39
|
+
(valueFormat && /[HhmSs]/.test(valueFormat))
|
|
40
|
+
) {
|
|
41
|
+
return localValue;
|
|
42
|
+
}
|
|
43
|
+
return String(localValue).split(" ")[0];
|
|
44
|
+
}
|
|
45
|
+
return localValue;
|
|
46
|
+
},
|
|
47
|
+
transformUtcForDateFormat(cellValue, formatType) {
|
|
48
|
+
if (
|
|
49
|
+
!cellValue ||
|
|
50
|
+
!this.field?.options?.utcTransformEnabled ||
|
|
51
|
+
!formatType ||
|
|
52
|
+
!DATE_FORMAT_TYPES.includes(formatType)
|
|
53
|
+
) {
|
|
54
|
+
return cellValue;
|
|
55
|
+
}
|
|
56
|
+
return this.$utcToLocal(cellValue);
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -20,12 +20,13 @@ import FormItemWrapper from "./form-item-wrapper";
|
|
|
20
20
|
import emitter from "../../../../../components/xform/utils/emitter";
|
|
21
21
|
import i18n from "../../../../../components/xform/utils/i18n";
|
|
22
22
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
23
|
+
import utcTransformMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin";
|
|
23
24
|
import * as formatUtil from "../../../../../components/xform/utils/format.js";
|
|
24
25
|
|
|
25
26
|
export default {
|
|
26
27
|
name: "text-widget",
|
|
27
28
|
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
28
|
-
mixins: [emitter, fieldMixin, i18n],
|
|
29
|
+
mixins: [emitter, fieldMixin, i18n, utcTransformMixin],
|
|
29
30
|
props: {
|
|
30
31
|
field: Object,
|
|
31
32
|
parentWidget: Object,
|
|
@@ -97,7 +98,10 @@ export default {
|
|
|
97
98
|
methods: {
|
|
98
99
|
formatterValue() {
|
|
99
100
|
let formatType = this.field.options.formatType;
|
|
100
|
-
let cellValue = this.
|
|
101
|
+
let cellValue = this.transformUtcForDateFormat(
|
|
102
|
+
this.fieldModel,
|
|
103
|
+
formatType
|
|
104
|
+
);
|
|
101
105
|
if (formatType === null || formatType === undefined) return cellValue;
|
|
102
106
|
if (formatType)
|
|
103
107
|
switch (formatType) {
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
import emitter from '../../../../../components/xform/utils/emitter'
|
|
21
21
|
import i18n from "../../../../../components/xform/utils/i18n";
|
|
22
22
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
23
|
+
import utcTransformMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin";
|
|
23
24
|
|
|
24
25
|
export default {
|
|
25
26
|
name: "time-range-widget",
|
|
26
27
|
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
27
|
-
mixins: [emitter, fieldMixin, i18n],
|
|
28
|
+
mixins: [emitter, fieldMixin, i18n, utcTransformMixin],
|
|
28
29
|
props: {
|
|
29
30
|
field: Object,
|
|
30
31
|
parentWidget: Object,
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
import emitter from '../../../../../components/xform/utils/emitter'
|
|
20
20
|
import i18n from "../../../../../components/xform/utils/i18n";
|
|
21
21
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
22
|
+
import utcTransformMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin";
|
|
22
23
|
|
|
23
24
|
export default {
|
|
24
25
|
name: "time-widget",
|
|
25
26
|
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
26
|
-
mixins: [emitter, fieldMixin, i18n],
|
|
27
|
+
mixins: [emitter, fieldMixin, i18n, utcTransformMixin],
|
|
27
28
|
props: {
|
|
28
29
|
field: Object,
|
|
29
30
|
parentWidget: Object,
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
</span>
|
|
313
313
|
</el-dialog>
|
|
314
314
|
<tableColumnDialog
|
|
315
|
-
v-if="
|
|
315
|
+
v-if="columnDialogMounted"
|
|
316
316
|
:visiable.sync="dialogVisible"
|
|
317
317
|
:designer="designer"
|
|
318
318
|
:selectedWidget="selectedWidget"
|
|
@@ -370,6 +370,7 @@ export default {
|
|
|
370
370
|
showTableConfigDialog: false,
|
|
371
371
|
tableConfigCode: null,
|
|
372
372
|
dialogVisible: !1,
|
|
373
|
+
columnDialogMounted: !1,
|
|
373
374
|
dataDialogVisible: !1,
|
|
374
375
|
showButtonsEditDialog: !1,
|
|
375
376
|
oldButtonName: "",
|
|
@@ -594,8 +595,14 @@ export default {
|
|
|
594
595
|
this.$set(this.optionModel, "tableConfig", "");
|
|
595
596
|
},
|
|
596
597
|
mounted: function () {
|
|
597
|
-
|
|
598
|
-
|
|
598
|
+
const preloadColumnDialog = () => {
|
|
599
|
+
this.columnDialogMounted = true;
|
|
600
|
+
};
|
|
601
|
+
if (typeof requestIdleCallback === "function") {
|
|
602
|
+
requestIdleCallback(preloadColumnDialog, { timeout: 200 });
|
|
603
|
+
} else {
|
|
604
|
+
this.$nextTick(preloadColumnDialog);
|
|
605
|
+
}
|
|
599
606
|
},
|
|
600
607
|
methods: {
|
|
601
608
|
dragSort: function () {
|
|
@@ -636,11 +643,10 @@ export default {
|
|
|
636
643
|
}
|
|
637
644
|
},
|
|
638
645
|
openSetting: function () {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
});*/
|
|
646
|
+
if (!this.columnDialogMounted) {
|
|
647
|
+
this.columnDialogMounted = true;
|
|
648
|
+
}
|
|
649
|
+
this.dialogVisible = true;
|
|
644
650
|
},
|
|
645
651
|
colSubmit: function () {
|
|
646
652
|
this.dialogVisible = !1;
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-dialog
|
|
3
|
-
custom-class="dialog-style list-dialog"
|
|
3
|
+
custom-class="dialog-style list-dialog table-column-config-dialog"
|
|
4
4
|
:title="i18nt('designer.setting.tableColEdit')"
|
|
5
5
|
:visible.sync="showDialog"
|
|
6
6
|
:modal="false"
|
|
7
7
|
:show-close="!0"
|
|
8
8
|
:close-on-click-modal="!1"
|
|
9
9
|
:close-on-press-escape="!1"
|
|
10
|
-
:destroy-on-close="
|
|
10
|
+
:destroy-on-close="false"
|
|
11
11
|
top="5vh"
|
|
12
12
|
width="1220px"
|
|
13
13
|
v-dialog-drag
|
|
14
14
|
:before-close="closeHandle"
|
|
15
15
|
>
|
|
16
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
class="cont table-column-dialog-cont"
|
|
18
|
+
v-loading="!tableReady"
|
|
19
|
+
element-loading-background="rgba(0, 0, 0, 0)"
|
|
20
|
+
element-loading-text="数据正在加载中"
|
|
21
|
+
element-loading-spinner="el-icon-loading"
|
|
22
|
+
>
|
|
17
23
|
<el-table
|
|
24
|
+
v-if="tableReady"
|
|
18
25
|
ref="singleTable"
|
|
19
26
|
width="100%"
|
|
20
27
|
:data="tableData"
|
|
@@ -23,11 +30,7 @@
|
|
|
23
30
|
row-key="columnId"
|
|
24
31
|
stripe=""
|
|
25
32
|
:tree-props="{ children: 'children' }"
|
|
26
|
-
default-expand-all
|
|
27
|
-
v-loading="pictLoading"
|
|
28
|
-
element-loading-background="rgba(0, 0, 0, 0)"
|
|
29
|
-
element-loading-text="数据正在加载中"
|
|
30
|
-
element-loading-spinner="el-icon-loading"
|
|
33
|
+
:default-expand-all="shouldExpandAllTable"
|
|
31
34
|
>
|
|
32
35
|
<el-table-column label="" width="80" fixed="left">
|
|
33
36
|
<template #default="scope">
|
|
@@ -175,6 +178,14 @@
|
|
|
175
178
|
<el-switch v-model="scope.row.filterable"></el-switch>
|
|
176
179
|
</template>
|
|
177
180
|
</el-table-column>
|
|
181
|
+
<el-table-column label="UTC时差" width="90" align="center">
|
|
182
|
+
<template #default="scope">
|
|
183
|
+
<el-switch
|
|
184
|
+
v-if="isUtcTransformColumn(scope.row)"
|
|
185
|
+
v-model="scope.row.utcTransformEnabled"
|
|
186
|
+
></el-switch>
|
|
187
|
+
</template>
|
|
188
|
+
</el-table-column>
|
|
178
189
|
<el-table-column
|
|
179
190
|
label="编辑更多属性"
|
|
180
191
|
width="100"
|
|
@@ -424,7 +435,7 @@
|
|
|
424
435
|
</el-dialog>
|
|
425
436
|
|
|
426
437
|
<el-dialog
|
|
427
|
-
custom-class="dialog-style list-dialog"
|
|
438
|
+
custom-class="dialog-style list-dialog table-column-row-edit-dialog"
|
|
428
439
|
:title="i18nt('designer.setting.tableColEdit')"
|
|
429
440
|
:visible.sync="showRowEditDialog"
|
|
430
441
|
v-if="showRowEditDialog"
|
|
@@ -433,11 +444,13 @@
|
|
|
433
444
|
:close-on-click-modal="!1"
|
|
434
445
|
:close-on-press-escape="!1"
|
|
435
446
|
:destroy-on-close="!0"
|
|
447
|
+
:append-to-body="true"
|
|
448
|
+
:modal-append-to-body="true"
|
|
436
449
|
top="5vh"
|
|
437
|
-
width="
|
|
450
|
+
width="480px"
|
|
438
451
|
v-dialog-drag
|
|
439
452
|
>
|
|
440
|
-
<div class="cont">
|
|
453
|
+
<div class="cont table-column-row-edit-cont">
|
|
441
454
|
<el-form :model="rowData" class="form-m2" label-position="top">
|
|
442
455
|
<el-form-item :label="i18nt('designer.setting.columnLabel')">
|
|
443
456
|
<el-input
|
|
@@ -512,6 +525,12 @@
|
|
|
512
525
|
@click="showRenderDialog(rowData)"
|
|
513
526
|
></el-button>
|
|
514
527
|
</el-form-item>
|
|
528
|
+
<el-form-item
|
|
529
|
+
v-if="isUtcTransformColumn(rowData)"
|
|
530
|
+
label="UTC时差转换"
|
|
531
|
+
>
|
|
532
|
+
<el-switch v-model="rowData.utcTransformEnabled"></el-switch>
|
|
533
|
+
</el-form-item>
|
|
515
534
|
<el-form-item :label="i18nt('designer.setting.visibleColumn')">
|
|
516
535
|
<el-switch v-model="rowData.show"></el-switch>
|
|
517
536
|
</el-form-item>
|
|
@@ -656,18 +675,20 @@ export default {
|
|
|
656
675
|
designer: Object,
|
|
657
676
|
selectedWidget: Object,
|
|
658
677
|
optionModel: Object,
|
|
678
|
+
visiable: {
|
|
679
|
+
type: Boolean,
|
|
680
|
+
default: false,
|
|
681
|
+
},
|
|
659
682
|
},
|
|
660
683
|
components: { columnRenderDialog, editTreeButtonGroupConfigDialog },
|
|
661
684
|
inject: ["openWidgetPropertyDialog"],
|
|
662
685
|
data() {
|
|
663
686
|
return {
|
|
664
|
-
|
|
687
|
+
tableReady: false,
|
|
665
688
|
tableColumnConfigTitle: null,
|
|
666
689
|
showTableColumnConfigDialog: false,
|
|
667
690
|
tableColumnConfigHeader: null,
|
|
668
691
|
tableColumnConfigCode: null,
|
|
669
|
-
showDialog: true,
|
|
670
|
-
dialogVisible: true,
|
|
671
692
|
showEditTreeButtonGroupConfigDialog: false,
|
|
672
693
|
currentEditTreeButtonGroupRow: null,
|
|
673
694
|
editTreeButtonGroupRowData: null,
|
|
@@ -921,11 +942,84 @@ export default {
|
|
|
921
942
|
beforeDestroy() {
|
|
922
943
|
if (this.dragSort) this.dragSort.destroy();
|
|
923
944
|
},
|
|
945
|
+
computed: {
|
|
946
|
+
showDialog: {
|
|
947
|
+
get() {
|
|
948
|
+
return this.visiable;
|
|
949
|
+
},
|
|
950
|
+
set(val) {
|
|
951
|
+
this.$emit("update:visiable", val);
|
|
952
|
+
},
|
|
953
|
+
},
|
|
954
|
+
shouldExpandAllTable() {
|
|
955
|
+
return this.countTreeRows(this.tableData) <= 30;
|
|
956
|
+
},
|
|
957
|
+
},
|
|
958
|
+
watch: {
|
|
959
|
+
visiable(val) {
|
|
960
|
+
if (val) {
|
|
961
|
+
this.onDialogOpen();
|
|
962
|
+
} else {
|
|
963
|
+
this.onDialogClose();
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
},
|
|
924
967
|
created() {},
|
|
925
968
|
mounted() {
|
|
926
|
-
this.
|
|
969
|
+
if (this.visiable) {
|
|
970
|
+
this.onDialogOpen();
|
|
971
|
+
}
|
|
927
972
|
},
|
|
928
973
|
methods: {
|
|
974
|
+
countTreeRows(rows) {
|
|
975
|
+
if (!Array.isArray(rows) || !rows.length) {
|
|
976
|
+
return 0;
|
|
977
|
+
}
|
|
978
|
+
let count = 0;
|
|
979
|
+
const walk = (list) => {
|
|
980
|
+
list.forEach((item) => {
|
|
981
|
+
count += 1;
|
|
982
|
+
if (item.children && item.children.length) {
|
|
983
|
+
walk(item.children);
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
};
|
|
987
|
+
walk(rows);
|
|
988
|
+
return count;
|
|
989
|
+
},
|
|
990
|
+
cloneTableColumnsForEdit(columns) {
|
|
991
|
+
if (!Array.isArray(columns)) {
|
|
992
|
+
return [];
|
|
993
|
+
}
|
|
994
|
+
const skipKeys = ["widget", "editWidget"];
|
|
995
|
+
const cloneRow = (row) => {
|
|
996
|
+
if (!row || typeof row !== "object") {
|
|
997
|
+
return row;
|
|
998
|
+
}
|
|
999
|
+
const cloned = {};
|
|
1000
|
+
Object.keys(row).forEach((key) => {
|
|
1001
|
+
if (skipKeys.includes(key)) {
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
const val = row[key];
|
|
1005
|
+
if (key === "children" && Array.isArray(val) && val.length) {
|
|
1006
|
+
cloned.children = val.map(cloneRow);
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
if (val !== null && typeof val === "object") {
|
|
1010
|
+
try {
|
|
1011
|
+
cloned[key] = deepClone(val);
|
|
1012
|
+
} catch (e) {
|
|
1013
|
+
cloned[key] = val;
|
|
1014
|
+
}
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
cloned[key] = val;
|
|
1018
|
+
});
|
|
1019
|
+
return cloned;
|
|
1020
|
+
};
|
|
1021
|
+
return columns.map(cloneRow);
|
|
1022
|
+
},
|
|
929
1023
|
editFormEventHandler(row, index, eventName) {
|
|
930
1024
|
this.curEventRow = row;
|
|
931
1025
|
this.curEventName = eventName;
|
|
@@ -954,22 +1048,43 @@ export default {
|
|
|
954
1048
|
this.curEventRow[this.curEventName] = this.formEventHandlerCode;
|
|
955
1049
|
this.showFormEventDialogFlag = false;
|
|
956
1050
|
},
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1051
|
+
onDialogClose() {
|
|
1052
|
+
this.tableReady = false;
|
|
1053
|
+
if (this.dragSort) {
|
|
1054
|
+
this.dragSort.destroy();
|
|
1055
|
+
this.dragSort = null;
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
onDialogOpen() {
|
|
1059
|
+
this.tableReady = false;
|
|
1060
|
+
if (this.dragSort) {
|
|
1061
|
+
this.dragSort.destroy();
|
|
1062
|
+
this.dragSort = null;
|
|
1063
|
+
}
|
|
1064
|
+
this.$nextTick(() => {
|
|
1065
|
+
const load = () => {
|
|
1066
|
+
this.loadTableData();
|
|
1067
|
+
this.tableReady = true;
|
|
1068
|
+
this.$nextTick(() => {
|
|
1069
|
+
requestAnimationFrame(() => {
|
|
1070
|
+
this.rowDrop();
|
|
1071
|
+
});
|
|
1072
|
+
});
|
|
1073
|
+
};
|
|
1074
|
+
if (typeof requestIdleCallback === "function") {
|
|
1075
|
+
requestIdleCallback(load, { timeout: 80 });
|
|
1076
|
+
} else {
|
|
1077
|
+
setTimeout(load, 0);
|
|
1078
|
+
}
|
|
1079
|
+
});
|
|
1080
|
+
},
|
|
1081
|
+
loadTableData() {
|
|
1082
|
+
const source = this.optionModel.tableColumns || [];
|
|
1083
|
+
try {
|
|
1084
|
+
this.tableData = this.cloneTableColumnsForEdit(source);
|
|
1085
|
+
} catch (e) {
|
|
1086
|
+
this.tableData = this.$baseLodash.cloneDeep(source);
|
|
1087
|
+
}
|
|
973
1088
|
},
|
|
974
1089
|
colSubmit() {
|
|
975
1090
|
this.dialogVisible = !1;
|
|
@@ -1101,10 +1216,27 @@ export default {
|
|
|
1101
1216
|
rowEditAuthName: this.createRowAuthName("Edit"),
|
|
1102
1217
|
rowAddShow: null,
|
|
1103
1218
|
rowEditShow: null,
|
|
1219
|
+
utcTransformEnabled: false,
|
|
1104
1220
|
// treeNode: false,
|
|
1105
1221
|
};
|
|
1106
1222
|
return row;
|
|
1107
1223
|
},
|
|
1224
|
+
isUtcTransformColumn(row) {
|
|
1225
|
+
const formatS = row.formatS;
|
|
1226
|
+
if (!formatS) {
|
|
1227
|
+
return true;
|
|
1228
|
+
}
|
|
1229
|
+
return [
|
|
1230
|
+
"d1",
|
|
1231
|
+
"d2",
|
|
1232
|
+
"d3",
|
|
1233
|
+
"d4",
|
|
1234
|
+
"d5",
|
|
1235
|
+
"render",
|
|
1236
|
+
"create_date",
|
|
1237
|
+
"modify_date",
|
|
1238
|
+
].includes(formatS);
|
|
1239
|
+
},
|
|
1108
1240
|
// 添加根节点
|
|
1109
1241
|
onAddRoot() {
|
|
1110
1242
|
this.tableData.push(this.generateRow());
|
|
@@ -1311,6 +1443,7 @@ export default {
|
|
|
1311
1443
|
row.columnOption = {};
|
|
1312
1444
|
row.widget = null;
|
|
1313
1445
|
}
|
|
1446
|
+
row.utcTransformEnabled = false;
|
|
1314
1447
|
} else {
|
|
1315
1448
|
if (row.prop && row.prop.startsWith(attachmentPrefix)) {
|
|
1316
1449
|
let suffix = row.prop.replace(attachmentPrefix, "");
|
|
@@ -1561,16 +1694,22 @@ export default {
|
|
|
1561
1694
|
return;
|
|
1562
1695
|
}
|
|
1563
1696
|
|
|
1564
|
-
|
|
1697
|
+
const { columnSelectedWidget, columnEditFields } =
|
|
1698
|
+
this.getColumnWidgetConfig(row);
|
|
1699
|
+
if (!columnSelectedWidget) {
|
|
1700
|
+
this.$message.warning(this.$t1("请先选择列格式化类型"));
|
|
1701
|
+
return;
|
|
1702
|
+
}
|
|
1703
|
+
columnSelectedWidget.options = this.$baseLodash.cloneDeep(
|
|
1704
|
+
columnSelectedWidget.options
|
|
1705
|
+
);
|
|
1565
1706
|
this.operateIndex = index;
|
|
1566
|
-
|
|
1567
|
-
let tableColumns = this.tableData;
|
|
1568
1707
|
this.openWidgetPropertyDialog({
|
|
1569
1708
|
row: row,
|
|
1570
|
-
columnSelectedWidget
|
|
1571
|
-
tableColumns,
|
|
1709
|
+
columnSelectedWidget,
|
|
1710
|
+
tableColumns: this.tableData,
|
|
1572
1711
|
index: index,
|
|
1573
|
-
|
|
1712
|
+
columnEditFields,
|
|
1574
1713
|
callback: (columnOption) => {
|
|
1575
1714
|
this.confirmFormatConfigDialog(columnOption, row);
|
|
1576
1715
|
},
|
|
@@ -1602,16 +1741,22 @@ export default {
|
|
|
1602
1741
|
}
|
|
1603
1742
|
},
|
|
1604
1743
|
openEditFormatConfigDialog(row, index) {
|
|
1605
|
-
|
|
1744
|
+
const { columnSelectedWidget, columnEditFields } =
|
|
1745
|
+
this.getColumnWidgetConfig(row, false, true);
|
|
1746
|
+
if (!columnSelectedWidget) {
|
|
1747
|
+
this.$message.warning(this.$t1("请先选择编辑列格式化类型"));
|
|
1748
|
+
return;
|
|
1749
|
+
}
|
|
1750
|
+
columnSelectedWidget.options = this.$baseLodash.cloneDeep(
|
|
1751
|
+
columnSelectedWidget.options
|
|
1752
|
+
);
|
|
1606
1753
|
this.operateIndex = index;
|
|
1607
|
-
|
|
1608
|
-
let tableColumns = this.tableData;
|
|
1609
1754
|
this.openWidgetPropertyDialog({
|
|
1610
1755
|
row: row,
|
|
1611
|
-
tableColumns,
|
|
1612
|
-
columnSelectedWidget
|
|
1756
|
+
tableColumns: this.tableData,
|
|
1757
|
+
columnSelectedWidget,
|
|
1613
1758
|
index: index,
|
|
1614
|
-
|
|
1759
|
+
columnEditFields,
|
|
1615
1760
|
callback: (columnOption) => {
|
|
1616
1761
|
this.confirmEditFormatConfigDialog(columnOption, row);
|
|
1617
1762
|
},
|
|
@@ -1744,4 +1889,37 @@ export default {
|
|
|
1744
1889
|
.icon-drag:before {
|
|
1745
1890
|
content: "\e61d";
|
|
1746
1891
|
}
|
|
1892
|
+
|
|
1893
|
+
/* 固定弹框内容区高度,避免加载前后抖动 */
|
|
1894
|
+
::v-deep .table-column-config-dialog.el-dialog {
|
|
1895
|
+
.el-dialog__body {
|
|
1896
|
+
height: 532px;
|
|
1897
|
+
max-height: 532px;
|
|
1898
|
+
overflow: hidden;
|
|
1899
|
+
box-sizing: border-box;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
.table-column-dialog-cont {
|
|
1904
|
+
height: 516px;
|
|
1905
|
+
min-height: 516px;
|
|
1906
|
+
max-height: 516px;
|
|
1907
|
+
overflow: hidden;
|
|
1908
|
+
box-sizing: border-box;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/* 完整列配置弹框:挂到 body,内容区可滚动 */
|
|
1912
|
+
::v-deep .table-column-row-edit-dialog.el-dialog {
|
|
1913
|
+
.el-dialog__body {
|
|
1914
|
+
max-height: calc(90vh - 130px);
|
|
1915
|
+
overflow-y: auto;
|
|
1916
|
+
overflow-x: hidden;
|
|
1917
|
+
box-sizing: border-box;
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
.table-column-row-edit-cont {
|
|
1922
|
+
padding-bottom: 8px;
|
|
1923
|
+
box-sizing: border-box;
|
|
1924
|
+
}
|
|
1747
1925
|
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item label="UTC时差转换">
|
|
3
|
+
<el-switch v-model="optionModel.utcTransformEnabled"></el-switch>
|
|
4
|
+
</el-form-item>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: "utcTransformEnabled-editor",
|
|
12
|
+
mixins: [i18n],
|
|
13
|
+
props: {
|
|
14
|
+
designer: Object,
|
|
15
|
+
selectedWidget: Object,
|
|
16
|
+
optionModel: Object,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
@@ -44,6 +44,7 @@ const COMMON_PROPERTIES = {
|
|
|
44
44
|
format: "format-editor",
|
|
45
45
|
valueFormat: "valueFormat-editor",
|
|
46
46
|
dateLimit: "dateLimit-editor",
|
|
47
|
+
utcTransformEnabled: "utcTransformEnabled-editor",
|
|
47
48
|
defaultTime: "defaultTime-editor",
|
|
48
49
|
filterable: "filterable-editor",
|
|
49
50
|
allowCreate: "allowCreate-editor",
|
|
@@ -1417,6 +1417,7 @@ export const basicFields = [
|
|
|
1417
1417
|
clearable: !0,
|
|
1418
1418
|
editable: !1,
|
|
1419
1419
|
format: "HH:mm:ss",
|
|
1420
|
+
utcTransformEnabled: !1,
|
|
1420
1421
|
required: !1,
|
|
1421
1422
|
requiredHint: "",
|
|
1422
1423
|
validation: "",
|
|
@@ -1470,6 +1471,7 @@ export const basicFields = [
|
|
|
1470
1471
|
clearable: !0,
|
|
1471
1472
|
editable: !1,
|
|
1472
1473
|
format: "HH:mm:ss",
|
|
1474
|
+
utcTransformEnabled: !1,
|
|
1473
1475
|
required: !1,
|
|
1474
1476
|
requiredHint: "",
|
|
1475
1477
|
validation: "",
|
|
@@ -1528,6 +1530,7 @@ export const basicFields = [
|
|
|
1528
1530
|
limitEndField: null,
|
|
1529
1531
|
minDate: null,
|
|
1530
1532
|
maxDate: null,
|
|
1533
|
+
utcTransformEnabled: !1,
|
|
1531
1534
|
required: !1,
|
|
1532
1535
|
requiredHint: "",
|
|
1533
1536
|
validation: "",
|
|
@@ -1584,6 +1587,7 @@ export const basicFields = [
|
|
|
1584
1587
|
format: "yyyy-MM-dd",
|
|
1585
1588
|
valueFormat: "yyyy-MM-dd",
|
|
1586
1589
|
defaultTime: ["00:00:00", "23:59:59"],
|
|
1590
|
+
utcTransformEnabled: !1,
|
|
1587
1591
|
required: !1,
|
|
1588
1592
|
requiredHint: "",
|
|
1589
1593
|
validation: "",
|
|
@@ -1944,6 +1948,7 @@ export const basicFields = [
|
|
|
1944
1948
|
autoValueHanlde: null,
|
|
1945
1949
|
formatType: null,
|
|
1946
1950
|
renderHandle: null,
|
|
1951
|
+
utcTransformEnabled: !1,
|
|
1947
1952
|
|
|
1948
1953
|
showRuleFlag: 1,
|
|
1949
1954
|
showRuleEnabled: 1,
|
|
@@ -521,42 +521,89 @@ modules = {
|
|
|
521
521
|
selectWidget: function (e) {
|
|
522
522
|
this.designer.setSelected(e);
|
|
523
523
|
},
|
|
524
|
-
getFormatterValue(cellValue, formatS) {
|
|
524
|
+
getFormatterValue(cellValue, formatS, utcTransformEnabled) {
|
|
525
|
+
let value = cellValue;
|
|
526
|
+
if (utcTransformEnabled && value != null && value !== "") {
|
|
527
|
+
const dateFormats = [
|
|
528
|
+
"d1",
|
|
529
|
+
"d2",
|
|
530
|
+
"d3",
|
|
531
|
+
"d4",
|
|
532
|
+
"d5",
|
|
533
|
+
"render",
|
|
534
|
+
"create_date",
|
|
535
|
+
"modify_date",
|
|
536
|
+
];
|
|
537
|
+
if (!formatS || dateFormats.includes(formatS)) {
|
|
538
|
+
value = this.$utcToLocal(value);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
if (!formatS) {
|
|
542
|
+
return value;
|
|
543
|
+
}
|
|
525
544
|
switch (formatS) {
|
|
526
545
|
case "d1":
|
|
527
|
-
return baseRefUtil.formatUtil.formatDate1(
|
|
546
|
+
return baseRefUtil.formatUtil.formatDate1(value);
|
|
528
547
|
case "d2":
|
|
529
|
-
return baseRefUtil.formatUtil.formatDate2(
|
|
548
|
+
return baseRefUtil.formatUtil.formatDate2(value);
|
|
530
549
|
case "d3":
|
|
531
|
-
return baseRefUtil.formatUtil.formatDate3(
|
|
550
|
+
return baseRefUtil.formatUtil.formatDate3(value);
|
|
532
551
|
case "d4":
|
|
533
|
-
return baseRefUtil.formatUtil.formatDate4(
|
|
552
|
+
return baseRefUtil.formatUtil.formatDate4(value);
|
|
534
553
|
case "d5":
|
|
535
|
-
return baseRefUtil.formatUtil.formatDate4(
|
|
554
|
+
return baseRefUtil.formatUtil.formatDate4(value);
|
|
536
555
|
case "n1":
|
|
537
|
-
return baseRefUtil.formatUtil.formatNumber1(
|
|
556
|
+
return baseRefUtil.formatUtil.formatNumber1(value);
|
|
538
557
|
case "n2":
|
|
539
|
-
return baseRefUtil.formatUtil.formatNumber2(
|
|
558
|
+
return baseRefUtil.formatUtil.formatNumber2(value);
|
|
540
559
|
case "n3":
|
|
541
|
-
return baseRefUtil.formatUtil.formatNumber3(
|
|
560
|
+
return baseRefUtil.formatUtil.formatNumber3(value);
|
|
542
561
|
case "n4":
|
|
543
|
-
return baseRefUtil.formatUtil.formatNumber4(
|
|
562
|
+
return baseRefUtil.formatUtil.formatNumber4(value);
|
|
544
563
|
case "n5":
|
|
545
|
-
return baseRefUtil.formatUtil.formatNumber5(
|
|
564
|
+
return baseRefUtil.formatUtil.formatNumber5(value);
|
|
546
565
|
case "n6":
|
|
547
|
-
return baseRefUtil.formatUtil.formatNumber6(
|
|
566
|
+
return baseRefUtil.formatUtil.formatNumber6(value);
|
|
548
567
|
case "n7":
|
|
549
|
-
return baseRefUtil.formatUtil.formatNumber7(
|
|
568
|
+
return baseRefUtil.formatUtil.formatNumber7(value);
|
|
550
569
|
}
|
|
551
|
-
return
|
|
570
|
+
return value;
|
|
571
|
+
},
|
|
572
|
+
isColumnLevelUtcFormat(formatS) {
|
|
573
|
+
if (!formatS) {
|
|
574
|
+
return true;
|
|
575
|
+
}
|
|
576
|
+
return [
|
|
577
|
+
"d1",
|
|
578
|
+
"d2",
|
|
579
|
+
"d3",
|
|
580
|
+
"d4",
|
|
581
|
+
"d5",
|
|
582
|
+
"render",
|
|
583
|
+
"create_date",
|
|
584
|
+
"modify_date",
|
|
585
|
+
].includes(formatS);
|
|
586
|
+
},
|
|
587
|
+
getColumnUtcTransformEnabled(column) {
|
|
588
|
+
const formatS = column.params?.formatS;
|
|
589
|
+
if (!this.isColumnLevelUtcFormat(formatS)) {
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
return !!(
|
|
593
|
+
column.params.utcTransformEnabled ||
|
|
594
|
+
column.params.columnConfig?.utcTransformEnabled
|
|
595
|
+
);
|
|
552
596
|
},
|
|
553
597
|
formatterValue: function ({ cellValue, row, column }) {
|
|
554
598
|
if (cellValue === null || cellValue === undefined) return cellValue;
|
|
599
|
+
if (!column.params) return cellValue;
|
|
555
600
|
|
|
556
|
-
|
|
557
|
-
|
|
601
|
+
const formatS = column.params.formatS || null;
|
|
602
|
+
const utcTransformEnabled = this.getColumnUtcTransformEnabled(column);
|
|
603
|
+
if (!formatS && !utcTransformEnabled) {
|
|
604
|
+
return cellValue;
|
|
558
605
|
}
|
|
559
|
-
return cellValue;
|
|
606
|
+
return this.getFormatterValue(cellValue, formatS, utcTransformEnabled);
|
|
560
607
|
},
|
|
561
608
|
getRowIndex: function (e) {
|
|
562
609
|
return this.widget.options.tableData.lastIndexOf(e);
|
|
@@ -695,6 +742,10 @@ modules = {
|
|
|
695
742
|
footerMethodConfg: t.footerMethodConfg,
|
|
696
743
|
widgetList: t.widgetList,
|
|
697
744
|
tableWidgetName,
|
|
745
|
+
utcTransformEnabled: this.isColumnLevelUtcFormat(t.formatS)
|
|
746
|
+
? t.utcTransformEnabled
|
|
747
|
+
: false,
|
|
748
|
+
columnConfig: t,
|
|
698
749
|
},
|
|
699
750
|
visible: t.show,
|
|
700
751
|
slots: {},
|
|
@@ -786,6 +837,11 @@ modules = {
|
|
|
786
837
|
required: t.required || false,
|
|
787
838
|
columnConfig: t,
|
|
788
839
|
editWidget,
|
|
840
|
+
utcTransformEnabled: widget || editWidget
|
|
841
|
+
? !!columnOption.utcTransformEnabled
|
|
842
|
+
: this.isColumnLevelUtcFormat(t.formatS)
|
|
843
|
+
? !!t.utcTransformEnabled
|
|
844
|
+
: false,
|
|
789
845
|
};
|
|
790
846
|
|
|
791
847
|
Object.assign(col.params, params);
|
|
@@ -845,22 +901,32 @@ modules = {
|
|
|
845
901
|
}
|
|
846
902
|
return result;
|
|
847
903
|
} else if ("date" === widgetType) {
|
|
904
|
+
let displayVal = value;
|
|
905
|
+
if (
|
|
906
|
+
fieldWidget.options.utcTransformEnabled &&
|
|
907
|
+
displayVal != null &&
|
|
908
|
+
displayVal !== ""
|
|
909
|
+
) {
|
|
910
|
+
displayVal = this.$utcToLocal(displayVal);
|
|
911
|
+
}
|
|
848
912
|
let dateType = fieldWidget.options.type;
|
|
849
913
|
if (["date", "week"].includes(dateType)) {
|
|
850
|
-
return
|
|
914
|
+
return displayVal ? displayVal.substring(0, 10) : null;
|
|
851
915
|
} else if (dateType === "dates") {
|
|
852
|
-
if (
|
|
853
|
-
if (Array.isArray(
|
|
854
|
-
return
|
|
855
|
-
.map((item) =>
|
|
916
|
+
if (displayVal) {
|
|
917
|
+
if (Array.isArray(displayVal)) {
|
|
918
|
+
return displayVal
|
|
919
|
+
.map((item) =>
|
|
920
|
+
typeof item === "string" ? item.substring(0, 10) : item
|
|
921
|
+
)
|
|
856
922
|
.join(",");
|
|
857
923
|
} else {
|
|
858
|
-
return
|
|
924
|
+
return displayVal;
|
|
859
925
|
}
|
|
860
926
|
}
|
|
861
927
|
return null;
|
|
862
928
|
} else {
|
|
863
|
-
return
|
|
929
|
+
return displayVal;
|
|
864
930
|
}
|
|
865
931
|
}
|
|
866
932
|
} else {
|
|
@@ -1336,7 +1402,11 @@ modules = {
|
|
|
1336
1402
|
columnSlots = {
|
|
1337
1403
|
default: (params, h) => {
|
|
1338
1404
|
let cellValue = params.row[params.column.field];
|
|
1339
|
-
return this.getFormatterValue(
|
|
1405
|
+
return this.getFormatterValue(
|
|
1406
|
+
cellValue,
|
|
1407
|
+
item.formatS,
|
|
1408
|
+
item.utcTransformEnabled
|
|
1409
|
+
);
|
|
1340
1410
|
},
|
|
1341
1411
|
};
|
|
1342
1412
|
}
|
|
@@ -911,6 +911,21 @@ export default {
|
|
|
911
911
|
formatS: t.formatS,
|
|
912
912
|
required: t.required || false,
|
|
913
913
|
columnConfig: t,
|
|
914
|
+
utcTransformEnabled: widget
|
|
915
|
+
? !!columnOption.utcTransformEnabled
|
|
916
|
+
: !t.formatS ||
|
|
917
|
+
[
|
|
918
|
+
"d1",
|
|
919
|
+
"d2",
|
|
920
|
+
"d3",
|
|
921
|
+
"d4",
|
|
922
|
+
"d5",
|
|
923
|
+
"render",
|
|
924
|
+
"create_date",
|
|
925
|
+
"modify_date",
|
|
926
|
+
].includes(t.formatS)
|
|
927
|
+
? !!t.utcTransformEnabled
|
|
928
|
+
: false,
|
|
914
929
|
},
|
|
915
930
|
visible: t.show,
|
|
916
931
|
};
|
|
@@ -1022,35 +1037,64 @@ export default {
|
|
|
1022
1037
|
},
|
|
1023
1038
|
formatterValue: function ({ cellValue, row, column }) {
|
|
1024
1039
|
if (cellValue === null || cellValue === undefined) return cellValue;
|
|
1040
|
+
if (!column.params) return cellValue;
|
|
1025
1041
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1042
|
+
let value = cellValue;
|
|
1043
|
+
const formatS = column.params.formatS;
|
|
1044
|
+
const dateFormats = [
|
|
1045
|
+
"d1",
|
|
1046
|
+
"d2",
|
|
1047
|
+
"d3",
|
|
1048
|
+
"d4",
|
|
1049
|
+
"d5",
|
|
1050
|
+
"render",
|
|
1051
|
+
"create_date",
|
|
1052
|
+
"modify_date",
|
|
1053
|
+
];
|
|
1054
|
+
const isColumnLevelUtc =
|
|
1055
|
+
!formatS || dateFormats.includes(formatS);
|
|
1056
|
+
const utcTransformEnabled = isColumnLevelUtc
|
|
1057
|
+
? !!(
|
|
1058
|
+
column.params.utcTransformEnabled ||
|
|
1059
|
+
column.params.columnConfig?.utcTransformEnabled
|
|
1060
|
+
)
|
|
1061
|
+
: false;
|
|
1062
|
+
|
|
1063
|
+
if (utcTransformEnabled && value != null && value !== "") {
|
|
1064
|
+
value = this.$utcToLocal(value);
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
if (!formatS) {
|
|
1068
|
+
return value;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
switch (formatS) {
|
|
1072
|
+
case "d1":
|
|
1073
|
+
return baseRefUtil.formatUtil.formatDate1(value);
|
|
1074
|
+
case "d2":
|
|
1075
|
+
return baseRefUtil.formatUtil.formatDate2(value);
|
|
1076
|
+
case "d3":
|
|
1077
|
+
return baseRefUtil.formatUtil.formatDate3(value);
|
|
1078
|
+
case "d4":
|
|
1079
|
+
return baseRefUtil.formatUtil.formatDate4(value);
|
|
1080
|
+
case "d5":
|
|
1081
|
+
return baseRefUtil.formatUtil.formatDate4(value);
|
|
1082
|
+
case "n1":
|
|
1083
|
+
return baseRefUtil.formatUtil.formatNumber1(value);
|
|
1084
|
+
case "n2":
|
|
1085
|
+
return baseRefUtil.formatUtil.formatNumber2(value);
|
|
1086
|
+
case "n3":
|
|
1087
|
+
return baseRefUtil.formatUtil.formatNumber3(value);
|
|
1088
|
+
case "n4":
|
|
1089
|
+
return baseRefUtil.formatUtil.formatNumber4(value);
|
|
1090
|
+
case "n5":
|
|
1091
|
+
return baseRefUtil.formatUtil.formatNumber5(value);
|
|
1092
|
+
case "n6":
|
|
1093
|
+
return baseRefUtil.formatUtil.formatNumber6(value);
|
|
1094
|
+
case "n7":
|
|
1095
|
+
return baseRefUtil.formatUtil.formatNumber7(value);
|
|
1096
|
+
}
|
|
1097
|
+
return value;
|
|
1054
1098
|
},
|
|
1055
1099
|
searchEvent() {
|
|
1056
1100
|
// this.getGridTable().commitProxy('reload');
|