|
|
@@ -14,7 +14,8 @@
|
|
|
<div class="other-people-title">
|
|
|
实时监测
|
|
|
</div>
|
|
|
- <div class="totalContianer" v-if="TotalPanel || LoftPanel">
|
|
|
+ <!--全局 和 楼栋-->
|
|
|
+ <div class="totalContianer" v-if="pageLevel == 0 || pageLevel == 1 || pageLevel == 4">
|
|
|
<div class="tlt">
|
|
|
<h5>正在监测</h5>
|
|
|
<BigRader :total-rs="totalRs"></BigRader>
|
|
|
@@ -24,25 +25,26 @@
|
|
|
<Watching :total-rs="totalRs"></Watching>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="manageContainer" v-if="managePanel">
|
|
|
+ <!--楼层-->
|
|
|
+ <div class="manageContainer" v-if="pageLevel==2">
|
|
|
<div class="tlt">
|
|
|
<h5></h5>
|
|
|
- <SmallRader :strs="totalRs"></SmallRader>
|
|
|
+ <SmallRader :total-rs="totalRs"></SmallRader>
|
|
|
</div>
|
|
|
<div class="trt">
|
|
|
<Loft></Loft>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--<div class="RoomContainer" v-if="RoomPanel">-->
|
|
|
- <!--<div class="tlt">-->
|
|
|
- <!--<h5></h5>-->
|
|
|
- <!--<SmallRader :strs="totalRs"></SmallRader>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--<div class="trt">-->
|
|
|
- <!--<Room></Room>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--<div class="DetctorContianer" v-if="DetctorPanel">-->
|
|
|
+ <div class="RoomContainer" v-if="pageLevel == 3">
|
|
|
+ <div class="tlt">
|
|
|
+ <h5></h5>
|
|
|
+ <SmallRader :total-rs="totalRs"></SmallRader>
|
|
|
+ </div>
|
|
|
+ <div class="trt">
|
|
|
+ <Room></Room>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--<div class="DetctorContianer" v-if="pageLevel == 4">-->
|
|
|
<!--<div class="tlt">-->
|
|
|
<!--<h5>正在监测</h5>-->
|
|
|
<!--<BigRader :total-rs="totalRs"></BigRader>-->
|
|
|
@@ -56,23 +58,23 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="cube">
|
|
|
- <WifiSign></WifiSign>
|
|
|
+ <WifiSign :wifi-rs="WifiRs"></WifiSign>
|
|
|
</div>
|
|
|
<Scan></Scan>
|
|
|
</div>
|
|
|
<div class="mrt">
|
|
|
- <div class="cube" v-if="pageLevel == 0||pageLevel == 4">
|
|
|
+ <div class="cube" v-if="pageLevel == 0||pageLevel == 1||pageLevel == 4">
|
|
|
<HistoryRecord></HistoryRecord>
|
|
|
</div>
|
|
|
- <div class="cube" v-if="pageLevel == 1||pageLevel == 2||pageLevel == 3">
|
|
|
- <runTimeRecord></runTimeRecord>
|
|
|
+ <div class="cube" v-if="pageLevel == 2||pageLevel == 3">
|
|
|
+ <runTimeRecord :total-rs="totalRs"></runTimeRecord>
|
|
|
</div>
|
|
|
<div v-if="pageLevel != 4">
|
|
|
<EquipInfo></EquipInfo>
|
|
|
</div>
|
|
|
<!--单个设备情况-->
|
|
|
<div v-if="pageLevel == 4">
|
|
|
- <SingleEquipInfo></SingleEquipInfo>
|
|
|
+ <SingleEquipInfo :total-rs="totalRs"></SingleEquipInfo>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -91,7 +93,12 @@
|
|
|
import Watching from '@/components/Watching.vue'
|
|
|
import Loft from '@/components/Loft.vue'
|
|
|
import Room from '@/components/Room.vue'
|
|
|
- import {RegionDetInfolist} from '../api/getApiRes.js'
|
|
|
+ import {
|
|
|
+ RegionDetInfolist,
|
|
|
+ SingleDetInfolist,
|
|
|
+ DetectorWifixyInfolist,
|
|
|
+ RegionWifixyInfolist
|
|
|
+ } from '../api/getApiRes.js'
|
|
|
|
|
|
let qs = require('qs');
|
|
|
export default {
|
|
|
@@ -100,12 +107,14 @@
|
|
|
loadingState: false,
|
|
|
pageLevel: 0,//操作层级 默认0查 全部 层级
|
|
|
regionId: 0,//默认查全部
|
|
|
+ detectorId: 0,//无默认设备
|
|
|
TotalPanel: true,//总控
|
|
|
LoftPanel: false,//楼层
|
|
|
managePanel: false,//区域
|
|
|
RoomPanel: false,//房间
|
|
|
DetctorPanel: false,//设备
|
|
|
totalRs: [],
|
|
|
+ WifiRs: [],
|
|
|
// pageLevel: 1,//当前为楼层
|
|
|
// pageLevel: 2,//当前为楼层区域
|
|
|
// pageLevel: 3,//当前为房间
|
|
|
@@ -120,7 +129,7 @@
|
|
|
// 定时查询
|
|
|
that.timer = setInterval(() => {
|
|
|
that.getDate();
|
|
|
- }, 2800);
|
|
|
+ }, 5000);
|
|
|
},
|
|
|
destroyed() {
|
|
|
//页面销毁时清除定时器
|
|
|
@@ -132,6 +141,7 @@
|
|
|
changPanel(level, btn) {
|
|
|
let that = this;
|
|
|
this.regionId = btn.Id ? btn.Id : 0;
|
|
|
+ this.detectorId = btn.Id ? btn.Id : 0;
|
|
|
if (btn == 0) {
|
|
|
// 首页单独处理
|
|
|
this.pageLevel = 0
|
|
|
@@ -143,17 +153,29 @@
|
|
|
// 根据层级和地区ID调用不同的Ajax接口
|
|
|
getDate() {
|
|
|
let that = this;
|
|
|
+ // 非设备层级
|
|
|
if (that.pageLevel != 4) {
|
|
|
- // 非设备层级
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
regionId: this.regionId
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
+ // wifi柱状图信息传入区域Id
|
|
|
+ that.getRegionWifixyInfolist(postdata);
|
|
|
+ // 区域检测实时记录
|
|
|
that.getRegionDetInfolist(postdata);
|
|
|
} else {
|
|
|
// 单个设备层级
|
|
|
// todo
|
|
|
+ let param = {
|
|
|
+ token: localStorage.token,
|
|
|
+ detectorId: this.detectorId
|
|
|
+ };
|
|
|
+ let postdata = qs.stringify(param);
|
|
|
+ // Wifi柱状图信息传入探测器Id
|
|
|
+ that.getDetectorWifixyInfolist(postdata);
|
|
|
+ // 单个设备检测实时记录
|
|
|
+ that.getSingleDetInfolist(postdata);
|
|
|
}
|
|
|
},
|
|
|
getRegionDetInfolist(postdata) {
|
|
|
@@ -167,6 +189,17 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getSingleDetInfolist(postdata) {
|
|
|
+ let that = this;
|
|
|
+ SingleDetInfolist(postdata).then(res => {
|
|
|
+ let json = res;
|
|
|
+ if (json.Code == 0) {
|
|
|
+ that.totalRs = json;
|
|
|
+ } else {
|
|
|
+ that.$message.error(json.Memo);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
wordDisplay(word) {
|
|
|
let index = 0;
|
|
|
let that = this;
|
|
|
@@ -174,6 +207,31 @@
|
|
|
that.list.unshift(word[index]);
|
|
|
index = index + 1;
|
|
|
}, 300);
|
|
|
+ },
|
|
|
+
|
|
|
+ // Wifi柱状图信息传入探测器Id
|
|
|
+ getDetectorWifixyInfolist(postdata) {
|
|
|
+ let that = this;
|
|
|
+ DetectorWifixyInfolist(postdata).then(res => {
|
|
|
+ let json = res;
|
|
|
+ if (json.Code == 0) {
|
|
|
+ that.WifiRs = json;
|
|
|
+ } else {
|
|
|
+ that.$message.error(json.Memo);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // Wifi柱状图信息传入区域Id
|
|
|
+ getRegionWifixyInfolist(postdata) {
|
|
|
+ let that = this;
|
|
|
+ RegionWifixyInfolist(postdata).then(res => {
|
|
|
+ let json = res;
|
|
|
+ if (json.Code == 0) {
|
|
|
+ that.WifiRs = json;
|
|
|
+ } else {
|
|
|
+ that.$message.error(json.Memo);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
components: {
|