同步电网一张图代码

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

@@ -16,7 +16,7 @@
<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>
@@ -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)

View File

@@ -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="告警原因">

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)">
详情
@@ -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) => {

View File

@@ -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;

View File

@@ -48,7 +48,7 @@
<script setup lang="ts">
import { onMounted, nextTick, ref, provide } from 'vue'
import Area from '@/components/form/area/index.vue'
import Map from './components/map.vue'
// import Map from './components/map.vue'
import { useDictData } from '@/stores/dictData'
import { mainHeight } from '@/utils/layout'
import { Search, Refresh } from '@element-plus/icons-vue'
@@ -59,7 +59,7 @@ import cityMapR from './components/cityMapR.vue'
import Info from './components/line/info.vue'
import DatePicker from '@/components/form/datePicker/index.vue'
import { map } from 'xe-utils'
const dictData = useDictData()
defineOptions({
name: 'panorama'

View File

@@ -1,7 +1,6 @@
<template>
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" :before-close="Cancel">
<el-scrollbar>
<el-form :inline="false" :model="configStore" label-width="160px">
<el-dialog draggable v-model="dialogVisible" :title="title" :before-close="Cancel">
<el-form :inline="false" :model="configStore" label-width="auto">
<el-divider border-style="dashed">全局</el-divider>
<div class="layout-config-global form-two">
<el-form-item label="组件主名称">
@@ -86,7 +85,7 @@
</el-form-item>
</div>
</el-form>
</el-scrollbar>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="onSubmit">确定</el-button>