同步现场代码

This commit is contained in:
GGJ
2024-05-09 18:00:04 +08:00
parent 06611f527a
commit 6d7f1bca56
46 changed files with 44063 additions and 1586 deletions

View File

@@ -1,131 +1,172 @@
<template>
<div class="boxLeft" :style="height">
<!-- 指标合格率统计 -->
<el-card>
<template #header>
<div class="card-header" style="display: flex; justify-content: space-between">
<div :class="show ? 'show' : 'noshow'">
<div class="boxLeft" :style="height">
<!-- 指标合格率统计 -->
<div :style="`height:calc(${boxHeight.height} - 40px)`">
<div class="title">
<span>指标合格率统计</span>
<span class="info" @click="open(0)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
</template>
<MyEChart :style="`height:calc(${boxHeight.height} - 40px)`" :options="passingCharts" />
</el-card>
<el-card>
<template #header>
<div class="card-header">
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</div>
<MyEChart :style="`height:calc(${EchHeight.height} - 40px)`" :options="passingCharts" />
</div>
<!-- 稳态指标超标占比 -->
<div :style="`height:calc(${boxHeight.height} + 40px)`">
<div class="title">
<span>稳态指标超标占比</span>
</div>
</template>
<div>
<div class="monitoringPoints">
<div>在线监测点数{{ monitorList.onlineNum }}</div>
<div>超标监测点数{{ monitorList.overNum }}</div>
<div>超标监测点占比{{ monitorList.overRatio }}</div>
<span class="info" @click="open(1)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
<MyEChart :style="boxHeight" :options="exceededCharts" />
</div>
</el-card>
<!-- 稳态电能质量指标水平评估 -->
<el-card>
<template #header>
<div class="card-header">
<span>稳态电能质量指标水平评估</span>
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</div>
</template>
<div :style="`height:calc(${boxHeight.height} + 20px)`" class="boxSteps">
<el-segmented v-model="active" :options="Voltage" block @change="handleClick" />
<div class="evaluationData mt10">
<div v-for="(item, i) in evaluationData">
<el-row style="width: 100%">
<el-col :span="12" style="display: flex">
<img :src="url[i]" />
<span>{{ item.targetName }}</span>
</el-col>
<el-col :span="12" style="display: flex">
<div style="width: 50%">
均值
<span style="color: #339966">{{ item.avg == 3.14159 ? '--' : item.avg }}</span>
</div>
<div>
标准差
<span style="color: #ff9900">{{ item.avg == 3.14159 ? '--' : item.avg }}</span>
</div>
</el-col>
</el-row>
<div>
<div class="monitoringPoints">
<div>在线监测点数{{ monitorList.onlineNum }}</div>
<div>超标监测点数{{ monitorList.overNum }}</div>
<div>超标监测点占比{{ monitorList.overRatio }}</div>
</div>
<MyEChart :style="`height:calc(${EchHeight.height} + 10px)`" :options="exceededCharts" />
</div>
</div>
</el-card>
<!-- 暂态事件统计 -->
<el-card>
<template #header>
<div class="card-header">
<!-- 暂态事件统计 -->
<div :style="`height:calc(${boxHeight.height} - 10px)`">
<div class="title">
<span>暂态事件统计</span>
</div>
</template>
<MyEChart :style="boxHeight" :options="statisticsCharts" />
</el-card>
<!-- 指标合格率统计 -->
<statistics ref="statisticsRef" />
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</div>
<MyEChart :style="`height:calc(${EchHeight.height} - 10px)`" :options="statisticsCharts" />
</div>
<!-- 稳态电能质量指标水平评估 -->
<div>
<div class="title">
<span>技术监督管理</span>
<!-- <span class="info" @click="open(3)">
详情
<ArrowRight style="width: 12px" />
</span> -->
</div>
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</div>
<div style="height: 150px" class="boxR">
<el-segmented v-model="active" :options="Voltage" block />
<el-row
style="height: calc(100% - 45px); display: flex; justify-content: space-around"
class="ml10 mr10 mt5"
>
<el-col :span="11" class="col pt10">
<div>
<span>异常问题总数</span>
<span style="color: #2dcd28">60</span>
</div>
<div>
<span style="width: 120px">已关联工单数</span>
<span style="color: #81b337">60</span>
</div>
<div>
<span style="width: 120px"> 工单转换率</span>
<span style="color: #338dff">60%</span>
</div>
</el-col>
<el-col :span="11" class="col pt10" :offset="0.5">
<div>
<span>异常问题总数</span>
<span style="color: #2dcd28">60</span>
</div>
<div>
<span style="width: 120px">已关联工单数</span>
<span style="color: #81b337">60</span>
</div>
<div>
<span style="width: 120px"> 工单转换率</span>
<span style="color: #338dff">60%</span>
</div>
</el-col>
</el-row>
</div>
</div>
<!-- 指标合格率统计 -->
<statistics ref="statisticsRef" />
<!-- 稳态指标超标占比 -->
<exceeded ref="exceededRef" />
</div>
<img
class="imgR"
:style="show ? 'transform: rotate(180deg);' : 'transform: rotate(0deg);'"
@click="show = !show"
src="@/assets/img/QH.png"
/>
</div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, provide } from 'vue'
import statistics from '../components/city/statistics.vue'
import exceeded from '../components/city/exceeded.vue'
import MyEChart from '@/components/echarts/MyEchart.vue'
import { useDictData } from '@/stores/dictData'
import { mainHeight } from '@/utils/layout'
import { color } from '@/components/echarts/color'
import { ArrowRight } from '@element-plus/icons-vue'
import { getAssessDetail, evaluationDetail, getGeneralSituation, getEvaluationData } from '@/api/device-boot/panorama'
import { getAssessDetail, evaluationDetail, getGeneralSituation } from '@/api/device-boot/panorama'
const dictData = useDictData()
const height = mainHeight(20)
const boxHeight: any = mainHeight(280, 4)
const height = mainHeight(30)
const show = ref(false)
const boxHeight: any = mainHeight(220, 3)
const EchHeight: any = mainHeight(320, 3)
const statisticsRef = ref()
const exceededRef = ref()
const formRow: any = ref({})
const monitorList: any = ref({})
const statisticsCharts: any = ref({})
const rowList: any = ref({})
const chartRef = ref()
const evaluationData: any = ref([])
const passingCharts = ref()
const exceededCharts = ref()
const Voltage: any = dictData
.getBasicData('Dev_Voltage_Stand')
.filter(item => {
if (item.code == '35kV' || item.code == '500kV' || item.code == '220kV' || item.code == '110kV') {
return item
}
})
.map(item => {
return {
label: item.name,
value: item.id
}
})
const active: any = ref(Voltage[0].value)
const url: any = [
new URL(`@/assets/img/PLPC.png`, import.meta.url),
new URL(`@/assets/img/DYPC.png`, import.meta.url),
new URL(`@/assets/img/JBL.png`, import.meta.url),
new URL(`@/assets/img/SXDY.png`, import.meta.url),
new URL(`@/assets/img/SB.png`, import.meta.url)
const Voltage: any = [
{
label: '技术监督计划',
value: '0'
},
{
label: '在线监测',
value: '1'
},
{
label: '用户投诉',
value: '2'
},
{
label: '谐波普测',
value: '3'
}
]
const active: any = ref(Voltage[0].value)
const open = (e: number) => {
if (e == 0) {
statisticsRef.value.open(formRow.value)
} else if (e == 1) {
exceededRef.value.open(formRow.value)
}
}
const info = (row: any) => {
@@ -137,7 +178,7 @@ const info = (row: any) => {
ids: [],
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0],
isUpToGrid: row.isUpToGrid,
monitorFlag: row.isUpToGrid
monitorFlag: row.isUpToGrid == 0 ? null : row.isUpToGrid
}
formRow.value = form
// 指标合格率统计
@@ -300,7 +341,8 @@ const info = (row: any) => {
}),
axisLabel: {
color: '#000',
fontSize: 12
fontSize: 12,
interval:0
}
},
grid: {
@@ -344,8 +386,6 @@ const info = (row: any) => {
})
// 稳态电能质量指标水平评估
handleClick(active.value)
// 暂态电能质量水平评估
getGeneralSituation({ ...form, monitorFlag: form.isUpToGrid == 0 ? 2 : 1 }).then(res => {
statisticsCharts.value = {
tooltip: {},
@@ -384,51 +424,65 @@ const info = (row: any) => {
})
}
// 点击电压等级
const handleClick = (i: any) => {
active.value = i
getEvaluationData({
...formRow.value,
voltageLevel: i
}).then(res => {
evaluationData.value = res.data
})
}
defineExpose({ info })
defineExpose({ info, show })
</script>
<style lang="scss" scoped>
.boxLeft {
// background-color: #fff;
width: 25%;
padding: 10px 0px 10px 10px;
background-color: #fff;
width: 100%;
padding: 10px 10px 10px 10px;
font-size: 13px;
overflow: hidden;
border-radius: 5px;
}
.info {
font-weight: normal;
.title {
// height: ;
display: flex;
font-size: 12px;
cursor: pointer;
align-items: center;
justify-content: space-between;
font-size: 15px;
line-height: 23px;
padding-left: 5px;
width: 100%;
font-weight: 550;
.info {
font-weight: normal;
display: flex;
font-size: 12px;
cursor: pointer;
color: #757575;
}
}
.TJTop {
display: flex;
img {
height: 1.2rem;
width: 1.2rem;
margin-right: 5px;
}
}
.evaluate {
height: 60px;
border: 1px solid #ccc;
margin: 10px 0;
padding: 10px 0;
display: flex;
justify-content: space-around;
text-align: center;
overflow-x: auto;
overflow-y: hidden;
.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;
}
}
.boxR {
border: 1px solid #ccc;
margin: 10px 0;
padding: 5px;
margin: 10px 0 0 0;
.num {
color: #2478f2;
}
@@ -440,48 +494,62 @@ defineExpose({ info })
margin: 0;
border: 0px;
}
}
:deep(.el-card) {
.el-card__header {
padding: 5px 20px;
font-size: 1.2rem;
&::before {
width: 0.3rem;
height: 1.2rem;
margin-top: 0.3rem;
position: absolute;
content: '';
background: var(--el-color-primary);
border-radius: 0.02rem;
left: 1.2rem;
.harmonic {
display: grid;
.progress {
display: flex;
align-items: center;
.text {
width: 50px;
font-size: 12px;
}
.el-progress {
flex: 1;
}
}
}
.el-card__body {
padding: 10px;
}
:deep(.el-select) {
min-width: 120px;
}
.col {
display: grid;
grid-template-columns: 1fr;
border-radius: 10px;
text-align: center;
background-color: #edededc0;
}
.imgR {
position: absolute;
padding: 10px;
top: calc(50% - 80px);
left: -23px;
height: 200px;
cursor: pointer;
}
.show {
width: 0px;
transition: all 0.3s ease;
.boxLeft {
padding: 0;
}
margin-bottom: 10px;
margin-right: 10px;
}
.noshow {
width: 25%;
transition: all 0.3s ease;
.boxLeft {
padding: 10px 10px 10px 10px;
}
}
:deep(.el-progress__text) {
font-size: 0.8rem !important ;
}
.monitoringPoints {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
text-align: center;
}
:deep(.boxSteps) {
font-size: 1rem;
.evaluationData {
display: grid;
height: calc(100% - 30px);
grid-template-rows: repeat(5, auto);
}
img {
width: 1.3rem;
height: 1.3rem;
margin-right: 10px;
}
}
:deep(.el-segmented) {
--el-border-radius-base: 16px;
margin-top: 10px;
margin-bottom: 10px;
}
</style>