调整电网一张图污染水平评估

This commit is contained in:
guanj
2026-07-20 10:04:02 +08:00
parent e77c57f8d0
commit 5eb5a01b50
6 changed files with 357 additions and 383 deletions

View File

@@ -109,19 +109,19 @@
<template #content>
<div class="thd-limit-tip__row">
<span>U < 6kV</span>
<span>5.0</span>
<span>5.0%</span>
</div>
<div class="thd-limit-tip__row">
<span>6kV U 20kV</span>
<span>4.0</span>
<span>4.0%</span>
</div>
<div class="thd-limit-tip__row">
<span>35kV U 66kV</span>
<span>3.0</span>
<span>3.0%</span>
</div>
<div class="thd-limit-tip__row">
<span>110kV U 1000kV</span>
<span>2.0</span>
<span>2.0%</span>
</div>
</template>
<el-icon><WarningFilled /></el-icon>

View File

@@ -1,299 +1,260 @@
<template>
<!-- 综合评估详情 -->
<el-dialog draggable title="综合评估统计" v-model="dialogVisible" width="1400px">
<div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<vxe-column field="deptName" title="地市" />
<vxe-column field="assessLevel" title="综合评估结论">
<template #default="scope">
<!-- class="conclusion"
:class="
scope.row.assessLevel == '特质'
? 'background1'
: scope.row.assessLevel == '较差'
? 'background2'
: scope.row.assessLevel == '极差'
? 'background3'
: ''
" -->
<span>
{{ scope.row.assessData }}
</span>
</template>
</vxe-column>
<vxe-column field="qualifyData" title="指标合格率(%)" />
<!-- <vxe-colgroup title="评估结论">
<vxe-column field="vdevAssessLevel" title="电压偏差">
<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>
<vxe-column field="freqAssessLevel" title="频率偏差">
<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>
<vxe-column field="harmAssessLevel" title="电压总谐波畸变率">
<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>
<vxe-column field="flickerAssessLevel" title="电压闪变">
<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>
<vxe-column field="unbalanceAssessLevel" title="三相电压不平衡度">
<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>
</vxe-colgroup> -->
</vxe-table>
</div>
<div style="height: 300px; margin-top: 10px; position: relative" v-loading="loading">
<!-- <el-select
v-model="time"
size="small"
@change="analysis"
>
<el-option label="年" value="1" />
<el-option label="月" value="3" />
</el-select> -->
<div style="position: absolute; width: 100px; top: 0px; right: 15px; 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>
</el-radio-group>
<el-radio-group v-model="type" size="small" @change="analysis">
<el-radio-button label="1"></el-radio-button>
<el-radio-button label="3"></el-radio-button>
</el-radio-group>
</div>
<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'
import { getAssessDetail, getAssessTrend } from '@/api/device-boot/panorama'
const dialogVisible: any = ref(false)
const rowList: any = ref({})
const type = ref('1')
const city = ref('0')
const loading = ref(false)
const tableData: any = ref([])
const picEChart = ref()
const open = async (row: any) => {
getAssessDetail(row).then(res => {
tableData.value = res.data
})
rowList.value = row
analysis()
dialogVisible.value = true
}
const analysis = () => {
loading.value = true
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
getAssessTrend({ ...rowList.value, searchBeginTime: time, type: type.value, areaType: city.value }).then(res => {
picEChart.value = {
title: {
text: '各地市综合评估趋势对比'
},
legend: {
right: 125,
top: 20
},
// 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
// ? '#A52a2a'
// : ''
// }">
// ${
// 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
// }
// },
xAxis: {
name: '时间',
data: res.data[0].children.map((item: any) => item.dataTime)
},
grid: {
bottom: '10px',
top: '60px'
},
yAxis: {
name: ''
},
options: {
dataZoom: false,
series: []
}
}
let list: any = []
let time: any = []
let mun: any = []
res.data.forEach((item: any, num: any) => {
time.push(item.deptName)
list.push([])
item.children.forEach((val: any, i: any) => {
mun.push(val.score == 3.14159 ? null : val.score)
list[num].push(val.score == 3.14159 ? null : val.score)
})
})
list.forEach((item: any, i: any) => {
picEChart.value.options.series.push({
name: time[i],
type: 'line',
data: item
})
})
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)
loading.value = false
})
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
:deep(.el-dialog__body) {
max-height: none !important;
}
.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 {
background-color: #A52a2a;
color: #fff;
}
:deep(.el-select) {
min-width: 80px !important;
}
</style>
<template>
<!-- 综合评估详情 -->
<el-dialog draggable title="稳态电能质量水平评估" v-model="dialogVisible" width="1400px">
<div class="title mb5">
<span>区域污染水平评估</span>
</div>
<div style="display: flex">
<div style="width: 400px">
<vxe-table
v-bind="defaultAttribute"
ref="tableRef"
@cell-click="currentChangeEvent"
height="250px"
:row-config="{ isCurrent: true, isHover: true }"
:data="tableData"
style="cursor: pointer"
>
<vxe-column field="deptName" title="地市" />
<vxe-column field="score" title="污染值" sortable>
<template #default="scope">
<span
:style="{
color: setColor(scope.row.score)
}"
>
{{ scope.row.score }}
</span>
</template>
</vxe-column>
</vxe-table>
</div>
<div class="ml10 " style="width: 980px">
<vxe-table
v-bind="defaultAttribute"
@cell-click="clickAttribute"
v-loading="loadingTab"
ref="vxeRef"
height="250px"
:data="subdata"
style="cursor: pointer"
>
<vxe-column type="seq" width="70" title="序号"></vxe-column>
<vxe-column field="subName" title="变电站名称" min-width="120"></vxe-column>
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
<vxe-column field="objName" title="监测对象名称" align="center" min-width="100"></vxe-column>
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="100"></vxe-column>
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
<vxe-column field="vharmonicValue" title="污染值" sortable min-width="80">
<template #default="scope">
<span
:style="{
color: setColor(scope.row.vharmonicValue)
}"
>
{{ scope.row.vharmonicValue }}
</span>
</template>
</vxe-column>
</vxe-table>
</div>
</div>
<div class="title mb5 mt10">
<span>敏感及重要用户评估</span>
</div>
<div style="height: 265px; position: relative" v-loading="loading">
<vxe-table
v-bind="defaultAttribute"
ref="tableRef1"
@cell-click="pollutionClick"
height="265px"
:row-config="{ isCurrent: true, isHover: true }"
:data="pollutionValueList"
style="cursor: pointer"
>
<vxe-column title="序号" width="60" type="seq"></vxe-column>
<vxe-column field="gdName" title="供电公司" Width="150" />
<vxe-column field="subStationName" title="变电站" />
<vxe-column field="projectName" title="项目名称" />
<vxe-column field="subValue" title="谐波电压污染值" width="150" />
</vxe-table>
<!-- <MyEChart style="height: 300px" :options="picEChart" @echartClick="echartClick" /> -->
</div>
</el-dialog>
</template>
<script setup lang="ts">
import { ref, nextTick } from 'vue'
import MyEChart from '@/components/echarts/MyEchart.vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { getAssessDetail, getAssessTrend, downPollutionSensitiveUser } from '@/api/device-boot/panorama'
import { useRoute } from 'vue-router'
const router = useRouter()
const dictData = useDictData()
const dialogVisible: any = ref(false)
const rowList: any = ref({})
const type = ref('1')
const city = ref('0')
const loading = ref(false)
const tableData: any = ref([])
const subdata: any = ref([])
const picEChart = ref()
const pollutionValueList = ref([])
const tableRef = ref()
const loadingTab = ref(false)
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
const open = async (row: any, list: any) => {
// getAssessDetail(row).then(res => {
tableData.value = list
subdata.value = tableData.value[0]?.powerFlagPollutionList || []
nextTick(() => {
setTimeout(() => {
tableRef.value?.setCurrentRow(tableData.value[0])
}, 0)
})
// })
rowList.value = row
analysis()
dialogVisible.value = true
}
const currentChangeEvent = async () => {
loadingTab.value = true
setTimeout(() => {
subdata.value = tableRef.value.getCurrentRecord()?.powerFlagPollutionList || []
loadingTab.value = false
}, 1000)
}
const analysis = () => {
loading.value = true
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
downPollutionSensitiveUser({ ...rowList.value, ids: [PollutionList?.[0]?.id], deptId: rowList.value.id }).then(res => {
pollutionValueList.value = res.data.filter((item: any) => item.subValue != null)
// const first10Items = res.data.slice(0, 10)
// picEChart.value = {
// title: {
// text: '污染值排名前十敏感及重要用户'
// },
// xAxis: {
// name: '',
// data: first10Items.map((item: any) => item.projectName.split('(')[0].trim()),
// axisLabel: {
// rotate: 20 // 核心:倾斜 45 度(推荐 30/45/60角度太大易读性差
// }
// },
// grid: {
// bottom: 10
// },
// legend: {
// show: false
// },
// yAxis: {
// name: ''
// },
// options: {
// dataZoom: false,
// series: [
// {
// // name: time[i],
// name: '污染值',
// type: 'bar',
// data: first10Items.map((item: any) => item.subValue),
// itemStyle: {
// color: function (params) {
// // params.value 是当前柱子的数值
// const value = params.value
// return setColor(value)
// }
// }
// }
// ]
// }
// }
loading.value = false
})
}
const setColor = val => {
return val == 3.14159
? ''
: val > 10000
? '#A52a2a'
: val > 1000
? '#ff9900'
: val > 100
? '#ffcc33'
: val > 0
? '#3399ff'
: val == 0
? '#00B07D'
: ''
}
const pollutionClick = (res: any) => {
router.push({
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport',
query: {
type: '4',
name: res.row.projectName,
t: Date.now()
}
})
}
const clickAttribute = (row: any) => {
router.push({
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport',
query: {
type: '1',
name: row.row.lineName,
t: Date.now()
}
})
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
:deep(.el-dialog__body) {
max-height: none !important;
}
.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 {
background-color: #a52a2a;
color: #fff;
}
:deep(.el-select) {
min-width: 80px !important;
}
.title {
display: flex;
justify-content: space-between;
position: relative;
span {
font-weight: 550;
font-size: 18px;
}
.WarningFilled {
width: 16px;
cursor: pointer;
}
}
</style>

View File

@@ -191,12 +191,12 @@
@click="show = !show"
src="@/assets/img/QH.png"
/>
<div class="legeng">
<!-- <div class="legeng">
<div v-for="item in legengList">
<span :style="`background-color: ${item.color};`"></span>
<span>{{ item.title }}</span>
</div>
</div>
</div> -->
<!-- 变电站详情 -->
<stand ref="standRef" />

View File

@@ -149,12 +149,12 @@
@click="show = !show"
src="@/assets/img/QH.png"
/>
<div class="legeng">
<!-- <div class="legeng">
<div v-for="item in legengList">
<span :style="`background-color: ${item.color};`"></span>
<span>{{ item.title }}</span>
</div>
</div>
</div> -->
<!-- 变电站详情 -->
<stand ref="standRef" />

View File

@@ -4,26 +4,7 @@
<!-- 综合评估 -->
<div style="height: 110px">
<div class="title">
<span>
稳态综合评估
<el-popover placement="right" :width="190" trigger="hover">
<template #reference>
<WarningFilled class="WarningFilled" />
</template>
<div class="text">
<span style="color: #00B07D">优秀:(4.5,5]</span>
<br />
<span style="color: #3399ff">良好:(4,4.5]</span>
<br />
<span style="color: #ffcc33">合格:(3,4]</span>
<br />
<span style="color: #ff9900">较差:(2,3]</span>
<br />
<span style="color: #A52a2a">极差:[1,2]</span>
</div>
</el-popover>
</span>
<span>稳态电能质量水平评估</span>
<span class="info" @click="open(0)">
详情
<ArrowRight style="width: 12px" />
@@ -34,58 +15,47 @@
</div>
<div class="mt10 TJTop">
<img src="@/assets/img/TJ.png" />
综合评估得分
<span
:style="{
color:
assessList.score == 3.14159
? ''
: assessList.score > 4.5
? '#339966'
: assessList.score > 4
? '#2b7fd3'
: assessList.score > 3
? '#ffcc33'
: assessList.score > 2
? '#97017e'
: assessList.score > 0
? '#A52a2a'
: ''
}"
>
{{ assessList.score == 3.14159 ? '/' : assessList.score }}
</span>
区域污染水平评估
<el-popover placement="right" :width="190" trigger="hover">
<template #reference>
<WarningFilled class="WarningFilled ml5" />
</template>
<div class="text">
<span style="color: #00b07d">无污染0</span>
<br />
<span style="color: #3399ff">轻微污染(0 , 100]</span>
<br />
<span style="color: #ffcc33">轻度污染(100 , 1000]</span>
<br />
<span style="color: #ff9900">中度污染(1000 , 10000]</span>
<br />
<span style="color: #a52a2a">重度污染(10000</span>
</div>
</el-popover>
</div>
<div class="evaluate">
<div v-for="item in assessList.children" style="min-width: 50px">
<div v-for="item in assessList" style="min-width: 60px" class="mb3">
<div>
<span class="line"></span>
{{ item.name }}
<span
class="line"
:style="{
background: setColor(item.score)
}"
></span>
{{ item.deptName }}
</div>
<div
style="margin-top: 5px"
:style="{
color:
item.score == 3.14159
? ''
: item.score > 4.5
? '#339966'
: item.score > 4
? '#2b7fd3'
: item.score > 3
? '#ffcc33'
: item.score > 2
? '#97017e'
: item.score > 0
? '#A52a2a'
: ''
color: setColor(item.score)
}"
>
{{ item.score == 3.14159 ? '/' : item.score }}
{{ setVal(item.score) }}
</div>
</div>
</div>
</div>
<!-- 稳态电能质量水平评估 -->
<div>
<div class="title">
@@ -108,7 +78,13 @@
</span>
</div>
<el-select v-model="harmonicType" style="width: 120px" @change="harmonicChange" size="small" filterable>
<el-select
v-model="harmonicType"
style="width: 120px"
@change="harmonicChange"
size="small"
filterable
>
<el-option
v-for="item in options"
:key="item.value"
@@ -155,7 +131,13 @@
</div>
</div>
<el-select v-model="value" style="width: 120px" size="small" @change="transientChange" filterable>
<el-select
v-model="value"
style="width: 120px"
size="small"
@change="transientChange"
filterable
>
<el-option v-for="item in options1" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</div>
@@ -259,6 +241,7 @@ import temporaryState from './details/temporaryState.vue'
import technique from './details/technique.vue'
import {
getAssessOverview,
getAreaPollution,
getEvaluationOverview,
getEventLevelEvaluation,
getSupervisionData
@@ -314,8 +297,7 @@ const options = ref([
{
label: '负序电流',
value: '9'
},
}
])
const technology: any = ref({})
const harmonicType = ref('6')
@@ -364,17 +346,16 @@ const JDlist = ref([
{
name: '试运行问题',
value: 0
},
}
])
const harmonicList: any = ref([])
const harmonicLineRatio: any = ref(0)
const WTList: any = ref([])
const PollutionList = dictData.getBasicData('Pollution_Calc')?.filter(item => item.name == '谐波电压')
const value = ref(options1[0].id)
const open = (e: number) => {
if (e == 0) {
evaluateRef.value.open(formRow.value)
evaluateRef.value.open(formRow.value, assessList.value)
} else if (e == 1) {
steadyStateRef.value.open(formRow.value)
} else if (e == 2) {
@@ -383,6 +364,36 @@ const open = (e: number) => {
techniqueRef.value.open(formRow.value)
}
}
const setColor = (val: any) => {
return val == 3.14159
? ''
: val > 10000
? '#A52a2a'
: val > 1000
? '#ff9900'
: val > 100
? '#ffcc33'
: val > 0
? '#3399ff'
: val == 0
? '#00B07D'
: ''
}
const setVal = (val: any) => {
return val == 3.14159
? '/'
: val > 10000
? '重度'
: val > 1000
? '中度'
: val > 100
? '轻度'
: val > 0
? '轻微'
: val == 0
? '无'
: ''
}
const info = (row: any) => {
let form = {
...row,
@@ -402,7 +413,10 @@ const info = (row: any) => {
transientChange()
// 综合评估
setTimeout(() => {
getAssessOverview(form).then(res => {
// getAssessOverview(form).then(res => {
// assessList.value = res.data
// })
getAreaPollution({ ...form, ids: [PollutionList?.[0]?.id] }).then(res => {
assessList.value = res.data
})
}, 300)
@@ -413,8 +427,7 @@ const info = (row: any) => {
JDlist.value[1].value = res.data?.onLineNum || 0
JDlist.value[2].value = res.data?.userNum || 0
JDlist.value[3].value = res.data?.trialRunNum || 0
})
})
}
const harmonicChange = () => {
getEvaluationOverview({ ...formRow.value, harmonicType: harmonicType.value }).then(res => {
@@ -476,11 +489,11 @@ defineExpose({ info, show })
cursor: pointer;
color: #757575;
}
.WarningFilled {
width: 12px;
font-weight: 500;
cursor: pointer;
}
}
.WarningFilled {
width: 12px;
font-weight: 500;
cursor: pointer;
}
.TJTop {
display: flex;

View File

@@ -29,7 +29,7 @@
</vxe-column>
</vxe-table>
</div>
<div class="ml10" style="width: 990px">
<div class="ml10 pr20" style="width: 980px">
<vxe-table
v-bind="defaultAttribute"
@cell-click="clickAttribute"