Merge branch 'master' of https://git.lgzn.space/chengdandan/fayuanjiangbei
This commit is contained in:
commit
83c46fe83f
|
@ -13,3 +13,15 @@ export const GetLevelAlarm = (params) => {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
//获取昨天、今天报警数量
|
||||||
|
export const getSecurityAlarmCount = (params) => {
|
||||||
|
return axios.get('api/GetSecurityAlarmCount', {
|
||||||
|
params
|
||||||
|
})
|
||||||
|
};
|
||||||
|
//获取报警统计接口
|
||||||
|
export const getAlarmStatistics = (params) => {
|
||||||
|
return axios.get('api/GetAlarmStatistics', {
|
||||||
|
params
|
||||||
|
})
|
||||||
|
};
|
|
@ -242,7 +242,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GetLevelAlarm } from "../api/index";
|
import { GetLevelAlarm, getAlarmStatistics } from "../api/index";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -377,7 +377,7 @@ export default {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.cameraList = camera;
|
this.cameraList = camera;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
this.warnSelect(0)
|
this.warnSelect(0);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//选中图片
|
//选中图片
|
||||||
|
@ -444,6 +444,15 @@ export default {
|
||||||
},
|
},
|
||||||
//设备左
|
//设备左
|
||||||
warningOne() {
|
warningOne() {
|
||||||
|
let data = [];
|
||||||
|
let dataX = []
|
||||||
|
getAlarmStatistics({
|
||||||
|
Type: "消防",
|
||||||
|
}).then((res) => {
|
||||||
|
res.data.data.forEach((item, index) => {
|
||||||
|
data.push(item.Count);
|
||||||
|
dataX.push(item.Name)
|
||||||
|
});
|
||||||
var myChart = this.$echarts.init(document.getElementById("warningOne"));
|
var myChart = this.$echarts.init(document.getElementById("warningOne"));
|
||||||
let option = {
|
let option = {
|
||||||
legend: {
|
legend: {
|
||||||
|
@ -475,7 +484,7 @@ export default {
|
||||||
top: "17%",
|
top: "17%",
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: ["温感", "烟感", "手动报警"],
|
data: dataX,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
@ -557,14 +566,24 @@ export default {
|
||||||
position: "inside",
|
position: "inside",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: [90, 94, 98],
|
data: data,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//设备右
|
//设备右
|
||||||
warningTwo() {
|
warningTwo() {
|
||||||
|
let data = [];
|
||||||
|
let dataX = []
|
||||||
|
getAlarmStatistics({
|
||||||
|
Type: "设备",
|
||||||
|
}).then((res) => {
|
||||||
|
res.data.data.forEach((item, index) => {
|
||||||
|
data.push(item.Count);
|
||||||
|
dataX.push(item.Name)
|
||||||
|
});
|
||||||
var myChart = this.$echarts.init(document.getElementById("warningTwo"));
|
var myChart = this.$echarts.init(document.getElementById("warningTwo"));
|
||||||
let option = {
|
let option = {
|
||||||
legend: {
|
legend: {
|
||||||
|
@ -596,7 +615,7 @@ export default {
|
||||||
top: "17%",
|
top: "17%",
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: ["空调", "照明", "电梯", "太阳灯"],
|
data: dataX,
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
@ -678,11 +697,12 @@ export default {
|
||||||
position: "inside",
|
position: "inside",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: [90, 100, 98, 97],
|
data: data,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
maintenanceLeft() {
|
maintenanceLeft() {
|
||||||
var myChart = this.$echarts.init(
|
var myChart = this.$echarts.init(
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GetLevelAlarm } from "../api/index";
|
import { GetLevelAlarm , getSecurityAlarmCount} from "../api/index";
|
||||||
export default {
|
export default {
|
||||||
name: "security",
|
name: "security",
|
||||||
data() {
|
data() {
|
||||||
|
@ -261,8 +261,17 @@ export default {
|
||||||
this.getFireWarnList()
|
this.getFireWarnList()
|
||||||
// 获取安防告警
|
// 获取安防告警
|
||||||
this.getPoliceList()
|
this.getPoliceList()
|
||||||
|
//获取安防统计今天昨天报警数量
|
||||||
|
this.getAlarmCount()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取昨天今天的报警数量
|
||||||
|
getAlarmCount(){
|
||||||
|
getSecurityAlarmCount().then((res)=>{
|
||||||
|
this.securityList[4].count = res.data.data.TodayCount
|
||||||
|
this.securityList[5].count = res.data.data.YesterdayCount
|
||||||
|
})
|
||||||
|
},
|
||||||
videoChange(index) {
|
videoChange(index) {
|
||||||
this.warnCameraList.forEach((item, i) => {
|
this.warnCameraList.forEach((item, i) => {
|
||||||
item.icon = require("../assets/images/anFang/video.png");
|
item.icon = require("../assets/images/anFang/video.png");
|
||||||
|
@ -321,6 +330,7 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
components: {},
|
components: {},
|
||||||
|
|
Loading…
Reference in New Issue