|
@@ -57,7 +57,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="sdb-list" v-if="markerData.length > 0">
|
|
|
- <div class="label t2">文字列表(选中:{{curMarkersIndex + 1}})</div>
|
|
|
+ <div class="label t2" v-if="markerData[0].icon">图标列表(选中:{{curMarkersIndex + 1}})</div>
|
|
|
+ <div class="label t2" v-else>文字列表(选中:{{curMarkersIndex + 1}})</div>
|
|
|
<div class="ul">
|
|
|
<div class="op" v-for="(t, index) in markerData" :key="index">
|
|
|
<p class="p1" v-if="t.icon" @click="openImg({obj: t, index})">({{index + 1}}){{t.text}}</p>
|
|
@@ -82,7 +83,7 @@
|
|
|
:events="mapEvents"
|
|
|
:plugin="plugin"
|
|
|
>
|
|
|
- <template v-if="mapDiyObj.zoom > 13">
|
|
|
+ <template v-if="mapDiyObj.zoom > 12">
|
|
|
<template v-if="mapDiyObj.isSchoolShow === '1'">
|
|
|
<el-amap-marker class="scoped-m-box" v-for="(marker, index) in schoolList" :key="3000 + index"
|
|
|
icon="https://img2.honglounews.com/20220110041435-6276.png"
|
|
@@ -270,6 +271,8 @@ export default {
|
|
|
},
|
|
|
markersEvents: {
|
|
|
dragend(e) {
|
|
|
+ const eData = e.target.getExtData()
|
|
|
+ that.curMarkersIndex = eData.index
|
|
|
const { lng, lat } = e.lnglat
|
|
|
let markerData = JSON.parse(JSON.stringify(that.markerData))
|
|
|
markerData[that.curMarkersIndex].position = [lng, lat]
|
|
@@ -861,13 +864,12 @@ export default {
|
|
|
if (bcStr && bcStr === 'edit') {
|
|
|
const index = this.mteObj.index || 0
|
|
|
let tempData = [...this.markerData]
|
|
|
- tempData[index].content = obj.text
|
|
|
+ tempData[index].icon = obj.icon
|
|
|
tempData[index].text = obj.text
|
|
|
tempData[index].color = obj.color
|
|
|
this.markerData = [...tempData]
|
|
|
this.$storage(`map_markerData`, JSON.stringify(tempData))
|
|
|
} else {
|
|
|
- console.log(obj)
|
|
|
this.imgAdd(obj)
|
|
|
this.isDbShow = false
|
|
|
this.$msgs('请在地图上操作')
|
|
@@ -960,7 +962,7 @@ export default {
|
|
|
draggable: true,
|
|
|
animation: 'AMAP_ANIMATION_DROP',
|
|
|
content: obj.text,
|
|
|
- offset: [0, -10],
|
|
|
+ offset: [-10, -10],
|
|
|
text: obj.text,
|
|
|
color: obj.color,
|
|
|
})
|