同步现场代码

This commit is contained in:
GGJ
2024-06-01 14:49:30 +08:00
parent 4512601ca3
commit 5ee4df018c
2 changed files with 91 additions and 17 deletions

View File

@@ -129,7 +129,7 @@ import { getAssessOverview } from '@/api/device-boot/panorama'
narimap.Require(['PSRMap', 'Thematic', 'Components.Query', 'Components.RegionSelector'], () => {
if (narimap.Config.examples.notlogin) {
initMap(narimap.Config.styles.sjDark)
initMap(narimap.Config.styles.sjRaster)
} else {
//电网GIS地图服务登录
narimap.SGAuth.login()
@@ -139,13 +139,17 @@ narimap.Require(['PSRMap', 'Thematic', 'Components.Query', 'Components.RegionSel
} else {
console.log('登录失败', result)
}
//默认打开电网GIS影像图
initMap(narimap.Config.styles.sjDark)
initMap(narimap.Config.styles.sjRaster)
})
.catch((err: any) => {
console.log('错误', err)
})
}
setTimeout(() => {
console.log('🚀 ~ .then ~ narimap.Config.style:', narimap.Config)
}, 0)
})
function initMap(styleurl: any) {
map.value = new narimap.Map({
@@ -309,6 +313,7 @@ const grids = (row: any) => {
// 综合评估
getAssessOverview(form.value).then(res => {
assessList.value = res.data?.children
getGridDiagramAreaData({ ...form.value, deptIndex: deptIndex.value }).then((res: any) => {
AreaData.value = res.data
GridDiagramArea()
@@ -324,32 +329,47 @@ const powerLoad = () => {
let colors: any = [
{
orgIds: [],
outline: {
color: '#fff'
},
fill: {
color: '#339966'
color: '#00b07d'
}
},
{
orgIds: [],
outline: {
color: '#fff'
},
fill: {
color: '#3399ff'
}
},
{
orgIds: [],
outline: {
color: '#fff'
},
fill: {
color: '#ffcc33'
}
},
{
orgIds: [],
outline: {
color: '#fff'
},
fill: {
color: '#ff9900'
color: '#db0887'
}
},
{
orgIds: [],
outline: {
color: '#fff'
},
fill: {
color: '#cc0000'
color: '#ff0000'
}
}
]
@@ -727,15 +747,15 @@ const GridDiagramArea = () => {
if (item.name == y.name) {
if (y.score == 3.14159) {
} else if (y.score > 4.5) {
item.background = '#33996696'
item.background = '#33996699'
} else if (y.score > 4) {
item.background = '#3399ff96'
item.background = '#3399ff99'
} else if (y.score > 3) {
item.background = '#ffcc3396'
item.background = '#ffcc3399'
} else if (y.score > 2) {
item.background = '#ff990096'
item.background = '#db088799'
} else if (y.score > 0) {
item.background = '#cc000096'
item.background = '#ff000099'
}
}
})