| | |
| | | * @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> |