同步现场代码

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

View File

@@ -13,11 +13,11 @@
<div class="text"> <div class="text">
<span style="color: #00b07d">优质(4.5 , 5]</span> <span style="color: #00b07d">优质(4.5 , 5]</span>
<br /> <br />
<span style="color: #3399ff">良好(4 , 4.5]</span> <span style="color: #2b7fd3">良好(4 , 4.5]</span>
<br /> <br />
<span style="color: #ffcc33">合格(3 , 4]</span> <span style="color: #ffcc33">合格(3 , 4]</span>
<br /> <br />
<span style="color: #ff9900">较差(2 , 3]</span> <span style="color: #97017e">较差(2 , 3]</span>
<br /> <br />
<span style="color: #cc0000">极差[1 , 2]</span> <span style="color: #cc0000">极差[1 , 2]</span>
</div> </div>
@@ -42,11 +42,11 @@
: assessList.score > 4.5 : assessList.score > 4.5
? '#339966' ? '#339966'
: assessList.score > 4 : assessList.score > 4
? '#3399ff' ? '#2b7fd3'
: assessList.score > 3 : assessList.score > 3
? '#ffcc33' ? '#ffcc33'
: assessList.score > 2 : assessList.score > 2
? '#ff9900' ? '#97017e'
: assessList.score > 0 : assessList.score > 0
? '#cc0000' ? '#cc0000'
: '' : ''
@@ -70,11 +70,11 @@
: item.score > 4.5 : item.score > 4.5
? '#339966' ? '#339966'
: item.score > 4 : item.score > 4
? '#3399ff' ? '#2b7fd3'
: item.score > 3 : item.score > 3
? '#ffcc33' ? '#ffcc33'
: item.score > 2 : item.score > 2
? '#ff9900' ? '#97017e'
: item.score > 0 : item.score > 0
? '#cc0000' ? '#cc0000'
: '' : ''
@@ -228,6 +228,12 @@
@click="show = !show" @click="show = !show"
src="@/assets/img/QH.png" src="@/assets/img/QH.png"
/> />
<div class="legeng">
<div v-for="item in legengList">
<span :style="`background-color: ${item.color};`"></span>
<span>{{ item.title }}</span>
</div>
</div>
<!-- 评估 --> <!-- 评估 -->
<Evaluate ref="evaluateRef" /> <Evaluate ref="evaluateRef" />
<!-- 稳态 --> <!-- 稳态 -->
@@ -295,6 +301,28 @@ const options1: any = dictData.getBasicData('Event_Statis').filter(item => {
return item return item
} }
}) })
const legengList = [
{
color: '#00b07d',
title: '优质'
},
{
color: '#3399ff',
title: '良好'
},
{
color: '#ffcc33',
title: '合格'
},
{
color: '#db0887',
title: '较差'
},
{
color: '#ff0000',
title: '极差'
}
]
const assessList: any = ref([]) const assessList: any = ref([])
const JDlist = ref([ const JDlist = ref([
{ {
@@ -463,7 +491,7 @@ defineExpose({ info, show })
.progress { .progress {
display: flex; display: flex;
align-items: center; align-items: center;
.text { .text {
width: 50px; width: 50px;
font-size: 12px; font-size: 12px;
@@ -494,6 +522,32 @@ defineExpose({ info, show })
height: 200px; height: 200px;
cursor: pointer; cursor: pointer;
} }
.legeng {
position: absolute;
padding: 5px;
bottom: 0;
left: -75px;
width: 70px;
font-size: 12px;
height: 120px;
background: #fff;
border-radius: 5px;
display: grid;
line-height: 22px;
grid-template-rows: auto;
div {
display: flex;
align-items: center;
justify-content: center;
span:nth-child(1) {
display: inline-block;
height: 10px;
border-radius: 2px;
width: 15px;
margin-right: 5px;
}
}
}
.show { .show {
width: 0px; width: 0px;
transition: all 0.3s ease; transition: all 0.3s ease;