设备监控问题修改
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<!-- 实时数据 - 实时趋势 -->
|
||||
<template>
|
||||
<div class="realtrend">
|
||||
qwww
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="(item, index) in tabsList" :label="item.groupName" :name="index" :key="index">
|
||||
<div v-loading="loading">
|
||||
@@ -29,48 +30,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="谐波电压含有率" name="0">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<el-icon><TrendCharts /></el-icon>
|
||||
谐波电压含有率
|
||||
</span>
|
||||
</template>
|
||||
<div class="tab_info">
|
||||
<vxe-grid v-if="activeName == '0'" class="reverse-table" v-bind="gridOptions"></vxe-grid>
|
||||
<div class="charts">
|
||||
<MyEchart ref="barCharts1" :options="echartsData1"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="间谐波电压含有率" name="1">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<el-icon><TrendCharts /></el-icon>
|
||||
间谐波电压含有率
|
||||
</span>
|
||||
</template>
|
||||
<div class="tab_info">
|
||||
<vxe-grid v-if="activeName == '1'" class="reverse-table" v-bind="gridOptions"></vxe-grid>
|
||||
<div class="charts">
|
||||
<MyEchart ref="barCharts2" :options="echartsData2"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="谐波电流幅值" name="2">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<el-icon><DataLine /></el-icon>
|
||||
谐波电流幅值
|
||||
</span>
|
||||
</template>
|
||||
<div class="tab_info">
|
||||
<vxe-grid v-if="activeName == '2'" class="reverse-table" v-bind="gridOptions"></vxe-grid>
|
||||
<div class="charts">
|
||||
<MyEchart ref="barCharts3" :options="echartsData3"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@@ -107,19 +66,6 @@ const myColumns: any = ref([
|
||||
])
|
||||
|
||||
const yAxisUnit: any = ref('')
|
||||
// myColumns.value.map(item => {
|
||||
// if (item.field == 'value') {
|
||||
// item.title =
|
||||
// activeName.value == '0'
|
||||
// ? '谐波电压含有率(%)'
|
||||
// : activeName.value == '1'
|
||||
// ? '间谐波电压含有率(%)'
|
||||
// : activeName.value == '2'
|
||||
// ? '谐波电流幅值(A)'
|
||||
// : ''
|
||||
// yAxisUnit.value = item.title.split('(')[0]
|
||||
// }
|
||||
// })
|
||||
|
||||
const myData = tableList
|
||||
const tabsList = ref([])
|
||||
@@ -239,13 +185,7 @@ const reverseTable = () => {
|
||||
reverseTable()
|
||||
|
||||
const echartsData: any = ref([]),
|
||||
echartsData1: any = ref([]),
|
||||
echartsData2: any = ref([]),
|
||||
echartsData3: any = ref([]),
|
||||
barCharts = ref(),
|
||||
barCharts1 = ref(),
|
||||
barCharts2 = ref(),
|
||||
barCharts3 = ref()
|
||||
barCharts = ref()
|
||||
|
||||
//加载echarts
|
||||
const init = () => {
|
||||
@@ -330,7 +270,7 @@ const init = () => {
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: chartsData?.value[0]?.unit ? '单位(' + chartsData?.value[0]?.unit+ ')' : '' ,
|
||||
name: chartsData?.value[0]?.unit ? '单位(' + chartsData?.value[0]?.unit + ')' : '',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
@@ -359,7 +299,7 @@ const init = () => {
|
||||
list.push({ phase: item.phase, title: item.title, list: item.phaseList })
|
||||
}
|
||||
})
|
||||
const colorList = ['#0e8780', '#FFCC00', '#009900', '#CC0000', ]
|
||||
const colorList = ['#0e8780', '#FFCC00', '#009900', '#CC0000']
|
||||
list.map((item: any, index: any) => {
|
||||
echartsData.value.options.legend.data.push(item.title)
|
||||
echartsData.value.options.series.push({
|
||||
@@ -383,16 +323,11 @@ const init = () => {
|
||||
}
|
||||
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
// activeName.value = tabsList.value[tab.index].id
|
||||
// activeName.value = tab.index
|
||||
params.value.groupId = tabsList.value[tab.index].id
|
||||
findRealTrendDataByGroupId(params.value)
|
||||
// reverseTable()
|
||||
init()
|
||||
}
|
||||
onMounted(() => {
|
||||
// init()
|
||||
})
|
||||
onMounted(() => {})
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -494,8 +429,5 @@ defineExpose({ open })
|
||||
height: calc(100vh - 550px);
|
||||
}
|
||||
}
|
||||
.custom-tabs-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user