This commit is contained in:
parent
f4a9b5ce21
commit
eafb575f09
|
@ -42,12 +42,12 @@ import geoJsonJiangyang from "/static/jsonData/jiangyang_geo.js"
|
||||||
import geoJsonLongmatan from "/static/jsonData/longmatan_geo.js"
|
import geoJsonLongmatan from "/static/jsonData/longmatan_geo.js"
|
||||||
import geoJsonNaxi from "/static/jsonData/naxi_geo.js"
|
import geoJsonNaxi from "/static/jsonData/naxi_geo.js"
|
||||||
import geoJsonXuyong from "/static/jsonData/xuyong_geo.js"
|
import geoJsonXuyong from "/static/jsonData/xuyong_geo.js"
|
||||||
import { useRouter,useRoute } from "vue-router"
|
import { useRouter, useRoute } from "vue-router"
|
||||||
import { areaObj } from "@/store/index.js"
|
import { areaObj } from "@/store/index.js"
|
||||||
import { landListApi } from "@/api.js"
|
import { landListApi } from "@/api.js"
|
||||||
import { globalEventBus } from '@/common/eventBus'
|
import { globalEventBus } from '@/common/eventBus'
|
||||||
import { sendMsg } from "@/api.js"
|
import { sendMsg } from "@/api.js"
|
||||||
const route=useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const sendFn = (event, data = '') => {
|
const sendFn = (event, data = '') => {
|
||||||
sendMsg({ channel: 'user-11', event, data })
|
sendMsg({ channel: 'user-11', event, data })
|
||||||
|
@ -316,8 +316,11 @@ const initAreaMap = async () => {
|
||||||
bg.setOption(option);
|
bg.setOption(option);
|
||||||
bg.on('click', function (params) {
|
bg.on('click', function (params) {
|
||||||
|
|
||||||
|
console.log(params, 'parmas')
|
||||||
|
|
||||||
|
|
||||||
if (isMainScreen) {
|
if (isMainScreen) {
|
||||||
sendFn('choseTown', { name: params.name })
|
sendFn('choseTown', { name: params?.name||params?.value })
|
||||||
} else {
|
} else {
|
||||||
areaStore.areaCodeList.forEach(item => {
|
areaStore.areaCodeList.forEach(item => {
|
||||||
if (item.name == (params.name || params.value)) {
|
if (item.name == (params.name || params.value)) {
|
||||||
|
@ -560,11 +563,11 @@ const initTownMap = async (name) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(() => areaStore.userInfo, (value, oldValue) => {
|
watch(() => areaStore.userInfo, (value, oldValue) => {
|
||||||
console.log("监听到了",value)
|
console.log("监听到了", value)
|
||||||
if (!value.streetCode) {
|
if (!value.streetCode) {
|
||||||
initGeoJson(value.areaCode)
|
initGeoJson(value.areaCode)
|
||||||
getFamrCenter().then(res => {
|
getFamrCenter().then(res => {
|
||||||
initAreaMap()
|
initAreaMap()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
initTownMap(value.name)
|
initTownMap(value.name)
|
||||||
|
@ -575,38 +578,38 @@ watch(() => areaStore.userInfo, (value, oldValue) => {
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const initGeoJson=(code)=>{
|
const initGeoJson = (code) => {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case "510521":
|
case "510521":
|
||||||
geoJson = geoJsonLuxian
|
geoJson = geoJsonLuxian
|
||||||
break;
|
break;
|
||||||
case '510502':
|
case '510502':
|
||||||
geoJson = geoJsonJiangyang
|
geoJson = geoJsonJiangyang
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case '510503':
|
case '510503':
|
||||||
geoJson = geoJsonNaxi
|
geoJson = geoJsonNaxi
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case '510504':
|
case '510504':
|
||||||
geoJson = geoJsonLongmatan
|
geoJson = geoJsonLongmatan
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case '510522':
|
case '510522':
|
||||||
geoJson = geoJsonHejiang
|
geoJson = geoJsonHejiang
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case '510524':
|
case '510524':
|
||||||
geoJson = geoJsonXuyong
|
geoJson = geoJsonXuyong
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case '510525':
|
case '510525':
|
||||||
geoJson = geoJsonGulin
|
geoJson = geoJsonGulin
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(route.query.areaCode){
|
if (route.query.areaCode) {
|
||||||
// initGeoJson(areaCode)
|
// initGeoJson(areaCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<leftCenter :data="data" :key="data.land_id"></leftCenter>
|
<leftCenter :data="data" :key="data.land_id"></leftCenter>
|
||||||
</div>
|
</div>
|
||||||
<div class="top center">
|
<div class="top center">
|
||||||
<!-- <JessibucaDemo v-if="video_url&&showVideo" :src="video_url"></JessibucaDemo> -->
|
<JessibucaDemo v-if="video_url&&showVideo" :src="video_url"></JessibucaDemo>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
|
|
Loading…
Reference in New Issue