Commit 7f1d22ba by 前端

修改围栏报警数量接口

1 parent b9f7c927
...@@ -24,3 +24,8 @@ export const GET_HOME_AUTHUSERORG = (params) => { ...@@ -24,3 +24,8 @@ export const GET_HOME_AUTHUSERORG = (params) => {
export const GET_HOME_NEWBINDDEVICEINFO = (params) => { export const GET_HOME_NEWBINDDEVICEINFO = (params) => {
return request(params, "/trialdrive/home/getnewbinddeviceinfo"); return request(params, "/trialdrive/home/getnewbinddeviceinfo");
}; };
// 首页-数据看板-获取围栏报警数量
export const GET_FENCE_ALARM = (params) => {
return request(params, "/alarmcenternew/fencealarm/getFenceAlarmCount");
};
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<img src="@/assets/images/enclosureicon.png" /> <img src="@/assets/images/enclosureicon.png" />
<span>围栏报警</span> <span>围栏报警</span>
</div> </div>
<div class="num">{{alarmInfo.fenceAlarmCount||0}}</div> <div class="num">{{fenceAlarmCount||0}}</div>
</div> </div>
<!-- 防拆报警 end --> <!-- 防拆报警 end -->
...@@ -242,6 +242,7 @@ import { ...@@ -242,6 +242,7 @@ import {
GET_HOME_ACTIVEDEVICEINFO, GET_HOME_ACTIVEDEVICEINFO,
GET_HOME_AUTHUSERORG, GET_HOME_AUTHUSERORG,
GET_HOME_NEWBINDDEVICEINFO, GET_HOME_NEWBINDDEVICEINFO,
GET_FENCE_ALARM
} from "@/services/home"; } from "@/services/home";
//import chartConfig from "@/chart/chartConfig.js"; //import chartConfig from "@/chart/chartConfig.js";
import * as echarts from "echarts/core"; import * as echarts from "echarts/core";
...@@ -279,11 +280,13 @@ export default { ...@@ -279,11 +280,13 @@ export default {
staticInfo: {}, staticInfo: {},
alarmInfo: {}, alarmInfo: {},
isZhongli: false, isZhongli: false,
maskFlag: true maskFlag: true,
fenceAlarmCount:0
}; };
}, },
mounted() { mounted() {
this.getAlarm(); this.getAlarm();
this.getFenceAlarm()
this.getActived(this.createActivedLineChart); this.getActived(this.createActivedLineChart);
this.getActived(this.createAllActivedLineChart, 11); this.getActived(this.createAllActivedLineChart, 11);
this.getBindEchart(); this.getBindEchart();
...@@ -636,6 +639,15 @@ export default { ...@@ -636,6 +639,15 @@ export default {
openAreaCar(){ openAreaCar(){
let _path = 'oEshield#/monitor/zoneCar?type=full' let _path = 'oEshield#/monitor/zoneCar?type=full'
window.open(_path) window.open(_path)
},
// 获取围栏报警数量
getFenceAlarm(){
GET_FENCE_ALARM().then(res => {
console.log(res)
let _obj = res.data || {};
this.fenceAlarmCount = _obj.fenceAlarmCount || 0
})
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!