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