| | |
| | | justify-content: space-between; |
| | | |
| | | padding: 10px 0 10px 0; |
| | | /* border: rgb(211, 154, 31) solid 0.5px; */ |
| | | |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | |
| | | float: left; |
| | | margin-right: 10px; |
| | | padding: 0 10px 0 10px; |
| | | border: 1px solid rgba(0, 0, 0, 0.5); |
| | | /* border: 1px solid rgba(0, 0, 0, 0.5); */ |
| | | border-radius: 5px; |
| | | } |
| | | |
| | |
| | | |
| | | float: left; |
| | | padding: 0 3px 0 3px; |
| | | } |
| | | |
| | | .el-tabs__content { |
| | | height: 360px; |
| | | } |
| | | |
| | | .el-tabs__active-bar { |
| | |
| | | <!-- <div class="r-b-t-main"> |
| | | <span class="r-b-t-left">设备标签</span> |
| | | <span class="r-b-t-right"> |
| | | <div |
| | | class="r-b-t-r-label" |
| | | v-for="(value,index) in labels" |
| | | <div |
| | | class="r-b-t-r-label" |
| | | v-for="(value,index) in labels" |
| | | :key="index" |
| | | > |
| | | {{value}} |
| | | {{value}} |
| | | </div> |
| | | </span> |
| | | </div> --> |
| | |
| | | |
| | | </script> |
| | | <script> |
| | | |
| | | var me = new Vue({ |
| | | el: '#appliutwo', |
| | | data: { |
| | |
| | | } |
| | | // var imgdatas = imgD.data[0].paddress.split(','); |
| | | my.imgsl = imgdatas.length == 0 ? ['no'] : imgdatas; |
| | | // my.imgsl = [ //最多3张照片 |
| | | // my.imgsl = [ //最多3张照片 |
| | | // "https://resource-city.sensoro.com/B8D675A3C4F71C5C8DE2FD764881BE57", |
| | | |
| | | // "https://resource-city.sensoro.com/1723C1A66DB44F792564F3648E5AA1EE", |
| | |
| | | var ct = document.getElementsByClassName('flare-liu-top')[0]; |
| | | var cordActive = document.getElementsByClassName('el-tabs__active-bar')[0];//滑块背景颜色 |
| | | |
| | | if (dat.state != '') { |
| | | // if (dat.state != '') { |
| | | // ct.style.backgroundImage = 'linear-gradient(to right, #F49966 , #F49966'; |
| | | // cordActive.style.backgroundImage = 'linear-gradient(to right, #F49966 , #F49966'; |
| | | // this.statesss = '故障'; |
| | | // } else { |
| | | // if (dat.jtype != 1) { |
| | | // if (dat.onlineStatus == 1) {//el-tabs__active-bar |
| | | // ct.style.backgroundImage = 'linear-gradient(to right, #32C1A2 , #32C1A2'; |
| | | // cordActive.style.backgroundImage = 'linear-gradient(to right, #32C1A2 , #32C1A2'; |
| | | // this.statesss = '在线'; |
| | | // } else { |
| | | // ct.style.backgroundImage = 'linear-gradient(to right, #CDCDCD , #CDCDCD'; |
| | | // cordActive.style.backgroundImage = 'linear-gradient(to right, #CDCDCD , #CDCDCD'; |
| | | // this.statesss = '离线'; |
| | | // } |
| | | // } else { |
| | | // ct.style.backgroundImage = 'linear-gradient(to right, #F35B5B , #F35B5B'; |
| | | // cordActive.style.backgroundImage = 'linear-gradient(to right, #F35B5B , #F35B5B'; |
| | | // this.statesss = '警报'; |
| | | // } |
| | | // } |
| | | if (dat.dtype == 3) { |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #F49966 , #F49966'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #F49966 , #F49966'; |
| | | this.statesss = '故障'; |
| | | } else { |
| | | if (dat.jtype != 1) { |
| | | if (dat.onlineStatus == 1) {//el-tabs__active-bar |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #32C1A2 , #32C1A2'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #32C1A2 , #32C1A2'; |
| | | this.statesss = '在线'; |
| | | } else { |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #CDCDCD , #CDCDCD'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #CDCDCD , #CDCDCD'; |
| | | this.statesss = '离线'; |
| | | } |
| | | } else { |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #F35B5B , #F35B5B'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #F35B5B , #F35B5B'; |
| | | this.statesss = '警报'; |
| | | } |
| | | } else if (dat.dtype == 1) {//el-tabs__active-bar |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #32C1A2 , #32C1A2'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #32C1A2 , #32C1A2'; |
| | | this.statesss = '正常'; |
| | | } else if (dat.dtype == 0) { |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #CDCDCD , #CDCDCD'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #CDCDCD , #CDCDCD'; |
| | | this.statesss = '离线'; |
| | | |
| | | } else if (dat.dtype == 2) { |
| | | ct.style.backgroundImage = 'linear-gradient(to right, #F35B5B , #F35B5B'; |
| | | cordActive.style.backgroundImage = 'linear-gradient(to right, #F35B5B , #F35B5B'; |
| | | this.statesss = '预警'; |
| | | } |
| | | |
| | | |
| | | }, |
| | | getUser(dat) { |
| | | var xhr = null |
| | | , my = this |
| | | , url = '/api/blade-jfpts/equipment/equipment/detail?id=' + dat; |
| | | if (XMLHttpRequest) { //http请求 |
| | | xhr = new XMLHttpRequest(); |
| | | } else { |
| | | xhr = new ActiveXObject("Microsoft.XMLHTTP"); |
| | | // if (XMLHttpRequest) { //http请求 |
| | | // xhr = new XMLHttpRequest(); |
| | | // } else { |
| | | // xhr = new ActiveXObject("Microsoft.XMLHTTP"); |
| | | |
| | | } |
| | | xhr.open("get", url, true); |
| | | xhr.send(); |
| | | xhr.onreadystatechange = function () { |
| | | if (xhr.readyState === 4) { |
| | | if (xhr.status === 200) { |
| | | // 判断isJson是否传进来了 |
| | | var data = JSON.parse(xhr.responseText);// JSON转js |
| | | my.ourd = data.data; |
| | | my.deptname = my.ourd.deptName; |
| | | } |
| | | } |
| | | } |
| | | // } |
| | | // xhr.open("get", url, true); |
| | | // xhr.send(); |
| | | // xhr.onreadystatechange = function () { |
| | | // if (xhr.readyState === 4) { |
| | | // if (xhr.status === 200) { |
| | | // // 判断isJson是否传进来了 |
| | | // var data = JSON.parse(xhr.responseText);// JSON转js |
| | | // my.ourd = data.data; |
| | | // my.deptname = my.ourd.deptName; |
| | | // } |
| | | // } |
| | | // } |
| | | axios.get(url).then((res) => { |
| | | console.log(typeof res,34234534345341) |
| | | var data = res;// JSON转js |
| | | my.ourd = data.data.data; |
| | | my.deptname = my.ourd.deptName; |
| | | }) |
| | | |
| | | }, |
| | | handleClick(tab, event) {//标签tab点击事件 |
| | | // console.log(tab, event); |
| | | }, |
| | | openRealVideoBox(serialNumber, channelNumber) { |
| | | openRealVideoBox(serialNumber, channelNumber) { |
| | | var that = this; |
| | | var newAxios = axios.create({ |
| | | baseURL: "https://web.byisf.com:18000", |
| | |
| | | }, |
| | | }); |
| | | |
| | | |
| | | if (that.ourd.manufacturers == "HK") { |
| | | |
| | | axios({ |
| | | method: "get", |
| | | url: `/api/blade-jfpts/equipment/equipment/selectEquimentPlayInfo?`, |
| | | params: { |
| | | number: that.ourd.deviceNumber, |
| | | }, |
| | | }).then((res) => { |
| | | that.videoSource = res.data.data.data.url; |
| | | 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; |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | |
| | | |
| | | }else{ |
| | | //this.form.serialNumber |
| | | newAxios |
| | | .post( |
| | | "/api_control", |
| | | {}, |
| | | { |
| | | params: { |
| | | param: JSON.stringify({ PktType: "GetAccessToken" }), |
| | | }, |
| | | .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; |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | ) |
| | | .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: { |
| | |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | | </html> |