Commit b2c8dbe8 by 王志慧

fixed

1 parent 2b0b4157
...@@ -84,6 +84,16 @@ const saveParkingSpacePicApi = params => { ...@@ -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 { export default {
getParkingSpaceListApi, getParkingSpaceListApi,
getMerchantListApi, getMerchantListApi,
......
...@@ -57,6 +57,10 @@ export default { ...@@ -57,6 +57,10 @@ export default {
} }
}, },
props: { props: {
id: {
type: Number,
default: 0
},
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
...@@ -252,23 +256,34 @@ export default { ...@@ -252,23 +256,34 @@ export default {
let { let {
AMap, AMap,
map, map,
id,
contextMenuPositon: { lng, lat } contextMenuPositon: { lng, lat }
} = this, } = this,
marker marker
marker = new AMap.Marker({ let params = {
icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png', id,
position: [lng, lat], parkingAddressLng: lng,
offset: new AMap.Pixel(-13, -30) 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) { cancel(infoWindow) {
infoWindow.close() infoWindow.close()
}, },
del(infoWindow){ del(infoWindow) {
infoWindow.close() infoWindow.close()
}, },
remoteMethod(query) { remoteMethod(query) {
if (query == '') { if (query == '') {
...@@ -387,7 +402,8 @@ export default { ...@@ -387,7 +402,8 @@ export default {
let { map } = this let { map } = this
map.zoomOut() map.zoomOut()
} }
} },
} }
</script> </script>
......
...@@ -8,9 +8,15 @@ const staticRoutes = Object.freeze([{ ...@@ -8,9 +8,15 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/Radar/index.vue`], resolve), component: resolve => require([`@/views/Radar/index.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'radar', name: 'parkingPlace',
path: '/Map/index', path: '/parkingPlace/index',
component: resolve => require([`@/views/Map/index.vue`], resolve), component: resolve => require([`@/views/parkingPlace/index.vue`], resolve),
meta: {}
},
{
name: 'sign',
path: '/parkingPlace/sign:id',
component: resolve => require([`@/views/parkingPlace/sign.vue`], resolve),
meta: {} meta: {}
} }
]) ])
......
...@@ -136,13 +136,13 @@ export default { ...@@ -136,13 +136,13 @@ export default {
{ {
type: 'el-button', type: 'el-button',
name: row => { name: row => {
return '修改标记' return '车位标记'
}, },
attrs: { attrs: {
type: 'text' type: 'text'
}, },
listeners: { listeners: {
click: row => this.del(row.scope) click: row => this.sign(row.scope)
} }
}, },
{ {
...@@ -386,6 +386,10 @@ export default { ...@@ -386,6 +386,10 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
//车位标记
sign(row){
this.$router.push(`/parkingPlace/sign/${row.id}`)
},
openUploadDialog(row) { openUploadDialog(row) {
this.curId = row.id this.curId = row.id
this.uploadVisible = true 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 \ 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!