fix: 系统调用详情切换问题

This commit is contained in:
chenjiancheng 2025-09-22 17:02:25 +08:00
parent 1be2fc4948
commit 01e238bdf9

View File

@ -128,9 +128,6 @@ let lineNet = ref({});
let lineAlg = ref({});
const chart = ref();
let myChart;
let historyPeakAndRealTime = ref(null);
let peak = ref(0);
let realTime = ref(0);
const changeSystemClasses = (name) => {
if (name === 'net') {
handleEchartData(lineNet.value);
@ -187,15 +184,7 @@ const nameMap = {
其它: 'OTHER',
};
const handleEchartData = (res) => {
historyPeakAndRealTime.value = res.currentCount ? res.currentCount : {};
peak.value = 0;
realTime.value = 0;
['A', 'B', 'C', '其它'].forEach((item) => {
peak.value += historyPeakAndRealTime.value[nameMap[item]]?.peak || 0;
realTime.value += historyPeakAndRealTime.value[nameMap[item]]?.realTime || 0;
});
const { categories, series } = processData(res.timeCounts);
debugger;
dayMax.value = getDayMax(series, categories.length);
lineOption.series.forEach((rawItem) => {
series.forEach((item) => {
@ -982,16 +971,6 @@ function switchOption(index) {
>
</div>
</div>
<!-- <div class="border" style="border: 1px solid rgba(0, 0, 0, 0.12)"></div> -->
<!-- <div class="column">
<div class="assets-title">
实时并发<span
class="red"
:style="{ color: theme.appThemeDetail.cssName === 'theme-red' ? '' : '#0062D9' }"
>{{ realTime }}</span
>
</div>
</div> -->
</div>
<div ref="usageCount" class="bottom-chart">