方案数据添加暂态事件页面
This commit is contained in:
@@ -16,13 +16,13 @@
|
||||
{{ deviceData.describe ? deviceData.describe : '/' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-collapse v-model="activeColName" @change="handleChange">
|
||||
<el-collapse v-model="activeColName" @change="handleChange" accordion>
|
||||
<el-collapse-item title="测试项信息" name="0">
|
||||
<div class="monitor_info" v-if="deviceData.records && deviceData.records.length != 0">
|
||||
<!-- <div class="history_title">
|
||||
<p>测试项信息</p>
|
||||
</div> -->
|
||||
<el-tabs v-model="activeName" type="border-card" @click="handleClickTabs">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-change="handleClickTabs">
|
||||
<el-tab-pane v-for="(item, index) in deviceData?.records" :label="item.itemName"
|
||||
:name="item.id" :key="index">
|
||||
<template #label>
|
||||
@@ -170,7 +170,7 @@
|
||||
<el-empty :style="EcharHeight" v-else description="未绑定数据" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="暂态数据" name="1">
|
||||
<transient :activeName='activeName' ref="transientRef" />
|
||||
<transient :activeName='activeName' ref="transientRef" :activeColName="activeColName"/>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
@@ -310,6 +310,7 @@ const handleClickTabs = () => {
|
||||
schemeTreeRef.value.setCheckedNode(activeName.value)
|
||||
setTimeout(() => {
|
||||
init(true)
|
||||
transientRef.value && transientRef.value.init()
|
||||
}, 100)
|
||||
}
|
||||
const nodeClick = async (e: anyObj) => {
|
||||
@@ -345,7 +346,7 @@ const nodeClick = async (e: anyObj) => {
|
||||
// if (searchForm.value.index.length == 0) {
|
||||
// searchForm.value.index = [indexOptions.value[0].id]
|
||||
// }
|
||||
|
||||
|
||||
schemeTreeRef.value.getPlanData(deviceData.value)
|
||||
await setTimeout(() => {
|
||||
loading.value = true
|
||||
@@ -645,12 +646,15 @@ const init = (flag: boolean) => {
|
||||
}
|
||||
}
|
||||
if (chartsList.length > 0) {
|
||||
let yData: any = []
|
||||
echartsData.value.yAxis = []
|
||||
let setList = [...new Set(unitList)];
|
||||
|
||||
setList.forEach((item: any, index: any) => {
|
||||
if (index > 2) {
|
||||
echartsData.value.grid.right = (index - 1) * 80
|
||||
}
|
||||
yData.push([])
|
||||
let right = {
|
||||
position: 'right',
|
||||
offset: (index - 1) * 80
|
||||
@@ -667,13 +671,8 @@ const init = (flag: boolean) => {
|
||||
})
|
||||
})
|
||||
// console.log("🚀 ~ result.forEach ~ result:", result)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let ABCName = [...new Set(chartsList.map((item: any) => { return item.anotherName == '电压负序分量' ? '电压不平衡' : item.anotherName == '电压正序分量' ? '电压不平衡' : item.anotherName == '电压零序分量' ? '电压不平衡' : item.anotherName }))];
|
||||
// console.log("🚀 ~ result.forEach ~ result:", result)
|
||||
|
||||
|
||||
result.forEach((item: any, index: any) => {
|
||||
let yMethodList: any = []
|
||||
@@ -701,20 +700,12 @@ const init = (flag: boolean) => {
|
||||
|
||||
|
||||
ABCList.forEach((kk: any) => {
|
||||
|
||||
|
||||
|
||||
|
||||
let colorName = kk[0].phase?.charAt(0).toUpperCase()
|
||||
|
||||
|
||||
let lineS = ABCName.findIndex(item => item === (kk[0].anotherName == '电压负序分量' ? '电压不平衡' : kk[0].anotherName == '电压正序分量' ? '电压不平衡' : kk[0].anotherName == '电压零序分量' ? '电压不平衡' : kk[0].anotherName));
|
||||
|
||||
|
||||
let seriesList: any = []
|
||||
kk.forEach((cc: any) => {
|
||||
if (cc.statisticalData !== null) {
|
||||
yMethodList.push(cc.statisticalData?.toFixed(2))
|
||||
yData[setList.indexOf(kk[0].unit)].push(cc.statisticalData?.toFixed(2))
|
||||
}
|
||||
seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit, lineStyle[lineS].type])
|
||||
})
|
||||
@@ -732,12 +723,22 @@ const init = (flag: boolean) => {
|
||||
})
|
||||
})
|
||||
|
||||
let [min, max] = yMethod(yMethodList)
|
||||
// let [min, max] = yMethod(yMethodList)
|
||||
|
||||
// echartsData.value.yAxis[index].min = min
|
||||
// echartsData.value.yAxis[index].max = max
|
||||
})
|
||||
yData.forEach((item: any, index: any) => {
|
||||
let [min, max] = yMethod(item)
|
||||
echartsData.value.yAxis[index].min = min
|
||||
echartsData.value.yAxis[index].max = max
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
@@ -968,6 +969,7 @@ const selectChange = (e: boolean) => {
|
||||
}
|
||||
|
||||
const handleChange = () => {
|
||||
|
||||
if (activeColName.value == '0') {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(495)
|
||||
@@ -981,6 +983,9 @@ const handleChange = () => {
|
||||
EcharHeight.value = mainHeight(315)
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
transientRef.value && transientRef.value.setHeight()
|
||||
}, 100);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user