同步电网一张图代码

This commit is contained in:
GGJ
2024-05-23 17:30:16 +08:00
parent 42109a1478
commit 1097c971cc
6 changed files with 155 additions and 123 deletions

View File

@@ -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)
})
// 终端