Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -174,15 +174,13 @@ function fnGetList(one: boolean) {
|
|||||||
tableState.loading = false;
|
tableState.loading = false;
|
||||||
var rightNum = 0;
|
var rightNum = 0;
|
||||||
var errorNum = 0;
|
var errorNum = 0;
|
||||||
// if (res.length) nfInfo.serialNum = res[0].serialNum;
|
res.data.forEach((item: any) => {
|
||||||
for (let i = 0; i < res.length; i++) {
|
if (item.serverState.online) {
|
||||||
if (res[i].status == '正常' || res[i].status == 'Normal') {
|
|
||||||
rightNum++;
|
rightNum++;
|
||||||
} else {
|
} else {
|
||||||
errorNum++;
|
errorNum++;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
const optionData: any = {
|
const optionData: any = {
|
||||||
title: {
|
title: {
|
||||||
text: '',
|
text: '',
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export default function useWS() {
|
|||||||
sortField: 'timestamp',
|
sortField: 'timestamp',
|
||||||
sortOrder: 'desc',
|
sortOrder: 'desc',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 5,
|
pageSize: 20,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// MME_UE会话事件
|
// MME_UE会话事件
|
||||||
@@ -149,7 +149,7 @@ export default function useWS() {
|
|||||||
sortField: 'timestamp',
|
sortField: 'timestamp',
|
||||||
sortOrder: 'desc',
|
sortOrder: 'desc',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 5,
|
pageSize: 20,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// IMS_CDR会话事件
|
// IMS_CDR会话事件
|
||||||
@@ -163,7 +163,7 @@ export default function useWS() {
|
|||||||
sortField: 'timestamp',
|
sortField: 'timestamp',
|
||||||
sortOrder: 'desc',
|
sortOrder: 'desc',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 5,
|
pageSize: 20,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ function fnModalOk() {
|
|||||||
message.error(t('views.perfManage.customTarget.expressionNoIdTip'), 3);
|
message.error(t('views.perfManage.customTarget.expressionNoIdTip'), 3);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
modalState.from.expression = result;
|
||||||
const from = toRaw(modalState.from);
|
const from = toRaw(modalState.from);
|
||||||
//return false;
|
//return false;
|
||||||
modalState.confirmLoading = true;
|
modalState.confirmLoading = true;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import { generateColorRGBA } from '@/utils/generate-utils';
|
|||||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { LineOutlined } from '@ant-design/icons-vue';
|
import { LineOutlined } from '@ant-design/icons-vue';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neInfoStore = useNeInfoStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
const ws = new WS();
|
const ws = new WS();
|
||||||
@@ -186,7 +186,7 @@ type StateType = {
|
|||||||
let state: StateType = reactive({
|
let state: StateType = reactive({
|
||||||
neType: [],
|
neType: [],
|
||||||
chartRealTime: false,
|
chartRealTime: false,
|
||||||
chartLegendSelectedFlag: false,
|
chartLegendSelectedFlag: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 存储每个指标的临时固定颜色
|
// 存储每个指标的临时固定颜色
|
||||||
@@ -411,12 +411,33 @@ function fnRanderChart() {
|
|||||||
if (!container) return; //若没有,则退出函数
|
if (!container) return; //若没有,则退出函数
|
||||||
kpiChart.value = markRaw(echarts.init(container, 'light'));
|
kpiChart.value = markRaw(echarts.init(container, 'light'));
|
||||||
//初始化Echarts图表实例,应用light主题,并赋值给kpiChart.value,markRaw是vue函数,用于标记对象为不可响应
|
//初始化Echarts图表实例,应用light主题,并赋值给kpiChart.value,markRaw是vue函数,用于标记对象为不可响应
|
||||||
const option: EChartsOption = {
|
const option: any = {
|
||||||
//定义图表的配置对象,tooltip的出发方式为axis
|
//定义图表的配置对象,tooltip的出发方式为axis
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
position: function (pt: any) {
|
position: function (
|
||||||
return [pt[0], '10%'];
|
point: number[],
|
||||||
|
size: { viewSize: number[]; contentSize: number[] }
|
||||||
|
) {
|
||||||
|
const [x, y] = point;
|
||||||
|
const [viewWidth] = size.viewSize;
|
||||||
|
const [tooltipWidth, tooltipHeight] = size.contentSize;
|
||||||
|
|
||||||
|
// 距离右侧的距离
|
||||||
|
const rightSpace = viewWidth - x;
|
||||||
|
|
||||||
|
// 计算垂直方向的居中位置
|
||||||
|
// 将 tooltip 的中心点对齐到鼠标位置
|
||||||
|
const verticalOffset = -tooltipHeight / 2;
|
||||||
|
|
||||||
|
// 如果右侧空间不足以显示tooltip(假设需要20px的安全距离)
|
||||||
|
if (rightSpace < tooltipWidth + 20) {
|
||||||
|
// 向左显示,垂直居中
|
||||||
|
return [x - tooltipWidth - 10, y + verticalOffset];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 默认向右显示,垂直居中
|
||||||
|
return [x + 10, y + verticalOffset];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ type StateType = {
|
|||||||
let state: StateType = reactive({
|
let state: StateType = reactive({
|
||||||
neType: [],
|
neType: [],
|
||||||
chartRealTime: false,
|
chartRealTime: false,
|
||||||
chartLegendSelectedFlag: false,
|
chartLegendSelectedFlag: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 存储每个指标的临时固定颜色
|
// 存储每个指标的临时固定颜色
|
||||||
@@ -551,18 +551,18 @@ function fnRanderChartData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const item of orgData) {
|
for (const item of orgData) {
|
||||||
chartDataXAxisData.push(item['timeGroup']);
|
|
||||||
const keys = Object.keys(item);
|
const keys = Object.keys(item);
|
||||||
for (const y of chartDataYSeriesData) {
|
for (const y of chartDataYSeriesData) {
|
||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
if (y.key === key) {
|
if (y.key === key) {
|
||||||
y.data.push(+item[key]);
|
y.data.push(+item[key]);
|
||||||
|
chartDataXAxisData.push(item['timeGroup']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(queryParams.sortOrder, chartLegendSelected);
|
///console.log(queryParams.sortOrder, chartDataXAxisData);
|
||||||
// console.log(chartDataXAxisData, chartDataYSeriesData);
|
console.log(chartDataXAxisData, chartDataYSeriesData);
|
||||||
|
|
||||||
// 绘制图数据
|
// 绘制图数据
|
||||||
kpiChart.value.setOption(
|
kpiChart.value.setOption(
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ async function fnIPerf() {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (state.dataType === 'options' && state.data.host === '') {
|
if (state.dataType === 'options' && state.data.mode === 'client' && state.data.host === '') {
|
||||||
message.warning({
|
message.warning({
|
||||||
content: 'Please fill in the Host',
|
content: 'Please fill in the Host',
|
||||||
duration: 2,
|
duration: 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user