同步现场代码

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,9 +1,9 @@
<template>
<!-- 综合评估详情 -->
<el-dialog draggable title="综合评估详情" v-model="dialogVisible" width="1400px">
<el-dialog draggable title="综合评估统计" v-model="dialogVisible" width="1400px">
<div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<vxe-column field="deptName" title="所属区域" />
<vxe-column field="deptName" title="地市" />
<vxe-column field="assessData" title="综合评估得分" :formatter="formatter" />
<vxe-column field="qualifyData" title="指标合格率" :formatter="formatter" />
<vxe-colgroup title="各项指标得分">
@@ -55,8 +55,8 @@ const open = async (row: any) => {
text: '各地市综合评估趋势对比'
},
xAxis: {
name: '(区域)',
data: res.data.map((item: any) => item.deptName)
name: '时间',
data: res.data[0].children.map((item: any) => item.dataTime)
},
grid: {
bottom: '10px'
@@ -73,13 +73,10 @@ const open = async (row: any) => {
let list: any = []
let time: any = []
res.data.forEach((item: any, num: any) => {
time = []
time.push(item.deptName)
list.push([])
item.children.forEach((val: any, i: any) => {
if (num == 0) {
list.push([])
}
time.push(val.dataTime)
list[i].push(val.score == 3.14159 ? null : val.score)
list[num].push(val.score == 3.14159 ? null : val.score)
})
})
list.forEach((item: any, i: any) => {

View File

@@ -1,6 +1,6 @@
<template>
<!-- 监测点详情 -->
<el-dialog draggable title="监测点详情" v-model="dialogVisible" width="1400px" :before-close="handleClose">
<el-dialog draggable title="监测点统计" v-model="dialogVisible" width="1400px" :before-close="handleClose">
<el-row style="height: 300px" :gutter="20">
<el-col :span="12">
<div class="title">
@@ -18,7 +18,7 @@
<el-select
v-model="statisticalType"
value-key="id"
style="width: 120px; margin-right: 80px"
style="width: 120px; margin-right: 80px"
@change="statiStics"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
@@ -31,22 +31,14 @@
</el-row>
<div>
<div class="title">
<span>监测点详细列表</span>
<span>区域监测点统计</span>
</div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<vxe-column field="lineName" title="监测点名称" />
<vxe-column field="areaName" title="所属区域" />
<vxe-column field="subName" title="所属变电站" />
<vxe-column field="voltageScale" title="电压等级" :formatter="formatter" />
<vxe-column field="loadType" title="负荷类型" :formatter="formatter" />
<vxe-column field="comFlag" title="通讯状态">
<template #default="scope">
<el-tag type="success" v-if="scope.row.comFlag == 1">正常</el-tag>
<el-tag type="danger" v-else>中断</el-tag>
</template>
</vxe-column>
<vxe-column field="onlineRate" title="在线率(%)" />
<vxe-column field="integrityData" title="数据完整性(%)" />
<vxe-column field="orgName" title="区域" :formatter="formatter" />
<vxe-column field="num" title="监测点个数" :formatter="formatter" />
<vxe-column field="integrityRate" title="数据完整率(%)" />
<vxe-column field="onLineRate" title="数据在线率(%)" />
<vxe-column field="outOfStandardRate" title="超标监测点占比(%)" />
</vxe-table>
</div>
</el-dialog>
@@ -62,7 +54,7 @@ const dialogVisible: any = ref(false)
const Voltage = dictData.getBasicData('Dev_Voltage_Stand')
const tableData: any = ref([])
const options = dictData.getBasicData('Statistical_Type', ['Report_Type'])
const options = dictData.getBasicData('Statistical_Type', ['Report_Type', 'Power_Network'])
const time = ref('1')
const statisticalType = ref(options[0])
const loadTypeArr = dictData.getBasicData('Interference_Source')
@@ -84,8 +76,11 @@ const open = async (row: any) => {
// 统计
statiStics()
// 监测点列表
getHalfReport(rowList.value).then((res: any) => {
tableData.value = res.data.records
getGridDiagramLineData({
...rowList.value,
statisticalType: rowList.value.deviceInfoParam.statisticalType
}).then((res: any) => {
tableData.value = res.data
})
dialogVisible.value = true
@@ -145,15 +140,15 @@ const statiStics = () => {
text: ''
},
xAxis: {
data: res.data.map((item: any) => item.orgName)
},
yAxis: {
name: '',
name: '%',
min: 0,
max: 100
},
options: {
dataZoom: null,
series: [
{
name: '数据完整性',
@@ -192,10 +187,10 @@ const statiStics = () => {
})
}
const formatter = (row: any) => {
if (row.column.field == 'loadType') {
return loadTypeArr.filter((item: any) => item.id == row.cellValue)[0]?.name
} else if (row.column.field == 'voltageScale') {
return Voltage.filter((item: any) => item.id == row.cellValue)[0]?.name
if (row.column.field == 'orgName') {
return row.cellValue.match(/[\u4e00-\u9fa5]+/g).join('')
} else if (row.column.field == 'num') {
return row.row.orgName.match(/\(([^]+)\)/)[1]
} else {
return row.cellValue
}

View File

@@ -1,6 +1,6 @@
<template>
<!-- 变电站 -->
<el-dialog draggable title="变电站详情" v-model="dialogVisible" width="1400px" :before-close="handleClose">
<el-dialog draggable title="变电站统计" v-model="dialogVisible" width="1400px" :before-close="handleClose">
<el-row style="height: 300px" :gutter="20">
<el-col :span="12">
<div class="title">
@@ -39,16 +39,21 @@
</div>
<div class="pie">
<MyEChart v-for="item in picEChart" class="MyEChart" :options="item" />
<MyEChart
v-for="(item, i) in picEChart"
:style="i == 3 ? `margin-left: 20%;` : ``"
class="MyEChart"
:options="item"
/>
</div>
</el-col>
</el-row>
<div>
<div class="title mb10">
<span>变电站详细列表</span>
<span>区域变电站统计</span>
</div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<vxe-column field="name" title="所属区域" />
<vxe-column field="name" title="区域" />
<vxe-column field="num" title="变电站总数" />
<vxe-column field="num1" title="无污染数量" :formatter="formatter" />
<vxe-column field="num2" title="轻微污染数量" :formatter="formatter" />
@@ -96,23 +101,11 @@ const open = async (row: any) => {
// 污染
contaminateC()
// 列表
getPollutionAlarmList(rowList.value).then(res => {
tableData.value = res.data.map((item: any) => {
return {
name: item[0],
num: item[1],
num1: item[2],
num2: item[3],
num3: item[4],
num4: item[5],
num5: item[5]
}
})
})
dialogVisible.value = true
}
const contaminateC = () => {
// rowList.value.deviceInfoParam.ids=[contaminate.value]
getPollutionAlarmData({ ...rowList.value, ids: [contaminate.value] }).then(res => {
let data = []
@@ -213,14 +206,15 @@ const contaminateC = () => {
show: false
},
axisLabel: {
distance: 5,
color: '#666',
fontSize: 12,
formatter: function (value: any) {
if (value === 0 || value === 100) {
return value + '%'
}
}
show: false
// distance: 5,
// color: '#666',
// fontSize: 12,
// formatter: function (value: any) {
// if (value === 0 || value === 100) {
// return value + '%'
// }
// }
},
anchor: {
show: false,
@@ -260,6 +254,19 @@ const contaminateC = () => {
}
})
})
getPollutionAlarmList({ ...rowList.value, ids: [contaminate.value] }).then(res => {
tableData.value = res.data.map((item: any) => {
return {
name: item[0],
num: item[1],
num1: item[2],
num2: item[3],
num3: item[4],
num4: item[5],
num5: item[5]
}
})
})
}
const analysis = (e: any) => {
let time = rowList.value.searchBeginTime?.slice(0, 4) + `-01-01`

View File

@@ -1,7 +1,7 @@
<!-- 稳态 -->
<template>
<!-- 终端 -->
<el-dialog draggable title="稳态电能质量水平评估详情" v-model="dialogVisible" width="1400px">
<el-dialog draggable title="稳态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
<el-row style="height: 330px" :gutter="20">
<el-col :span="12">
<div class="title">
@@ -31,7 +31,7 @@
</div>
<div>
标准差
<span style="color: #ff9900">{{ item.avg == 3.14159 ? '--' : item.avg }}</span>
<span style="color: #ff9900">{{ item.avg == 3.14159 ? '--' : item.sd }}</span>
</div>
</el-col>
</el-row>
@@ -48,10 +48,10 @@
</el-row>
<div>
<div class="title">
<span>稳态电能质量水平评估详细列表</span>
<span>区域稳态电能质量水平评估</span>
</div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<vxe-column field="deptName" title="区域名称" />
<vxe-column field="deptName" title="区域" />
<vxe-column field="onlineNum" title="在线监测点数量(个)" />
<vxe-column field="overNum" title="超标监测点数量(个)" />
<vxe-column field="overRatio" title="超标监测点占比(%)" />

View File

@@ -1,6 +1,6 @@
<!-- 技术 -->
<template>
<el-dialog draggable title="技术监督管理详情" v-model="dialogVisible" width="1400px">
<el-dialog draggable title="技术监督管理统计" v-model="dialogVisible" width="1400px">
<div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<vxe-column field="devName" />
@@ -24,11 +24,7 @@ import { defaultAttribute } from '@/components/table/defaultAttribute'
const dialogVisible: any = ref(false)
const tableData: any = ref([
{
devName: 123
}
])
const tableData: any = ref([])
const picEChart = ref({
title: {

View File

@@ -1,9 +1,9 @@
<!-- 暂态 -->
<template>
<el-dialog draggable title="暂态电能质量水平评估详情" v-model="dialogVisible" width="1400px">
<el-dialog draggable title="暂态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
<div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<vxe-column field="name" title="所属区域" />
<vxe-column field="name" title="区域" />
<vxe-column field="sagTimes" title="暂降次数" />
<vxe-column field="swellTimes" title="暂升次数" />
@@ -32,7 +32,7 @@
<div class="statistics-box">
<MyEChart style="height: 300px" :options="picEChart1" />
<el-table size="small" height="300px" :data="resembleData">
<el-table-column prop="name" label="暂降原因" width="80px" align="center" />
<el-table-column prop="name" label="暂降类型" width="80px" align="center" />
<el-table-column prop="value" label="暂降次数" width="80px" align="center" />
</el-table>
</div>
@@ -66,7 +66,8 @@ const open = async (row: any) => {
trigger: 'item'
},
legend: {
orient: 'vertical'
orient: 'vertical',
left: '10px'
},
xAxis: {
show: false
@@ -79,7 +80,7 @@ const open = async (row: any) => {
series: [
{
type: 'pie',
center: ['40%', '50%'],
center: ['60%', '50%'],
radius: '50%',
label: {
show: false,
@@ -98,7 +99,8 @@ const open = async (row: any) => {
trigger: 'item'
},
legend: {
orient: 'vertical'
orient: 'vertical',
left: '10px'
},
xAxis: {
show: false
@@ -111,7 +113,7 @@ const open = async (row: any) => {
series: [
{
type: 'pie',
center: ['40%', '50%'],
center: ['60%', '50%'],
radius: '50%',
label: {
show: false,

View File

@@ -1,6 +1,6 @@
<template>
<!-- 终端 -->
<el-dialog draggable title="终端统计详情" v-model="dialogVisible" width="1400px" :before-close="handleClose">
<el-dialog draggable title="终端统计" v-model="dialogVisible" width="1400px" :before-close="handleClose">
<el-row style="height: 300px" :gutter="20">
<el-col :span="12">
<div class="title">
@@ -50,30 +50,14 @@
</el-row>
<div>
<div class="title">
<span>终端统计细列表</span>
<span>区域终端统计</span>
</div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<vxe-column field="devName" title="终端名称" />
<vxe-column field="areaName" title="所属区域" />
<vxe-column field="bdName" title="所属变电站" />
<vxe-column field="devType" title="终端型号" />
<vxe-column field="loginTime" title="投运时间" />
<vxe-column field="runFlag" title="终端状态">
<template #default="scope">
<el-tag :type="scope.row.runFlag == '投运' ? 'success' : 'danger'">
{{ scope.row.runFlag }}
</el-tag>
</template>
</vxe-column>
<vxe-column field="comFlag" title="通讯状态">
<template #default="scope">
<el-tag :type="scope.row.comFlag == '正常' ? 'success' : 'danger'">
{{ scope.row.comFlag }}
</el-tag>
</template>
</vxe-column>
<vxe-column field="updateTime" title="最新数据时间" />
<vxe-column field="onlineEvaluate" title="终端在线率(%)" :formatter="formatter" />
<vxe-column field="orgName" title="区域" />
<vxe-column field="runNum" title="运行个数 " />
<vxe-column field="overhaulNum" title="检修个数 " />
<vxe-column field="refundNum" title="退役个数" />
<vxe-column field="onLineRate" title="数据在线率(%)" />
</vxe-table>
</div>
</el-dialog>
@@ -83,7 +67,7 @@ import { ref } from 'vue'
import { useDictData } from '@/stores/dictData'
import MyEChart from '@/components/echarts/MyEchart.vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { getGridDiagramDevTendency, getGridDiagramDevData, getRuntimeData } from '@/api/device-boot/panorama'
import { getGridDiagramDevTendency, getGridDiagramDevData, getGridDiagramDevDataList } from '@/api/device-boot/panorama'
const dictData = useDictData()
const dialogVisible: any = ref(false)
const time = ref('1')
@@ -122,6 +106,10 @@ const open = async (row: any) => {
})
picEChart.value = {
tooltip: {
trigger: 'item',
formatter: '{b} :在运终端数 {c} 台'
},
legend: {
show: false
},
@@ -161,13 +149,23 @@ const open = async (row: any) => {
}
})
// 列表
getRuntimeData({
getGridDiagramDevDataList({
deviceInfoParam: {
...row,
serverName: 'pqs-common',
ids: [row.id],
runFlag: [],
comFlag: [],
manufacturer: dictData.getBasicData('Dev_Manufacturers'),
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0]
},
...row,
serverName: 'pqs-common',
ids: [row.id],
runFlag: [],
comFlag: [],
manufacturer: dictData.getBasicData('Dev_Manufacturers'),
statisticalType: {}
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0]
}).then((res: any) => {
tableData.value = res.data
})