Commit d270ae60 authored by 高飞's avatar 高飞

事件查询添加告警信息

parent 18040d0c
......@@ -14,7 +14,7 @@ datasource.druid.validationQuery=SELECT 'x' FROM DUAL
# 格式为:ip地址:端口:用户名:密码
# 端口号一定要写,例如:192.168.2.100:21:reader:reader
ftp.host=33.65.250.179:21:hzjt:1qaz2wsx
ftp.host=localhost:21:hzjt:1qaz2wsx
alarm.subscribe.data.key=gs:traff:alarmlist
......@@ -39,6 +39,6 @@ gs.traff.cloud.department.fileagent.url=http://33.50.1.22:8888/agent/fileAgent?f
alarmrecord.check.push.recordtype=1
eventsend.url=http://33.65.250.179:8089/sendEvents
devicesend.url=http://33.65.250.179:8089/traffdevicewriteresult/sendDevices
eventsend.url=http://localhost:8089/sendEvents
devicesend.url=http://localhost:8089/traffdevicewriteresult/sendDevices
devicesend.timeout=1000
\ No newline at end of file
......@@ -4,7 +4,7 @@ server.port=8082
#spring.datasource.username=hzjt
#spring.datasource.password=hzjt
#spring.datasource.url=jdbc:oracle:thin:@33.65.250.179:1521:helowin
#spring.datasource.url=jdbc:oracle:thin:@localhost:1521:helowin
spring.datasource.username=test
spring.datasource.password=test
spring.datasource.url=jdbc:oracle:thin:@192.168.168.212:1523:helowin
......@@ -29,7 +29,7 @@ spring.datasource.useGlobalDataSourceStat=true
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
#
#spring.redis.host=33.65.250.179
#spring.redis.host=localhost
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.cache.type=redis
......@@ -67,9 +67,9 @@ spring.devtools.restart.exclude=static/**,public/**
managername=admin
devicesend.url=http://33.65.250.179:8089/traffdevicewriteresult/sendDevices
devicesend.url=http://localhost:8089/traffdevicewriteresult/sendDevices
devicesend.timeout=1000
flvurl=http://33.65.250.179:8089/getflv
flvurl=http://localhost:8089/getflv
json.resisurl=http://33.50.1.21:57081/record/ecvs
qingzhi.devicewrite.url=http://33.50.1.213:38080/api/jtldpt/impld/deviceWrite
......@@ -78,8 +78,8 @@ qingzhi.devicewrite.timeout=5000
qingzhi.eventwrite.url=http://33.50.1.213:38080/api/jtldpt/impld/trafficEventWrite
qingzhi.eventwrite.timeout=5000
eventsend.url=http://33.65.250.179:8089/sendEvents
pushrecordurl=33.65.250.179:8089/sendtouser
eventsend.url=http://localhost:8089/sendEvents
pushrecordurl=localhost:8089/sendtouser
ipstrs=33.55.1.85,33.55.1.86,33.55.1.87,33.55.1.88,33.55.1.89,33.55.1.90,33.55.1.91,33.55.1.92,33.55.1.93,33.55.1.94,33.55.1.95,33.55.1.96,33.51.6.97,33.60.1.7,33.54.3.240,33.53.1.171,33.52.1.222,33.61.1.23,33.57.1.22
ipurl=:8001/api/traffic-incident/restartAutoRule
\ No newline at end of file
......@@ -1249,7 +1249,7 @@ let arr_right_s = [];
//websocket连接
let d = new Date().getTime();
let web_ip = "ws:/33.65.250.179:8089/websocket/" + d;
let web_ip = "ws:/localhost:8089/websocket/" + d;
let wss = new WebSocket(web_ip);
wss.onopen = function () {
console.log("连接成功");
......@@ -1532,7 +1532,7 @@ $('[name="status"]').bootstrapSwitch({
//推送近5分钟数据
function websocket_s(ds) {
let web_ips = "ws:/33.65.250.179:8089/websocket/" + ds;
let web_ips = "ws:/localhost:8089/websocket/" + ds;
ws_j5fz = new WebSocket(web_ips);
ws_j5fz.onopen = function () {
console.log("连接成功");
......@@ -1582,7 +1582,7 @@ function websocket_s(ds) {
//推送自动规则
function websocket_gzdj(video_id, items, indexs_1) {
let web_ips = "ws:/33.65.250.179:8089/websocket/" + video_id;
let web_ips = "ws:/localhost:8089/websocket/" + video_id;
let ws_gzdj = new WebSocket(web_ips);
ws_gzdj.onopen = function () {
console.log("连接成功");
......
......@@ -1249,7 +1249,7 @@ let arr_right_s = [];
//websocket连接
let d = new Date().getTime();
let web_ip = "ws:/33.65.250.179:8089/websocket/" + d;
let web_ip = "ws:/localhost:8089/websocket/" + d;
let wss = new WebSocket(web_ip);
wss.onopen = function () {
console.log("连接成功");
......@@ -1270,7 +1270,7 @@ wss.onmessage = function (evt) {
//if_cz 判断前来的事件是不是本部门下的
let if_cz = false;
//jk_video_id为监控id
let jk_video_id = data.data.video_id;;
let jk_video_id = data.data.video_id;
// let jk_video_id = data.data.video_id;
vue_tree.jk_s.forEach((item, index)=> {
if (item.VIDOID == jk_video_id) {
......@@ -1520,7 +1520,7 @@ $('[name="status"]').bootstrapSwitch({
//推送近5分钟数据
function websocket_s(ds) {
let web_ips = "ws:/33.65.250.179:8089/websocket/" + ds;
let web_ips = "ws:/localhost:8089/websocket/" + ds;
ws_j5fz = new WebSocket(web_ips);
ws_j5fz.onopen = function () {
console.log("连接成功");
......@@ -1570,7 +1570,7 @@ function websocket_s(ds) {
//推送自动规则
function websocket_gzdj(video_id, items, indexs_1) {
let web_ips = "ws:/33.65.250.179:8089/websocket/" + video_id;
let web_ips = "ws:/localhost:8089/websocket/" + video_id;
let ws_gzdj = new WebSocket(web_ips);
ws_gzdj.onopen = function () {
console.log("连接成功");
......
......@@ -617,7 +617,7 @@ $('[data-gallery=manual]').click(function (e) {
new PhotoViewer(items, options);
});
let d = new Date().getTime();
let web_ip = "ws:/33.65.250.179:8089/websocket/" + d;
let web_ip = "ws:/localhost:8089/websocket/" + d;
let wss = new WebSocket(web_ip);
wss.onopen = function () {
console.log("连接成功");
......
......@@ -469,7 +469,7 @@ $('[data-gallery=manual]').click(function (e) {
let d = new Date().getTime();
let web_ip = "ws:/33.65.250.179:8089/websocket/" + d;
let web_ip = "ws:/localhost:8089/websocket/" + d;
let wss = new WebSocket(web_ip);
wss.onopen = function () {
console.log("连接成功");
......
......@@ -20,6 +20,8 @@ let vue_sjcx = new Vue({
arr_cllx: [],
jk_s:[],
check_s:false,
cllx: [],
jk_arr:[]
},
methods: {
fastSearch: function () {
......@@ -45,7 +47,9 @@ let vue_sjcx = new Vue({
},
success: function (result) {
let defaultData = [];
vue_sjcx.jk_arr = [];
if (result.code == 0) {
vue_sjcx.jk_arr=result.data;
defaultData = toTree(result.data, parIds + '');
$('#tree-xzxq').treeview({
expandIcon: 'glyphicon glyphicon-triangle-right selected-span',
......@@ -635,7 +639,7 @@ $('[data-gallery=manual]').click(function (e) {
new PhotoViewer(items, options);
});
let d = new Date().getTime();
let web_ip = "ws:/33.65.250.179:8089/websocket/" + d;
let web_ip = "ws:/localhost:8089/websocket/" + d;
let wss = new WebSocket(web_ip);
wss.onopen = function () {
console.log("连接成功");
......@@ -655,22 +659,168 @@ wss.onmessage = function (evt) {
//jk_video_id为监控id
// let a_id = data.data.video_id.slice(0, data.data.video_id.length - 1) + (parseInt(data.data.video_id.slice(data.data.video_id.length - 1, data.data.video_id.length)) + 1) + '';
let jk_video_id = data.data.fdid+"_"+data.data.channelid;
// let jk_video_id = data.data.video_id;
// let jk_video_id = data.data.fdid+"_"+data.data.channelid;
let jk_video_id = data.data.video_id;
vue_sjcx.jk_s.forEach((item, index)=> {
if(item.VIDOID == jk_video_id )
{
if_cz = true;
}
});
if (if_cz) {
if (if_cz) {
//事件id
let sjid = data.recordid;
//报警时间
let sj = (new Date(parseInt(data.data.ts))).Format("yyyy-MM-dd hh:mm:ss");
//事件类型
let bjlx = '';
//事件等级
let sjdj = '';
vue_sjcx.arr_cllx.forEach((item, index)=> {
if (item.id == data.data.incident_type) {
bjlx = item.name;
sjdj = item.alarmlevel;
}
});
//监控名称
let jkmc = '';
vue_sjcx.jk_arr.forEach((item, index)=> {
if (item.href == jk_video_id) {
jkmc = item.text;
}
});
//违法图片
let wfsp = [];
data.data.img_base64.forEach((item, index)=> {
let src = 'data:image/jpg;base64,' + item;
wfsp.push({img_src: src});
});
//右边消息弹出框的id
let tss = 'a' + data.data.ts;
//判断三级弹出框是否已经弹出,没有弹出,则清空,若是弹出,则继续push
if ($("#myModal_sj")[0].style.display != 'block') {
$(".carousel").collapse();
vue_sjsstx.yjsj_data = [];
vue_sjsstx.ejsj_data = [];
vue_sjsstx.sjsj_data = [];
$("#myModal_sj").modal("show");
$("#myModal_sj").find('input').each(function () {
$(this).removeAttr("checked", false);
$(this).prop("checked", false);
});
}
if (sjdj == '1') {
$("#a1s").collapse();
vue_sjsstx.yjsj_data.unshift({
src: wfsp,
videoid: jk_video_id,
dwmc: jkmc,
sjlx: bjlx,
bjsj: sj,
checked: false,
recordid: sjid,
channelid: jk_video_id.slice(jk_video_id.length - 1),
fdid: jk_video_id.slice(0, jk_video_id.length - 2),
recordtime: sj,
recordtype: data.data.incident_type,
ss_type: '',
});
setTimeout(function () {
vue_sjcx.query(1, true);
$("#a1s .carousel-indicators li").removeClass("active");
$("#a1s .carousel-inner > div").removeClass("active");
$("#a1s .carousel-indicators li:first-child").addClass("active");
$("#a1s .carousel-inner > div:first-child").addClass("active");
// #点击轮播图下方小圆点可以改变轮播图片
$("#a1s li").click(function () {
var index = $(this).attr("data-slide-to");
$('#a1s').carousel(parseInt(index))
});
$('#a1s').carousel({
interval: 3000,
});
}, 500);
} else if (sjdj == '2') {
$("#a2s").collapse();
vue_sjsstx.ejsj_data.unshift({
src: wfsp,
videoid: jk_video_id,
dwmc: jkmc,
sjlx: bjlx,
bjsj: sj,
checked: false,
recordid: sjid,
channelid: jk_video_id.slice(jk_video_id.length - 1),
fdid: jk_video_id.slice(0, jk_video_id.length - 2),
recordtime: sj,
recordtype: data.data.incident_type,
ss_type: '',
});
setTimeout(function () {
$("#a2s .carousel-indicators li").removeClass("active");
$("#a2s .carousel-inner > div").removeClass("active");
$("#a2s .carousel-indicators li:first-child").addClass("active");
$("#a2s .carousel-inner > div:first-child").addClass("active");
// #点击轮播图下方小圆点可以改变轮播图片
$("#a2s li").click(function () {
var index = $(this).attr("data-slide-to");
$('#a2s').carousel(parseInt(index))
});
$('#a2s').carousel({
interval: 3000,
});
}, 500);
}, 200);
} else if (sjdj == '3') {
$("#a3s").collapse();
vue_sjsstx.sjsj_data.unshift({
src: wfsp,
videoid: jk_video_id,
dwmc: jkmc,
sjlx: bjlx,
bjsj: sj,
checked: false,
recordid: sjid,
channelid: jk_video_id.slice(jk_video_id.length - 1),
fdid: jk_video_id.slice(0, jk_video_id.length - 2),
recordtime: sj,
recordtype: data.data.incident_type,
ss_type: '',
});
setTimeout(function () {
$("#a3s .carousel-indicators li").removeClass("active");
$("#a3s .carousel-inner > div").removeClass("active");
$("#a3s .carousel-indicators li:first-child").addClass("active");
$("#a3s .carousel-inner > div:first-child").addClass("active");
// #点击轮播图下方小圆点可以改变轮播图片
$("#a3s li").click(function () {
var index = $(this).attr("data-slide-to");
$('#a3s').carousel(parseInt(index))
});
$('#a3s').carousel({
interval: 3000,
});
}, 500);
}
new NoticeJs({
text: 'Notification message',
position: 'bottomRight',
// id: tss,
id: 11,
sjlx: bjlx,
dwmc: jkmc,
animation: {
open: 'animated bounceIn',
close: 'animated bounceOut'
}
}).show();
//播放声音
let myMp3 = document.getElementById("audio");
audio.play();
}
}
};
......
......@@ -705,7 +705,7 @@ laydate.render({
}
});
function websocket_s(d) {
let web_ip = "ws:/33.65.250.179:8089/websocket/" + d;
let web_ip = "ws:/localhost:8089/websocket/" + d;
wss = new WebSocket(web_ip);
wss.onopen = function () {
console.log("连接成功");
......
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