Commit 2c3101ac authored by Administrator's avatar Administrator

设备列表定位

parent b42f6530
......@@ -86,7 +86,7 @@
<!-- 用户的设备列表 -->
<div v-if="deviceListVisible" class="zero-user-devices">
<el-collapse v-if="checkPermission(['manage isadmin'])" v-model="activeNames">
<el-collapse-item name="1">
<el-collapse-item v-show="leftDeviceListVisible" name="1">
<template slot="title">
设备列表 - {{ leftDeviceName }}
</template>
......@@ -209,6 +209,7 @@ export default {
data(){
const _this = this;
return {
leftDeviceListVisible: true,
markersGoodsVisible: false,
markersGoods: [{
id: 1,
......@@ -280,9 +281,10 @@ export default {
console.log(this.$route.query);
if (this.$route.query.device_id > 0) {
this.markersDeviceVisible = true;
this.leftDeviceListVisible = false;
this.zoom = 15;
console.log(this.$route.query.device_id);
this.markerClickEvent({ id: this.$route.query.device_id });
this.getUserDeviceInfo(this.$route.query.device_id);
}
},
created() {
......@@ -314,6 +316,7 @@ export default {
this.zoom = 6;
this.markersDeviceVisible = true;
this.markerVisible = false;
this.leftDeviceListVisible = true;
});
},
getUserDevices(center) {
......@@ -322,6 +325,7 @@ export default {
this.center = center;
this.markerVisible = true;
this.markersDeviceVisible = true;
this.leftDeviceListVisible = true;
},
rebuildEvent(marker) {
var mapcenter = marker.mapcenter.replace(/\s*/g, '');
......@@ -360,6 +364,7 @@ export default {
},
// 获取单个用户下的设备
getUserDeviceList(uid) {
this.leftDeviceListVisible = true;
// 停止定时器
this.clearIntv();
devices({ uid: uid })
......@@ -379,6 +384,7 @@ export default {
this.markerVisible = false;
});
// this.dataRefresh();
this.leftDeviceListVisible = false;
},
// 获取设备详细信息
getUserDeviceInfo(id) {
......
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