| | |
| | | <!-- element ui --> |
| | | <link rel="stylesheet" href="../../lib/elementUi.css"> |
| | | <script src="../../lib/elementUi.js"></script> |
| | | |
| | | <!-- axios --> |
| | | <script src='../../lib/axios.js'></script> |
| | | <!-- 视频 --> |
| | | <script src='../../../realVideo/hls.js'></script> |
| | | <!-- layui --> |
| | | <link rel="stylesheet" href="../../lib/layui/css/layui.css" media="all"> |
| | | <style> |
| | |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="现场视频" name="second"> |
| | | <!-- {{aoud}} --> |
| | | <div> |
| | | <video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" data-setup='{}' style='width: 100%;height: auto'> |
| | | <source id="source" :src="aoud" type="application/x-mpegURL"></source> |
| | | </video> |
| | | </div> |
| | | <video style="height: auto;width: 100%;" controls="controls" id="real_video_conversation" src=""> |
| | | </video> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="other" name="second">other</el-tab-pane> --> |
| | | </el-tabs> |
| | |
| | | // names: '', |
| | | contacts: '', |
| | | deptname: '',//使用方 |
| | | aoud: '',//视频 |
| | | ourd: '',//视频data |
| | | calls: '', |
| | | imgsl: [], |
| | | deploymentTime: '', |
| | |
| | | if (xhr.status === 200) { |
| | | // 判断isJson是否传进来了 |
| | | var data = JSON.parse(xhr.responseText);// JSON转js |
| | | var ourd = data.data, |
| | | cl = ourd.channelNumber, |
| | | deviceCode = ourd.serialNumber; |
| | | my.deptname = ourd.deptName; |
| | | // console.log(data,1111111111111) |
| | | var xhr2 = null//视频请求 |
| | | , url = 'https://web.byisf.com:18000/GetPlayUrl?deviceCode='+ deviceCode +'&chl=' + cl; |
| | | if (XMLHttpRequest) { //http请求 |
| | | xhr2 = new XMLHttpRequest(); |
| | | } else { |
| | | xhr2 = new ActiveXObject("Microsoft.XMLHTTP"); |
| | | |
| | | } |
| | | xhr2.open("get", url, true); |
| | | xhr2.send(); |
| | | xhr2.onreadystatechange = function () { |
| | | if (xhr2.readyState === 4) { |
| | | if (xhr2.status === 200) { |
| | | // 判断isJson是否传进来了 |
| | | var data2 = JSON.parse(xhr2.responseText);// JSON转js |
| | | my.aoud = data2.data.m3u8; |
| | | // console.log(data2,222222222222) |
| | | |
| | | } |
| | | } |
| | | } |
| | | my.ourd = data.data; |
| | | my.deptname = my.ourd.deptName; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | handleClick(tab, event) {//标签tab点击事件 |
| | | // console.log(tab, event); |
| | | }, |
| | | openRealVideoBox(serialNumber, channelNumber) { |
| | | var that = this; |
| | | var newAxios = axios.create({ |
| | | baseURL: "https://web.byisf.com:18000", |
| | | withCredentials: false, |
| | | headers: { |
| | | "Content-type": "application/x-www-form-urlencoded", |
| | | }, |
| | | }); |
| | | |
| | | //this.form.serialNumber |
| | | newAxios |
| | | .post( |
| | | "/api_control", |
| | | {}, |
| | | { |
| | | params: { |
| | | param: JSON.stringify({ PktType: "GetAccessToken" }), |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | newAxios |
| | | .get( |
| | | `https://web.byisf.com:18000/GetPlayUrl?deviceCode=${serialNumber}&chl=${channelNumber}` |
| | | ) |
| | | .then((result) => { |
| | | that.videoSource = result.data.data.m3u8; |
| | | if (Hls.isSupported()) { |
| | | var dom = document.getElementById("real_video_conversation"); |
| | | that.hls = new Hls(); |
| | | var m3u8Url = decodeURIComponent(that.videoSource); |
| | | that.hls.loadSource(m3u8Url); |
| | | that.hls.attachMedia(dom); |
| | | that.hls.on(Hls.Events.MANIFEST_PARSED, function () { |
| | | dom.play(); |
| | | }); |
| | | that.hls.on(Hls.Events.ERROR, function (event, data) { |
| | | console.log(data, 4566824159, "视频播放有问题!!!"); |
| | | if (data.fatal) { |
| | | switch (data.type) { |
| | | case Hls.ErrorTypes.NETWORK_ERROR: |
| | | // try to recover network error |
| | | console.log( |
| | | "fatal network error encountered, try to recover" |
| | | ); |
| | | that.hls.startLoad(); |
| | | break; |
| | | case Hls.ErrorTypes.MEDIA_ERROR: |
| | | console.log( |
| | | "fatal media error encountered, try to recover" |
| | | ); |
| | | that.hls.recoverMediaError(); |
| | | break; |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | watch: { |
| | | activeName() { |
| | | if (this.activeName == "second") { |
| | | this.i++; |
| | | this.openRealVideoBox(this.ourd.serialNumber, this.ourd.channelNumber); |
| | | } else { |
| | | var dom = document.getElementById("real_video_conversation"); |
| | | if (dom.getAttribute("src") != "") { |
| | | dom.pause(); |
| | | dom.setAttribute("src", ""); |
| | | this.hls.destroy(); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.oldtime = setTimeout(() => {//需要同步数据处理,input中value在mounted中没有直接传值 |
| | |
| | | this.getUser(this.ourData.id); |
| | | // console.log(this.ourData); |
| | | this.getdatas(this.ourData); |
| | | },100); |
| | | }, 50); |
| | | |
| | | |
| | | } |
| | |
| | | this.maxFlareCount = options.maxFlareCount || 8; |
| | | this.displaySingleFlaresAtCount = options.displaySingleFlaresAtCount || 8; |
| | | this.singleFlareTooltipProperty = options.singleFlareTooltipProperty || null; |
| | | var defaultTextSymbol = new TextSymbol() |
| | | var defaultTextSymbol = new TextSymbol()//聚合字体 |
| | | .setColor(new Color([255, 255, 255])) |
| | | .setAlign(Font.ALIGN_START) |
| | | .setFont(new Font("10pt").setWeight(Font.WEIGHT_BOLD).setFamily("calibri")) |
| | | .setFont(new Font("15pt").setWeight(Font.WEIGHT_BOLD).setFamily("calibri")) |
| | | .setVerticalAlignment("middle"); |
| | | defaultTextSymbol.font.size = 30; |
| | | defaultTextSymbol.yoffset=100; |
| | | // defaultTextSymbol.line.algin = 30; |
| | | console.log(defaultTextSymbol,2123445453) |
| | | this.textSymbol = options.textSymbol || defaultTextSymbol; |
| | | this.flareShowMode = options.flareShowMode || "mouse"; |
| | | |
| | |
| | | tooltipGroup.rawNode.setAttribute("class", "tooltip-text"); |
| | | |
| | | var textShapes = []; |
| | | for (var i = 0, len = lines.length; i < len; i++) { |
| | | for (var i = 0, len = lines.length; i < len; i++) {//聚合字体 |
| | | var textShape = tooltipGroup.createText({ |
| | | x: xPos, |
| | | y: yPos + (i * 10), |
| | |
| | | }) |
| | | .setFill("#000") |
| | | .setFont({ |
| | | size: 8, |
| | | size: 8,//聚合字体大小 |
| | | family: this.textSymbol.font.family, |
| | | weight: this.textSymbol.font.weight |
| | | }); |
| | |
| | | // console.log($('#policeHeatMap').prop('checked') == true) |
| | | $('#policeHeatMap').prop('checked', false); |
| | | that.checkBoxSelect($('#policeHeatMap')); |
| | | }else |
| | | //解决打开热力图 切换top获取不了数据问题 业主 |
| | | if ($('#ownerHeatMap').prop('checked') == true) { |
| | | // console.log($('#ownerHeatMap').prop('checked') == true) |
| | | $('#ownerHeatMap').prop('checked', false); |
| | | that.checkBoxSelect($('#ownerHeatMap')); |
| | | }else |
| | | //解决打开热力图 切换top获取不了数据问题 设备 |
| | | if ($('#equipmentHeatMap').prop('checked') == true) { |
| | | // console.log($('#equipmentHeatMap').prop('checked') == true) |
| | | $('#equipmentHeatMap').prop('checked', false); |
| | | that.checkBoxSelect($('#equipmentHeatMap')); |
| | | } |
| | | } else |
| | | //解决打开热力图 切换top获取不了数据问题 业主 |
| | | if ($('#ownerHeatMap').prop('checked') == true) { |
| | | // console.log($('#ownerHeatMap').prop('checked') == true) |
| | | $('#ownerHeatMap').prop('checked', false); |
| | | that.checkBoxSelect($('#ownerHeatMap')); |
| | | } else |
| | | //解决打开热力图 切换top获取不了数据问题 设备 |
| | | if ($('#equipmentHeatMap').prop('checked') == true) { |
| | | // console.log($('#equipmentHeatMap').prop('checked') == true) |
| | | $('#equipmentHeatMap').prop('checked', false); |
| | | that.checkBoxSelect($('#equipmentHeatMap')); |
| | | } |
| | | |
| | | |
| | | // console.log($('#policeHeatMap').prop('checked') == true) |
| | |
| | | // console.log(this,text,'text()') |
| | | // console.log(that.tabIndex,'tabIndex') |
| | | |
| | | |
| | | //解决打开热力图 切换top获取不了数据问题 警情 |
| | | if ($('#policeHeatMap').prop('checked') == true) { |
| | | // console.log($('#policeHeatMap').prop('checked') == true) |
| | | $('#policeHeatMap').prop('checked', false); |
| | | that.checkBoxSelect($('#policeHeatMap')); |
| | | } else |
| | | //解决打开热力图 切换top获取不了数据问题 业主 |
| | | if ($('#ownerHeatMap').prop('checked') == true) { |
| | | // console.log($('#ownerHeatMap').prop('checked') == true) |
| | | $('#ownerHeatMap').prop('checked', false); |
| | | that.checkBoxSelect($('#ownerHeatMap')); |
| | | } else |
| | | //解决打开热力图 切换top获取不了数据问题 设备 |
| | | if ($('#equipmentHeatMap').prop('checked') == true) { |
| | | // console.log($('#equipmentHeatMap').prop('checked') == true) |
| | | $('#equipmentHeatMap').prop('checked', false); |
| | | that.checkBoxSelect($('#equipmentHeatMap')); |
| | | var time = setTimeout(() => { |
| | | // $('#equipmentHeatMap').click(function () { |
| | | // that.checkBoxSelect('#equipmentHeatMap'); |
| | | // })(); |
| | | $('#equipmentHeatMap').click(); |
| | | }, 500); |
| | | } |
| | | |
| | | |
| | | $(this).parent().parent().prev().html(text + '<i></i>'); |
| | | $(this).parent().parent().stop().slideUp(0); |
| | | |
| | |
| | | },{//路由占位 |
| | | path: '/dataL', |
| | | redirect: '/dataL/hFive', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'hFive', |
| | | name: '提交激活路口', |
| | |
| | | { |
| | | path: '/patrolManagement', |
| | | redirect: '/policeInformationDistribution/patrolManagement', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'patrolManagement', |
| | | name: '巡逻管理', |
| | |
| | | },{ |
| | | path: '/policeInformationDistribution', |
| | | redirect: '/policeInformationDistribution/policeManagementTeam', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'policeManagementTeam', |
| | | name: '处警队伍管理', |
| | |
| | | },{ |
| | | path: '/report', |
| | | redirect: '/report/reportConfiguration', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'reportConfiguration', |
| | | name: '报表配置', |
| | |
| | | },{ |
| | | path: '/report', |
| | | redirect: '/report/announcementReport', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'announcementReport', |
| | | name: '公告报表', |
| | |
| | | }); |
| | | |
| | | }, handleStart(row) { |
| | | |
| | | console.log(row,11111111111); |
| | | row = this.selectRow; |
| | | console.log(row,22222222222); |
| | | var arr = []; |
| | | console.log(this.$store.state.tags.tagList,3333333); |
| | | this.$store.state.tags.tagList.forEach(item => { |
| | | if (item.label != "视频") { |
| | | arr.push(item); |
| | | } |
| | | }); |
| | | this.$store.state.tags.tagList = arr; |
| | | console.log(arr) |
| | | console.log(arr,444444444444); |
| | | this.$router.push({ |
| | | path: `/real/video/`, query: row |
| | | }); |
| | |
| | | 'l-t-s-red': state == dataState[3], |
| | | 'l-t-s-yuan': true, |
| | | }" |
| | | ></span |
| | | >  |
| | | ></span> |
| | |   |
| | | <span>{{ state }}</span> |
| | | </div> |
| | | <div class="t-t-time"> |
| | |
| | | <div class="l-m-3-main"> |
| | | <!-- {{ videoUrl }} --> |
| | | <div> |
| | | <video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" data-setup='{}' style='width: 100%;height: auto'> |
| | | <source id="source" :src="videoUrl" type="application/x-mpegURL"></source> |
| | | </video> |
| | | </div> |
| | | <video |
| | | style="height: 550px; width: 100%" |
| | | controls="controls" |
| | | id="real_video_conversationDataL" |
| | | src="" |
| | | ></video> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | |
| | | getVideo, |
| | | } from "../../api/dataL/axiosL"; |
| | | import axios from "axios"; |
| | | import Hls from "hls.js"; |
| | | import echarts from "echarts"; |
| | | import { Form } from "element-ui"; |
| | | const cityOptions = ["未处理", "处理中", "已处理"]; |
| | |
| | | setimgl = imgdatas.length == 0 ? ["no"] : imgdatas; |
| | | this.stetDetails(data, setimgl); |
| | | }); |
| | | var videoData = { |
| | | deviceCode: that.a.serialNumber, |
| | | chl: that.a.channelNumber, |
| | | }; |
| | | // console.log(videoData); |
| | | // getVideo(videoData).then((res) => { |
| | | // that.videoUrl = res |
| | | |
| | | // console.log(res) |
| | | |
| | | // }); |
| | | var xhr2 = null, //视频请求 |
| | | url = |
| | | "https://web.byisf.com:18000/GetPlayUrl?deviceCode=" + |
| | | videoData.deviceCode + |
| | | "&chl=" + |
| | | videoData.chl; |
| | | if (XMLHttpRequest) { |
| | | //http请求 |
| | | xhr2 = new XMLHttpRequest(); |
| | | } else { |
| | | xhr2 = new ActiveXObject("Microsoft.XMLHTTP"); |
| | | } |
| | | xhr2.open("get", url, true); |
| | | xhr2.send(); |
| | | xhr2.onreadystatechange = function () { |
| | | if (xhr2.readyState === 4) { |
| | | if (xhr2.status === 200) { |
| | | // 判断isJson是否传进来了 |
| | | var data2 = JSON.parse(xhr2.responseText); // JSON转js |
| | | that.videoUrl = data2.data.m3u8; |
| | | // console.log(videoUrl); |
| | | } |
| | | } |
| | | }; |
| | | }); |
| | | }, |
| | | stetDetails(d, imgdata) { |
| | |
| | | //行点击事件 |
| | | // console.log(val.i); |
| | | }, |
| | | //获取视频 |
| | | openRealVideoBox(serialNumber, channelNumber) { |
| | | var that = this; |
| | | var newAxios = axios.create({ |
| | | baseURL: "https://web.byisf.com:18000", |
| | | withCredentials: false, |
| | | headers: { |
| | | "Content-type": "application/x-www-form-urlencoded", |
| | | }, |
| | | }); |
| | | newAxios |
| | | .post( |
| | | "/api_control", |
| | | {}, |
| | | { |
| | | params: { |
| | | param: JSON.stringify({ PktType: "GetAccessToken" }), |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | newAxios |
| | | .get( |
| | | `https://web.byisf.com:18000/GetPlayUrl?deviceCode=${serialNumber}&chl=${channelNumber}` |
| | | ) |
| | | .then((result) => { |
| | | that.videoSource = result.data.data.m3u8; |
| | | if (Hls.isSupported()) { |
| | | var dom = document.getElementById( |
| | | "real_video_conversationDataL" |
| | | ); |
| | | that.hls = new Hls(); |
| | | var m3u8Url = decodeURIComponent(that.videoSource); |
| | | that.hls.loadSource(m3u8Url); |
| | | that.hls.attachMedia(dom); |
| | | that.hls.on(Hls.Events.MANIFEST_PARSED, function () { |
| | | dom.play(); |
| | | }); |
| | | that.hls.on(Hls.Events.ERROR, function (event, data) { |
| | | console.log(data, 4566824159, "视频播放有问题!!!"); |
| | | if (data.fatal) { |
| | | switch (data.type) { |
| | | case Hls.ErrorTypes.NETWORK_ERROR: |
| | | // try to recover network error |
| | | console.log( |
| | | "fatal network error encountered, try to recover" |
| | | ); |
| | | that.hls.startLoad(); |
| | | break; |
| | | case Hls.ErrorTypes.MEDIA_ERROR: |
| | | console.log( |
| | | "fatal media error encountered, try to recover" |
| | | ); |
| | | that.hls.recoverMediaError(); |
| | | break; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | // let loadingInstance1 = Loading.service({ fullscreen: true }); |
| | |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | activeName() { |
| | | if (this.activeName == "third") { |
| | | this.i++; |
| | | this.openRealVideoBox(this.a.serialNumber, this.a.channelNumber); |
| | | }else{ |
| | | var dom = document.getElementById("real_video_conversationDataL"); |
| | | if (dom.getAttribute("src") != "") { |
| | | dom.pause(); |
| | | dom.setAttribute("src", ""); |
| | | this.hls.destroy(); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" > |
| | |
| | | }, |
| | | getUser(dat) { |
| | | //建立使用方搜索关键词 |
| | | console.log(dat); |
| | | // console.log(dat); |
| | | if (dat.length > 0) { |
| | | this.users = []; |
| | | for (var key in dat) { |
| | |
| | | onLoads(pages, params = {}) { |
| | | // this.$message.success("分页信息:" + JSON.stringify(pages)); |
| | | // this.pages.total = 40; |
| | | console.log(1) |
| | | // console.log(1) |
| | | this.loadings = true; |
| | | console.log(2) |
| | | // console.log(2) |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | console.log(3) |
| | | // console.log(3) |
| | | // getListliu(1, 10, {}, val.id).then((res) => { |
| | | var useId = this.onceData.deptId; |
| | | console.log(4) |
| | | // console.log(4) |
| | | getListliu(pages.currentPage, pages.pageSize, values, useId).then( |
| | | (res) => { |
| | | console.log(5) |
| | | console.log(pages.currentPage, pages.pageSize, values, useId,332332) |
| | | // console.log(5) |
| | | // console.log(pages.currentPage, pages.pageSize, values, useId,332332) |
| | | // console.log(this.datas); |
| | | // getListliu('1', '10', {}, '1353972967828533249').then((res) => { |
| | | //拿到数据 |