全局替换终端
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<!-- 市级 -->
|
||||
<!-- <div v-show="control == 4"> -->
|
||||
<div v-show="control == 2">
|
||||
<cityMapL ref="cityMapLRef" class="mapL" />
|
||||
<cityMapL ref="cityMapLRef" class="mapL" @LookMap="LookMap" @GridDiagram="GridDiagram" />
|
||||
<cityMapR ref="cityMapRRef" class="mapR" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -88,14 +88,17 @@ const control = ref(1)
|
||||
const form: any = ref({
|
||||
name: '',
|
||||
orgNo: dictData.state.area[0].id,
|
||||
areaName: dictData.state.area[0]?.name,
|
||||
isUpToGrid: 0
|
||||
})
|
||||
|
||||
const height = mainHeight(10)
|
||||
// 获取区域名称
|
||||
const changeValue = (e: any) => {
|
||||
//mapRef.value.locatePositions(e)
|
||||
console.log('🚀 ~ changeValue ~ e:', e.data)
|
||||
// mapRef.value.locatePositions(e)
|
||||
form.value.orgNo = e.data.id //list.filter((item: any) => item.code == e.orgId)[0]?.id || dictData.state.area[0].id
|
||||
form.value.areaName = e.data.name
|
||||
options.value[0].name = e.data.areaName
|
||||
|
||||
control.value = e.data.level
|
||||
@@ -118,12 +121,56 @@ const infoShow = (e: boolean) => {
|
||||
}
|
||||
// 地图控制图层
|
||||
const LookMap = (row: any, key?: any) => {
|
||||
//mapRef.value.addMarkers({ ...row, type: 1 }, key)
|
||||
// mapRef.value.addMarkers({ ...row, type: 1 }, key)
|
||||
}
|
||||
const LngLat = [
|
||||
{
|
||||
name: '唐山',
|
||||
LngLat: [118.335849137, 39.7513593355],
|
||||
zoom: 8
|
||||
},
|
||||
{
|
||||
name: '张家口',
|
||||
LngLat: [115.032504679, 40.8951549951],
|
||||
zoom: 7
|
||||
},
|
||||
{
|
||||
name: '秦皇岛',
|
||||
LngLat: [119.185113833, 40.1179119754],
|
||||
zoom: 8.3
|
||||
},
|
||||
{
|
||||
name: '承德',
|
||||
LngLat: [117.548498365, 41.3775890632],
|
||||
zoom: 7.3
|
||||
},
|
||||
{
|
||||
name: '廊坊',
|
||||
LngLat: [116.628004129, 39.0589378611],
|
||||
zoom: 8
|
||||
},
|
||||
{
|
||||
name: '超高压',
|
||||
LngLat: [116.84428600000001, 40.57707185292256],
|
||||
zoom: 6.709267680647425
|
||||
},
|
||||
{
|
||||
name: '风光储',
|
||||
LngLat: [116.84428600000001, 40.57707185292256],
|
||||
zoom: 6.709267680647425
|
||||
}
|
||||
]
|
||||
//区域统计展示切换
|
||||
const GridDiagram = (k?: number) => {
|
||||
//mapRef.value.radiusPop(k)
|
||||
//mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.709267680647425)
|
||||
const GridDiagram = (k?: number, num?: number) => {
|
||||
// mapRef.value.radiusPop(k)
|
||||
if (num == 3) {
|
||||
// form.value.areaName
|
||||
let value = LngLat.filter(item => item.name == form.value.areaName)[0]
|
||||
|
||||
// if (value) mapRef.value.flyTo({ coordinate: value.LngLat }, value.zoom)
|
||||
} else {
|
||||
// mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.709267680647425)
|
||||
}
|
||||
}
|
||||
const info = () => {
|
||||
form.value.startTime = datePickerRef.value.timeValue[0]
|
||||
@@ -133,7 +180,7 @@ const info = () => {
|
||||
|
||||
form.value.type = datePickerRef.value.interval
|
||||
|
||||
//mapRef.value.grids(form.value)
|
||||
// mapRef.value.grids(form.value)
|
||||
if (control.value == 1) {
|
||||
mapLRef.value.info(form.value)
|
||||
mapRRef.value.info(form.value)
|
||||
@@ -147,6 +194,7 @@ const reset = () => {
|
||||
form.value = {
|
||||
name: '',
|
||||
orgNo: dictData.state.area[0].id,
|
||||
areaName: dictData.state.area[0]?.name,
|
||||
isUpToGrid: 0
|
||||
}
|
||||
changeValue({ data: dictData.state.area[0] })
|
||||
@@ -220,5 +268,4 @@ onMounted(() => {
|
||||
background-color: var(--el-button-hover-bg-color);
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user