Commit 88374748 authored by xxx's avatar xxx

添加监控报警

parent 54b3b245
......@@ -85,6 +85,7 @@ import {
apiCpointQuery,
apiPathmapNavigationQuery,
} from "@/axios/api.js"
import axios from 'axios'
import startOrderReceiving from './components/startOrderReceiving/index.vue' //接受派单
import voiceApplication from './components/voiceApplication/index.vue' //语音申请
import failureDeclaration from './components/failureDeclaration/index.vue' //故障申报
......@@ -95,6 +96,8 @@ import smallWindow from './components/smallWindow/index.vue' //小窗口车辆
import mars3dViewerMap from '../../components/mars3d/Map.vue' //地图
import ElectricQuantity from '../../components/electricity/index.vue' //电池组件
axios.defaults.baseURL = "/jiankong";
export default {
components: {
startOrderReceiving,
......@@ -136,10 +139,15 @@ export default {
navigatorXY:{
x:0,
y:0,
}
},
//摄像头会话号
jsession:'',
//摄像头车辆设备号
devices:'',
}
},
mounted(){
let that = this;
this.loadData();
this.setNowTimes();
this.zongTimer1 = setInterval(() => {
......@@ -158,7 +166,7 @@ export default {
if(this.carclass == '铲车'){
this.loadData1();
}
//获取报警记录以及坐标计算距离并返回给后台
//获取报警记录以及摄像头报警数据
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
......@@ -188,7 +196,31 @@ export default {
});
}
});
//获取摄像头报警数据
if(that.devices != ''){
axios.get('/jiankong/StandardApiAction_vehicleAlarm.action', {
params: {
jsession:that.jsession,
DevIDNO:that.devices
}
}).then(function (response) {
if(response.data.alarmlist.length != 0){
that.$nextTick(()=>{
that.$notify({
title:
response.data.alarmlist[0].type == 620 ? "接打电话报警" :
response.data.alarmlist[0].type == 621 ? '接打电话报警' :
response.data.alarmlist[0].type == 624 ? '分神驾驶报警' :
response.data.alarmlist[0].type == 625 ? '分神驾驶报警' :
response.data.alarmlist[0].type == 400 ? '前向碰撞报警' : '',
type: 'warning',
duration: 5000,
dangerouslyUseHTMLString: true,
});
})
}
})
}
}
}
});
......@@ -198,6 +230,7 @@ export default {
},
methods:{
loadData(){
let that = this;
let href1 = window.location.href;
let href2 = href1.split('?')[1];
this.userName1 = decodeURI(href2);
......@@ -208,7 +241,28 @@ export default {
this.personalName = res.data.content[0].name;
this.$refs.startOrderReceivingMethod.loadData(this.carnumber);
this.$refs.voiceApplicationMethod.loadData3(this.carnumber);
//获取摄像头会话号
axios.get('/jiankong/StandardApiAction_login.action', {
params: {
account:'admin',
password:'admin'
}
}).then(function (response1) {
that.jsession = response1.data.jsession;
if(that.jsession != '' && that.carnumber != ''){
//获取摄像头车辆设备号
axios.get('/jiankong/StandardApiAction_getDeviceByVehicle.action', {
params: {
jsession:that.jsession,
vehiIdno:that.carnumber
}
}).then(function (response2) {
if(response2.data.devices.length != 0){
that.devices = response2.data.devices[0].did;
}
})
}
})
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res1) => {
if(res1.code == 200){
if(res1.data.totalElements == 0){
......
......@@ -40,6 +40,14 @@ module.exports = {
pathRewrite: { '^/pic': '' },
changeOrigin: true,
},
//获取会话号
'/jiankong': {
target: 'http://oa.gemho.cn:8088',
changeOrigin: true,
pathRewrite: {
'^/jiankong': ''
}
},
},
//https: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment