修改准实时数据数据页面样式

This commit is contained in:
GGJ
2024-11-28 14:01:27 +08:00
parent a008424927
commit da184e1a37
4 changed files with 90 additions and 24 deletions

View File

@@ -1,9 +1,9 @@
<!-- 实时数据 - 谐波频谱页面 -->
<template>
<div class="realtrend" v-loading="loading">
<div class="select">
<div class="select" v-if="!loading">
<div class="mr10">谐波次数 </div>
<el-select v-model="selectValue" v-if="!loading" style="width: 100px">
<el-select v-model="selectValue" style="width: 100px">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
@@ -175,6 +175,11 @@ const init = () => {
value: limitData.value[key]
})
}
if (selectValue.value == '1') {
gbData = gbData.filter((_, index: number) => index % 2 !== 0)
} else if (selectValue.value == '2') {
gbData = gbData.filter((_, index: number) => index % 2 == 0)
}
let xAxisList: any = []
chartsData.value.map((item: any, index: any) => {
chartsYxiasData.value.map((vv: any, vvs: any) => {
@@ -298,10 +303,29 @@ const limitData: any = ref()
const setOverLimitData = (val: any) => {
limitData.value = {}
for (let key in val) {
if (String(key).includes('uharm')) {
limitData.value[key] = val[key]
if (activeName.value == 0) {
if (String(key).includes('uharm')) {
if (key.startsWith('uharm')) {
limitData.value[key] = val[key];
}
}
} else if (activeName.value == 1) {
if (String(key).includes('iharm')) {
limitData.value[key] = val[key]
}
} else {
if (String(key).includes('inuharm')) {
limitData.value[key] = val[key]
}
}
}
}
onMounted(() => { })
defineExpose({ open, setRealTrendData, setOverLimitData })