Commit 7ad178a5 authored by yangkaiyi's avatar yangkaiyi

自动定位到围栏区

parent 503396f6
<template>
<!-- 围栏悬浮层 -->
<section class="lbs-bg-transparent lbs-bg-transparent2">
<el-card
class="box-card lbs-bg-transparent"
......@@ -114,6 +115,7 @@
"
></el-button
></el-tooltip>
<!-- 删除围栏 -->
<el-tooltip
class="item"
effect="dark"
......@@ -353,7 +355,9 @@ export default {
},
},
},
mounted() {},
mounted() {
this.$store.dispatch("getGeofences");
},
components: {
Binds: Binds,
DistrictGeo: DistrictGeo,
......
......@@ -332,6 +332,9 @@ export default {
getGeofences({ commit }) {
getGeofences().then((res) => {
commit(types.USER_GET_GEOFENCES, res);
if (res.length) {
commit(types.USER_SET_SELECT_GEOFENCE, res[1]);
}
});
},
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