|
|
|
@ -165,18 +165,20 @@ |
|
|
|
document.getElementById('alarmBtn').onclick = function () { |
|
|
|
document.getElementById('alarmBtn').onclick = function () { |
|
|
|
reportIot(); |
|
|
|
reportIot(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//报警信息上报 |
|
|
|
//报警信息上报 |
|
|
|
function reportIot() { |
|
|
|
function reportIot() { |
|
|
|
let ip = $('#ip').val(); |
|
|
|
let ip = $('#ip').val(); |
|
|
|
if(ip == '') { |
|
|
|
if(ip == '') { |
|
|
|
layer.msg('未成功获取本机IP,请联系运维人员'); |
|
|
|
layer.msg('未成功获取本机IP,请联系运维人员'); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let val = $('#volTxt').val() !== '' ? ',' + $('#volTxt').val() : '' |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
"alarmTypeIdentity": "700007", |
|
|
|
"alarmTypeIdentity":"700007", |
|
|
|
"description": $('#volTxt').val(), |
|
|
|
"description": ip + val, |
|
|
|
"deviceSn": ip, |
|
|
|
"deviceSn":'ZJBJLXDIANXIN001', |
|
|
|
"platformCode": "DIANXIN", |
|
|
|
"platformCode":"DIANXIN", |
|
|
|
} |
|
|
|
} |
|
|
|
var loadingIndex = layer.load(0, {shade: false}); |
|
|
|
var loadingIndex = layer.load(0, {shade: false}); |
|
|
|
$.ajax({ |
|
|
|
$.ajax({ |
|
|
|
@ -199,8 +201,9 @@ |
|
|
|
getIp(); |
|
|
|
getIp(); |
|
|
|
function getIp() { |
|
|
|
function getIp() { |
|
|
|
$.ajax({ |
|
|
|
$.ajax({ |
|
|
|
url: baseUrl + "/appData/escalation", type: "post", contentType: "application/json;charset=UTF-8", dataType: "json", data: {},timeout: 6000, success: function (res) { |
|
|
|
url: baseUrl + "/alarmInformation/getIp", type: "get", contentType: "application/json;charset=UTF-8", dataType: "json", data: {},timeout: 6000, success: function (res) { |
|
|
|
let _data = JSON.parse(res.data); |
|
|
|
console.log('res ===>',res) |
|
|
|
|
|
|
|
// let _data = JSON.parse(res.data); |
|
|
|
if (res.code === 200) { |
|
|
|
if (res.code === 200) { |
|
|
|
$('#ip').val(res.data); |
|
|
|
$('#ip').val(res.data); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
|