Commit e1c3b4e7 authored by Administrator's avatar Administrator

Merge branch 'hotfix/device_location_map'

parents e6087357 2c3101ac
Pipeline #247 failed with stage
......@@ -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,
......@@ -277,6 +278,14 @@ export default {
watch: {
},
mounted() {
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.getUserDeviceInfo(this.$route.query.device_id);
}
},
created() {
this.$store.dispatch('app/toggleSideBar');
......@@ -307,6 +316,7 @@ export default {
this.zoom = 6;
this.markersDeviceVisible = true;
this.markerVisible = false;
this.leftDeviceListVisible = true;
});
},
getUserDevices(center) {
......@@ -315,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, '');
......@@ -353,6 +364,7 @@ export default {
},
// 获取单个用户下的设备
getUserDeviceList(uid) {
this.leftDeviceListVisible = true;
// 停止定时器
this.clearIntv();
devices({ uid: uid })
......@@ -372,6 +384,7 @@ export default {
this.markerVisible = false;
});
// this.dataRefresh();
this.leftDeviceListVisible = false;
},
// 获取设备详细信息
getUserDeviceInfo(id) {
......
......@@ -72,12 +72,12 @@
<span>{{ scope.row.tname }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="检测介质" width="170">
<el-table-column align="center" label="检测介质" width="100">
<template slot-scope="scope">
<span>{{ scope.row.gas }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="切断装置" width="170">
<el-table-column align="center" label="切断装置" width="100">
<template slot-scope="scope">
<span>{{ shutoffDevice(scope.row.shutoff_type) }}</span>
</template>
......@@ -92,7 +92,7 @@
<span>{{ scope.row.danwei }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="切断装置状态" width="120">
<el-table-column align="center" label="切断装置状态" width="80">
<template slot-scope="scope">
<span>
<el-popconfirm
......@@ -131,6 +131,13 @@
<span v-if="scope.row.update_time > 0">{{ scope.row.update_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="--" width="120">
<template slot-scope="scope">
<router-link :to="{ path: '/map/map', query: { device_id: scope.row.id } }">
<el-button class="button">查看地图</el-button>
</router-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
......
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