| | |
| | | <div class="avue-logo"> |
| | | <transition name="fade"> |
| | | <span v-if="keyCollapse" class="avue-logo_subtitle" key="0"> |
| | | {{ website.logo }} |
| | | <!-- {{ website.logo }}--> |
| | | <i class="icon-anbao"></i> |
| | | </span> |
| | | </transition> |
| | | <transition-group name="fade"> |
| | |
| | | <el-form-item> |
| | | <el-button |
| | | type="success" |
| | | @click.stop="updateJtyep(form, 1, '办结')" |
| | | @click.stop="updateJtyep(form, 2, '办结')" |
| | | >办结 |
| | | </el-button> |
| | | |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | // this.getData(); |
| | | this.websocketStart(); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["website", "keyCollapse"]), |
| | | }, |
| | | methods: { |
| | | // getData() { |
| | | // var that = this; |
| | | // axios({ |
| | | // url: "/api/blade-jfpts/alarm/alarm/getLimit", |
| | | // method: "get", |
| | | // }).then(function (response) { |
| | | // if (response.data.data.length > 0) { |
| | | // that.deviceId = response.data.data[0].id; |
| | | // } else { |
| | | // that.deviceId = 0; |
| | | // } |
| | | // //获得最新ID,开启实时报警循环 |
| | | // that.layerRealtime(); |
| | | // }); |
| | | // }, |
| | | layerRealtime(jid) { |
| | | var that = this; |
| | | // 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.records.length > 0) { |
| | | that.form = response.data.data.records[0]; |
| | | if ( |
| | | response.data.data.records[0].waringType == "紧急求救" && |
| | | response.data.data.records[0].alarmId == userId |
| | | ) { |
| | | response.data.data.records[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() { |
| | | //关闭窗口回调,关闭警报 |
| | |
| | | }, |
| | | }).then((resdata) => {}); |
| | | |
| | | that.$router.push({ |
| | | path: "/policeTracking/track", |
| | | query: that.form, |
| | | }); |
| | | if (t == "办结") { |
| | | location.reload(); |
| | | } else { |
| | | that.$router.push({ |
| | | path: "/policeTracking/track", |
| | | query: that.form, |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | beginTimeOrEndTime(time) { |
| | |
| | | jid: that.form.id, |
| | | }, |
| | | }).then((resdata) => { |
| | | console.log(resdata); |
| | | }); |
| | | |
| | | newCallAxios |
| | |
| | | } |
| | | 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) |
| | |
| | | //执行重连 |
| | | that.websocketStart(); |
| | | }; |
| | | |
| | | } else { |
| | | console.log("WebSocket连接没有建立成功!!"); |
| | | } |
| | |
| | | //执行重连 |
| | | that.websocketStart(); |
| | | } |
| | | }, 10000); |
| | | }, 4000); |
| | | } else { |
| | | console.log("WebSocket连接没有建立成功!!"); |
| | | //执行重连 |
| | | that.websocketStart(); |
| | | } |
| | | }, 3000); |
| | | }, 1000); |
| | | }, |
| | | |
| | | onDialogTableVisible() { |