Merge branch 'main' of http://192.168.2.166:3180/OMC/ems_frontend_vue3
This commit is contained in:
@@ -31,7 +31,7 @@ interface ChartDataItem {
|
||||
date: string; // 将存储完整的时间字符串包含时分秒
|
||||
[kpiId: string]: string | number; // 动态指标
|
||||
}
|
||||
|
||||
const tableLoading = ref(false);
|
||||
//网元类型定义
|
||||
const ALL_NE_TYPES = ['AMF','SMF','UPF','MME','IMS','SMSC'] as const;
|
||||
type NeType= typeof ALL_NE_TYPES[number];
|
||||
@@ -107,6 +107,7 @@ const fnRealTimeSwitch = (bool: boolean) => {
|
||||
}
|
||||
chartData.value = [];
|
||||
|
||||
tableLoading.value =true;
|
||||
const options: OptionsType = {
|
||||
url: '/ws',
|
||||
params: {
|
||||
@@ -119,6 +120,7 @@ const fnRealTimeSwitch = (bool: boolean) => {
|
||||
} else if (ws.value) {
|
||||
ws.value.close(); //断开链接
|
||||
ws.value = null; //清空链接
|
||||
tableLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -142,6 +144,9 @@ const handleWebSocketMessage = (kpiEvent:any)=>{
|
||||
|
||||
// 更新数据
|
||||
updateChartData(newData);
|
||||
if(tableLoading.value){
|
||||
tableLoading.value=false;
|
||||
}
|
||||
};
|
||||
//成功回调
|
||||
const wsMessage = (res:Record<string,any>)=>{
|
||||
@@ -286,10 +291,9 @@ const updateChart = () => {
|
||||
},
|
||||
grid: {
|
||||
//网格配置
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
left: '6%',
|
||||
right: '6%',
|
||||
bottom: '3%',
|
||||
top: 100,
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: {
|
||||
@@ -607,6 +611,7 @@ const updateChartLegendSelect = (selectedKpiId?: string) => {
|
||||
:pagination="false"
|
||||
:scroll="{ y: 250 }"
|
||||
size="small"
|
||||
:loading="tableLoading"
|
||||
:custom-row="(record) => ({
|
||||
onClick: () => handleRowClick(record),
|
||||
class: record.kpiId === selectedRow ? 'selected-row' : ''
|
||||
@@ -643,7 +648,7 @@ const updateChartLegendSelect = (selectedKpiId?: string) => {
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
height: calc(100vh - 550px);
|
||||
height: 400px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user