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-04-26 09:15:20 +08:00
|
|
|
<div>
|
|
|
|
|
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
|
2024-05-09 18:00:04 +08:00
|
|
|
<vxe-column field="deptName" title="地市" />
|
2024-06-02 17:55:37 +08:00
|
|
|
<vxe-column field="assessLevel" title="综合评估结论">
|
|
|
|
|
<template #default="scope">
|
2024-06-05 17:01:09 +08:00
|
|
|
<!-- class="conclusion"
|
2024-06-02 17:55:37 +08:00
|
|
|
:class="
|
|
|
|
|
scope.row.assessLevel == '特质'
|
|
|
|
|
? 'background1'
|
|
|
|
|
: scope.row.assessLevel == '较差'
|
|
|
|
|
? 'background2'
|
|
|
|
|
: scope.row.assessLevel == '极差'
|
|
|
|
|
? 'background3'
|
|
|
|
|
: ''
|
2024-06-05 17:01:09 +08:00
|
|
|
" -->
|
2024-06-12 16:16:02 +08:00
|
|
|
<span>
|
2024-06-05 17:01:09 +08:00
|
|
|
{{ scope.row.assessData }}
|
2024-06-02 17:55:37 +08:00
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
<vxe-column field="qualifyData" title="指标合格率(%)" />
|
2024-05-27 10:37:50 +08:00
|
|
|
|
2024-06-05 17:01:09 +08:00
|
|
|
<!-- <vxe-colgroup title="评估结论">
|
2024-06-04 18:06:17 +08:00
|
|
|
<vxe-column field="vdevAssessLevel" title="电压偏差">
|
2024-06-02 17:55:37 +08:00
|
|
|
<template #default="scope">
|
|
|
|
|
<span
|
|
|
|
|
class="conclusion"
|
|
|
|
|
:class="
|
|
|
|
|
scope.row.vdevAssessLevel == '特质'
|
|
|
|
|
? 'background1'
|
|
|
|
|
: scope.row.vdevAssessLevel == '较差'
|
|
|
|
|
? 'background2'
|
|
|
|
|
: scope.row.vdevAssessLevel == '极差'
|
|
|
|
|
? 'background3'
|
|
|
|
|
: ''
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{ scope.row.vdevAssessLevel }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
2024-06-04 18:06:17 +08:00
|
|
|
|
|
|
|
|
<vxe-column field="freqAssessLevel" title="频率偏差">
|
2024-06-02 17:55:37 +08:00
|
|
|
<template #default="scope">
|
|
|
|
|
<span
|
|
|
|
|
class="conclusion"
|
|
|
|
|
:class="
|
|
|
|
|
scope.row.freqAssessLevel == '特质'
|
|
|
|
|
? 'background1'
|
|
|
|
|
: scope.row.freqAssessLevel == '较差'
|
|
|
|
|
? 'background2'
|
|
|
|
|
: scope.row.freqAssessLevel == '极差'
|
|
|
|
|
? 'background3'
|
|
|
|
|
: ''
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{ scope.row.freqAssessLevel }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
2024-06-04 18:06:17 +08:00
|
|
|
|
|
|
|
|
<vxe-column field="harmAssessLevel" title="电压总谐波畸变率">
|
2024-06-02 17:55:37 +08:00
|
|
|
<template #default="scope">
|
|
|
|
|
<span
|
|
|
|
|
class="conclusion"
|
|
|
|
|
:class="
|
|
|
|
|
scope.row.harmAssessLevel == '特质'
|
|
|
|
|
? 'background1'
|
|
|
|
|
: scope.row.harmAssessLevel == '较差'
|
|
|
|
|
? 'background2'
|
|
|
|
|
: scope.row.harmAssessLevel == '极差'
|
|
|
|
|
? 'background3'
|
|
|
|
|
: ''
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{ scope.row.harmAssessLevel }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
2024-06-04 18:06:17 +08:00
|
|
|
|
|
|
|
|
<vxe-column field="flickerAssessLevel" title="电压闪变">
|
2024-06-02 17:55:37 +08:00
|
|
|
<template #default="scope">
|
|
|
|
|
<span
|
|
|
|
|
class="conclusion"
|
|
|
|
|
:class="
|
|
|
|
|
scope.row.flickerAssessLevel == '特质'
|
|
|
|
|
? 'background1'
|
|
|
|
|
: scope.row.flickerAssessLevel == '较差'
|
|
|
|
|
? 'background2'
|
|
|
|
|
: scope.row.flickerAssessLevel == '极差'
|
|
|
|
|
? 'background3'
|
|
|
|
|
: ''
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{ scope.row.flickerAssessLevel }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
2024-06-04 18:06:17 +08:00
|
|
|
|
|
|
|
|
<vxe-column field="unbalanceAssessLevel" title="三相电压不平衡度">
|
2024-06-02 17:55:37 +08:00
|
|
|
<template #default="scope">
|
|
|
|
|
<span
|
|
|
|
|
class="conclusion"
|
|
|
|
|
:class="
|
|
|
|
|
scope.row.unbalanceAssessLevel == '特质'
|
|
|
|
|
? 'background1'
|
|
|
|
|
: scope.row.unbalanceAssessLevel == '较差'
|
|
|
|
|
? 'background2'
|
|
|
|
|
: scope.row.unbalanceAssessLevel == '极差'
|
|
|
|
|
? 'background3'
|
|
|
|
|
: ''
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{ scope.row.unbalanceAssessLevel }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
2024-06-05 17:01:09 +08:00
|
|
|
</vxe-colgroup> -->
|
2024-04-26 09:15:20 +08:00
|
|
|
</vxe-table>
|
|
|
|
|
</div>
|
2024-06-02 17:55:37 +08:00
|
|
|
<div style="height: 300px; margin-top: 10px; position: relative" v-loading="loading">
|
2024-06-12 16:16:02 +08:00
|
|
|
<!-- <el-select
|
2024-06-02 17:55:37 +08:00
|
|
|
v-model="time"
|
|
|
|
|
size="small"
|
2024-06-12 16:16:02 +08:00
|
|
|
|
2024-06-02 17:55:37 +08:00
|
|
|
@change="analysis"
|
|
|
|
|
>
|
|
|
|
|
<el-option label="年" value="1" />
|
|
|
|
|
<el-option label="月" value="3" />
|
2024-06-12 16:16:02 +08:00
|
|
|
</el-select> -->
|
2024-06-13 13:32:50 +08:00
|
|
|
<div style="position: absolute; width: 100px; top: 0px; right: 0px; z-index: 1">
|
|
|
|
|
<el-radio-group v-model="city" size="small" @change="analysis">
|
|
|
|
|
<el-radio-button label="0">省</el-radio-button>
|
|
|
|
|
<el-radio-button label="1">市</el-radio-button>
|
2024-06-12 16:16:02 +08:00
|
|
|
</el-radio-group>
|
2024-06-13 13:32:50 +08:00
|
|
|
<el-radio-group v-model="type" size="small" @change="analysis">
|
2024-06-12 16:16:02 +08:00
|
|
|
<el-radio-button label="1">年</el-radio-button>
|
|
|
|
|
<el-radio-button label="3">月</el-radio-button>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-04-26 09:15:20 +08:00
|
|
|
<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-29 16:37:07 +08:00
|
|
|
import { getAssessDetail, getAssessTrend } from '@/api/device-boot/panorama'
|
2024-04-26 09:15:20 +08:00
|
|
|
const dialogVisible: any = ref(false)
|
2024-06-02 17:55:37 +08:00
|
|
|
const rowList: any = ref({})
|
2024-06-13 13:32:50 +08:00
|
|
|
const type = ref('1')
|
|
|
|
|
const city = ref('0')
|
2024-06-02 17:55:37 +08:00
|
|
|
const loading = 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
|
2024-04-29 16:37:07 +08:00
|
|
|
})
|
2024-06-02 17:55:37 +08:00
|
|
|
rowList.value = row
|
2024-06-13 13:32:50 +08:00
|
|
|
analysis()
|
2024-06-02 17:55:37 +08:00
|
|
|
dialogVisible.value = true
|
|
|
|
|
}
|
2024-06-13 13:32:50 +08:00
|
|
|
const analysis = () => {
|
2024-06-02 17:55:37 +08:00
|
|
|
loading.value = true
|
|
|
|
|
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
|
2024-06-13 13:32:50 +08:00
|
|
|
getAssessTrend({ ...rowList.value, searchBeginTime: time, type: type.value, areaType: city.value }).then(res => {
|
2024-04-27 22:18:58 +08:00
|
|
|
picEChart.value = {
|
|
|
|
|
title: {
|
2024-04-29 16:37:07 +08:00
|
|
|
text: '各地市综合评估趋势对比'
|
2024-04-27 22:18:58 +08:00
|
|
|
},
|
2024-06-12 16:16:02 +08:00
|
|
|
legend: {
|
|
|
|
|
right: 120,
|
|
|
|
|
top: 20
|
|
|
|
|
},
|
2024-06-05 17:01:09 +08:00
|
|
|
// tooltip: {
|
|
|
|
|
// formatter: function (params: any) {
|
|
|
|
|
// // console.log(123, params)
|
|
|
|
|
|
|
|
|
|
// var tips = ''
|
|
|
|
|
|
|
|
|
|
// for (var i = 0; i < params.length; i++) {
|
|
|
|
|
// console.log('🚀 ~ getAssessTrend ~ params[i].value:', params[i].value)
|
|
|
|
|
|
|
|
|
|
// tips +=
|
|
|
|
|
// params[i].seriesName +
|
|
|
|
|
// ':' +
|
|
|
|
|
// `<span style="color:${
|
|
|
|
|
// params[i].value > 4.5
|
|
|
|
|
// ? ''
|
|
|
|
|
// : params[i].value > 4
|
|
|
|
|
// ? ''
|
|
|
|
|
// : params[i].value > 3
|
|
|
|
|
// ? ''
|
|
|
|
|
// : params[i].value > 2
|
|
|
|
|
// ? '#97017e'
|
|
|
|
|
// : params[i].value > 0
|
2025-07-16 18:31:31 +08:00
|
|
|
// ? '#A52a2a'
|
2024-06-05 17:01:09 +08:00
|
|
|
// : ''
|
|
|
|
|
// }">
|
|
|
|
|
// ${
|
|
|
|
|
// params[i].value > 4.5
|
|
|
|
|
// ? '优质'
|
|
|
|
|
// : params[i].value > 4
|
|
|
|
|
// ? '良好'
|
|
|
|
|
// : params[i].value > 3
|
|
|
|
|
// ? '一般'
|
|
|
|
|
// : params[i].value > 2
|
|
|
|
|
// ? '较差'
|
|
|
|
|
// : params[i].value > 0
|
|
|
|
|
// ? '极差'
|
|
|
|
|
// : ''
|
|
|
|
|
// }
|
|
|
|
|
// </span>` +
|
|
|
|
|
// '</br>'
|
|
|
|
|
// }
|
|
|
|
|
// return tips
|
|
|
|
|
// }
|
|
|
|
|
// },
|
2024-04-27 22:18:58 +08:00
|
|
|
xAxis: {
|
2024-05-09 18:00:04 +08:00
|
|
|
name: '时间',
|
|
|
|
|
data: res.data[0].children.map((item: any) => item.dataTime)
|
2024-04-27 22:18:58 +08:00
|
|
|
},
|
2024-06-02 17:55:37 +08:00
|
|
|
|
2024-04-29 16:37:07 +08:00
|
|
|
grid: {
|
2024-06-12 16:16:02 +08:00
|
|
|
bottom: '10px',
|
2024-06-13 13:32:50 +08:00
|
|
|
top: '60px'
|
2024-04-29 16:37:07 +08:00
|
|
|
},
|
2024-06-02 17:55:37 +08:00
|
|
|
|
2024-04-27 22:18:58 +08:00
|
|
|
yAxis: {
|
2024-04-29 16:37:07 +08:00
|
|
|
name: ''
|
2024-04-27 22:18:58 +08:00
|
|
|
},
|
|
|
|
|
options: {
|
2024-04-29 16:37:07 +08:00
|
|
|
dataZoom: false,
|
|
|
|
|
series: []
|
2024-04-26 09:15:20 +08:00
|
|
|
}
|
2024-04-27 22:18:58 +08:00
|
|
|
}
|
2024-04-29 16:37:07 +08:00
|
|
|
|
|
|
|
|
let list: any = []
|
|
|
|
|
let time: any = []
|
2024-06-04 18:06:17 +08:00
|
|
|
let mun: any = []
|
2024-04-29 16:37:07 +08:00
|
|
|
res.data.forEach((item: any, num: any) => {
|
2024-05-09 18:00:04 +08:00
|
|
|
time.push(item.deptName)
|
|
|
|
|
list.push([])
|
2024-04-29 16:37:07 +08:00
|
|
|
item.children.forEach((val: any, i: any) => {
|
2024-06-04 18:06:17 +08:00
|
|
|
mun.push(val.score == 3.14159 ? null : val.score)
|
2024-05-09 18:00:04 +08:00
|
|
|
list[num].push(val.score == 3.14159 ? null : val.score)
|
2024-04-29 16:37:07 +08:00
|
|
|
})
|
|
|
|
|
})
|
2024-06-04 18:06:17 +08:00
|
|
|
|
2024-04-29 16:37:07 +08:00
|
|
|
list.forEach((item: any, i: any) => {
|
|
|
|
|
picEChart.value.options.series.push({
|
|
|
|
|
name: time[i],
|
|
|
|
|
type: 'line',
|
|
|
|
|
data: item
|
|
|
|
|
})
|
|
|
|
|
})
|
2024-06-04 18:06:17 +08:00
|
|
|
picEChart.value.yAxis.min = Math.min(...mun) < 1 ? 0 : (Math.min(...mun) - 0.5).toFixed(2)
|
|
|
|
|
picEChart.value.yAxis.max = Math.max(...mun) > 4.5 ? 5 : (Math.max(...mun) + 0.5).toFixed(2)
|
2024-06-02 17:55:37 +08:00
|
|
|
loading.value = false
|
2024-04-27 22:18:58 +08:00
|
|
|
})
|
|
|
|
|
}
|
2024-04-26 09:15:20 +08:00
|
|
|
|
|
|
|
|
defineExpose({ open })
|
|
|
|
|
</script>
|
2024-05-27 10:37:50 +08:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
:deep(.el-dialog__body) {
|
|
|
|
|
max-height: none !important;
|
|
|
|
|
}
|
2024-06-02 17:55:37 +08:00
|
|
|
.conclusion {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
.background1 {
|
|
|
|
|
background-color: #339966;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.background2 {
|
|
|
|
|
background-color: #97017e;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.background3 {
|
2025-07-16 18:31:31 +08:00
|
|
|
background-color: #A52a2a;
|
2024-06-02 17:55:37 +08:00
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
:deep(.el-select) {
|
|
|
|
|
min-width: 80px !important;
|
|
|
|
|
}
|
2024-05-27 10:37:50 +08:00
|
|
|
</style>
|