style: 调整时间字段宽度
This commit is contained in:
@@ -27,7 +27,7 @@ import useAlarmStore from '@/store/modules/alarm';
|
||||
import { getServerTime } from '@/api';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { parseDateToStr, YYYY_MM_DD_HH_MM_SSZ } from '@/utils/date-utils';
|
||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||
const { proConfig, waterMarkContent } = useLayoutStore();
|
||||
const { t, currentLocale } = useI18n();
|
||||
@@ -214,7 +214,7 @@ function fnGetServerTime() {
|
||||
// serverTimeStr.value = parseDateToStr(serverTime.timestamp);
|
||||
// 用DOM直接修改
|
||||
if (serverTimeDom) {
|
||||
serverTimeDom.innerText = parseDateToStr(serverTime.timestamp);
|
||||
serverTimeDom.innerText = parseDateToStr(serverTime.timestamp, YYYY_MM_DD_HH_MM_SSZ);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
@@ -162,13 +162,17 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.dashboard.ue.time'),
|
||||
dataIndex: 'eventJSON',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
const record = opt.value;
|
||||
console.log(record);
|
||||
if (record?.time) {
|
||||
return record.time;
|
||||
return parseDateToStr(record.time);
|
||||
}
|
||||
if (record?.timestamp) {
|
||||
return parseDateToStr(+record.timestamp * 1000);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -157,13 +157,16 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.dashboard.ue.time'),
|
||||
dataIndex: 'eventJSON',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
const record = opt.value;
|
||||
if (record?.time) {
|
||||
return record.time;
|
||||
return parseDateToStr(record.time);
|
||||
}
|
||||
if (record?.timestamp) {
|
||||
return parseDateToStr(+record.timestamp * 1000);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ import { listTenant } from '@/api/system/tenant';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
import { parseSizeFromByte } from '@/utils/parse-utils';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const ws = new WS();
|
||||
@@ -240,10 +241,10 @@ let tableColumns = ref<ColumnsType>([
|
||||
title: t('views.dashboard.cdr.invocationTime'), // 调用时间
|
||||
dataIndex: 'cdrJSON',
|
||||
align: 'left',
|
||||
width: 200,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
const cdrJSON = opt.value;
|
||||
return cdrJSON.invocationTimestamp;
|
||||
return parseDateToStr(cdrJSON.invocationTimestamp);
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -801,7 +802,7 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ t('views.dashboard.cdr.time') }}: </span>
|
||||
<span>{{ record.cdrJSON.invocationTimestamp }}</span>
|
||||
<span>{{ parseDateToStr(record.cdrJSON.invocationTimestamp) }}</span>
|
||||
</div>
|
||||
<a-divider orientation="left">
|
||||
{{ t('views.dashboard.cdr.rowInfo') }}
|
||||
|
||||
@@ -37,6 +37,7 @@ import { parseSizeFromByte } from '@/utils/parse-utils';
|
||||
import { message } from 'ant-design-vue';
|
||||
import useNeInfoStore from '@/store/modules/neinfo';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
const { t, currentLocale } = useI18n();
|
||||
const ws = new WS();
|
||||
|
||||
@@ -379,7 +380,10 @@ function fnRanderChartDataLoad() {
|
||||
break;
|
||||
}
|
||||
// 时间
|
||||
const dataTime = item.cdrJSON.invocationTimestamp;
|
||||
const dataTime = parseDateToStr(
|
||||
item.cdrJSON.invocationTimestamp,
|
||||
'HH:mm:ss'
|
||||
);
|
||||
const listOfMultipleUnitUsage = item.cdrJSON.listOfMultipleUnitUsage;
|
||||
if (
|
||||
!Array.isArray(listOfMultipleUnitUsage) ||
|
||||
@@ -684,7 +688,12 @@ onBeforeUnmount(() => {
|
||||
<!-- 图数据 -->
|
||||
<div ref="cdrChartDom" style="height: 600px; width: 100%"></div>
|
||||
|
||||
<a-descriptions title="Data Usage" bordered :column="2" style="width: 60%;">
|
||||
<a-descriptions
|
||||
title="Data Usage"
|
||||
bordered
|
||||
:column="2"
|
||||
style="width: 60%"
|
||||
>
|
||||
<a-descriptions-item label="Total Uplink">
|
||||
{{ state.dataUsage[0] }}
|
||||
</a-descriptions-item>
|
||||
|
||||
@@ -201,13 +201,13 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.dashboard.cdr.time'),
|
||||
dataIndex: 'cdrJSON',
|
||||
align: 'left',
|
||||
width: 200,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
const cdrJSON = opt.value;
|
||||
if (typeof cdrJSON.updateTime === 'number') {
|
||||
return parseDateToStr(+cdrJSON.updateTime * 1000);
|
||||
}
|
||||
return cdrJSON.updateTime;
|
||||
return parseDateToStr(cdrJSON.updateTime);
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -814,7 +814,7 @@ onBeforeUnmount(() => {
|
||||
{{
|
||||
typeof record.cdrJSON.updateTime === 'number'
|
||||
? parseDateToStr(+record.cdrJSON.updateTime * 1000)
|
||||
: record.cdrJSON.updateTime
|
||||
: parseDateToStr(record.cdrJSON.updateTime)
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -90,7 +90,7 @@ let tableColumns: ColumnsType = [
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value * 1000);
|
||||
},
|
||||
width: 150,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: t('views.logManage.neFile.fileName'),
|
||||
|
||||
@@ -88,7 +88,7 @@ let tableColumns: ColumnsType = [
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value * 1000);
|
||||
},
|
||||
width: 150,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: t('views.logManage.neFile.fileName'),
|
||||
|
||||
@@ -152,7 +152,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.monitor.jobLog.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -103,7 +103,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
},
|
||||
width: 150,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: t('views.ne.neConfigBackup.name'),
|
||||
|
||||
@@ -134,7 +134,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('common.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
|
||||
@@ -107,7 +107,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('common.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
|
||||
@@ -131,7 +131,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
},
|
||||
width: 200,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: t('common.operate'),
|
||||
|
||||
@@ -54,7 +54,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('common.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -127,7 +127,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
},
|
||||
width: 150,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: t('common.operate'),
|
||||
|
||||
@@ -151,7 +151,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
},
|
||||
width: 150,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: t('common.operate'),
|
||||
|
||||
@@ -85,7 +85,7 @@ let tableColumns: ColumnsType = [
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value * 1000);
|
||||
},
|
||||
width: 150,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: t('views.logManage.neFile.fileName'),
|
||||
|
||||
@@ -130,7 +130,7 @@ let tableColumns = ref<ColumnsType>([
|
||||
title: t('views.system.config.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -108,7 +108,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.system.dept.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -180,7 +180,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.system.dictData.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -128,7 +128,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.system.dict.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -140,8 +140,8 @@ let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('views.system.log.login.loginTime'),
|
||||
dataIndex: 'loginTime',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
align: 'left',
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -162,8 +162,8 @@ let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('views.system.log.operate.operDate'),
|
||||
dataIndex: 'operTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
align: 'left',
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -158,8 +158,8 @@ let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('views.system.menu.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
align: 'left',
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -117,8 +117,8 @@ let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('views.system.post.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
align: 'left',
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -203,7 +203,7 @@ let tableColumns: ColumnsType = [
|
||||
if (typeof cdrJSON.releaseTime === 'number') {
|
||||
return parseDateToStr(+cdrJSON.releaseTime * 1000);
|
||||
}
|
||||
return cdrJSON.releaseTime;
|
||||
return parseDateToStr(cdrJSON.releaseTime);
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -735,7 +735,7 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ t('views.dashboard.cdr.releaseTime') }}: </span>
|
||||
<span>{{ record.cdrJSON.releaseTime }}</span>
|
||||
<span>{{ parseDateToStr(record.cdrJSON.releaseTime) }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
@@ -155,7 +155,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.system.log.operate.operDate'),
|
||||
dataIndex: 'operTime',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
width: 250,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
return parseDateToStr(+opt.value);
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||
import PQueue from 'p-queue';
|
||||
import saveAs from 'file-saver';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
const { t } = useI18n();
|
||||
const ws = new WS();
|
||||
const queue = new PQueue({ concurrency: 1, autoStart: true });
|
||||
@@ -199,7 +200,7 @@ let tableColumns: ColumnsType = [
|
||||
width: 200,
|
||||
customRender(opt) {
|
||||
const cdrJSON = opt.value;
|
||||
return cdrJSON.invocationTimestamp;
|
||||
return parseDateToStr(cdrJSON.invocationTimestamp);
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -593,7 +594,7 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ t('views.dashboard.cdr.time') }}: </span>
|
||||
<span>{{ record.cdrJSON.invocationTimestamp }}</span>
|
||||
<span>{{ parseDateToStr(record.cdrJSON.invocationTimestamp) }}</span>
|
||||
</div>
|
||||
<a-divider orientation="left">
|
||||
{{ t('views.dashboard.cdr.rowInfo') }}
|
||||
|
||||
@@ -171,7 +171,7 @@ let tableColumns: ColumnsType = [
|
||||
if (typeof cdrJSON.updateTime === 'number') {
|
||||
return parseDateToStr(+cdrJSON.updateTime * 1000);
|
||||
}
|
||||
return cdrJSON.updateTime;
|
||||
return parseDateToStr(cdrJSON.updateTime);
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -580,7 +580,7 @@ onBeforeUnmount(() => {
|
||||
{{
|
||||
typeof record.cdrJSON.updateTime === 'number'
|
||||
? parseDateToStr(+record.cdrJSON.updateTime * 1000)
|
||||
: record.cdrJSON.updateTime
|
||||
: parseDateToStr(record.cdrJSON.updateTime)
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -79,7 +79,7 @@ let tableColumns: ColumnsType = reactive([
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value * 1000);
|
||||
},
|
||||
width: 200,
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: t('views.logManage.neFile.fileName'),
|
||||
|
||||
Reference in New Issue
Block a user