Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
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 f66b9639
authored
Dec 23, 2024
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
地图切换
1 parent
be63bdeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
25 deletions
src/pages/monitor/addPoi.vue
src/pages/monitor/addPoi.vue
View file @
f66b963
...
@@ -173,9 +173,14 @@ export default {
...
@@ -173,9 +173,14 @@ export default {
});
});
AMap
.
invoke
(
"autocompleteShow"
);
AMap
.
invoke
(
"autocompleteShow"
);
AMap
.
invoke
(
"autocompleteAddEventListener"
,
"onconfirm"
,
(
e
)
=>
{
AMap
.
invoke
(
"autocompleteAddEventListener"
,
"onconfirm"
,
(
e
)
=>
{
this
.
poi
=
e
.
item
.
value
;
let
_poi
=
e
.
item
.
value
;
this
.
$set
(
this
.
form
,
"address"
,
this
.
poi
.
address
);
// this.$set(this.form, "address", this.poi.address);
this
.
$refs
.
addressInput
.
focus
();
let
_params
=
{};
_params
.
lng
=
_poi
.
location
.
lng
;
_params
.
lat
=
_poi
.
location
.
lat
;
this
.
addPoiMarker
(
_params
,
"search"
);
// this.$refs.poiMapSearch.focus();
});
});
this
.
initMapEvent
();
this
.
initMapEvent
();
this
.
getPoiTrack
();
this
.
getPoiTrack
();
...
@@ -297,12 +302,10 @@ export default {
...
@@ -297,12 +302,10 @@ export default {
// marker点击事件
// marker点击事件
markerEvent
(
e
)
{
markerEvent
(
e
)
{
console
.
log
(
e
)
let
_params
=
e
;
let
_params
=
e
;
this
.
setPoiInfo
(
e
);
this
.
setPoiInfo
(
e
);
let
point
=
e
.
latLng
;
let
point
=
e
.
latLng
;
AMap
.
invoke
(
"getLocation"
,
point
,
(
res
)
=>
{
AMap
.
invoke
(
"getLocation"
,
point
,
(
res
)
=>
{
console
.
log
(
res
)
let
_pois
=
res
.
surroundingPois
||
[];
let
_pois
=
res
.
surroundingPois
||
[];
_params
.
address
=
res
.
address
;
_params
.
address
=
res
.
address
;
_params
.
near
=
_pois
[
0
]
?
_pois
[
0
].
title
:
""
;
_params
.
near
=
_pois
[
0
]
?
_pois
[
0
].
title
:
""
;
...
@@ -333,26 +336,6 @@ export default {
...
@@ -333,26 +336,6 @@ export default {
this
.
hideFooter
=
!
this
.
hideFooter
;
this
.
hideFooter
=
!
this
.
hideFooter
;
},
},
// 绑定搜索
bindSearch
()
{
const
_this
=
this
;
AMap
.
plugin
(
"AMap.AutoComplete"
,
function
()
{
let
autoComplete
=
new
AMap
.
AutoComplete
({
input
:
"poiMapSearch"
,
});
autoComplete
.
on
(
"select"
,
function
(
e
)
{
console
.
log
(
e
);
let
_poi
=
e
.
poi
||
{};
let
_params
=
{};
_params
.
lng
=
_poi
.
location
.
lng
;
_params
.
lat
=
_poi
.
location
.
lat
;
_this
.
addPoiMarker
(
_params
,
"search"
);
});
});
},
// 返回列表页面
// 返回列表页面
goListPage
()
{
goListPage
()
{
let
path
=
`/trialRun#/poi/index`
;
let
path
=
`/trialRun#/poi/index`
;
...
...
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