设备监控修改
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!-- 实时数据 - 实时趋势 -->
|
||||
<template>
|
||||
<div class="realtrend" v-loading="loading">
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||
<el-tabs type="border-card" v-if="tabsList.length!=0" v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="(item, index) in tabsList" :label="item.groupName" :name="index" :key="index">
|
||||
<div>
|
||||
<div class="realtrend_top">
|
||||
@@ -55,6 +55,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-empty v-else/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@@ -93,17 +94,16 @@ const myData = tableList
|
||||
const tabsList = ref([])
|
||||
//接收参数
|
||||
const params = ref({})
|
||||
const open = (val: any) => {
|
||||
const open = async (val: any) => {
|
||||
//获取指标tab
|
||||
loading.value = true
|
||||
getDeviceTrendDataGroup().then(res => {
|
||||
await getDeviceTrendDataGroup().then(res => {
|
||||
tabsList.value = res.data
|
||||
if (tabsList.value.length != 0) {
|
||||
// activeName.value = tabsList.value[0]?.id
|
||||
activeName.value = val.activeTrendName || 0
|
||||
}
|
||||
params.value = { groupId: tabsList.value[activeName.value]?.id, ...val }
|
||||
loading.value = false
|
||||
})
|
||||
init()
|
||||
return
|
||||
@@ -360,6 +360,7 @@ const init = () => {
|
||||
if (barCharts.value) {
|
||||
barCharts.value[activeName.value]?.initChart()
|
||||
}
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user