Files
admin-sjzx/src/views/pqs/qualityInspeection/panorama/components/details/steadyState.vue

339 lines
9.5 KiB
Vue
Raw Normal View History

2024-04-26 09:15:20 +08:00
<!-- 稳态 -->
<template>
<!-- 终端 -->
2024-05-09 18:00:04 +08:00
<el-dialog draggable title="稳态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
2024-05-14 18:28:27 +08:00
<el-row style="height: 300px" :gutter="20">
2024-04-27 22:18:58 +08:00
<el-col :span="12">
2024-04-26 09:15:20 +08:00
<div class="title">
<span>稳态电能质量水平评估</span>
</div>
2024-04-27 22:18:58 +08:00
<div class="boxSteps">
<el-steps>
<template v-for="(item, i) in Voltage">
2024-12-11 16:14:08 +08:00
<el-step :class="active == i ? 'highlight' : ''" :title="item.name"
@click="handleClick(i)"></el-step>
2024-04-27 22:18:58 +08:00
</template>
</el-steps>
</div>
<div v-for="(item, i) in evaluationData" class="evaluationData">
<el-row style="width: 100%">
<el-col :span="12" style="display: flex">
<img :src="url[i]" />
<span>{{ item.targetName }}</span>
</el-col>
<el-col :span="12" style="display: flex">
<div style="width: 150px">
均值
<span style="color: #339966">{{ item.avg == 3.14159 ? '--' : item.avg }}</span>
</div>
<div>
标准差
2024-05-09 18:00:04 +08:00
<span style="color: #ff9900">{{ item.avg == 3.14159 ? '--' : item.sd }}</span>
2024-04-27 22:18:58 +08:00
</div>
</el-col>
</el-row>
</div>
2024-04-26 09:15:20 +08:00
</el-col>
2024-04-27 22:18:58 +08:00
<el-col :span="12">
2024-04-26 09:15:20 +08:00
<div class="title">
2024-08-06 20:58:01 +08:00
<span>稳态电能质量超标占比环比变化</span>
2024-04-26 09:15:20 +08:00
</div>
<div class="pie">
2024-05-14 18:28:27 +08:00
<div style="height: 250px; width: 100%" ref="chartRef"></div>
2024-04-26 09:15:20 +08:00
</div>
</el-col>
</el-row>
<div>
<div class="title">
2024-05-09 18:00:04 +08:00
<span>区域稳态电能质量水平评估</span>
2024-04-26 09:15:20 +08:00
</div>
2024-06-05 17:01:09 +08:00
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="365px" :data="tableData">
2024-05-09 18:00:04 +08:00
<vxe-column field="deptName" title="区域" />
2024-06-05 17:01:09 +08:00
<vxe-column sortable field="onlineNum" title="在线监测点数量(个)" />
<vxe-column sortable field="overNum" title="超标监测点数量(个)" />
<vxe-column sortable field="overRatio" title="超标监测点占比(%)" />
2024-04-27 22:18:58 +08:00
<vxe-colgroup :title="item" v-for="(item, i) in title">
2024-08-06 20:58:01 +08:00
<vxe-column title="监测点数 " field="overNum">
2024-04-27 22:18:58 +08:00
<template #default="scope">
2024-04-29 16:37:07 +08:00
<span>{{ scope.row.list[i].overNum }}</span>
2024-04-27 22:18:58 +08:00
</template>
</vxe-column>
2024-06-05 17:01:09 +08:00
<vxe-column title="天数" field="overDay">
2024-04-27 22:18:58 +08:00
<template #default="scope">
2024-04-29 16:37:07 +08:00
<span>{{ scope.row.list[i].overDay }}</span>
2024-04-27 22:18:58 +08:00
</template>
</vxe-column>
</vxe-colgroup>
2024-04-26 09:15:20 +08:00
</vxe-table>
</div>
</el-dialog>
</template>
<script setup lang="ts">
2024-04-27 22:18:58 +08:00
import { ref, nextTick } from 'vue'
import echarts from '@/components/echarts/echarts'
import { useDictData } from '@/stores/dictData'
import { color } from '@/components/echarts/color'
2024-04-26 09:15:20 +08:00
import { defaultAttribute } from '@/components/table/defaultAttribute'
2024-04-27 22:18:58 +08:00
import { getEvaluationData, evaluationDetail, evaluationRatio } from '@/api/device-boot/panorama'
2024-04-26 09:15:20 +08:00
const dialogVisible: any = ref(false)
2024-04-27 22:18:58 +08:00
const rowList = ref({})
const active: any = ref(1)
const evaluationData: any = ref([])
2024-04-26 09:15:20 +08:00
2024-04-27 22:18:58 +08:00
const dictData = useDictData()
const Voltage: any = dictData.getBasicData('Dev_Voltage_Stand').filter(item => {
if (item.code == '35kV' || item.code == '500kV' || item.code == '220kV' || item.code == '110kV') {
return item
2024-04-26 09:15:20 +08:00
}
})
2024-04-27 22:18:58 +08:00
const chartRef = ref<HTMLDivElement>()
const url: any = [
new URL(`@/assets/img/PLPC.png`, import.meta.url),
new URL(`@/assets/img/DYPC.png`, import.meta.url),
new URL(`@/assets/img/JBL.png`, import.meta.url),
new URL(`@/assets/img/SXDY.png`, import.meta.url),
new URL(`@/assets/img/SB.png`, import.meta.url)
]
const tableData: any = ref([])
2024-06-05 17:01:09 +08:00
const title = ['电压偏差(超标)', '频率偏差(超标)', '电压总谐波畸变率(超标)', '闪变(超标)', '三相电压不平衡度(超标)']
2024-04-27 22:18:58 +08:00
const echart = (row: any) => {
2024-05-14 18:28:27 +08:00
let maxList: any = []
row.forEach((item: any) => {
maxList.push(...(item.ratioList || [0]))
})
let max = Math.max(...maxList) > 50 ? 100 : 50
2024-04-27 22:18:58 +08:00
let chart = echarts.init(chartRef.value as HTMLDivElement)
2024-12-11 16:14:08 +08:00
let dataname = ['频率偏差(Hz)',
2024-08-06 20:58:01 +08:00
'电压偏差(%)',
'电压总谐波畸变率(%)',
'三相电压不平衡度(%)',
'闪变',
'谐波电压(%)',
'谐波电流(%)',
'间谐波电压(%)',
'负序电流(A)']
2024-05-14 18:28:27 +08:00
// let datamax = [100, 100, 100, 100, 100, 100]
2024-04-27 22:18:58 +08:00
let indicator = []
for (let i = 0; i < dataname.length; i++) {
2024-04-26 09:15:20 +08:00
indicator.push({
name: dataname[i],
2024-05-14 18:28:27 +08:00
max: max
2024-04-26 09:15:20 +08:00
})
}
2024-04-27 22:18:58 +08:00
let option: any = {
2024-04-26 09:15:20 +08:00
tooltip: {
2024-04-27 22:18:58 +08:00
trigger: 'item',
axisPointer: {
type: 'shadow',
label: {
color: '#fff',
fontSize: 16
}
},
textStyle: {
color: '#fff',
fontStyle: 'normal',
opacity: 0.35,
fontSize: 14
},
2024-12-11 16:14:08 +08:00
backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0,
2024-12-11 16:14:08 +08:00
position: 'bottom'
2024-04-26 09:15:20 +08:00
},
legend: {
2024-04-27 22:18:58 +08:00
data: row.map((item: any) => item.time),
2024-04-26 09:15:20 +08:00
type: 'scroll',
orient: 'vertical',
icon: 'roundRect',
right: '20',
2024-04-27 22:18:58 +08:00
itemGap: 10,
2024-04-26 09:15:20 +08:00
itemWidth: 16,
itemHeight: 16,
textStyle: {
fontSize: '15',
color: '#656565'
}
},
radar: {
2024-05-14 18:28:27 +08:00
center: ['50%', '60%'],
2024-08-06 20:58:01 +08:00
radius: '60%',
2024-04-26 09:15:20 +08:00
startAngle: 90,
splitNumber: 5,
splitArea: {
areaStyle: {
color: ['#FFFFFF', '#F5F9FF'].reverse()
}
},
axisLabel: {
show: false
},
axisLine: {
show: true,
lineStyle: {
color: '#D2E4F8'
}
},
splitLine: {
show: true,
lineStyle: {
color: '#D2E4F8'
}
},
name: {
formatter: '{value}',
textStyle: {
color: '#656565',
fontSize: 15
}
},
indicator: indicator
},
2024-04-27 22:18:58 +08:00
series: []
}
row.forEach((item: any, i: any) => {
option.series.push({
name: item.time,
type: 'radar',
symbol: 'none',
areaStyle: {
normal: {
color: color[i + 1]
}
2024-04-26 09:15:20 +08:00
},
2024-04-27 22:18:58 +08:00
itemStyle: {
color: color[i + 1]
2024-04-26 09:15:20 +08:00
},
2024-04-27 22:18:58 +08:00
data: [item.ratioList]
})
})
2024-04-26 09:15:20 +08:00
chart.setOption(option)
}
2024-04-27 22:18:58 +08:00
2024-04-26 09:15:20 +08:00
const open = async (row: any) => {
2024-04-27 22:18:58 +08:00
rowList.value = row
2024-04-26 09:15:20 +08:00
dialogVisible.value = true
2024-04-27 22:18:58 +08:00
// 稳态电能质量水平评估
handleClick(0)
//环比
evaluationRatio(row).then(res => {
echart(res.data)
})
// 稳态电能质量水平评估详细列表
evaluationDetail(row).then(res => {
tableData.value = res.data
})
}
// 点击电压等级
const handleClick = (i: any) => {
active.value = i
getEvaluationData({
...rowList.value,
voltageLevel: Voltage[i].id
}).then(res => {
evaluationData.value = res.data
})
2024-04-26 09:15:20 +08:00
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
:deep(.el-select) {
min-width: 80px;
}
2024-12-11 16:14:08 +08:00
2024-04-26 09:15:20 +08:00
.title {
display: flex;
justify-content: space-between;
margin: 10px;
2024-12-11 16:14:08 +08:00
2024-04-26 09:15:20 +08:00
span {
font-weight: 550;
font-size: 18px;
}
}
2024-12-11 16:14:08 +08:00
2024-04-26 09:15:20 +08:00
.pie {
display: flex;
justify-content: space-around;
}
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
.evaluationData {
2024-05-14 18:28:27 +08:00
height: 33px;
2024-04-27 22:18:58 +08:00
margin: 8px 30px;
width: 100%;
box-shadow: 1px 1px 1px 1px #e8e3e3;
display: flex;
font-size: 18px;
2024-05-14 18:28:27 +08:00
line-height: 35px;
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
img {
2024-05-14 18:28:27 +08:00
height: 25px;
width: 25px;
margin: 4px 20px 0px 30px;
2024-04-27 22:18:58 +08:00
}
}
.el-steps {
margin-top: 5px;
}
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
:deep(.el-step__icon) {
border: none;
background: #ccc;
margin-top: 5px;
width: 15px;
height: 15px;
}
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
:deep(.el-step__icon-inner) {
display: none;
}
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
:deep(.boxSteps) {
border-radius: 50px;
width: 60%;
height: 25px;
margin: auto;
margin-top: 30px;
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
.el-step__title {
line-height: 18px;
font-size: 16px;
margin-left: -10px;
font-weight: 500;
color: #000 !important;
position: relative;
top: -50px;
}
}
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
:deep(.highlight) {
.el-step__icon {
background: var(--el-color-primary);
}
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
.el-step__title {
font-weight: 700 !important;
color: var(--el-color-primary) !important;
}
2024-12-11 16:14:08 +08:00
2024-04-27 22:18:58 +08:00
// .is-wait {
// color: var(--el-color-primary) !important;
// }
2024-04-26 09:15:20 +08:00
}
2024-12-11 16:14:08 +08:00
2024-05-27 10:37:50 +08:00
:deep(.el-dialog__body) {
max-height: none !important;
}
2024-04-26 09:15:20 +08:00
</style>