|
@@ -58,6 +58,20 @@
|
|
|
:events="events"
|
|
|
:plugin="plugin"
|
|
|
>
|
|
|
+ <el-amap-marker v-for="(marker, index) in {...schoolList}" :key="3000 + index"
|
|
|
+ icon="https://img2.honglounews.com/20220110031921-2283.png"
|
|
|
+ :position="marker.position"
|
|
|
+ :events="schoolEvents"
|
|
|
+ :extData="{id: marker.id}"
|
|
|
+ >
|
|
|
+ </el-amap-marker>
|
|
|
+ <el-amap-marker v-for="(marker, index) in {...estateList}" :key="2000 + index"
|
|
|
+ icon="https://img2.honglounews.com/20220110032219-7950.png"
|
|
|
+ :position="marker.position"
|
|
|
+ :events="estateEvents"
|
|
|
+ :extData="{id: marker.id}"
|
|
|
+ >
|
|
|
+ </el-amap-marker>
|
|
|
<template v-if="mapDiyObj.zoom > 3">
|
|
|
<el-amap-marker v-for="(marker, index) in markerData" :key="1000 + index"
|
|
|
:position="marker.position"
|
|
@@ -103,6 +117,8 @@ export default {
|
|
|
data() {
|
|
|
const that = this
|
|
|
return {
|
|
|
+ estateList: [],
|
|
|
+ schoolList: [],
|
|
|
isDbShow: true,
|
|
|
isMapSetShow: false,
|
|
|
formData: [],
|
|
@@ -181,10 +197,22 @@ export default {
|
|
|
polygonEvents: {
|
|
|
click(e) {
|
|
|
// console.log(e.target.getExtData())
|
|
|
- console.log(wx)
|
|
|
+ // console.log(wx)
|
|
|
wx.miniProgram.navigateTo({url: '/pagesSchool/indexDtl?id=25'})
|
|
|
},
|
|
|
},
|
|
|
+ estateEvents: {
|
|
|
+ click(e) {
|
|
|
+ const eData = e.target.getExtData()
|
|
|
+ wx.miniProgram.navigateTo({url: `/pagesHouse/indexDtl?id=${eData.id}`})
|
|
|
+ },
|
|
|
+ },
|
|
|
+ schoolEvents: {
|
|
|
+ click(e) {
|
|
|
+ const eData = e.target.getExtData()
|
|
|
+ wx.miniProgram.navigateTo({url: `/pagesSchool/indexDtl?id=${eData.id}`})
|
|
|
+ },
|
|
|
+ },
|
|
|
curMarkersIndex: 0,
|
|
|
plugin: [{
|
|
|
pName: 'MouseTool',
|
|
@@ -213,6 +241,18 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getData()
|
|
|
+ this.$api.other.admmapcoordinall().then(res => {
|
|
|
+ let estateList = res.estate_list || []
|
|
|
+ estateList.map(item => {
|
|
|
+ item.position = [item.longitude, item.latitude]
|
|
|
+ })
|
|
|
+ this.estateList = [...estateList]
|
|
|
+ let schoolList = res.school_list || []
|
|
|
+ schoolList.map(item => {
|
|
|
+ item.position = [item.longitude, item.latitude]
|
|
|
+ })
|
|
|
+ this.schoolList = [...schoolList]
|
|
|
+ })
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
@@ -379,7 +419,6 @@ export default {
|
|
|
that.polygons = [...polygons]
|
|
|
mouseTool.close(true)
|
|
|
that.isDbShow = true
|
|
|
- console.log(that.isDbShow)
|
|
|
})
|
|
|
},
|
|
|
mapIsEdit (index, str) {
|
|
@@ -420,7 +459,6 @@ export default {
|
|
|
if (obj) {
|
|
|
if (bcStr && bcStr === 'edit') {
|
|
|
const index = this.mteObj.index || 0
|
|
|
- console.log(this.mteObj)
|
|
|
const str = this.mteStr === 'textAdd' ? 'markerData' : 'polygons'
|
|
|
let tempData = [...this[str]]
|
|
|
if (this.mteStr === 'textAdd') {
|