| | |
| | | // window.clearTimeout(window.realTimeQuery); |
| | | // that.deviceId = 334; // 测试用 |
| | | // window.realTimeQuery = setInterval(function () { |
| | | axios({ |
| | | url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + jid, |
| | | method: "post", |
| | | }).then(function (response) { |
| | | var userId = JSON.parse( |
| | | window.localStorage.getItem("物联网安保云服务平台-userInfo") |
| | | ).content.user_id; |
| | | axios({ |
| | | url: "/api/blade-jfpts/alarm/alarm/page", |
| | | method: "get", |
| | | params: { |
| | | id: jid, |
| | | }, |
| | | }).then(function (response) { |
| | | var userId = JSON.parse( |
| | | window.localStorage.getItem("物联网安保云服务平台-userInfo") |
| | | ).content.user_id; |
| | | |
| | | if (response.data.data.length > 0) { |
| | | // that.deviceId = response.data.data[0].id; |
| | | that.form = response.data.data[0]; |
| | | if (response.data.data.length > 0) { |
| | | // that.deviceId = response.data.data[0].id; |
| | | that.form = response.data.data[0]; |
| | | |
| | | if ( |
| | | response.data.data[0].waringType == "紧急求救" && |
| | | response.data.data[0].alarmId == userId |
| | | ) { |
| | | response.data.data[0].waringType = "一键求助"; |
| | | if ( |
| | | response.data.data[0].waringType == "紧急求救" && |
| | | response.data.data[0].alarmId == userId |
| | | ) { |
| | | response.data.data[0].waringType = "一键求助"; |
| | | |
| | | that.peopleList = [ |
| | | { label: that.form.oneContacts, value: that.form.onePhone }, |
| | | { label: that.form.twoContacts, value: that.form.twoPhone }, |
| | | { label: that.form.threeContacts, value: that.form.threePhone }, |
| | | ]; |
| | | that.peopleName = that.form.oneContacts; |
| | | that.peoplePhone = that.form.onePhone; |
| | | that.dialogTableVisible = true; |
| | | that.peopleList = [ |
| | | { label: that.form.oneContacts, value: that.form.onePhone }, |
| | | { label: that.form.twoContacts, value: that.form.twoPhone }, |
| | | { label: that.form.threeContacts, value: that.form.threePhone }, |
| | | ]; |
| | | that.peopleName = that.form.oneContacts; |
| | | that.peoplePhone = that.form.onePhone; |
| | | that.dialogTableVisible = true; |
| | | |
| | | that.ofX = null; |
| | | that.ofY = null; |
| | | that.ofX = null; |
| | | that.ofY = null; |
| | | |
| | | window.addEventListener("mousemove", that.handleMousemove); |
| | | window.addEventListener("mousemove", that.handleMousemove); |
| | | |
| | | that.$refs.realAudio.src = "./realVideo/audio.mp3"; |
| | | that.$refs.realAudio.play(); |
| | | } |
| | | that.$refs.realAudio.src = "./realVideo/audio.mp3"; |
| | | that.$refs.realAudio.play(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | // }, 5000); |
| | | }, |
| | | closeDialog() { |
| | |
| | | } |
| | | if (window.WebSocket) { |
| | | // https |
| | | window.socket = new WebSocket("wss://web.byisf.com/wss/websocket/"); |
| | | //window.socket = new WebSocket("wss://web.byisf.com/wss/websocket/"); |
| | | |
| | | //http |
| | | //window.socket = new WebSocket("ws://localhost:9034/websocket"); |
| | | window.socket = new WebSocket("ws://localhost:9034/websocket"); |
| | | |
| | | window.socket.onmessage = function (event) { |
| | | // alert(event.data) |