Files
admin-govern/src/views/govern/device/planData/index.vue

799 lines
33 KiB
Vue
Raw Normal View History

2024-06-24 14:38:42 +08:00
<template>
<div class="default-main device-manage" :style="{ height: pageHeight.height }">
<!-- @node-change="nodeClick" -->
<schemeTree @node-click="nodeClick" @init="nodeClick" ref="schemeTreeRef"></schemeTree>
<div class="device-manage-right" v-if="deviceData">
<el-descriptions value="small" title="方案信息" class="mb10" :column="2" border>
<template #extra>
<el-button size="small" type="primary" @click="handleOpen(0, '')">新增方案</el-button>
</template>
<el-descriptions-item label="方案名称" width="60">
{{ deviceData.itemName }}
</el-descriptions-item>
<el-descriptions-item label="方案描述" width="60">
{{ deviceData.describe ? deviceData.describe : '/' }}
</el-descriptions-item>
</el-descriptions>
<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">
<el-tab-pane
v-for="(item, index) in deviceData.records"
:label="item.itemName"
2024-06-27 09:39:53 +08:00
:name="item.id"
2024-06-24 14:38:42 +08:00
:key="index"
>
<el-descriptions value="small" class="mb10" :column="4" border>
<el-descriptions-item label="测试项名称" width="160">
{{ item.itemName }}
</el-descriptions-item>
<el-descriptions-item label="测量间隔" width="160">
{{ item.statisticalInterval }}分钟
</el-descriptions-item>
<el-descriptions-item label="电压等级" width="160">
{{
voltageLevelList.find(vv => {
return vv.id == item.voltageLevel
})?.name
}}
</el-descriptions-item>
<el-descriptions-item label="接线方式" width="160">
{{
volConTypeList.find(vv => {
return vv.id == item.volConType
})?.name
}}
</el-descriptions-item>
<el-descriptions-item label="最小短路容量" width="160">
{{ item.capacitySscmin }}MVA
</el-descriptions-item>
<el-descriptions-item label="用户协议容量" width="160">
{{ item.capacitySi }}MVA
</el-descriptions-item>
<el-descriptions-item label="基准短路容量" width="160">
{{ item.capacitySscb }}MVA
</el-descriptions-item>
<el-descriptions-item label="供电设备容量" width="160">
{{ item.capacitySt }}MVA
</el-descriptions-item>
<el-descriptions-item label="PT变比" width="160">
{{ item.pt && item.pt1 ? item.pt / item.pt1 : item.pt }}
</el-descriptions-item>
<el-descriptions-item label="CT变比" width="160">
{{ item.ct && item.ct1 ? item.ct / item.ct1 : item.ct }}
</el-descriptions-item>
<el-descriptions-item label="起始时间" width="160">
{{ item.startTime }}
</el-descriptions-item>
<el-descriptions-item label="结束时间" width="160">
{{ item.endTime }}
</el-descriptions-item>
<el-descriptions-item label="监测位置" width="160">
{{ item.location }}
</el-descriptions-item>
<!-- <el-descriptions-item label="操作" width="160"> -->
<!-- <el-button type="primary" size="small" icon="el-icon-EditPen" @click="handleOpen(3)">
修改
</el-button> -->
<!-- <el-button type="primary" size="small" icon="el-icon-InfoFilled" @click="openDevice">
数据绑定
</el-button> -->
<!-- </el-descriptions-item> -->
</el-descriptions>
</el-tab-pane>
</el-tabs>
</div>
<div class="history_title">
<p>历史趋势</p>
</div>
<div class="history_header">
2024-07-03 19:31:29 +08:00
<el-form :model="searchForm" class="history_select" label-width="auto">
2024-06-24 14:38:42 +08:00
<el-form-item label="统计指标">
2024-06-27 09:39:53 +08:00
<el-select
multiple
:multiple-limit="3"
2024-07-03 19:31:29 +08:00
collapse-tags
collapse-tags-tooltip
v-model="searchForm.index"
placeholder="请选择统计指标"
2024-06-27 09:39:53 +08:00
>
<el-option
2024-07-03 19:31:29 +08:00
v-for="item in indexOptions"
2024-06-27 09:39:53 +08:00
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
2024-07-03 19:31:29 +08:00
<div v-for="(item, index) in countData" :key="index">
<el-form-item :label="item.name + '谐波次数'" v-if="item.countOptions.length != 0">
<el-select v-model="item.count" multiple placeholder="请选择谐波次数">
<el-option
v-for="vv in item.countOptions"
:key="vv"
:label="vv"
:value="vv"
></el-option>
</el-select>
</el-form-item>
</div>
2024-06-24 14:38:42 +08:00
<el-form-item label="值类型">
2024-07-03 19:31:29 +08:00
<el-select v-model="searchForm.type" placeholder="请选择值类型">
2024-06-24 14:38:42 +08:00
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div class="history_searchBtn">
2024-07-03 19:31:29 +08:00
<el-button type="primary" size="small" icon="el-icon-Search" @click="init()">查询</el-button>
2024-06-27 09:39:53 +08:00
<el-button
v-if="historyDataList.length != 0"
type="primary"
size="small"
icon="el-icon-Download"
@click="handleExport"
>
2024-06-24 14:38:42 +08:00
导出
2024-06-27 09:39:53 +08:00
</el-button>
2024-06-24 14:38:42 +08:00
</div>
</div>
<div class="history_chart" v-loading="loading" v-show="echartsData">
<MyEchart ref="historyChart" :isExport="true" :options="echartsData" />
</div>
</div>
<el-empty v-else description="请选择设备" class="device-manage-right" />
<popup ref="dialogRef" @onSubmit="refreshTree" />
</div>
</template>
<script lang="ts" setup>
import popup from './components/popup.vue'
import schemeTree from './components/schemeTree.vue'
import { mainHeight } from '@/utils/layout'
import { queryByCode, queryByid, queryCsDictTree } from '@/api/system-boot/dictTree'
2024-07-03 19:31:29 +08:00
import { ref, reactive, onMounted, provide, nextTick, watch } from 'vue'
2024-06-24 14:38:42 +08:00
import { ElMessage } from 'element-plus'
import MyEchart from '@/components/echarts/MyEchart.vue'
import { getTestRecordInfo, getHistoryTrend } from '@/api/cs-device-boot/planData'
import { useDictData } from '@/stores/dictData'
import { queryStatistical } from '@/api/system-boot/csstatisticalset'
import * as echarts from 'echarts'
2024-07-03 19:31:29 +08:00
import { isNonNullChain } from 'typescript'
2024-07-04 14:22:13 +08:00
import { position } from 'html2canvas/dist/types/css/property-descriptors/position'
2024-06-24 14:38:42 +08:00
const dictData = useDictData()
defineOptions({
name: 'govern/device/manage'
})
//电压等级
const voltageLevelList = dictData.getBasicData('Dev_Voltage')
//接线方式
const volConTypeList = dictData.getBasicData('Dev_Connect')
//值类型
const pageHeight = mainHeight(20)
const loading = ref(true)
const searchForm = ref({})
const typeOptions = [
{
name: '平均值',
id: 'avg'
},
{
name: '最大值',
id: 'max'
},
{
name: '最小值',
id: 'min'
},
{
name: 'CP95值',
id: 'cp95'
}
]
searchForm.value = {
2024-07-03 19:31:29 +08:00
index: [],
2024-06-27 09:39:53 +08:00
type: typeOptions[0].id,
count: []
2024-06-24 14:38:42 +08:00
}
//统计指标
const indexOptions: any = ref([])
2024-06-27 09:39:53 +08:00
//谐波次数
const countOptions: any = ref([])
2024-06-24 14:38:42 +08:00
// Harmonic_Type
// portable-harmonic
const legendDictList: any = ref([])
queryByCode('portable-harmonic').then(res => {
queryCsDictTree(res.data.id).then(item => {
indexOptions.value = item.data
2024-07-03 19:31:29 +08:00
searchForm.value.index[0] = indexOptions.value[0].id
2024-06-24 14:38:42 +08:00
})
queryStatistical(res.data.id).then(vv => {
legendDictList.value = vv.data
})
})
const activeName: any = ref()
const deviceData: any = ref([])
const schemeTreeRef = ref()
2024-06-27 09:39:53 +08:00
//历史趋势devId
const historyDevId: any = ref('')
2024-06-24 14:38:42 +08:00
const chartTitle: any = ref('')
const nodeClick = async (e: anyObj) => {
loading.value = true
deviceData.value = []
2024-06-27 09:39:53 +08:00
historyDevId.value = e.children && e.children.length != 0 ? e.children[0].id : e.id
2024-06-24 14:38:42 +08:00
let id = e.pid ? e.pid : e.id
//查询测试项信息
try {
await getTestRecordInfo(id).then(res => {
deviceData.value = res.data
loading.value = false
2024-06-27 09:39:53 +08:00
if (res.data.records.length == 1) {
activeName.value = res.data.records[0].id
} else {
res.data.records.map((item: any) => {
//多层
if (item.id == e.id) {
activeName.value = item.id
return
}
})
}
2024-06-24 14:38:42 +08:00
schemeTreeRef.value.getPlanData(deviceData.value)
})
} catch (error) {
loading.value = false
}
init()
}
// const deviceRef = ref()
// const openDevice = () => {
// deviceRef.value.open(deviceData.value.records[0].id)
// }
const dialogRef = ref()
const handleOpen = (val: any, id: any) => {
// deviceData.value.records[0].id
dialogRef.value.open(val, '')
}
const echartsData = ref<any>(null)
//加载echarts图表
//历史趋势数据
const historyDataList: any = ref([])
const refreshTree = () => {
schemeTreeRef.value.getTreeList()
}
2024-06-27 09:39:53 +08:00
const range = (start: any, end: any, step: any) => {
return Array.from({ length: (end - start) / step + 1 }, (_, i) => start + i * step)
}
2024-06-24 14:38:42 +08:00
const init = async () => {
2024-07-03 19:31:29 +08:00
// 选择指标的时候切换legend内容和data数据
2024-06-27 09:39:53 +08:00
let list: any = []
legendDictList.value?.selectedList?.map((item: any) => {
2024-07-03 19:31:29 +08:00
searchForm.value.index.map((vv: any) => {
if (item.dataType == vv) {
list.push(item.eleEpdPqdVOS)
}
})
2024-06-27 09:39:53 +08:00
})
2024-07-03 19:31:29 +08:00
2024-07-04 14:22:13 +08:00
//颜色数组
const colorList = [
'#DAA521',
'#2E8B58',
'blueviolet',
'#A5292A',
'aqua',
'#d81e06',
'coral',
'#012B6A',
'brown',
'#70B601',
'#1DD0CE',
'cadetblue',
]
2024-06-27 09:39:53 +08:00
if (historyDevId.value) {
2024-07-03 19:31:29 +08:00
//选择的指标使用方法处理
initSearchFormIndexAndCount(searchForm.value.index)
2024-06-27 09:39:53 +08:00
//查询历史趋势
historyDataList.value = []
loading.value = true
let middleTitle = ''
if (
deviceData.value.records &&
deviceData.value.records.length != 0 &&
deviceData.value.records.find((item: any) => {
return item.id == activeName.value
})?.itemName
) {
middleTitle = deviceData.value.records.find((item: any) => {
return item.id == activeName.value
})?.itemName
} else {
middleTitle = ''
}
2024-07-03 19:31:29 +08:00
chartTitle.value = deviceData.value.itemName + ' ' + middleTitle + ' '
// +
// indexOptions.value.find(item => {
// return item.id == searchForm.value.index[0]
// })?.name
searchForm.value.index.map((item: any) => {
indexOptions.value.map((vv: any) => {
if (vv.id == item) {
chartTitle.value += ' ' + vv.name
}
})
})
let lists: any = []
countData.value.map((item: any, index: any) => {
lists[index] = {
statisticalId: item.index,
frequencys: item.count
}
})
2024-06-27 09:39:53 +08:00
let obj = {
devId: historyDevId.value,
2024-07-03 19:31:29 +08:00
list: lists,
valueType: searchForm.value.type
2024-06-27 09:39:53 +08:00
}
try {
await getHistoryTrend(obj)
2024-06-24 14:38:42 +08:00
.then(res => {
if (res.code == 'A0000') {
historyDataList.value = res.data
echartsData.value = null
//icon图标替换legend图例
const iconThree =
'path://M512 85.333333c235.637333 0 426.666667 191.029333 426.666667 426.666667S747.637333 938.666667 512 938.666667 85.333333 747.637333 85.333333 512 276.362667 85.333333 512 85.333333z m214.592 318.677334a32 32 0 0 0-45.248 0.064L544.736 541.066667l-81.792-89.109334a32 32 0 0 0-46.613333-0.576l-119.36 123.733334a32 32 0 1 0 46.058666 44.437333l95.754667-99.264 81.418667 88.704a32 32 0 0 0 46.24 0.96l160.213333-160.693333a32 32 0 0 0-0.064-45.248z'
const iconDanger =
'path://M1001.661867 796.544c48.896 84.906667 7.68 157.013333-87.552 157.013333H110.781867c-97.834667 0-139.050667-69.504-90.112-157.013333l401.664-666.88c48.896-87.552 128.725333-87.552 177.664 0l401.664 666.88zM479.165867 296.533333v341.333334a32 32 0 1 0 64 0v-341.333334a32 32 0 1 0-64 0z m0 469.333334v42.666666a32 32 0 1 0 64 0v-42.666666a32 32 0 1 0-64 0z'
2024-07-03 19:31:29 +08:00
let xAxis: any = [],
timeList: any = []
2024-07-04 14:22:13 +08:00
let unitList: any = []
2024-06-27 09:39:53 +08:00
historyDataList.value.map((item: any) => {
2024-07-03 19:31:29 +08:00
timeList.push(item.time)
2024-07-04 14:22:13 +08:00
if (unitList.indexOf(item.unit) == -1) {
unitList.push(item.unit)
}
2024-06-24 14:38:42 +08:00
})
2024-07-03 19:31:29 +08:00
xAxis = timeList.sort((a: any, b: any) => {
return (
a.replace('-', '').replace('-', '').replace(' ', '').replace(':', '').replace(':', '') -
0 -
(b
.replace('-', '')
.replace('-', '')
.replace(' ', '')
.replace(':', '')
.replace(':', '') -
0)
)
})
2024-06-24 14:38:42 +08:00
echartsData.value = {
options: {
title: [
{
2024-07-04 14:22:13 +08:00
left: '10%',
top: 0,
2024-06-24 14:38:42 +08:00
text: chartTitle.value
}
],
toolbox: {
feature: {
2024-06-27 09:39:53 +08:00
// saveAsImage: {
// title: '保存'
// },
// dataView: { readOnly: false },
// }
2024-06-24 14:38:42 +08:00
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
2024-07-04 14:22:13 +08:00
},
formatter: function (params: any) {
var res = params[0].name + '<br/>'
for (var i = 0, l = params.length; i < l; i++) {
params[i].unit =
echartsData.value.options.yAxis[
echartsData.value.options.series[params[i].seriesIndex].yAxisIndex
]?.name
res +=
params[i].seriesName +
' ' +
`<div style="width:16px;height:16px;float:left;background:${params[i].color};border-radius:50%;margin:0 5px;margin:0 10px"></div>` +
`<div style='float:right;min-width:120px;padding-left:20px;'>${params[i].value} ${params[i].unit}</div><br/>`
}
return res
2024-06-24 14:38:42 +08:00
}
},
legend: {
//legend使用iconfont图标
2024-06-27 09:39:53 +08:00
data: [],
2024-06-24 14:38:42 +08:00
itemWidth: 20,
itemHeight: 10,
2024-07-03 19:31:29 +08:00
itemGap: 15,
type: 'scroll', // 开启滚动分页
// orient: 'vertical', // 垂直排列
2024-07-04 14:22:13 +08:00
right: '13%', // 位置调整
top: 0,
bottom: 20,
width: 400,
2024-07-03 19:31:29 +08:00
height: 50
2024-06-24 14:38:42 +08:00
},
grid: {
2024-07-04 14:22:13 +08:00
left: '3%',
right: '3%',
bottom: '10%',
top: '5%',
2024-06-24 14:38:42 +08:00
containLabel: true
},
xAxis: [
{
type: 'category',
2024-07-04 14:22:13 +08:00
name: '\n\n\n\n\n时间',
2024-06-24 14:38:42 +08:00
axisLabel: {
color: '#A9AEB2',
2024-07-03 19:31:29 +08:00
fontSize: 12,
show: function (index: any, value: any) {
// 检查数据中是否存在这个时间点
// return data.some(item:any => item[0] === value)
}
2024-06-24 14:38:42 +08:00
},
2024-07-04 14:22:13 +08:00
nameTextStyle: {
right: 0
},
2024-07-03 19:31:29 +08:00
data: Array.from(new Set(xAxis)),
2024-06-24 14:38:42 +08:00
axisLine: {
lineStyle: {
color: '#43485E'
}
}
}
],
yAxis: [
{
type: 'value',
2024-07-04 14:22:13 +08:00
name: unitList[0],
2024-06-24 14:38:42 +08:00
axisLabel: {
2024-07-04 14:22:13 +08:00
color: '#000',
fontSize: 14
2024-06-24 14:38:42 +08:00
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
2024-07-04 14:22:13 +08:00
color: colorList[0]
2024-06-24 14:38:42 +08:00
}
},
nameTextStyle: {
2024-07-04 14:22:13 +08:00
color: '#000',
fontSize: '14'
2024-06-24 14:38:42 +08:00
},
splitLine: {
show: false,
lineStyle: {
color: ['#43485E'],
width: 1,
type: 'solid'
}
}
}
2024-06-27 09:39:53 +08:00
],
series: []
2024-06-24 14:38:42 +08:00
}
}
2024-07-04 14:22:13 +08:00
//处理多y轴
if (unitList.length != 0 && unitList.length > 1) {
// echartsData.value.options.yAxis[0].yAxisIndex = 0
unitList.map((item: any, index: any) => {
if (index != unitList.length - 1) {
echartsData.value.options.yAxis.push({
type: 'value',
position: 'right',
offset: index * 80, // y轴位置的偏移量
name: unitList[index + 1],
axisLabel: {
color: '#000',
fontSize: 14
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
color: colorList[index+1]
}
},
nameTextStyle: {
color: '#000',
fontSize: '14'
},
splitLine: {
show: false,
lineStyle: {
color: ['#43485E'],
width: 1,
type: 'solid'
}
}
// yAxisIndex: index + 1
})
}
})
}
2024-07-03 19:31:29 +08:00
list.map((item: any, index: any) => {
2024-06-27 09:39:53 +08:00
item.map((vv: any, indexs: any) => {
//处理legend
if (historyDataList.value.length != 0) {
echartsData.value.options.legend.data.push({
2024-07-03 19:31:29 +08:00
name: vv.phase + '相' + vv.showName,
2024-06-27 09:39:53 +08:00
icon: iconThree
2024-06-24 14:38:42 +08:00
})
2024-06-27 09:39:53 +08:00
}
2024-07-04 14:22:13 +08:00
if (
unitList.findIndex((item: any) => {
return item == vv.unit
}) != -1
) {
vv.yAxisIndex = unitList.findIndex((item: any) => {
return item == vv.unit
})
} else {
vv.yAxisIndex = 0
}
2024-06-27 09:39:53 +08:00
//series数据
echartsData.value.options.series.push({
2024-07-03 19:31:29 +08:00
name: vv.phase + '相' + vv.showName,
2024-06-27 09:39:53 +08:00
type: 'line',
smooth: true,
symbol: 'none',
emphasis: {
focus: 'series'
},
2024-07-04 14:22:13 +08:00
itemStyle: {},
//数据
2024-06-27 09:39:53 +08:00
data: historyDataList.value
.map((kk: any) => {
2024-07-03 19:31:29 +08:00
if (kk.statisticalName == vv.name) {
2024-06-27 09:39:53 +08:00
return kk.statisticalData
} else {
return ''
}
})
2024-07-04 14:22:13 +08:00
.filter((kk: any) => kk !== ''),
//数据对应的y轴
// yAxisIndex:0,
yAxisIndex: vv.yAxisIndex
2024-06-27 09:39:53 +08:00
})
2024-06-24 14:38:42 +08:00
})
})
2024-07-04 14:22:13 +08:00
//设置数据项颜色
echartsData.value.options.series.map((item: any, index: any) => {
item.itemStyle = {
normal: {
color: colorList[index],
lineStyle: {
color: colorList[index]
}
}
}
})
2024-06-24 14:38:42 +08:00
loading.value = false
}
})
.catch(error => {
loading.value = false
})
} catch (error) {
loading.value = false
}
}
}
//导出
const historyChart = ref()
// const chart: any = ref(null)
// chart.value = echarts.init(historyChart.value)
const handleExport = () => {
2024-06-27 09:39:53 +08:00
setTimeout(() => {
let xAxis: any = []
2024-07-03 19:31:29 +08:00
let timeList: any = []
2024-06-27 09:39:53 +08:00
historyDataList.value.map((item: any) => {
2024-07-03 19:31:29 +08:00
timeList.push(item.time)
})
xAxis = timeList.sort((a: any, b: any) => {
return (
a.replace('-', '').replace('-', '').replace(' ', '').replace(':', '').replace(':', '') -
0 -
(b.replace('-', '').replace('-', '').replace(' ', '').replace(':', '').replace(':', '') - 0)
)
2024-06-27 09:39:53 +08:00
})
2024-07-03 19:31:29 +08:00
xAxis = Array.from(new Set(xAxis))
2024-06-27 09:39:53 +08:00
// 使用这个函数转换数据为CSV格式
2024-07-03 19:31:29 +08:00
let csv: any = ''
2024-06-27 09:39:53 +08:00
const list = echartsData.value.options.series
2024-07-03 19:31:29 +08:00
csv = convertToCSV([], [])
2024-06-27 09:39:53 +08:00
// 如果你想提供下载链接
const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' })
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = '历史趋势.csv'
2024-06-24 14:38:42 +08:00
link.click()
2024-06-27 09:39:53 +08:00
function convertToCSV(data: any, key: any) {
// 添加列头
2024-07-03 19:31:29 +08:00
let title = '统计时间,'
2024-06-27 09:39:53 +08:00
list.map((item: any, index: any) => {
index == list.length - 1 ? (title += `${item.name}\n`) : (title += `${item.name},`)
})
let csv = ''
csv = title
// 遍历数据并添加到CSV字符串中
const listLength = list.length
list[0].data.map((vv: any, indexs: any) => {
2024-07-03 19:31:29 +08:00
let strs = '',
count = null
list.map((item: any, index: any) => {
if (index == 0) {
count = index
}
index == list.length - 1
? (strs += list[index].data[indexs])
: (strs += list[index].data[indexs] + ',')
})
if (count == 0 && xAxis[indexs]) {
csv += `${xAxis[indexs]},` + strs + '\n'
2024-06-27 09:39:53 +08:00
}
})
return csv
}
}, 10)
2024-06-24 14:38:42 +08:00
}
2024-07-03 19:31:29 +08:00
const countData: any = ref([])
2024-06-24 14:38:42 +08:00
2024-07-03 19:31:29 +08:00
//根据选择的指标处理谐波次数
const initSearchFormIndexAndCount = (list: any) => {
if (list.length != 0) {
list.map((item: any, index: any) => {
if (!countData.value[index]) {
countData.value[index] = {
index: item,
countOptions: [],
count: [],
name: indexOptions.value.find((vv: any) => {
return vv.id == item
})?.name
}
}
legendDictList.value?.selectedList?.map((vv: any, vvs: any) => {
//查找相等的指标
if (item == vv.dataType) {
vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
if (kk.harmStart && kk.harmEnd) {
range(0, 0, 0)
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 2)
}
})
}
})
})
}
}
watch(
() => searchForm.value.index,
(val: any, oldval: any) => {
if (val) {
initSearchFormIndexAndCount(val)
if (val == 0) {
countData.value = []
}
2024-07-04 18:15:09 +08:00
countData.value.map((item:any,key:any)=>{
if(val.findIndex((vv:any)=>{return vv==item.index})==-1){
countData.value.splice(key,1)
}
})
2024-07-03 19:31:29 +08:00
}
},
{
deep: true,
immediate: true
}
)
2024-06-24 14:38:42 +08:00
onMounted(() => {})
</script>
<style lang="scss" scoped>
.device-manage {
display: flex;
height: calc(100vh - 100px);
// overflow-y: auto;
&-right {
// overflow: auto;
flex: 1;
padding: 10px 10px 10px 0;
.el-descriptions__header {
height: 36px;
margin-bottom: 7px;
display: flex;
align-items: center;
}
}
.device-manage-right {
overflow: hidden;
flex: 1 !important;
height: calc(100vh - 135px);
padding: 10px 10px 10px 10px;
border: 2px solid #eeeeee;
display: flex;
flex-direction: column;
.el-descriptions__header {
height: 36px;
margin-bottom: 7px;
display: flex;
align-items: center;
}
}
}
.history_title {
width: 100%;
p {
height: 32px;
line-height: 32px;
font-size: 16px;
font-weight: bold;
}
}
.monitor_info {
width: 100%;
}
.history_header {
display: flex;
2024-07-03 19:31:29 +08:00
flex-wrap: wrap;
2024-06-24 14:38:42 +08:00
.history_select {
2024-07-03 19:31:29 +08:00
width: 90%;
2024-06-24 14:38:42 +08:00
display: flex;
justify-content: flex-start;
2024-07-03 19:31:29 +08:00
flex-wrap: wrap;
2024-06-24 14:38:42 +08:00
.el-select {
margin-right: 10px;
}
}
.history_searchBtn {
flex: 1;
display: flex;
justify-content: flex-end;
}
}
.history_chart {
width: 100%;
2024-07-03 19:31:29 +08:00
min-height: calc(100vh - 680px) !important;
2024-06-24 14:38:42 +08:00
flex: 1;
margin-top: 10px;
}
// ::v-deep .el-select {
// width: 200px !important;
// }
</style>