全局替换终端

This commit is contained in:
GGJ
2024-06-13 13:32:50 +08:00
parent d4db10d5ca
commit 2c66e096e7
90 changed files with 1369 additions and 628 deletions

View File

@@ -8,7 +8,7 @@
v-model.trim="inputQuery"
style="height: 46px; width: 334px"
@keyup.enter="DeviceQ"
placeholder="请输入设备名称"
placeholder="请输入终端名称"
>
<template #prefix>
<div class="Icon"></div>
@@ -127,7 +127,7 @@ const LngLat = [
]
import { getAssessOverview } from '@/api/device-boot/panorama'
narimap.Require(['PSRMap', 'Thematic', 'Components.Query', 'Components.RegionSelector'], () => {
narimap.Require(['PSRMap', 'Thematic', 'Components.Query','Components.MapSelector', 'Components.RegionSelector'], () => {
if (narimap.Config.examples.notlogin) {
initMap(narimap.Config.styles.sjRaster)
} else {
@@ -147,9 +147,6 @@ narimap.Require(['PSRMap', 'Thematic', 'Components.Query', 'Components.RegionSel
console.log('错误', err)
})
}
setTimeout(() => {
console.log('🚀 ~ .then ~ narimap.Config.style:', narimap.Config)
}, 0)
})
function initMap(styleurl: any) {
map.value = new narimap.Map({
@@ -163,6 +160,7 @@ function initMap(styleurl: any) {
localIdeographFontFamily: 'Microsoft YoHei'
})
map.value.on('load', () => {
createMapSelectorComponent()
DeviceQuery.value = new narimap.ResourceQuery.DeviceQuery()
addLayer()
@@ -984,6 +982,24 @@ const flyTo = (row: any, zoom?: number) => {
})
}
// 添加地图选择
const createMapSelectorComponent = () => {
const mapSelector = new narimap.Components.MapSelector();
mapSelector.init(
map.value,
// ['sjBase', 'sjDark'],
// [
// {
// styleKey: 'sjRaster',
// styleName: '影像图',
// styleUrl: narimap.Config.styles.sjRaster,
// // styleIcon: WebGIS.Config.apiRoot + 'libs/webgis/images/map/map_sjRasterStyle.png'
// }
// ]
)
}
defineExpose({ locatePositions, addMarkers, grids, DeviceQ, radiusPop, flyTo })
const height = mainHeight(20)
</script>