Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-charge
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b2c8dbe8
authored
Feb 28, 2024
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
2b0b4157
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
15 deletions
src/api/modules/parkingSpace.js
src/components/map-container/index.vue
src/router/routes.js
src/views/parkingPlace/index.vue
src/views/parkingPlace/sign.vue
src/api/modules/parkingSpace.js
View file @
b2c8dbe
...
...
@@ -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
,
...
...
src/components/map-container/index.vue
View file @
b2c8dbe
...
...
@@ -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
>
...
...
src/router/routes.js
View file @
b2c8dbe
...
...
@@ -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
:
{}
}
])
...
...
src/views/parkingPlace/index.vue
View file @
b2c8dbe
...
...
@@ -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
...
...
src/views/parkingPlace/sign.vue
0 → 100644
View file @
b2c8dbe
<
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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment