cloud-web-corejs 1.0.54-dev.654 → 1.0.54-dev.656
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/setting-panel/property-editor/container-data-table/table-column-dialog.vue +12 -2
- package/src/components/xform/form-render/container-item/data-table-mixin.js +25 -3
- package/src/components/xform/form-render/container-item/list-h5-item.vue +20 -2
package/package.json
CHANGED
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
<el-switch v-model="scope.row.filterable"></el-switch>
|
|
179
179
|
</template>
|
|
180
180
|
</el-table-column>
|
|
181
|
-
<el-table-column label="UTC
|
|
181
|
+
<el-table-column label="UTC时差转换" width="90" align="center">
|
|
182
182
|
<template #default="scope">
|
|
183
183
|
<el-switch
|
|
184
184
|
v-if="isUtcTransformColumn(scope.row)"
|
|
@@ -1226,7 +1226,16 @@ export default {
|
|
|
1226
1226
|
if (!formatS) {
|
|
1227
1227
|
return true;
|
|
1228
1228
|
}
|
|
1229
|
-
return [
|
|
1229
|
+
return [
|
|
1230
|
+
"d1",
|
|
1231
|
+
"d2",
|
|
1232
|
+
"d3",
|
|
1233
|
+
"d4",
|
|
1234
|
+
"d5",
|
|
1235
|
+
"render",
|
|
1236
|
+
"create_date",
|
|
1237
|
+
"modify_date",
|
|
1238
|
+
].includes(formatS);
|
|
1230
1239
|
},
|
|
1231
1240
|
// 添加根节点
|
|
1232
1241
|
onAddRoot() {
|
|
@@ -1434,6 +1443,7 @@ export default {
|
|
|
1434
1443
|
row.columnOption = {};
|
|
1435
1444
|
row.widget = null;
|
|
1436
1445
|
}
|
|
1446
|
+
row.utcTransformEnabled = false;
|
|
1437
1447
|
} else {
|
|
1438
1448
|
if (row.prop && row.prop.startsWith(attachmentPrefix)) {
|
|
1439
1449
|
let suffix = row.prop.replace(attachmentPrefix, "");
|
|
@@ -524,7 +524,16 @@ modules = {
|
|
|
524
524
|
getFormatterValue(cellValue, formatS, utcTransformEnabled) {
|
|
525
525
|
let value = cellValue;
|
|
526
526
|
if (utcTransformEnabled && value != null && value !== "") {
|
|
527
|
-
const dateFormats = [
|
|
527
|
+
const dateFormats = [
|
|
528
|
+
"d1",
|
|
529
|
+
"d2",
|
|
530
|
+
"d3",
|
|
531
|
+
"d4",
|
|
532
|
+
"d5",
|
|
533
|
+
"render",
|
|
534
|
+
"create_date",
|
|
535
|
+
"modify_date",
|
|
536
|
+
];
|
|
528
537
|
if (!formatS || dateFormats.includes(formatS)) {
|
|
529
538
|
value = this.$utcToLocal(value);
|
|
530
539
|
}
|
|
@@ -564,7 +573,16 @@ modules = {
|
|
|
564
573
|
if (!formatS) {
|
|
565
574
|
return true;
|
|
566
575
|
}
|
|
567
|
-
return [
|
|
576
|
+
return [
|
|
577
|
+
"d1",
|
|
578
|
+
"d2",
|
|
579
|
+
"d3",
|
|
580
|
+
"d4",
|
|
581
|
+
"d5",
|
|
582
|
+
"render",
|
|
583
|
+
"create_date",
|
|
584
|
+
"modify_date",
|
|
585
|
+
].includes(formatS);
|
|
568
586
|
},
|
|
569
587
|
getColumnUtcTransformEnabled(column) {
|
|
570
588
|
const formatS = column.params?.formatS;
|
|
@@ -921,7 +939,11 @@ modules = {
|
|
|
921
939
|
if (t.formatS === "render") {
|
|
922
940
|
let r = t.render ? new Function("params", "h", t.render) : null;
|
|
923
941
|
col.slots.default = (params, h) => {
|
|
924
|
-
|
|
942
|
+
let result = r ? r.call(this, params, h) : "";
|
|
943
|
+
if (this.getColumnUtcTransformEnabled(col)) {
|
|
944
|
+
result = this.$utcToLocal(result);
|
|
945
|
+
}
|
|
946
|
+
return result;
|
|
925
947
|
};
|
|
926
948
|
} else if (widget) {
|
|
927
949
|
// col.slots.default = columnSelectedWidget.id;
|
|
@@ -914,7 +914,16 @@ export default {
|
|
|
914
914
|
utcTransformEnabled: widget
|
|
915
915
|
? !!columnOption.utcTransformEnabled
|
|
916
916
|
: !t.formatS ||
|
|
917
|
-
[
|
|
917
|
+
[
|
|
918
|
+
"d1",
|
|
919
|
+
"d2",
|
|
920
|
+
"d3",
|
|
921
|
+
"d4",
|
|
922
|
+
"d5",
|
|
923
|
+
"render",
|
|
924
|
+
"create_date",
|
|
925
|
+
"modify_date",
|
|
926
|
+
].includes(t.formatS)
|
|
918
927
|
? !!t.utcTransformEnabled
|
|
919
928
|
: false,
|
|
920
929
|
},
|
|
@@ -1032,7 +1041,16 @@ export default {
|
|
|
1032
1041
|
|
|
1033
1042
|
let value = cellValue;
|
|
1034
1043
|
const formatS = column.params.formatS;
|
|
1035
|
-
const dateFormats = [
|
|
1044
|
+
const dateFormats = [
|
|
1045
|
+
"d1",
|
|
1046
|
+
"d2",
|
|
1047
|
+
"d3",
|
|
1048
|
+
"d4",
|
|
1049
|
+
"d5",
|
|
1050
|
+
"render",
|
|
1051
|
+
"create_date",
|
|
1052
|
+
"modify_date",
|
|
1053
|
+
];
|
|
1036
1054
|
const isColumnLevelUtc =
|
|
1037
1055
|
!formatS || dateFormats.includes(formatS);
|
|
1038
1056
|
const utcTransformEnabled = isColumnLevelUtc
|