Commit b2c8dbe8 by 王志慧

fixed

1 parent 2b0b4157
......@@ -84,6 +84,16 @@ const saveParkingSpacePicApi = params => {
})
}
// 车位标记
const addFlagparkingSpace = params => {
params.method = 'marketing.api.charge.parkingSpace.addFlag'
return http({
url: URL,
method: 'post',
data: params,
sign: true
})
}
export default {
getParkingSpaceListApi,
getMerchantListApi,
......
......@@ -57,6 +57,10 @@ export default {
}
},
props: {
id: {
type: Number,
default: 0
},
width: {
type: String,
default: '100%'
......@@ -252,23 +256,34 @@ export default {
let {
AMap,
map,
id,
contextMenuPositon: { lng, lat }
} = this,
marker
marker = new AMap.Marker({
icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
position: [lng, lat],
offset: new AMap.Pixel(-13, -30)
let params = {
id,
parkingAddressLng: lng,
parkingAddressLat: lat
}
this.$apis.parkingSpace.addFlagparkingSpace(params).then(res => {
if (res) {
marker = new AMap.Marker({
icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
position: [lng, lat],
offset: new AMap.Pixel(-13, -30)
})
marker.setMap(map)
this.initMarket(marker)
infoWindow.close()
this.$message.success('车位标记成功')
}
})
marker.setMap(map)
this.initMarket(marker)
infoWindow.close()
},
cancel(infoWindow) {
infoWindow.close()
},
del(infoWindow){
infoWindow.close()
del(infoWindow) {
infoWindow.close()
},
remoteMethod(query) {
if (query == '') {
......@@ -387,7 +402,8 @@ export default {
let { map } = this
map.zoomOut()
}
}
},
}
</script>
......
......@@ -8,9 +8,15 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/Radar/index.vue`], resolve),
meta: {}
}, {
name: 'radar',
path: '/Map/index',
component: resolve => require([`@/views/Map/index.vue`], resolve),
name: 'parkingPlace',
path: '/parkingPlace/index',
component: resolve => require([`@/views/parkingPlace/index.vue`], resolve),
meta: {}
},
{
name: 'sign',
path: '/parkingPlace/sign:id',
component: resolve => require([`@/views/parkingPlace/sign.vue`], resolve),
meta: {}
}
])
......
......@@ -136,13 +136,13 @@ export default {
{
type: 'el-button',
name: row => {
return '修改标记'
return '车位标记'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.del(row.scope)
click: row => this.sign(row.scope)
}
},
{
......@@ -386,6 +386,10 @@ export default {
},
mounted() {},
methods: {
//车位标记
sign(row){
this.$router.push(`/parkingPlace/sign/${row.id}`)
},
openUploadDialog(row) {
this.curId = row.id
this.uploadVisible = true
......
<template>
<map-container width="100%" height="100%" :id="id"></map-container>
</template>
<script>
export default {
data() {
return {
id: this.$route.params.id
}
}
}
</script>
<style>
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!