同步电网一张图代码
This commit is contained in:
@@ -16,20 +16,20 @@
|
||||
<div class="title">
|
||||
<span>
|
||||
污染告警
|
||||
<el-popover placement="right" :width="150" trigger="hover">
|
||||
<el-popover placement="right" :width="170" trigger="hover">
|
||||
<template #reference>
|
||||
<WarningFilled class="WarningFilled" />
|
||||
</template>
|
||||
<div class="text">
|
||||
<span style="color: #00b07d">无污染:(0,1]</span>
|
||||
<span style="color: #00b07d">无污染:(0 , 1]</span>
|
||||
<br />
|
||||
<span style="color: #3399ff">轻微污染:(1,1.2]</span>
|
||||
<span style="color: #3399ff">轻微污染:(1 , 1.2]</span>
|
||||
<br />
|
||||
<span style="color: #ffcc33">轻度污染:(1.2,1.6]</span>
|
||||
<span style="color: #ffcc33">轻度污染:(1.2 , 1.6]</span>
|
||||
<br />
|
||||
<span style="color: #ff9900">中度污染:(1.6,2]</span>
|
||||
<span style="color: #ff9900">中度污染:(1.6 , 2]</span>
|
||||
<br />
|
||||
<span style="color: #cc0000">重度污染:(2,+∞)</span>
|
||||
<span style="color: #cc0000">重度污染:(2 , +∞)</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
</span>
|
||||
@@ -120,17 +120,29 @@ const contaminateC = () => {
|
||||
data = res.data.gwInfo
|
||||
}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i] >= 0 || data[i] < 1) {
|
||||
a1++
|
||||
} else if (data[i] >= 1 || data[i] < 1.2) {
|
||||
a2++
|
||||
} else if (data[i] >= 1.2 || data[i] < 1.6) {
|
||||
a3++
|
||||
} else if (data[i] >= 1.6 || data[i] < 2) {
|
||||
a4++
|
||||
} else if (data[i] >= 2) {
|
||||
if (data[i] >= 2) {
|
||||
a5++
|
||||
} else if (data[i] >= 1.6 && data[i] < 2) {
|
||||
a4++
|
||||
} else if (data[i] >= 1.2 && data[i] < 1.6) {
|
||||
a3++
|
||||
} else if (data[i] >= 1 && data[i] < 1.2) {
|
||||
a4++
|
||||
} else if (data[i] >= 0 && data[i] < 1) {
|
||||
a1++
|
||||
}
|
||||
|
||||
// if (data[i] >= 0 || data[i] < 1) {
|
||||
// a1++
|
||||
// } else if (data[i] >= 1 || data[i] < 1.2) {
|
||||
// a2++
|
||||
// } else if (data[i] >= 1.2 || data[i] < 1.6) {
|
||||
// a3++
|
||||
// } else if (data[i] >= 1.6 || data[i] < 2) {
|
||||
// a4++
|
||||
// } else if (data[i] >= 2) {
|
||||
// a5++
|
||||
// }
|
||||
}
|
||||
// console.log('🚀 ~ getPollutionAlarmData ~ a1 / data.length:', a1 / data.length)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<el-col :span="8">
|
||||
<h3 class="mb10 iconBox">
|
||||
<span></span>
|
||||
告警明细
|
||||
告警明细 (天)
|
||||
</h3>
|
||||
<el-descriptions title="" border :column="2" size="small">
|
||||
<el-descriptions-item width="140px" label="告警原因">
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
<div class="title">
|
||||
<span @click="GridDiagram(i)">
|
||||
{{ item.title }}
|
||||
<span class="ratio">
|
||||
{{item.ratioTitle}}:
|
||||
{{ item.ratio }}%
|
||||
</span>
|
||||
<span class="ratio">{{ item.ratioTitle }}: {{ item.ratio }}%</span>
|
||||
</span>
|
||||
<span class="info" @click="open(i)">
|
||||
详情
|
||||
@@ -166,7 +163,7 @@ const list: any = ref([
|
||||
new URL(`@/assets/img/JCD-ZX.png`, import.meta.url),
|
||||
new URL(`@/assets/img/JCD-GJ.png`, import.meta.url)
|
||||
],
|
||||
ratioTitle:'告警率',
|
||||
ratioTitle: '告警率',
|
||||
ratio: 0,
|
||||
titleT: ['总数', '在线', '告警'],
|
||||
color: ['#000', '#2dcd28', '#bd3124'],
|
||||
@@ -211,7 +208,7 @@ const list: any = ref([
|
||||
title: '变电站',
|
||||
img: [new URL(`@/assets/img/BDZ-ZS.png`, import.meta.url), new URL(`@/assets/img/BDZ-GJ.png`, import.meta.url)],
|
||||
color: ['#000', '#bd3124'],
|
||||
ratioTitle:'告警率',
|
||||
ratioTitle: '告警率',
|
||||
ratio: 0,
|
||||
titleT: ['总数', '告警'],
|
||||
list: [
|
||||
@@ -251,7 +248,7 @@ const list: any = ref([
|
||||
title: '终端',
|
||||
img: [new URL(`@/assets/img/ZD-ZS.png`, import.meta.url), new URL(`@/assets/img/ZD-ZX.png`, import.meta.url)],
|
||||
titleT: ['总数', '在运'],
|
||||
ratioTitle:'在运率',
|
||||
ratioTitle: '在运率',
|
||||
ratio: 0,
|
||||
color: ['#000', '#2dcd28'],
|
||||
list: [
|
||||
@@ -295,11 +292,11 @@ const boxHeight = mainHeight(40, 3)
|
||||
// 详情
|
||||
const open = (e: any) => {
|
||||
if (e == 0) {
|
||||
standRef.value.open(formRow.value)
|
||||
} else if (e == 1) {
|
||||
terminalRef.value.open(formRow.value)
|
||||
} else if (e == 2) {
|
||||
pointRef.value.open(formRow.value)
|
||||
} else if (e == 1) {
|
||||
standRef.value.open(formRow.value)
|
||||
} else if (e == 2) {
|
||||
terminalRef.value.open(formRow.value)
|
||||
}
|
||||
}
|
||||
const info = async (row: any) => {
|
||||
@@ -351,7 +348,7 @@ const info = async (row: any) => {
|
||||
getSubLineGiveAnAlarm(form).then(res => {
|
||||
let data = row.isUpToGrid == 1 ? res.data.gwInfo : res.data.info
|
||||
list.value[1].list = data[0].data
|
||||
|
||||
|
||||
list.value[1].ratio = ((list.value[1].list[4].numTwo / list.value[1].list[4].numOne) * 100).toFixed(2)
|
||||
})
|
||||
// 终端
|
||||
|
||||
@@ -4,7 +4,25 @@
|
||||
<!-- 综合评估 -->
|
||||
<div style="height: 110px">
|
||||
<div class="title">
|
||||
<span>综合评估</span>
|
||||
<span>综合评估
|
||||
<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 />
|
||||
<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: #cc0000">极差:[1 , 2]</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
|
||||
</span>
|
||||
<span class="info" @click="open(0)">
|
||||
详情
|
||||
<ArrowRight style="width: 12px" />
|
||||
@@ -220,6 +238,7 @@ import { onMounted, reactive, ref, provide } from 'vue'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { WarningFilled } from '@element-plus/icons-vue'
|
||||
import { ArrowRight } from '@element-plus/icons-vue'
|
||||
import Evaluate from './details/evaluate.vue'
|
||||
import steadyState from './details/steadyState.vue'
|
||||
@@ -386,6 +405,11 @@ defineExpose({ info, show })
|
||||
cursor: pointer;
|
||||
color: #757575;
|
||||
}
|
||||
.WarningFilled {
|
||||
width: 12px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.TJTop {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user