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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
7 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 => {
...
@@ -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
,
...
...
src/components/map-container/index.vue
View file @
b2c8dbe
...
@@ -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,9 +256,17 @@ export default {
...
@@ -252,9 +256,17 @@ export default {
let
{
let
{
AMap
,
AMap
,
map
,
map
,
id
,
contextMenuPositon
:
{
lng
,
lat
}
contextMenuPositon
:
{
lng
,
lat
}
}
=
this
,
}
=
this
,
marker
marker
let
params
=
{
id
,
parkingAddressLng
:
lng
,
parkingAddressLat
:
lat
}
this
.
$apis
.
parkingSpace
.
addFlagparkingSpace
(
params
).
then
(
res
=>
{
if
(
res
)
{
marker
=
new
AMap
.
Marker
({
marker
=
new
AMap
.
Marker
({
icon
:
'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png'
,
icon
:
'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png'
,
position
:
[
lng
,
lat
],
position
:
[
lng
,
lat
],
...
@@ -263,11 +275,14 @@ export default {
...
@@ -263,11 +275,14 @@ export default {
marker
.
setMap
(
map
)
marker
.
setMap
(
map
)
this
.
initMarket
(
marker
)
this
.
initMarket
(
marker
)
infoWindow
.
close
()
infoWindow
.
close
()
this
.
$message
.
success
(
'车位标记成功'
)
}
})
},
},
cancel
(
infoWindow
)
{
cancel
(
infoWindow
)
{
infoWindow
.
close
()
infoWindow
.
close
()
},
},
del
(
infoWindow
){
del
(
infoWindow
)
{
infoWindow
.
close
()
infoWindow
.
close
()
},
},
remoteMethod
(
query
)
{
remoteMethod
(
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
>
...
...
src/router/routes.js
View file @
b2c8dbe
...
@@ -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
:
{}
}
}
])
])
...
...
src/views/parkingPlace/index.vue
View file @
b2c8dbe
...
@@ -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
...
...
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
\ 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