Merge remote-tracking branch 'origin/main' into multi-tenant
This commit is contained in:
@@ -695,7 +695,7 @@ export default {
|
||||
installSourceUpload: 'New Upload',
|
||||
installSelect: 'Select Record',
|
||||
installUpload: 'Upload File',
|
||||
installText: 'Installed',
|
||||
installText: 'Install',
|
||||
licenseTitle: "Licenses",
|
||||
licenseDesc: "Network element service authorization certification",
|
||||
licenseResultTitle: "Whether to authorize activation immediately",
|
||||
|
||||
@@ -20,6 +20,9 @@ export const YYYYMMDDHHMMSS = 'YYYYMMDDHHmmss';
|
||||
/**年-月-日 时:分:秒 列如:2022-12-30 01:01:59 */
|
||||
export const YYYY_MM_DD_HH_MM_SS = 'YYYY-MM-DD HH:mm:ss';
|
||||
|
||||
/**年-月-日 时:分:秒 列如:2022-12-30T01:01:59+08:00 */
|
||||
export const YYYY_MM_DD_HH_MM_SSZ = 'YYYY-MM-DD HH:mm:ssZZ';
|
||||
|
||||
/**
|
||||
* 格式时间字符串
|
||||
* @param dateStr 时间字符串
|
||||
@@ -36,12 +39,12 @@ export function parseStrToDate(
|
||||
/**
|
||||
* 格式时间
|
||||
* @param date 可转的Date对象
|
||||
* @param formatStr 时间格式 默认YYYY-MM-DD HH:mm:ss
|
||||
* @param formatStr 时间格式 默认YYYY-MM-DD HH:mm:ssZZ
|
||||
* @returns 时间格式字符串
|
||||
*/
|
||||
export function parseDateToStr(
|
||||
date: string | number | Date,
|
||||
formatStr: string = YYYY_MM_DD_HH_MM_SS
|
||||
formatStr: string = YYYY_MM_DD_HH_MM_SSZ
|
||||
): string {
|
||||
return dayjs(date).format(formatStr);
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ let neCascaderOptions = ref<Record<string, any>[]>([]);
|
||||
const viewportDom = ref<HTMLElement | null>(null);
|
||||
const { isFullscreen, toggle } = useFullscreen(viewportDom);
|
||||
|
||||
let initFlag = false;
|
||||
/**10s调度器 */
|
||||
const interval10s = ref<any>(null);
|
||||
|
||||
@@ -220,7 +221,7 @@ function loadData() {
|
||||
|
||||
clearInterval(interval5s.value);
|
||||
interval5s.value = setInterval(() => {
|
||||
if (!interval5s.value) return;
|
||||
if (!interval5s.value || !initFlag) return;
|
||||
fnGetSkim(); // 获取概览信息
|
||||
fnGetNeState(); // 获取网元状态
|
||||
upfTFSend('0');
|
||||
@@ -298,6 +299,7 @@ onMounted(() => {
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
initFlag = true;
|
||||
fnGetSkim().then(() => {
|
||||
loadData();
|
||||
});
|
||||
@@ -309,6 +311,7 @@ onBeforeUnmount(() => {
|
||||
interval10s.value = null;
|
||||
clearInterval(interval5s.value);
|
||||
interval5s.value = null;
|
||||
initFlag = false;
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -392,7 +395,7 @@ onBeforeUnmount(() => {
|
||||
<div class="data">
|
||||
<div
|
||||
class="item toRouter"
|
||||
@click="fnToRouter('Base5G_2082', { neType: '5g' })"
|
||||
@click="fnToRouter('BaseStation_2096', { neType: 'AMF' })"
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
>
|
||||
<div style="align-items: flex-start">
|
||||
@@ -406,7 +409,7 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
<div
|
||||
class="item toRouter"
|
||||
@click="fnToRouter('Base5G_2082', { neType: '5g' })"
|
||||
@click="fnToRouter('BaseStation_2096', { neType: 'AMF' })"
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
>
|
||||
<div style="align-items: flex-start">
|
||||
@@ -429,7 +432,7 @@ onBeforeUnmount(() => {
|
||||
<div class="data">
|
||||
<div
|
||||
class="item toRouter"
|
||||
@click="fnToRouter('Base5G_2082', { neType: '4g' })"
|
||||
@click="fnToRouter('BaseStation_2096', { neType: 'MME' })"
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
>
|
||||
<div style="align-items: flex-start">
|
||||
@@ -443,7 +446,7 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
<div
|
||||
class="item toRouter"
|
||||
@click="fnToRouter('Base5G_2082', { neType: '4g' })"
|
||||
@click="fnToRouter('BaseStation_2096', { neType: 'MME' })"
|
||||
:title="t('views.dashboard.overview.toRouter')"
|
||||
>
|
||||
<div style="align-items: flex-start">
|
||||
|
||||
@@ -229,7 +229,7 @@ function fnRanderChart() {
|
||||
|
||||
// 创建 ResizeObserver 实例 监听图表容器大小变化,并在变化时调整图表大小
|
||||
var observer = new ResizeObserver(entries => {
|
||||
if (cdrChart) {
|
||||
if (cdrChart && !cdrChart.isDisposed) {
|
||||
cdrChart.resize();
|
||||
}
|
||||
});
|
||||
@@ -295,6 +295,8 @@ let state = reactive({
|
||||
total: 0,
|
||||
/**表格加载状态 */
|
||||
loading: false,
|
||||
/**数据总量 up,down */
|
||||
dataUsage: ['0 B', '0 B'],
|
||||
});
|
||||
|
||||
/**查询列表, pageNum初始页数 */
|
||||
@@ -455,6 +457,18 @@ function fnRanderChartDataUpdate() {
|
||||
],
|
||||
});
|
||||
cdrChart.hideLoading();
|
||||
|
||||
// 累加总量
|
||||
let uplinkTotal = 0;
|
||||
let downlinkTotal = 0;
|
||||
for (let index = 0; index < dataVolumeUplinkYSeriesData.length; index++) {
|
||||
uplinkTotal += dataVolumeUplinkYSeriesData[index];
|
||||
downlinkTotal += dataVolumeDownlinkYSeriesData[index];
|
||||
}
|
||||
state.dataUsage = [
|
||||
parseSizeFromByte(uplinkTotal),
|
||||
parseSizeFromByte(downlinkTotal),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -549,9 +563,9 @@ onMounted(() => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
if (res.data.length > 0) {
|
||||
let arr: Record<string, any>[] = [];
|
||||
res.data.forEach(i => {
|
||||
if (i.neType === 'SMF') {
|
||||
arr.push({ value: i.neId, label: i.neName });
|
||||
res.data.forEach((v: any) => {
|
||||
if (v.neType === 'SMF') {
|
||||
arr.push({ value: v.neId, label: v.neName });
|
||||
}
|
||||
});
|
||||
neOtions.value = arr;
|
||||
@@ -669,6 +683,15 @@ onBeforeUnmount(() => {
|
||||
<a-card :bordered="false">
|
||||
<!-- 图数据 -->
|
||||
<div ref="cdrChartDom" style="height: 600px; width: 100%"></div>
|
||||
|
||||
<a-descriptions title="Data Usage" bordered :column="2">
|
||||
<a-descriptions-item label="Total Uplink">
|
||||
{{ state.dataUsage[0] }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="Total Downlink">
|
||||
{{ state.dataUsage[1] }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-card>
|
||||
</PageContainer>
|
||||
</template>
|
||||
|
||||
@@ -30,6 +30,8 @@ import {
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import saveAs from 'file-saver';
|
||||
import { readSheet, writeSheet } from '@/utils/execl-utils';
|
||||
import { useRoute } from 'vue-router';
|
||||
const route = useRoute();
|
||||
// 异步加载组件
|
||||
const HistoryModal = defineAsyncComponent(
|
||||
() => import('./components/history.vue')
|
||||
@@ -666,7 +668,8 @@ onMounted(() => {
|
||||
});
|
||||
neCascaderOptions.value = arr;
|
||||
// 无查询参数neType时 默认选择AMF
|
||||
const item = arr.find(s => s.value === 'AMF');
|
||||
const queryNeType = (route.query.neType as string) || 'AMF';
|
||||
const item = arr.find(s => s.value === queryNeType);
|
||||
if (item && item.children) {
|
||||
const info = item.children[0];
|
||||
neTypeAndId.value = [info.neType, info.neId];
|
||||
|
||||
@@ -105,7 +105,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
title: t('views.ne.common.serialNum'),
|
||||
dataIndex: 'serialNum',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: t('views.ne.common.expiryDate'),
|
||||
@@ -126,12 +126,12 @@ let tableColumns = ref<TableColumnsType>([
|
||||
{
|
||||
title: t('common.updateTime'),
|
||||
dataIndex: 'updateTime',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
customRender(opt) {
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
},
|
||||
width: 150,
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: t('common.operate'),
|
||||
@@ -413,7 +413,7 @@ onMounted(() => {
|
||||
:loading="modalState.confirmLoading"
|
||||
@click.prevent="fnRecordStateBatch()"
|
||||
>
|
||||
<template #icon><CloudSyncOutlined /></template>
|
||||
<template #icon><SyncOutlined /></template>
|
||||
{{ t('views.ne.neLicense.reloadBatch') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
@@ -508,7 +508,7 @@ onMounted(() => {
|
||||
<a-tooltip placement="topRight">
|
||||
<template #title>{{ t('views.ne.neLicense.reload') }}</template>
|
||||
<a-button type="link" @click.prevent="fnRecordState(record)">
|
||||
<template #icon><CloudSyncOutlined /> </template>
|
||||
<template #icon><SyncOutlined /> </template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="topRight">
|
||||
@@ -517,7 +517,7 @@ onMounted(() => {
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleByEdit(record.id)"
|
||||
>
|
||||
<template #icon><CloudUploadOutlined /> </template>
|
||||
<template #icon><UploadOutlined /> </template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
|
||||
@@ -234,19 +234,14 @@ watchEffect(() => {
|
||||
text-align: right;
|
||||
}
|
||||
.thead-item:nth-child(2),
|
||||
.tbody-item:nth-child(2) {
|
||||
flex-basis: 8rem;
|
||||
width: 8rem;
|
||||
}
|
||||
.tbody-item:nth-child(2),
|
||||
.thead-item:nth-child(3),
|
||||
.tbody-item:nth-child(3) {
|
||||
flex-basis: 8rem;
|
||||
width: 8rem;
|
||||
}
|
||||
.tbody-item:nth-child(3),
|
||||
.thead-item:nth-child(4),
|
||||
.tbody-item:nth-child(4) {
|
||||
flex-basis: 8rem;
|
||||
width: 8rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.thead-item:nth-child(5),
|
||||
.tbody-item:nth-child(5) {
|
||||
@@ -271,16 +266,32 @@ watchEffect(() => {
|
||||
}
|
||||
|
||||
/* 修改滚动条的样式 */
|
||||
.thead-item:nth-child(2)::-webkit-scrollbar,
|
||||
.tbody-item:nth-child(2)::-webkit-scrollbar,
|
||||
.tbody-item:nth-child(3)::-webkit-scrollbar,
|
||||
.tbody-item:nth-child(4)::-webkit-scrollbar,
|
||||
.tbody-item:nth-child(7)::-webkit-scrollbar {
|
||||
width: 4px; /* 设置滚动条宽度 */
|
||||
height: 4px;
|
||||
}
|
||||
.thead-item:nth-child(2)::-webkit-scrollbar-track,
|
||||
.tbody-item:nth-child(2)::-webkit-scrollbar-track,
|
||||
.tbody-item:nth-child(3)::-webkit-scrollbar-track,
|
||||
.tbody-item:nth-child(4)::-webkit-scrollbar-track,
|
||||
.tbody-item:nth-child(7)::-webkit-scrollbar-track {
|
||||
background-color: #f0f0f0; /* 设置滚动条轨道背景颜色 */
|
||||
}
|
||||
.thead-item:nth-child(2)::-webkit-scrollbar-thumb,
|
||||
.tbody-item:nth-child(2)::-webkit-scrollbar-thumb,
|
||||
.tbody-item:nth-child(3)::-webkit-scrollbar-thumb,
|
||||
.tbody-item:nth-child(4)::-webkit-scrollbar-thumb,
|
||||
.tbody-item:nth-child(7)::-webkit-scrollbar-thumb {
|
||||
background-color: #bfbfbf; /* 设置滚动条滑块颜色 */
|
||||
}
|
||||
.thead-item:nth-child(2)::-webkit-scrollbar-thumb:hover,
|
||||
.tbody-item:nth-child(2)::-webkit-scrollbar-thumb:hover,
|
||||
.tbody-item:nth-child(3)::-webkit-scrollbar-thumb:hover,
|
||||
.tbody-item:nth-child(4)::-webkit-scrollbar-thumb:hover,
|
||||
.tbody-item:nth-child(7)::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #1890ff; /* 设置鼠标悬停时滚动条滑块颜色 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user