联调终端运行评价

This commit is contained in:
GGJ
2025-05-15 14:52:02 +08:00
parent 325aa7d56e
commit 67718efe57
22 changed files with 672 additions and 330 deletions

View File

@@ -88,7 +88,7 @@
>
<bm-label
v-if="zoom > 14"
:content="path.lineName"
:content="path.deviceName"
:labelStyle="{
color: '#fff',
border: '0px solid #fff',
@@ -106,31 +106,25 @@
<!-- 详情 -->
<bm-marker :position="infoWindowPoint" :icon="{ url: '1', size: { width: 0, height: 0 } }">
<bm-info-window :show="infoWindowPoint.show" @close="infoWindowPoint.show = false">
<el-descriptions :title="infoWindowPoint.lineName" :column="1" v-if="infoWindowPoint.lineId">
<el-descriptions
style="width: auto"
:title="infoWindowPoint.deviceName"
:column="1"
v-if="infoWindowPoint.lineId"
>
<el-descriptions-item label="供电公司">{{ infoWindowPoint.gdName }}</el-descriptions-item>
<el-descriptions-item label="变电站">{{ infoWindowPoint.subName }}</el-descriptions-item>
<el-descriptions-item label="母线">{{ infoWindowPoint.voltageName }}</el-descriptions-item>
<el-descriptions-item label="变电站(场站)">{{ infoWindowPoint.subName }}</el-descriptions-item>
<el-descriptions-item label="网络参数">
{{ infoWindowPoint.ip }}
</el-descriptions-item>
<el-descriptions-item label="PT变化">{{ infoWindowPoint.pt2 }}</el-descriptions-item>
<el-descriptions-item label="CT变化">{{ infoWindowPoint.ct2 }}</el-descriptions-item>
<el-descriptions-item label="生产厂家">
{{ infoWindowPoint.manufacturer }}
</el-descriptions-item>
<el-descriptions-item label="终端状态">
{{
infoWindowPoint.runFlag == 0 ? '投运' : infoWindowPoint.runFlag == 1 ? '热备用' : '停运'
}}
</el-descriptions-item>
<el-descriptions-item label="通讯状态">
{{ infoWindowPoint.comFlag == 0 ? '中断' : '正常' }}
</el-descriptions-item>
<el-descriptions-item>
<el-button type="primary" size="small" @click="lookPoint(infoWindowPoint)">
查看详情
</el-button>
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:title="infoWindowPoint.subName"
@@ -156,7 +150,7 @@
</div>
<!-- 信息弹框 -->
<div v-if="zoom <= 9">
<!-- <div v-if="zoom <= 9">
<bm-overlay
v-for="item in AreaData"
pane="labelPane"
@@ -200,7 +194,7 @@
</div>
</div>
</bm-overlay>
</div>
</div> -->
</baidu-map>
</div>
</template>
@@ -214,9 +208,10 @@ import { useDictData } from '@/stores/dictData'
import { Search } from '@element-plus/icons-vue'
import { BaiduMap, BmOverlay } from 'vue-baidu-map-3x'
import { getAssessOverview } from '@/api/device-boot/panorama'
import { getRunEvaluate } from '@/api/device-boot/runEvaluate'
import { getGridDiagramAreaData } from '@/api/device-boot/panorama'
const emit = defineEmits(['changeValue', 'drop', 'show'])
import mapJson from './boundary'
import mapJson from '@/views/pqs/panorama/components/boundary'
const datePickerRef = ref()
const height = mainHeight(90)
// 页面中直接引入就可以
@@ -238,34 +233,77 @@ const imgUrl1 = new URL('@/assets/img/ZD-ZS.png', import.meta.url).href
const imgUrl2 = new URL('@/assets/img/JCD-ZS.png', import.meta.url).href
const boundaryList: any = ref([
{
orgName: '唐山',
LngLat: [118.335849137, 39.7513593355],
boundary: mapJson.tsJSON
orgName: '大连',
LngLat: [122.060077, 39.635794],
boundary: mapJson['大连']
},
{
orgName: '张家口',
LngLat: [115.032504679, 40.8951549951],
boundary: mapJson.zjkJSON
orgName: '抚顺',
LngLat: [124.354599, 41.88962],
boundary: mapJson['抚顺']
},
{
orgName: '秦皇岛',
LngLat: [119.185113833, 40.1179119754],
boundary: mapJson.qhdJSON
orgName: '沈阳',
LngLat: [123.0389, 41.992993],
boundary: mapJson['沈阳']
},
{
orgName: '承德',
LngLat: [117.548498365, 41.3775890632],
boundary: mapJson.cdJSON
orgName: '丹东',
LngLat: [124.585661, 40.645967],
boundary: mapJson['丹东']
},
{
orgName: '廊坊',
LngLat: [116.628004129, 39.0589378611],
boundary: mapJson.lfJSON
orgName: '营口',
LngLat: [122.225226, 40.433551],
boundary: mapJson['营口']
},
{
orgName: '盘锦',
LngLat: [121.875362, 41.075416],
boundary: mapJson['盘锦']
},
{
orgName: '铁岭',
LngLat: [124.229492, 42.731873],
boundary: mapJson['铁岭']
},
{
orgName: '朝阳',
LngLat: [119.640944, 41.39657],
boundary: mapJson['朝阳']
},
{
orgName: '葫芦岛',
LngLat: [119.850873, 40.728517],
boundary: mapJson['葫芦岛']
},
{
orgName: '锦州',
LngLat: [121.42, 41.58],
boundary: mapJson['锦州']
},
{
orgName: '阜新',
LngLat: [121.658585, 42.350951],
boundary: mapJson['阜新']
},
{
orgName: '本溪',
LngLat: [124.390785, 41.197021],
boundary: mapJson['本溪']
},
{
orgName: '辽阳',
LngLat: [123.090785, 41.297021],
boundary: mapJson['辽阳']
},
{
orgName: '鞍山',
LngLat: [122.808845, 40.840049],
boundary: mapJson['鞍山']
}
])
const zoom = ref(13)
const areaLineInfo = ref<any>([])
const siteList = ref<any>([])
@@ -299,7 +337,7 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
polyline.value = []
areaLineInfo.value = []
let r = 0.0035
let list = data.filter((item: any) => item.lng != 0)
let list = filterUniqueDeviceNames(data.filter((item: any) => item.lng != 0))
list.forEach((item: any) => {
// 变电站图标
item.icon = {
@@ -321,38 +359,19 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
val.icon = {
url: '',
size: {
width: 40,
height: 40
width: 35,
height: 30
}
}
switch (val.runFlag) {
case 0:
// 投运
if (val.comFlag == 0) {
// 异常
if (val.noDealCount > 0) {
// 异常有暂降
val.icon.url = new URL('@/assets/txycyzj.gif', import.meta.url).href
} else if (val.noDealCount == 0) {
// 异常无暂降
val.icon.url = new URL('@/assets/txzdwzj.png', import.meta.url).href
}
} else if (val.comFlag == 1) {
// 正常
if (val.noDealCount > 0) {
// 正常有暂降
val.icon.url = new URL('@/assets/txzcyzj.gif', import.meta.url).href
} else if (val.noDealCount == 0) {
// 正常无暂降
val.icon.url = new URL('@/assets/txzcwzj.png', import.meta.url).href
}
}
val.icon.url = new URL('@/assets/terminal0.png', import.meta.url).href
break
case 1:
val.icon.url = new URL('@/assets/rby.png', import.meta.url).href
val.icon.url = new URL('@/assets/terminal1.png', import.meta.url).href
break
case 2:
val.icon.url = new URL('@/assets/ty.png', import.meta.url).href
val.icon.url = new URL('@/assets/terminal2.png', import.meta.url).href
break
default:
break
@@ -375,6 +394,21 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
// center.value.lng = areaLineInfo.value[0].lng
// center.value.lat = areaLineInfo.value[0].lat
}
// 过滤终端
const filterUniqueDeviceNames = data => {
return data.map(item => {
const uniqueChildren = item.children.reduce((acc, curr) => {
if (!acc.some(child => child.deviceName === curr.deviceName)) {
acc.push(curr)
}
return acc
}, [])
return {
...item,
children: uniqueChildren
}
})
}
// 获取zoom
const syncCenterAndZoom = (e: any) => {
zoom.value = e.target.getZoom()
@@ -403,16 +437,18 @@ const lookPoint = (e: any) => {
}
// 搜索
const DeviceQ = () => {
console.log(12313, QueryList.value)
showCollapse.value = true
if (inputQuery.value.length == 0) return
let list = []
let regex = new RegExp(inputQuery.value, 'i')
let data = areaLineInfo.value
.filter((item: any) => regex.test(item.lineName))
.filter((item: any) => regex.test(item.deviceName))
.map((item: any) => {
return {
psrName: item.lineName,
psrName: item.deviceName,
vlevelName: item.voltageScale,
maintOrgName: item.gdName,
coordinate: [item.lng, item.lat]
@@ -440,7 +476,7 @@ const flyTo = (e: any, zoom?: number) => {
zoomMap.value = zoom
} else {
zoomMap.value = 15
let data = areaLineInfo.value.filter((item: any) => regex.test(item.lineName))[0]
let data = areaLineInfo.value.filter((item: any) => regex.test(item.deviceName))[0]
if (data) {
markerClick(data)
}
@@ -448,28 +484,15 @@ const flyTo = (e: any, zoom?: number) => {
}
// 市级统计数据
const grids = (row: any) => {
let form = {
...row,
id: row.orgNo,
deptIndex: row.orgNo,
orgId: row.orgNo,
ids: [],
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0],
isUpToGrid: row.isUpToGrid,
monitorFlag: row.isUpToGrid == 0 ? null : row.isUpToGrid
}
AreaData.value = []
assessList.value = []
// 综合评估
getAssessOverview(form).then(res => {
assessList.value = res.data?.children
getGridDiagramAreaData({ ...form, deptIndex: deptIndex.value }).then((res: any) => {
AreaData.value = res.data
GridDiagramArea()
})
// if (powerManageGridMap.value) powerLoad()
getRunEvaluate({ ...row, deptIndex: deptIndex.value }).then((res: any) => {
console.log('🚀 ~ getRunEvaluate ~ res:', res)
AreaData.value = res.data
GridDiagramArea()
})
// if (powerManageGridMap.value) powerLoad()
}
const radiusPop = (k: any) => {
console.log('🚀 ~ radiusPop ~ k:', k)
@@ -477,27 +500,36 @@ const radiusPop = (k: any) => {
}
const GridDiagramArea = () => {
boundaryList.value.forEach((item: any) => {
assessList.value.forEach((y: any) => {
if (item.orgName == y.name) {
if (y.score == 3.14159) {
} else if (y.score > 4.5) {
item.background = '#33996699'
} else if (y.score > 4) {
item.background = '#3399ff99'
} else if (y.score > 3) {
item.background = '#ffcc3399'
} else if (y.score > 2) {
item.background = '#db088799'
} else if (y.score > 0) {
item.background = '#ff000099'
}
}
})
// assessList.value.forEach((y: any) => {
// if (item.orgName == y.name) {
// if (y.score == 3.14159) {
// } else if (y.score > 4.5) {
// item.background = '#33996699'
// } else if (y.score > 4) {
// item.background = '#3399ff99'
// } else if (y.score > 3) {
// item.background = '#ffcc3399'
// } else if (y.score > 2) {
// item.background = '#db088799'
// } else if (y.score > 0) {
// item.background = '#ff000099'
// }
// }
// })
AreaData.value.forEach((k: any, i: any) => {
if (item.orgName == k.orgName) {
if (item.orgName == k.name) {
for (let kk in item) {
k[kk] = item[kk]
}
if (k.evaluate >= 90) {
k.background = '#0fff04'
} else if (k.evaluate >= 80) {
k.background = '#2b7fd3'
} else if (k.evaluate >= 70) {
k.background = '#ffcc33'
} else {
k.background = '#97017e'
}
}
})
})
@@ -567,5 +599,7 @@ defineExpose({ addMarkers, locatePositions, reset, grids, radiusPop, flyTo })
}
}
}
:deep(.el-descriptions__cell) {
white-space: nowrap;
}
</style>
./cds.js./boundary