|
@@ -204,8 +204,8 @@
|
|
|
this.bottomMenuList() //获取底部公共组件消息和任务
|
|
|
this.getTreeselect()
|
|
|
this.deptId = Cookies.get("deptId")
|
|
|
- // this.getSensorListByDeptId()
|
|
|
- // this.getDlblistBydeptId()
|
|
|
+ this.getSensorListByDeptIds()
|
|
|
+ this.getDlblistBydeptIds()
|
|
|
this.selectDeviceType(-1)
|
|
|
},
|
|
|
data() {
|
|
@@ -427,6 +427,29 @@
|
|
|
console.error(error);
|
|
|
});
|
|
|
},
|
|
|
+ // 大喇叭
|
|
|
+ getDlblistBydeptIds() {
|
|
|
+ let that = this;
|
|
|
+ let markersList = [];
|
|
|
+ getDlblistBydeptId(that.deptId).then(function(res) {
|
|
|
+ that.loudspeakerNum = res.data.length
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(function(error) {
|
|
|
+ console.error(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 传感器
|
|
|
+ getSensorListByDeptIds() {
|
|
|
+ let that = this;
|
|
|
+ let markersList = [];
|
|
|
+ getSensorListByDeptId(that.deptId).then(function(res) {
|
|
|
+ that.sensorNum = res.data.length
|
|
|
+ })
|
|
|
+ .catch(function(error) {
|
|
|
+ console.error(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
// 传感器
|
|
|
getSensorListByDeptId() {
|
|
|
let that = this;
|
|
@@ -1035,4 +1058,4 @@
|
|
|
height: 600px;
|
|
|
border: 1px solid red;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|