Commit 7ad178a5 authored by yangkaiyi's avatar yangkaiyi

自动定位到围栏区

parent 503396f6
<template> <template>
<!-- 围栏悬浮层 -->
<section class="lbs-bg-transparent lbs-bg-transparent2"> <section class="lbs-bg-transparent lbs-bg-transparent2">
<el-card <el-card
class="box-card lbs-bg-transparent" class="box-card lbs-bg-transparent"
...@@ -114,6 +115,7 @@ ...@@ -114,6 +115,7 @@
" "
></el-button ></el-button
></el-tooltip> ></el-tooltip>
<!-- 删除围栏 -->
<el-tooltip <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
...@@ -353,7 +355,9 @@ export default { ...@@ -353,7 +355,9 @@ export default {
}, },
}, },
}, },
mounted() {}, mounted() {
this.$store.dispatch("getGeofences");
},
components: { components: {
Binds: Binds, Binds: Binds,
DistrictGeo: DistrictGeo, DistrictGeo: DistrictGeo,
......
...@@ -332,6 +332,9 @@ export default { ...@@ -332,6 +332,9 @@ export default {
getGeofences({ commit }) { getGeofences({ commit }) {
getGeofences().then((res) => { getGeofences().then((res) => {
commit(types.USER_GET_GEOFENCES, res); commit(types.USER_GET_GEOFENCES, res);
if (res.length) {
commit(types.USER_SET_SELECT_GEOFENCE, res[1]);
}
}); });
}, },
hideGeofences({ commit }) { hideGeofences({ commit }) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment