Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
e-shield-h5
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 6ce33071
authored
Jan 03, 2025
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
地图切换
1 parent
c970a609
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
41 deletions
src/views/fence.vue
src/views/monitor.vue
src/views/replay.vue
src/views/resident.vue
src/views/share.vue
src/views/fence.vue
View file @
6ce3307
...
...
@@ -74,7 +74,7 @@
import
{
defineComponent
,
onMounted
,
ref
}
from
"vue"
;
import
mapContent
from
"@/components/mapContent.vue"
;
import
popup
from
"@/components/popup.vue"
;
import
AMapLoader
from
"@amap/amap-jsapi-loader"
;
//
import AMapLoader from "@amap/amap-jsapi-loader";
import
{
CONSTANT
}
from
"../constant"
;
import
{
Toast
,
Dialog
}
from
"vant"
;
import
{
useRoute
}
from
"vue-router"
;
...
...
@@ -104,18 +104,18 @@ export default defineComponent({
const
adcodeItemName
=
ref
(
null
);
let
district
=
null
;
onMounted
(()
=>
{
AMapLoader
.
load
({
key
:
CONSTANT
.
MAP_KEY
,
version
:
"1.4.8"
,
plugins
:
CONSTANT
.
MAP_PLUGINS
,
}).
then
((
AMap
)
=>
{
window
.
AMap
=
AMap
;
mapContentRefs
.
value
.
initMap
(
"fenceContainer"
,
1
)
;
geocoderValue
.
value
=
new
AMap
.
Geocoder
({
radius
:
1000
,
extensions
:
"all"
,
});
});
mapContentRefs
.
value
.
initMap
(
"fenceContainer"
,
1
);
// AMapLoader.load({
// key: CONSTANT.MAP_KEY
,
// version: "1.4.8"
,
// plugins: CONSTANT.MAP_PLUGINS,
// }).then((AMap) => {
// window.AMap = AMap
;
//
geocoderValue.value = new AMap.Geocoder({
//
radius: 1000,
//
extensions: "all",
//
});
//
});
});
// 地图刷新
const
refreshCb
=
(
map
)
=>
{
...
...
src/views/monitor.vue
View file @
6ce3307
...
...
@@ -38,7 +38,7 @@
<
script
>
import
{
onMounted
,
ref
,
nextTick
,
watch
}
from
"vue"
;
import
mapContent
from
"@/components/mapContent.vue"
;
import
AMapLoader
from
"@amap/amap-jsapi-loader"
;
//
import AMapLoader from "@amap/amap-jsapi-loader";
import
{
CONSTANT
}
from
"../constant"
;
import
{
GET_CAR_LOCATION_INFO
}
from
"@/api/index"
;
import
{
useRoute
}
from
"vue-router"
;
...
...
@@ -81,14 +81,14 @@ export default {
timeoutId
.
value
&&
clearTimeout
(
timeoutId
.
value
);
};
onMounted
(()
=>
{
AMapLoader
.
load
({
key
:
CONSTANT
.
MAP_KEY
,
version
:
"1.4.8"
,
plugins
:
CONSTANT
.
MAP_PLUGINS
,
}).
then
((
AMap
)
=>
{
window
.
AMap
=
AMap
;
mapContentRefs
.
value
.
initMap
(
"monitorContainer"
)
;
});
mapContentRefs
.
value
.
initMap
(
"monitorContainer"
);
// AMapLoader.load({
// key: CONSTANT.MAP_KEY
,
// version: "1.4.8"
,
// plugins: CONSTANT.MAP_PLUGINS,
// }).then((AMap) => {
// window.AMap = AMap
;
//
});
});
watch
(
changey
,
(
newVal
)
=>
{
let
listNode
=
document
.
querySelector
(
".list-content-monitor"
);
...
...
src/views/replay.vue
View file @
6ce3307
...
...
@@ -99,7 +99,7 @@
import
{
defineComponent
,
onMounted
,
ref
,
reactive
,
nextTick
}
from
"vue"
;
import
mapContent
from
"@/components/mapContent.vue"
;
import
popup
from
"@/components/popup.vue"
;
import
AMapLoader
from
"@amap/amap-jsapi-loader"
;
//
import AMapLoader from "@amap/amap-jsapi-loader";
import
{
CONSTANT
}
from
"../constant"
;
import
{
Toast
,
Dialog
}
from
"vant"
;
import
moment
from
"@/utils/moment"
;
...
...
src/views/resident.vue
View file @
6ce3307
...
...
@@ -92,7 +92,7 @@
import
{
defineComponent
,
nextTick
,
onMounted
,
ref
,
watch
}
from
"vue"
;
import
mapContent
from
"@/components/mapContent.vue"
;
import
popup
from
"@/components/popup.vue"
;
import
AMapLoader
from
"@amap/amap-jsapi-loader"
;
//
import AMapLoader from "@amap/amap-jsapi-loader";
import
{
CONSTANT
}
from
"../constant"
;
import
moment
from
"@/utils/moment"
;
import
{
GET_RESIDENT_DATA
}
from
"@/api/index"
;
...
...
@@ -191,14 +191,14 @@ export default defineComponent({
});
};
onMounted
(()
=>
{
AMapLoader
.
load
({
key
:
CONSTANT
.
MAP_KEY
,
version
:
"1.4.8"
,
plugins
:
CONSTANT
.
MAP_PLUGINS
,
}).
then
((
AMap
)
=>
{
window
.
AMap
=
AMap
;
mapContentRefs
.
value
.
initMap
(
"residentContainer"
)
;
});
mapContentRefs
.
value
.
initMap
(
"residentContainer"
);
// AMapLoader.load({
// key: CONSTANT.MAP_KEY
,
// version: "1.4.8"
,
// plugins: CONSTANT.MAP_PLUGINS,
// }).then((AMap) => {
// window.AMap = AMap
;
//
});
});
// 快捷选择时间
const
selectTime
=
(
e
)
=>
{
...
...
src/views/share.vue
View file @
6ce3307
...
...
@@ -12,7 +12,7 @@
<
script
>
import
{
ref
,
defineComponent
,
onMounted
}
from
"vue"
;
import
mapContent
from
"@/components/mapContent.vue"
;
import
AMapLoader
from
"@amap/amap-jsapi-loader"
;
//
import AMapLoader from "@amap/amap-jsapi-loader";
import
{
CONSTANT
}
from
"../constant"
;
export
default
defineComponent
({
name
:
"SharePage"
,
...
...
@@ -22,14 +22,14 @@ export default defineComponent({
setup
()
{
const
mapContentRefs
=
ref
(
null
);
onMounted
(()
=>
{
AMapLoader
.
load
({
key
:
CONSTANT
.
MAP_KEY
,
version
:
"1.4.8"
,
plugins
:
CONSTANT
.
MAP_PLUGINS
,
}).
then
((
AMap
)
=>
{
window
.
AMap
=
AMap
;
mapContentRefs
.
value
.
initMap
(
"shareContainer"
)
;
});
mapContentRefs
.
value
.
initMap
(
"shareContainer"
);
// AMapLoader.load({
// key: CONSTANT.MAP_KEY
,
// version: "1.4.8"
,
// plugins: CONSTANT.MAP_PLUGINS,
// }).then((AMap) => {
// window.AMap = AMap
;
//
});
});
return
{
mapContentRefs
,
...
...
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