|
|
@@ -48,8 +48,8 @@
|
|
|
|
|
|
<el-dialog title="扫描结果" :visible.sync="dialogScanVisible" width="30%">
|
|
|
<el-table :data="scanGridData">
|
|
|
- <el-table-column property="name" label="设备" width="150"></el-table-column>
|
|
|
- <el-table-column property="state" label="结果" width="200"></el-table-column>
|
|
|
+ <el-table-column property="Name" label="设备" align="center"></el-table-column>
|
|
|
+ <el-table-column property="State" label="结果" align="center"></el-table-column>
|
|
|
</el-table>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogScanVisible = false" size="small" type="primary">关闭</el-button>
|
|
|
@@ -94,7 +94,10 @@
|
|
|
CurrentRegionId: 0,
|
|
|
WifiRs: {},
|
|
|
ScanRs: {},
|
|
|
- signList: {},
|
|
|
+ signList: {
|
|
|
+ title:'',
|
|
|
+ Rs:null
|
|
|
+ },
|
|
|
totalRs: [],
|
|
|
equipRs: [],
|
|
|
dialogScanVisible: false,
|
|
|
@@ -103,6 +106,7 @@
|
|
|
detectorList: [],
|
|
|
showLeft: true,
|
|
|
regionId: '',
|
|
|
+ selectName: '',
|
|
|
historyRs: {
|
|
|
Title: '区域无线设备列表',
|
|
|
Url: 'signEquip',
|
|
|
@@ -123,7 +127,14 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.init();
|
|
|
- this.showLeft = parseInt(this.$store.state.status.count) % 2 == 0
|
|
|
+ this.showLeft = parseInt(this.$store.state.status.count) % 2 == 0;
|
|
|
+ // 定时刷新
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.timerInfo();
|
|
|
+ }, 5000);
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ clearInterval(this.timer);
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
@@ -134,6 +145,8 @@
|
|
|
'$route': function (val) {
|
|
|
if (val.path == '/') {
|
|
|
this.init()
|
|
|
+ } else {
|
|
|
+ clearInterval(this.timer);
|
|
|
}
|
|
|
},
|
|
|
'$store.state.status.count': function (val) {
|
|
|
@@ -141,6 +154,17 @@
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ timerInfo() {
|
|
|
+ this.getDetectorList(this.CurrentRegionId);
|
|
|
+ this.getRegion06G(this.CurrentRegionId);
|
|
|
+ this.getWifiChannel(this.CurrentRegionId);
|
|
|
+ this.getMonitorArea(this.CurrentRegionId);
|
|
|
+ this.getNetDevMonitor(this.CurrentRegionId);
|
|
|
+ this.getWirelessMonitor(this.CurrentRegionId);
|
|
|
+ this.getDevList(this.CurrentRegionId);
|
|
|
+ this.getWirelessStatus(this.CurrentRegionId);
|
|
|
+ this.getScanStrategyList(this.CurrentRegionId);
|
|
|
+ },
|
|
|
init() {
|
|
|
this.getDate();
|
|
|
},
|
|
|
@@ -158,15 +182,16 @@
|
|
|
// 默认加载第一个区域
|
|
|
if (json.Rs) {
|
|
|
this.CurrentRegionId = json.Rs[0].Id;
|
|
|
- this.getDetectorList(json.Rs[0].Id);
|
|
|
- this.getRegion06G(json.Rs[0].Id);
|
|
|
- this.getWifiChannel(json.Rs[0].Id);
|
|
|
- this.getMonitorArea(json.Rs[0].Id);
|
|
|
- this.getNetDevMonitor(json.Rs[0].Id);
|
|
|
- this.getWirelessMonitor(json.Rs[0].Id);
|
|
|
- this.getDevList(json.Rs[0].Id);
|
|
|
- this.getWirelessStatus(json.Rs[0].Id);
|
|
|
- this.getScanStrategyList(json.Rs[0].Id);
|
|
|
+ this.signList.title = json.Rs[0].Name;
|
|
|
+ this.getDetectorList(this.CurrentRegionId);
|
|
|
+ this.getRegion06G(this.CurrentRegionId);
|
|
|
+ this.getWifiChannel(this.CurrentRegionId);
|
|
|
+ this.getMonitorArea(this.CurrentRegionId);
|
|
|
+ this.getNetDevMonitor(this.CurrentRegionId);
|
|
|
+ this.getWirelessMonitor(this.CurrentRegionId);
|
|
|
+ this.getDevList(this.CurrentRegionId);
|
|
|
+ this.getWirelessStatus(this.CurrentRegionId);
|
|
|
+ this.getScanStrategyList(this.CurrentRegionId);
|
|
|
}
|
|
|
} else {
|
|
|
that.$message.error(json.Memo);
|
|
|
@@ -180,12 +205,12 @@
|
|
|
regionId: regionId,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- that.detectorList = [];
|
|
|
DetectorList(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.detectorList = json.Rs
|
|
|
} else {
|
|
|
+ that.detectorList = [];
|
|
|
that.$message.error(json.Memo);
|
|
|
}
|
|
|
})
|
|
|
@@ -207,7 +232,10 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- ClickGetInfo(Id) {
|
|
|
+ ClickGetInfo(Id, name) {
|
|
|
+ this.selectName = name;
|
|
|
+ this.signList.title = name;
|
|
|
+ console.log( this.signList);
|
|
|
this.CurrentRegionId = Id;
|
|
|
this.getDetectorList(Id);
|
|
|
this.getRegion06G(Id);
|
|
|
@@ -232,12 +260,8 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- showScanRresult() {
|
|
|
+ showScanRresult(Rs) {
|
|
|
let that = this;
|
|
|
- let Rs = [
|
|
|
- {name: "设备1", state: 1},
|
|
|
- {name: "设备2", state: 2},
|
|
|
- ];
|
|
|
that.dialogScanVisible = true;
|
|
|
that.scanGridData = Rs;
|
|
|
},
|
|
|
@@ -268,20 +292,20 @@
|
|
|
let postdata = qs.stringify(param);
|
|
|
MonitorArea(postdata).then(res => {
|
|
|
let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- if(!json.Rs.Data) {
|
|
|
- return false
|
|
|
- }else{
|
|
|
- this.signList = json;
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.signList = {
|
|
|
- Rs:{
|
|
|
- Data:[]
|
|
|
- }
|
|
|
- };
|
|
|
- that.$message.error(json.Memo);
|
|
|
- }
|
|
|
+ // if (json.Code == 0) {
|
|
|
+ // if (!json.Rs.Data) {
|
|
|
+ // return false
|
|
|
+ // } else {
|
|
|
+ // that.signList = json;
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // that.signList = {
|
|
|
+ // Rs: {
|
|
|
+ // Data: []
|
|
|
+ // }
|
|
|
+ // };
|
|
|
+ // that.$message.error(json.Memo);
|
|
|
+ // }
|
|
|
})
|
|
|
},
|
|
|
getNetDevMonitor(id) {
|
|
|
@@ -403,6 +427,7 @@
|
|
|
<style scoped>
|
|
|
@import "../assets/css/cube.css";
|
|
|
@import "../assets/css/dialog.css";
|
|
|
+
|
|
|
.mainContainer {
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
|
@@ -422,6 +447,7 @@
|
|
|
|
|
|
.mainContainer .md {
|
|
|
width: 52%;
|
|
|
+ min-width: 660px;
|
|
|
float: left;
|
|
|
overflow: hidden;
|
|
|
padding-bottom: 10px;
|
|
|
@@ -477,24 +503,29 @@
|
|
|
background-size: 100%;
|
|
|
}
|
|
|
|
|
|
- .el-table {
|
|
|
+ .el-table {
|
|
|
background-color: #061B44;
|
|
|
color: #6DC1FF;
|
|
|
}
|
|
|
- .el-table th, .el-table tr {
|
|
|
+
|
|
|
+ .el-table th, .el-table tr {
|
|
|
background-color: #061B44;
|
|
|
color: #6DC1FF;
|
|
|
}
|
|
|
- /deep/ .el-table th, /deep/ .el-table tr {
|
|
|
+
|
|
|
+ /deep/ .el-table th, /deep/ .el-table tr {
|
|
|
background-color: #061B44;
|
|
|
color: #6DC1FF;
|
|
|
}
|
|
|
- /deep/ .el-table td, /deep/ .el-table th.is-leaf {
|
|
|
+
|
|
|
+ /deep/ .el-table td, /deep/ .el-table th.is-leaf {
|
|
|
border-bottom: 1px solid #061B44;
|
|
|
}
|
|
|
- /deep/ .el-table--border::after, /deep/ .el-table--group::after, /deep/ .el-table::before {
|
|
|
+
|
|
|
+ /deep/ .el-table--border::after, /deep/ .el-table--group::after, /deep/ .el-table::before {
|
|
|
background-color: #061B44;
|
|
|
}
|
|
|
+
|
|
|
/deep/ .el-dialog__title {
|
|
|
color: #6DC1FF;
|
|
|
}
|