2024-04-26 09:15:20 +08:00
|
|
|
<template>
|
|
|
|
|
<!-- 综合评估详情 -->
|
|
|
|
|
<el-dialog draggable title="综合评估详情" v-model="dialogVisible" width="1400px">
|
|
|
|
|
<div>
|
|
|
|
|
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
|
2024-04-27 22:18:58 +08:00
|
|
|
<vxe-column field="deptName" title="所属区域" />
|
|
|
|
|
<vxe-column field="assessData" title="综合评估得分" :formatter="formatter" />
|
|
|
|
|
<vxe-column field="qualifyData" title="指标合格率" :formatter="formatter" />
|
2024-04-26 09:15:20 +08:00
|
|
|
<vxe-colgroup title="各项指标得分">
|
|
|
|
|
<vxe-colgroup title="电压偏差">
|
2024-04-27 22:18:58 +08:00
|
|
|
<vxe-column field="vdevAssessData" title="评估得分" :formatter="formatter" />
|
|
|
|
|
<vxe-column field="vdevQualifyData" title="指标合格率" :formatter="formatter" />
|
2024-04-26 09:15:20 +08:00
|
|
|
</vxe-colgroup>
|
2024-04-27 22:18:58 +08:00
|
|
|
<vxe-colgroup title="频率偏差">
|
|
|
|
|
<vxe-column field="freqAssessData" title="评估得分" :formatter="formatter" />
|
|
|
|
|
<vxe-column field="freqQualifyData" title="指标合格率" :formatter="formatter" />
|
2024-04-26 09:15:20 +08:00
|
|
|
</vxe-colgroup>
|
|
|
|
|
<vxe-colgroup title="谐波含量">
|
2024-04-27 22:18:58 +08:00
|
|
|
<vxe-column field="harmAssessData" title="评估得分" :formatter="formatter" />
|
|
|
|
|
<vxe-column field="harmQualifyData" title="指标合格率" :formatter="formatter" />
|
2024-04-26 09:15:20 +08:00
|
|
|
</vxe-colgroup>
|
|
|
|
|
<vxe-colgroup title="电压闪变">
|
2024-04-27 22:18:58 +08:00
|
|
|
<vxe-column field="flickerAssessData" title="评估得分" :formatter="formatter" />
|
|
|
|
|
<vxe-column field="flickerQualifyData" title="指标合格率" :formatter="formatter" />
|
2024-04-26 09:15:20 +08:00
|
|
|
</vxe-colgroup>
|
|
|
|
|
<vxe-colgroup title="三相不平衡度">
|
2024-04-27 22:18:58 +08:00
|
|
|
<vxe-column field="unbalanceAssessData" title="评估得分" :formatter="formatter" />
|
|
|
|
|
<vxe-column field="unbalanceQualifyData" title="指标合格率" :formatter="formatter" />
|
2024-04-26 09:15:20 +08:00
|
|
|
</vxe-colgroup>
|
|
|
|
|
</vxe-colgroup>
|
|
|
|
|
</vxe-table>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="height: 300px; margin-top: 10px">
|
|
|
|
|
<MyEChart style="height: 300px" :options="picEChart" />
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
|
|
|
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
2024-04-27 22:18:58 +08:00
|
|
|
import { getAssessDetail } 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 tableData: any = ref([])
|
|
|
|
|
|
|
|
|
|
const picEChart = ref()
|
|
|
|
|
const open = async (row: any) => {
|
|
|
|
|
getAssessDetail(row).then(res => {
|
|
|
|
|
tableData.value = res.data
|
|
|
|
|
picEChart.value = {
|
|
|
|
|
tooltip: {
|
|
|
|
|
formatter: function (params: any) {
|
|
|
|
|
let tips = ''
|
|
|
|
|
|
|
|
|
|
if (params[0].value == 3.14159) {
|
|
|
|
|
tips += params[0].name + ':暂无数据<br/>'
|
|
|
|
|
} else {
|
|
|
|
|
tips += params[0].name + ':' + params[0].value + '%<br/>'
|
|
|
|
|
}
|
2024-04-26 09:15:20 +08:00
|
|
|
|
2024-04-27 22:18:58 +08:00
|
|
|
return tips
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
title: {
|
|
|
|
|
text: ''
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
name: '(区域)',
|
|
|
|
|
data: res.data.map((item: any) => item.deptName)
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
name: '',
|
|
|
|
|
min: 0,
|
|
|
|
|
max: 100
|
|
|
|
|
},
|
|
|
|
|
options: {
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: '评估得分',
|
|
|
|
|
type: 'bar',
|
2024-04-26 09:15:20 +08:00
|
|
|
|
2024-04-27 22:18:58 +08:00
|
|
|
data: res.data.map((item: any) => item.assessData)
|
|
|
|
|
}
|
|
|
|
|
]
|
2024-04-26 09:15:20 +08:00
|
|
|
}
|
2024-04-27 22:18:58 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
2024-04-26 09:15:20 +08:00
|
|
|
dialogVisible.value = true
|
|
|
|
|
}
|
2024-04-27 22:18:58 +08:00
|
|
|
const formatter = (row: any) => {
|
|
|
|
|
if (row.cellValue == 3.14159) {
|
|
|
|
|
return '暂无数据'
|
|
|
|
|
} else {
|
|
|
|
|
return row.cellValue
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-04-26 09:15:20 +08:00
|
|
|
|
|
|
|
|
defineExpose({ open })
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped></style>
|