| | |
| | | url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + that.deviceId, |
| | | method: "post", |
| | | }).then(function (response) { |
| | | var userId = JSON.parse(window.localStorage.getItem('物联网安保云服务平台-userInfo')).content.user_id; |
| | | if (response.data.data.length > 0 && response.data.data[0].waringType == "一键求助" && response.data.data[0].alarmId != userId) { |
| | | 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]; |
| | | 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.videoConversationReal = true; |
| | | that.$refs.realAudio.src = "./realVideo/audio.mp3"; |
| | | that.$refs.realAudio.play(); |
| | | console.log(userId, response.data.data[0].alarmId); |
| | | if ( |
| | | response.data.data[0].waringType == "紧急求救" && |
| | | response.data.data[0].alarmId == userId |
| | | ) { |
| | | response.data.data[0].waringType == "一键求助"; |
| | | that.form = response.data.data[0]; |
| | | 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.videoConversationReal = true; |
| | | that.$refs.realAudio.src = "./realVideo/audio.mp3"; |
| | | that.$refs.realAudio.play(); |
| | | } |
| | | } |
| | | }); |
| | | }, 5000); |
| | |
| | | closeDialog() { |
| | | //关闭窗口回调,关闭警报 |
| | | this.$refs.realAudio.pause(); |
| | | this.videoConversationReal = false; |
| | | this.oldVideoSatart = false; |
| | | }, |
| | | updateJtyep(row, jtype, t) { |
| | | var that = this; |
| | |
| | | * @Author: Morpheus |
| | | * @Date: 2021-03-17 15:21:33 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-03-19 16:56:35 |
| | | * @Last Modified time: 2021-03-19 18:47:03 |
| | | */ |
| | | <template> |
| | | <basic-container> |
| | |
| | | >{{ |
| | | row.jtype == "0" |
| | | ? "未处理" |
| | | : row.jtype == "1" |
| | | ? "办结" |
| | | : row.jtype == "2" |
| | | ? "推送110" |
| | | : "派发保安" |
| | | : "已处理" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | |
| | | >视频 |
| | | </el-button> |
| | | <el-button |
| | | v-if="row.jtype == 0 || row.jtype == '' " |
| | | v-if="row.jtype == 0 || row.jtype == ''" |
| | | icon="el-icon-edit" |
| | | :size="size" |
| | | :type="type" |
| | |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="PoliceTracking(row)" |
| | | >追踪 |
| | | >追踪 |
| | | </el-button> |
| | | <el-button |
| | | icon="el-icon-location-outline" |
| | |
| | | src="/img/police-num.png" |
| | | style="margin-top: -20px; height: 80px; vertical-align: middle" |
| | | alt="" |
| | | @click.stop="updateJtyep(form, 2, '推送110')" |
| | | @click.stop="updateJtyep(form, 1, '推送110')" |
| | | /> |
| | | |
| | | <el-button |
| | | type="primary" |
| | | @click.stop="updateJtyep(form, 3, '派送保安')" |
| | | @click.stop="updateJtyep(form, 1, '派送保安')" |
| | | >派送保安 |
| | | </el-button> |
| | | </el-form-item> |
| | |
| | | { |
| | | label: "警情类型", |
| | | prop: "waringType", |
| | | search: true, |
| | | search: false, |
| | | searchSpan: 3, |
| | | width: 130, |
| | | className: "waringTypeClass", |
| | |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "办结", |
| | | label: "已处理", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "推送110", |
| | | value: "2", |
| | | }, |
| | | { |
| | | label: "派发保安", |
| | | value: "3", |
| | | }, |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | |
| | | ...params, |
| | | }; |
| | | |
| | | console.log(this.$router.query, 111); |
| | | |
| | | if ( |
| | | this.$router.query && |
| | | this.$router.query != null && |
| | |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | console.log(data.records); |
| | | data.records.forEach(item => { |
| | | item.waringType == "紧急求救" ? item.waringType = "一键求助" : ''; |
| | | }) |
| | | this.page.total = data.total; |
| | | |
| | | data.records.sort((a, b) => { |
| | |
| | | }); |
| | | |
| | | this.data = data.records; |
| | | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | |
| | | .then((res) => { |
| | | newAxios |
| | | .get( |
| | | `https://web.byisf.com:18000/GetPlayUrl?deviceCode=001231663A45&chl=${this.form.channelNumber}` |
| | | `https://web.byisf.com:18000/GetPlayUrl?deviceCode=001241945990&chl=${this.form.channelNumber}` |
| | | ) |
| | | .then((result) => { |
| | | this.videoSource = result.data.data.m3u8; |
| | |
| | | }, |
| | | }); |
| | | var that = this; |
| | | |
| | | Recorder.getPermission().then(() => { |
| | | // 一键呼叫相关函数 |
| | | setInterval(() => { |
| | | // 一键呼叫相关函数 |
| | | that.recorder.start().then(() => { |
| | | // 开始录音 |
| | | newCallAxios |
| | | .post( |
| | | `/api_control`, |
| | | {}, |
| | | { |
| | | params: { |
| | | param: { PktType: "GetAccessToken" }, |
| | | }, |
| | | } |
| | | ) |
| | | .then((result) => { |
| | | setTimeout(() => { |
| | | var formData = new FormData(); |
| | | var blob = that.recorder.getPCMBlob(); //获取pcm格式音频数据 |
| | | //此处获取到blob对象后需要设置fileName满足当前项目上传需求,其它项目可直接传把blob作为file塞入formData |
| | | var newbolb = new Blob([blob], { type: "audio/pcm" }); |
| | | var fileOfBlob = new File( |
| | | [newbolb], |
| | | new Date().getTime() + ".pcm" |
| | | ); |
| | | formData.append("file", fileOfBlob); |
| | | |
| | | // var dom = document.getElementById("real_audio"); |
| | | // dom.setAttribute("src", URL.createObjectURL(blob)); |
| | | |
| | | // this.recorder.play(); |
| | | |
| | | newCallAxios |
| | | .post(`/api_control`, blob, { |
| | | that.recorder.start().then( |
| | | () => { |
| | | // 开始录音 |
| | | setTimeout(() => { |
| | | newCallAxios |
| | | .post( |
| | | `/api_control`, |
| | | {}, |
| | | { |
| | | params: { |
| | | param: { |
| | | PktType: "Talk", |
| | | accessToken: result.data.data.accessToken, |
| | | // deviceCode: form.channelNumber, |
| | | deviceCode: "001231663A45", |
| | | }, |
| | | param: { PktType: "GetAccessToken" }, |
| | | }, |
| | | }) |
| | | .then((result) => {}); |
| | | }, 10000); |
| | | }); |
| | | }); |
| | | }, 5000); |
| | | } |
| | | ) |
| | | .then((result) => { |
| | | var formData = new FormData(); |
| | | var blob = that.recorder.getPCMBlob(); //获取pcm格式音频数据 |
| | | //此处获取到blob对象后需要设置fileName满足当前项目上传需求,其它项目可直接传把blob作为file塞入formData |
| | | var newbolb = new Blob([blob], { type: "audio/pcm" }); |
| | | var fileOfBlob = new File( |
| | | [newbolb], |
| | | new Date().getTime() + ".pcm" |
| | | ); |
| | | formData.append("file", fileOfBlob); |
| | | |
| | | // var dom = document.getElementById("real_audio"); |
| | | // dom.setAttribute("src", URL.createObjectURL(blob)); |
| | | |
| | | // this.recorder.play(); |
| | | |
| | | newCallAxios |
| | | .post(`/api_control`, blob, { |
| | | params: { |
| | | param: { |
| | | PktType: "Talk", |
| | | accessToken: result.data.data.accessToken, |
| | | // deviceCode: form.channelNumber, |
| | | deviceCode: "001241945990", |
| | | }, |
| | | }, |
| | | }) |
| | | .then((result) => {}); |
| | | }); |
| | | }, 5000); |
| | | }, |
| | | (error) => { |
| | | // 出错了 |
| | | console.log(`${error.name} : ${error.message}`); |
| | | } |
| | | ); |
| | | }, 6000); |
| | | }); |
| | | }, |
| | | |
| | |
| | | PktType: "Talk", |
| | | accessToken: result.data.data.accessToken, |
| | | // deviceCode: form.channelNumber, |
| | | deviceCode: "001231663A45", |
| | | deviceCode: "001241945990", |
| | | }, |
| | | }, |
| | | }) |
| | |
| | | }, |
| | | PoliceTracking(row) { |
| | | //警情追踪 |
| | | this.$router.push({path: "/policeTracking/track", query: row}); |
| | | } |
| | | this.$router.push({ path: "/policeTracking/track", query: row }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //本地服务接口地址 |
| | | //target: 'http://192.168.3.39:82/', |
| | | target: 'https://web.byisf.com:18001/api/', |
| | | target: 'http://192.168.1.125:82/', |
| | | // target: 'https://web.byisf.com:18001/api/', |
| | | //远程演示服务地址,可用于直接启动项目 |
| | | //target: 'https://saber.bladex.vip/api', |
| | | ws: true, |