修改冀北现场问题

This commit is contained in:
GGJ
2025-12-14 12:47:53 +08:00
parent ff2b9db7b8
commit 0b61c4b7ba
55 changed files with 2679 additions and 951 deletions

View File

@@ -19,6 +19,12 @@
</template>
</el-input>
</div>
<div>
<!-- <el-button @click="showPsrmap" class="psrmapBut">电网图层</el-button> -->
<el-checkbox-group v-model="group" @change="showPsrmap" size="small" class="psrmapBut">
<el-checkbox-button value="1" label="电网图层"></el-checkbox-button>
</el-checkbox-group>
</div>
<!-- 搜索内容展示 -->
<div class="query-box-wrap collapse" v-show="showWrap">
<div v-if="QueryList.length == 0" class="collapse_none">查询无结果</div>
@@ -50,6 +56,8 @@
展开搜索结果
</div>
</div>
<!-- 点击弹框 -->
<propInfo ref="propInfoRef" @flyTo="flyTo"/>
</template>
<script setup lang="ts">
@@ -63,7 +71,8 @@ import { getGridDiagramAreaData } from '@/api/device-boot/panorama'
import { Search } from '@element-plus/icons-vue'
import '@/assets/panorama/narimap.css'
import '@/assets/panorama/nrgisCommon.css'
const emit = defineEmits(['changeValue', 'drop', 'show'])
import propInfo from '@/views/pqs/qualityInspeection/panorama/components/details/propInfo.vue'
const emit = defineEmits(['changeValue', 'drop', 'show', 'setLine'])
const prop = defineProps({
lineInfo: {
type: Boolean
@@ -77,6 +86,7 @@ const datePickerRef = ref()
const form: any = ref({})
const colorKey = ref('')
const PopKey = ref(2)
const propInfoRef = ref()
const assessList: any = ref([])
const linList: any = ref([])
const QueryList: any = ref([])
@@ -144,7 +154,7 @@ narimap.Require(
// ['PSRMap', 'Components.Query', 'Marker'],
() => {
if (narimap.Config.examples.notlogin) {
initMap(narimap.Config.styles.sjRaster)
initMap(narimap.Config.styles.sjDark)
} else {
//电网GIS地图服务登录
narimap.SGAuth.login()
@@ -156,7 +166,7 @@ narimap.Require(
}
//默认打开电网GIS影像图
initMap(narimap.Config.styles.sjRaster)
initMap(narimap.Config.styles.sjDark)
})
.catch((err: any) => {
console.log('错误', err)
@@ -278,7 +288,6 @@ const addSource = async () => {
// }
// }
// ]
console.log('🚀 ~ sourceList:', sourceList.value)
if (map.value.getSource('themeData')) {
map.value.getSource('themeData').setData({
@@ -353,30 +362,52 @@ const addSource = async () => {
*/
'heatmap-opacity': 1
},
maxzoom: 12
maxzoom: 12,
layout: {
visibility: 'none'
}
})
}
}
const changeHeat = e => {
map.value.setLayoutProperty('earthquakes-paint', 'visibility', e ? 'visible' : 'none')
}
const psrmap = ref(null)
// 添加变电站线路
const addLine = () => {
//添加电网图层
let psrmap = new narimap.PSRMap(map.value, {
psrmap.value = new narimap.PSRMap(map.value, {
orgId: orgId.value == '1100F3DE20806FADE050007F01006CBE' ? '' : orgId.value
// disableFilterByUserAuth:new narimap.Config.examples.disableFilterByUserAuth
})
psrmap.addPSR()
psrmap.value.addPSR()
initDeviceCard()
setTimeout(() => {
psrmap.filterByDomain(1)
// psrmap.filterByDomain(1)
}, 0)
psrmap.value.on('load', () => {
// 显示电网图层
// psrmap.value.hide()
})
//添加电网要素点击事件
psrmap.on('click', (features: any) => {
psrmap.value.on('click', (features: any) => {
console.log(features)
showCollapse.value = false
if (inputQuery.value.length == 0) showWrap.value = false
})
}
const group = ref(['1'])
const showPsrmap = e => {
if (e.length > 0) {
psrmap.value.show()
} else {
psrmap.value.hide()
}
}
const propInfoShow=ref(false)
// 添加变电站弹框
const initDeviceCard = () => {
deviceCard.value && deviceCard.value.close()
@@ -401,10 +432,13 @@ const initDeviceCard = () => {
deviceCard.value.on('click', (res: any) => {
if (res.button.id == 'nariPopupViewDetail') {
emit('show', true)
propInfoShow.value=propInfoRef.value.show
propInfoRef.value.show=false
}
setTimeout(() => {
document.querySelectorAll('.nari-tabs__close')[0].onclick = function (v: any) {
emit('show', false)
propInfoRef.value.show=propInfoShow.value
}
}, 10)
})
@@ -726,6 +760,7 @@ const addLayer = () => {
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
//添加多个监测点
const lineData = ref([])
const addMarkers = async (row?: any, key?: any, num?: any) => {
if (map.value == null) return
let params = {
@@ -740,7 +775,7 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
statisticalType: {},
...row
}
lineData.value = []
let { data } = await getAreaLineInfo(params)
let r = 0.0035
@@ -756,6 +791,7 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
}
item.children.forEach((val: any, i: number) => {
lineData.value.push(val)
val.lng = item.lng + r * Math.cos((2 * Math.PI * i) / item.children.length)
val.lat = item.lat + r * Math.sin((2 * Math.PI * i) / item.children.length)
val.imageUrl =
@@ -796,18 +832,6 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
break
}
}
let num = 20
if (val.vharmonicValue > 10000) {
num = 100
} else if (val.vharmonicValue > 1000) {
num = 80
} else if (val.vharmonicValue > 100) {
num = 60
} else if (val.vharmonicValue > 0) {
num = 40
} else {
num = 20
}
sourceList.value.push({
type: 'Feature',
@@ -817,12 +841,16 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
},
properties: {
value: val.vharmonicValue || 0
// value: num //10 //val.vharmonicValue || 0
// value: 0
}
})
})
})
console.log('🚀 ~ addMarkers ~ num:', key)
if (key != undefined) {
propInfoRef.value.open(lineData.value)
// emit('setLine', lineData.value)
}
if (flag.value) {
linList.value = [...tempFeatureZ, ...tempFeatureT]
@@ -1150,7 +1178,7 @@ const createMapSelectorComponent = () => {
)
}
defineExpose({ locatePositions, addMarkers, grids, DeviceQ, radiusPop, flyTo })
defineExpose({ locatePositions, addMarkers, grids, DeviceQ, radiusPop, flyTo, changeHeat })
const height = mainHeight(20)
</script>