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

575 lines
18 KiB
Vue
Raw Normal View History

2024-04-26 09:15:20 +08:00
<template>
2024-04-27 22:18:58 +08:00
<div :class="show ? 'show' : 'noshow'">
<div class="boxLeft" :style="height">
2024-04-26 09:15:20 +08:00
<!-- 综合评估 -->
2024-05-09 18:00:04 +08:00
<div style="height: 110px">
2024-04-26 09:15:20 +08:00
<div class="title">
2024-05-27 10:37:50 +08:00
<span>
综合评估
2024-05-23 17:30:16 +08:00
<el-popover placement="right" :width="150" trigger="hover">
<template #reference>
<WarningFilled class="WarningFilled" />
</template>
<div class="text">
<span style="color: #00b07d">优质(4.5 , 5]</span>
<br />
2024-06-01 14:49:30 +08:00
<span style="color: #2b7fd3">良好(4 , 4.5]</span>
2024-05-23 17:30:16 +08:00
<br />
<span style="color: #ffcc33">合格(3 , 4]</span>
<br />
2024-06-01 14:49:30 +08:00
<span style="color: #97017e">较差(2 , 3]</span>
2024-05-23 17:30:16 +08:00
<br />
<span style="color: #cc0000">极差[1 , 2]</span>
</div>
</el-popover>
</span>
2024-04-26 09:15:20 +08:00
<span class="info" @click="open(0)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
2024-05-09 18:00:04 +08:00
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</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
2024-06-01 14:49:30 +08:00
? '#2b7fd3'
: assessList.score > 3
? '#ffcc33'
: assessList.score > 2
2024-06-01 14:49:30 +08:00
? '#97017e'
: assessList.score > 0
? '#cc0000'
: ''
}"
>
{{ assessList.level }}
</span>
2024-05-09 18:00:04 +08:00
</div>
2024-04-26 09:15:20 +08:00
<div class="evaluate">
2024-05-09 18:00:04 +08:00
<div v-for="item in assessList.children" style="min-width: 50px">
<div>
<span class="line"></span>
{{ item.name }}
</div>
2024-04-27 22:18:58 +08:00
<div
style="margin-top: 5px"
:style="{
color:
item.score == 3.14159
? ''
: item.score > 4.5
? '#339966'
: item.score > 4
2024-06-01 14:49:30 +08:00
? '#2b7fd3'
2024-04-27 22:18:58 +08:00
: item.score > 3
? '#ffcc33'
: item.score > 2
2024-06-01 14:49:30 +08:00
? '#97017e'
2024-04-27 22:18:58 +08:00
: item.score > 0
? '#cc0000'
: ''
}"
>
{{ item.level }}
2024-04-27 22:18:58 +08:00
</div>
2024-04-26 09:15:20 +08:00
</div>
</div>
</div>
<!-- 稳态电能质量水平评估 -->
<div>
<div class="title">
<span>稳态电能质量水平评估</span>
<span class="info" @click="open(1)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
2024-05-09 18:00:04 +08:00
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</div>
2024-04-26 09:15:20 +08:00
<div :style="boxHeight" class="boxR">
<div class="top">
2024-05-09 18:00:04 +08:00
<div class="TJTop">
<img src="@/assets/img/TJ.png" />
监测点越限占比
2024-04-27 22:18:58 +08:00
<span class="num">
2024-05-09 18:00:04 +08:00
{{ harmonicLineRatio == 3.14159 ? '0' : harmonicLineRatio + '%' }}
2024-04-27 22:18:58 +08:00
</span>
2024-05-09 18:00:04 +08:00
</div>
2024-04-27 22:18:58 +08:00
<el-select v-model="harmonicType" style="width: 120px" @change="harmonicChange" size="small">
2024-04-26 09:15:20 +08:00
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
2024-05-09 18:00:04 +08:00
<!-- <MyEChart :style="EchHeight" :options="harmonicList" /> -->
<div :style="EchHeight" class="harmonic mt5">
<div class="progress" v-for="item in harmonicList">
<span class="text">{{ item.deptName }}</span>
<el-progress :percentage="item.ratio" />
</div>
</div>
2024-04-26 09:15:20 +08:00
</div>
</div>
2024-04-29 16:37:07 +08:00
<!-- 暂态电能质量水平评估 -->
2024-04-26 09:15:20 +08:00
<div>
<div class="title">
2024-04-29 16:37:07 +08:00
<span>暂态电能质量水平评估</span>
2024-04-26 09:15:20 +08:00
<span class="info" @click="open(2)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
2024-05-09 18:00:04 +08:00
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</div>
2024-04-26 09:15:20 +08:00
<div :style="boxHeight" class="boxR">
<div class="top">
2024-05-27 10:37:50 +08:00
<div>
<div class="TJTop">
<img src="@/assets/img/TJ.png" />
<span>暂降严重度:</span>
</div>
<div class="ml22" style="font-size: 12px">
<span>
幅值低于90%:
<span class="num">{{ transientNum[0] }}  </span>
幅值低于50%:
2024-05-27 10:37:50 +08:00
<span class="num">{{ transientNum[1] }}</span>
</span>
</div>
2024-05-09 18:00:04 +08:00
</div>
2024-05-27 10:37:50 +08:00
2024-04-27 22:18:58 +08:00
<el-select v-model="value" style="width: 120px" size="small" @change="transientChange">
<el-option v-for="item in options1" :key="item.id" :label="item.name" :value="item.id" />
2024-04-26 09:15:20 +08:00
</el-select>
</div>
2024-05-09 18:00:04 +08:00
<!-- <MyEChart :style="EchHeight" :options="WTList" /> -->
<div :style="EchHeight" class="harmonic mt5">
<div class="progress" v-for="item in WTList">
<span class="text">{{ item.orgName }}</span>
2024-05-22 17:19:22 +08:00
<el-progress :percentage="item.count" :format="format" />
2024-05-09 18:00:04 +08:00
</div>
</div>
2024-04-26 09:15:20 +08:00
</div>
</div>
<!-- 技术监督管理 -->
<div>
<div class="title">
2024-05-09 18:00:04 +08:00
<span>技术监督管理</span>
2024-04-26 09:15:20 +08:00
<span class="info" @click="open(3)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
2024-05-09 18:00:04 +08:00
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</div>
<div style="height: 150px" class="boxR">
2024-04-26 09:15:20 +08:00
<div class="evaluate bottom">
<div v-for="item in JDlist" style="width: 80px">
<div>{{ item.name }}</div>
2024-05-09 18:00:04 +08:00
<div style="margin-top: 5px; font-weight: 550">{{ item.value }}</div>
2024-04-26 09:15:20 +08:00
</div>
</div>
2024-05-09 18:00:04 +08:00
<el-row
style="height: calc(100% - 45px); display: flex; justify-content: space-around"
class="ml10 mr10 mt5"
>
<el-col :span="11" class="col pt10">
2024-04-26 09:15:20 +08:00
<div>
<span>异常问题总数</span>
2024-05-16 17:55:09 +08:00
<span style="color: #2dcd28">0</span>
2024-04-26 09:15:20 +08:00
</div>
<div>
<span style="width: 120px">已关联工单数</span>
2024-05-16 17:55:09 +08:00
<span style="color: #81b337">0</span>
2024-04-26 09:15:20 +08:00
</div>
<div>
<span style="width: 120px"> 工单转换率</span>
2024-05-16 17:55:09 +08:00
<span style="color: #338dff">0%</span>
2024-04-26 09:15:20 +08:00
</div>
</el-col>
2024-05-09 18:00:04 +08:00
<el-col :span="11" class="col pt10" :offset="0.5">
2024-04-26 09:15:20 +08:00
<div>
<span>异常问题总数</span>
2024-05-16 17:55:09 +08:00
<span style="color: #2dcd28">0</span>
2024-04-26 09:15:20 +08:00
</div>
<div>
<span style="width: 120px">已关联工单数</span>
2024-05-16 17:55:09 +08:00
<span style="color: #81b337">0</span>
2024-04-26 09:15:20 +08:00
</div>
<div>
<span style="width: 120px"> 工单转换率</span>
2024-05-16 17:55:09 +08:00
<span style="color: #338dff">0%</span>
2024-04-26 09:15:20 +08:00
</div>
</el-col>
</el-row>
</div>
</div>
</div>
2024-04-30 11:18:41 +08:00
<img
2024-04-26 09:15:20 +08:00
class="imgR"
:style="show ? 'transform: rotate(180deg);' : 'transform: rotate(0deg);'"
@click="show = !show"
src="@/assets/img/QH.png"
2024-04-30 11:18:41 +08:00
/>
2024-06-01 14:49:30 +08:00
<div class="legeng">
<div v-for="item in legengList">
<span :style="`background-color: ${item.color};`"></span>
<span>{{ item.title }}</span>
</div>
</div>
2024-04-26 09:15:20 +08:00
<!-- 评估 -->
<Evaluate ref="evaluateRef" />
<!-- 稳态 -->
<steadyState ref="steadyStateRef" />
<!-- 暂态 -->
<temporaryState ref="temporaryStateRef" />
<!-- 技术 -->
<technique ref="techniqueRef" />
</div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, provide } from 'vue'
import MyEChart from '@/components/echarts/MyEchart.vue'
import { useDictData } from '@/stores/dictData'
import { mainHeight } from '@/utils/layout'
2024-05-23 17:30:16 +08:00
import { WarningFilled } from '@element-plus/icons-vue'
2024-04-26 09:15:20 +08:00
import { ArrowRight } from '@element-plus/icons-vue'
import Evaluate from './details/evaluate.vue'
import steadyState from './details/steadyState.vue'
import temporaryState from './details/temporaryState.vue'
import technique from './details/technique.vue'
2024-04-27 22:18:58 +08:00
import { getAssessOverview, getEvaluationOverview, getEventLevelEvaluation } from '@/api/device-boot/panorama'
2024-04-26 09:15:20 +08:00
const dictData = useDictData()
const show = ref(false)
const height = mainHeight(30)
2024-05-09 18:00:04 +08:00
const boxHeight: any = mainHeight(420, 2)
const EchHeight: any = mainHeight(490, 2)
2024-04-26 09:15:20 +08:00
const evaluateRef = ref()
const steadyStateRef = ref()
2024-04-27 22:18:58 +08:00
const formRow: any = ref({})
2024-04-26 09:15:20 +08:00
const temporaryStateRef = ref()
const techniqueRef = ref()
const mun = ref(0)
2024-04-26 09:15:20 +08:00
const options = ref([
2024-04-27 22:18:58 +08:00
{
label: '全指标',
value: '0'
},
2024-04-26 09:15:20 +08:00
{
label: '电压偏差',
value: '1'
},
{
label: '频率偏差',
value: '2'
},
{
label: '电压总谐波畸变率',
value: '3'
},
{
label: '电压闪变',
value: '4'
},
{
label: '三相电压不平衡度',
value: '5'
}
])
2024-04-27 22:18:58 +08:00
const harmonicType = ref('0')
const transientNum = ref([0, 0])
2024-04-27 22:18:58 +08:00
const options1: any = dictData.getBasicData('Event_Statis').filter(item => {
if (item.code == 'Voltage_Dip' || item.code == 'Voltage_Rise' || item.code == 'Short_Interruptions') {
return item
2024-04-26 09:15:20 +08:00
}
2024-04-27 22:18:58 +08:00
})
2024-06-01 14:49:30 +08:00
const legengList = [
{
color: '#00b07d',
title: '优质'
},
{
color: '#3399ff',
title: '良好'
},
{
color: '#ffcc33',
title: '合格'
},
{
color: '#db0887',
title: '较差'
},
{
color: '#ff0000',
title: '极差'
}
]
2024-04-27 22:18:58 +08:00
const assessList: any = ref([])
2024-04-26 09:15:20 +08:00
const JDlist = ref([
{
name: '技术监督计划',
2024-05-16 17:55:09 +08:00
value: 0
2024-04-26 09:15:20 +08:00
},
{
2024-05-09 18:00:04 +08:00
name: '在线监测',
2024-05-16 17:55:09 +08:00
value: 0
2024-04-26 09:15:20 +08:00
},
{
2024-05-09 18:00:04 +08:00
name: '用户投诉',
2024-05-16 17:55:09 +08:00
value: 0
2024-04-26 09:15:20 +08:00
},
{
2024-05-09 18:00:04 +08:00
name: '谐波普测',
2024-05-16 17:55:09 +08:00
value: 0
2024-04-26 09:15:20 +08:00
}
])
2024-05-09 18:00:04 +08:00
const harmonicList: any = ref([])
2024-04-27 22:18:58 +08:00
const harmonicLineRatio: any = ref(0)
2024-05-09 18:00:04 +08:00
const WTList: any = ref([])
2024-04-26 09:15:20 +08:00
2024-04-27 22:18:58 +08:00
const value = ref(options1[0].id)
2024-04-26 09:15:20 +08:00
const open = (e: number) => {
if (e == 0) {
2024-04-27 22:18:58 +08:00
evaluateRef.value.open(formRow.value)
2024-04-26 09:15:20 +08:00
} else if (e == 1) {
2024-04-27 22:18:58 +08:00
steadyStateRef.value.open(formRow.value)
2024-04-26 09:15:20 +08:00
} else if (e == 2) {
2024-04-27 22:18:58 +08:00
temporaryStateRef.value.open(formRow.value)
2024-04-26 09:15:20 +08:00
} else if (e == 3) {
2024-04-27 22:18:58 +08:00
techniqueRef.value.open(formRow.value)
2024-04-26 09:15:20 +08:00
}
}
const info = (row: any) => {
let form = {
2024-04-27 22:18:58 +08:00
...row,
2024-04-26 09:15:20 +08:00
id: row.orgNo,
deptIndex: row.orgNo,
orgId: row.orgNo,
ids: [],
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0],
isUpToGrid: row.isUpToGrid,
2024-05-09 18:00:04 +08:00
monitorFlag: row.isUpToGrid == 0 ? null : row.isUpToGrid
2024-04-26 09:15:20 +08:00
}
2024-04-27 22:18:58 +08:00
formRow.value = form
2024-06-04 16:56:57 +08:00
2024-04-29 16:37:07 +08:00
// 稳态电能质量水平评估概览数据
2024-04-27 22:18:58 +08:00
harmonicChange()
// 暂态统计详情
transientChange()
2024-06-04 16:56:57 +08:00
// 综合评估
setTimeout(() => {
getAssessOverview(form).then(res => {
assessList.value = res.data
})
}, 300)
2024-04-27 22:18:58 +08:00
}
const harmonicChange = () => {
getEvaluationOverview({ ...formRow.value, harmonicType: harmonicType.value }).then(res => {
harmonicLineRatio.value = res.data.lineRatio
2024-05-09 18:00:04 +08:00
harmonicList.value = res.data.childrenList.map((item: any) => {
item.ratio = item.ratio == 3.14159 ? 0 : item.ratio
return item
})
2024-04-27 22:18:58 +08:00
})
}
const transientChange = () => {
getEventLevelEvaluation({ ...formRow.value, ids: [value.value] }).then(res => {
let data = []
transientNum.value = [0, 0]
2024-04-27 22:18:58 +08:00
if (formRow.value.isUpToGrid == 0) {
data = res.data.info
transientNum.value = res.data.data
2024-04-27 22:18:58 +08:00
} else {
transientNum.value = res.data.gwData
2024-04-27 22:18:58 +08:00
data = res.data.gwInfo
}
WTList.value = []
mun.value = Math.max(...data.map((item: any) => item.count)) - 0
data.forEach((item: any) => {
item.count = item.count == 0 ? 0 : Number(((item.count / mun.value) * 100).toFixed(2))
})
2024-05-09 18:00:04 +08:00
WTList.value = data
2024-04-27 22:18:58 +08:00
})
2024-04-26 09:15:20 +08:00
}
const format = (percentage: any) => (Math.round(percentage * mun.value) / 100).toFixed(0) + '条'
2024-05-22 17:19:22 +08:00
2024-05-09 18:00:04 +08:00
defineExpose({ info, show })
2024-04-26 09:15:20 +08:00
</script>
<style lang="scss" scoped>
.boxLeft {
background-color: #fff;
2024-04-27 22:18:58 +08:00
width: 100%;
2024-04-30 11:18:41 +08:00
padding: 10px 10px 10px 10px;
2024-04-26 09:15:20 +08:00
font-size: 13px;
overflow: hidden;
2024-05-09 18:00:04 +08:00
border-radius: 5px;
2024-04-26 09:15:20 +08:00
}
.title {
// height: ;
display: flex;
justify-content: space-between;
2024-05-09 18:00:04 +08:00
font-size: 15px;
2024-04-27 22:18:58 +08:00
line-height: 23px;
2024-04-26 09:15:20 +08:00
padding-left: 5px;
width: 100%;
2024-05-09 18:00:04 +08:00
font-weight: 550;
2024-04-26 09:15:20 +08:00
.info {
font-weight: normal;
display: flex;
font-size: 12px;
cursor: pointer;
2024-05-09 18:00:04 +08:00
color: #757575;
}
2024-05-23 17:30:16 +08:00
.WarningFilled {
width: 12px;
font-weight: 500;
cursor: pointer;
}
2024-05-09 18:00:04 +08:00
}
.TJTop {
display: flex;
img {
height: 1.2rem;
width: 1.2rem;
margin-right: 5px;
2024-04-26 09:15:20 +08:00
}
}
.evaluate {
margin: 10px 0;
display: flex;
justify-content: space-around;
text-align: center;
2024-04-27 22:18:58 +08:00
overflow-x: auto;
overflow-y: hidden;
2024-05-09 18:00:04 +08:00
.line {
display: inline-block;
width: 0.5rem;
height: 0.5rem;
border-radius: 0.25rem;
background: var(--el-color-primary);
margin-right: 2px;
margin-bottom: 1px;
}
2024-04-26 09:15:20 +08:00
}
.boxR {
2024-05-09 18:00:04 +08:00
margin: 10px 0 0 0;
2024-04-26 09:15:20 +08:00
.num {
color: #2478f2;
}
.top {
display: flex;
justify-content: space-between;
}
.bottom {
margin: 0;
border: 0px;
}
2024-05-09 18:00:04 +08:00
.harmonic {
display: grid;
overflow-y: auto;
2024-05-09 18:00:04 +08:00
.progress {
display: flex;
align-items: center;
2024-06-01 14:49:30 +08:00
2024-05-09 18:00:04 +08:00
.text {
width: 50px;
font-size: 12px;
}
.el-progress {
flex: 1;
}
}
}
2024-04-26 09:15:20 +08:00
}
:deep(.el-select) {
min-width: 120px;
}
.col {
2024-04-29 16:37:07 +08:00
display: grid;
grid-template-columns: 1fr;
2024-05-09 18:00:04 +08:00
border-radius: 10px;
2024-04-29 16:37:07 +08:00
text-align: center;
2024-05-16 17:55:09 +08:00
align-items: center;
2024-05-09 18:00:04 +08:00
background-color: #edededc0;
2024-04-26 09:15:20 +08:00
}
.imgR {
position: absolute;
padding: 10px;
top: calc(50% - 80px);
left: -23px;
2024-05-09 18:00:04 +08:00
2024-04-26 09:15:20 +08:00
height: 200px;
cursor: pointer;
}
2024-06-01 14:49:30 +08:00
.legeng {
position: absolute;
padding: 5px;
bottom: 0;
left: -75px;
width: 70px;
font-size: 12px;
height: 120px;
background: #fff;
border-radius: 5px;
display: grid;
line-height: 22px;
grid-template-rows: auto;
div {
display: flex;
align-items: center;
2024-06-04 16:56:57 +08:00
justify-content: center;
2024-06-01 14:49:30 +08:00
span:nth-child(1) {
display: inline-block;
height: 10px;
border-radius: 2px;
width: 15px;
margin-right: 5px;
}
}
}
2024-04-26 09:15:20 +08:00
.show {
width: 0px;
2024-06-05 13:28:58 +08:00
transition: all 0.1s ease;
2024-04-27 22:18:58 +08:00
.boxLeft {
padding: 0;
}
2024-04-26 09:15:20 +08:00
}
.noshow {
2024-04-27 22:18:58 +08:00
width: 25%;
2024-04-26 09:15:20 +08:00
transition: all 0.3s ease;
2024-04-27 22:18:58 +08:00
.boxLeft {
2024-04-30 11:18:41 +08:00
padding: 10px 10px 10px 10px;
2024-04-27 22:18:58 +08:00
}
2024-04-26 09:15:20 +08:00
}
2024-05-09 18:00:04 +08:00
:deep(.el-progress__text) {
font-size: 0.8rem !important ;
}
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>