1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-49a3d9e0","chunk-01e7f715"],{"093a2":function(e,t,a){"use strict";a("72d9")},"0ca1":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAADBUlEQVRYCa1XvW4TQRCevdgBWhACCkAQJZifBEiChLCEoMw70CCkGAnxDnkJmtRQREjwChR0hMahQCmITUFiECWSbXw3zOzdnvfWc7drh5Oi25n59vvGu7M7FwUlz6Otg5O9Q/iIiHcUYGxgSEY6VkkNag9jlVxETN6YOL8VGgxBlWqfu6Aef9i60rcxZlwzA/fdO1IbiPEa+4lmLo8beYD9L9uXdinBzzda3+bIPW8wGSQ1Ee/3jqINMt6buP2ObMMeY5I0bVsY61VRSiGCSoR47qriKk1AKfAlkAv4BlVcYgK8/4C46iMOjhOX5hQmiAn87OE9e0+FeVO4eItgnjmlSWICSYze5afTMJ6ryCp90lgZp3gKqLCaVN2llFlg8fpmZ5XSuIxJfMIHZk4JM/4VWZSE+aQ/kMAFH2KEkOyS+LuCv8wgTs3txCcSWH7RbdA9ctrBlZhVS1+cwpzMXfSCtY9ZJB55z7/LEWxL3BMrgMpfgMGKDlDinkiAylksFocLCDesA6xEETxzY2W2xF1I4O7Lw7NU/ItlBLafdr+9t72wp85ffW37q8bMzRo2ppBAf9AP+vVMQEdf9wJiq+wDYzHqkfS4GoUEpD0aExx3lJ4YV6OQgLRHx5V157saeQJZA9L93530X23ENbsx5Qn8+pGspw0o3SufKC2lvsZP/bY+VnyTqHJYg7UMNE8gUVFWgGG3G6W5cqv1fb077Dw1ZP53yj3WAsibEV2VwSeAheiX1Ef495NfdBJha+UrQMXhb0CTXDN5bC2dwPLmQYM61ZmZ2GaYxFqsyVN1AqOZ7/+wgpVyNJo6AXtPJLDoUzCAOjaoFzwR4x6n0dQJ0LU6VQFqblTtr68W9qkXvPVoiWGjGekGBLgkoiqcVEi6B4T3giIZrcASa0eDYT+r/tn3s0gdZOnGxNr0XWfOf9gFFETvB9EC8l2CzYiOxPT77xcIQrB2RJ/L14LQDsj0AoBOfps6EK/J2nwKduhv6EU7AFrD2zefd5v0L3zLCQWa6g8Bd/4Bb9cO+AyDjUAAAAAASUVORK5CYII="},"39db":function(e,t,a){},"72d9":function(e,t,a){},9124:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-card",{staticClass:"dashboard-container",staticStyle:{height:"calc(100vh - 113px)"},attrs:{"body-style":"{padding:'0px'}"}},[i("el-container",{staticClass:"videoService",staticStyle:{height:"100%"}},[i("el-aside",{staticStyle:{padding:"10px 20px 30px 30px","box-shadow":"rgb(193 193 193) 0px 0px 10px"}},[i("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[i("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center","justify-content":"center"}},[i("div",{staticStyle:{display:"flex","justify-content":"center","align-items":"center",width:"250px",background:"#eee",height:"40px",color:"#2766dd"}},[e._v(" 相机列表 ")])])]),i("el-input",{staticClass:"input-with-select",staticStyle:{"margin-top":"10px"},attrs:{placeholder:"请输入相机编码或线路名称","suffix-icon":"el-icon-search",clearable:""},on:{change:e.cameraTree},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}}),i("div",{staticStyle:{"font-size":"14px",float:"right",position:"relative",top:"8px",width:"50px","text-align":"center",color:"#f7f8f8",background:"#2766dd",padding:"5px","border-radius":"2px",cursor:"pointer"},on:{click:e.clicks}},[e._v(" 重置 ")]),i("el-menu",{staticStyle:{"margin-top":"40px",height:"calc(100% - 130px)",visibility:"auto","overflow-y":"auto"},attrs:{"default-active":e.cameraTreeIndex}},[e.cameraTreeData.length<=0?i("div",{staticStyle:{color:"#b9b9b9",width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center"}},[e._v(" 暂无数据 ")]):e._e(),e._l(e.cameraTreeData,(function(t){return i("el-submenu",{attrs:{index:t.index}},[i("template",{slot:"title"},[i("div",{staticStyle:{height:"100%",display:"flex","align-items":"center"}},[i("img",{staticStyle:{"margin-right":"5px",width:"15px"},attrs:{src:a("0ca1")}}),i("div",[e._v(e._s(t.name))])])]),e._l(t.children,(function(t){return[t.children.length>0?[i("el-submenu",{attrs:{index:t.index}},[i("template",{slot:"title"},[e._v(e._s(t.name))]),e._l(t.children,(function(t){return i("el-menu-item",{attrs:{index:t.index}},[i("el-checkbox",{attrs:{disabled:e.getNum(t.code)},on:{change:function(a){return e.checkboxClick(t.code)}},model:{value:e.checkboxObj[t.code],callback:function(a){e.$set(e.checkboxObj,t.code,a)},expression:"checkboxObj[item3.code]"}},[i("img",{staticStyle:{width:"20px",height:"15px","margin-bottom":"3px","margin-right":"3px"},attrs:{src:a("b9af")}}),e._v(" "+e._s(t.name))])],1)}))],2)]:[i("el-menu-item",{attrs:{index:t.index}},[i("el-checkbox",{attrs:{disabled:e.getNum(t.code)},on:{change:function(a){return e.checkboxClick(t.code)}},model:{value:e.checkboxObj[t.code],callback:function(a){e.$set(e.checkboxObj,t.code,a)},expression:"checkboxObj[item2.code]"}},[i("img",{staticStyle:{width:"20px",height:"15px","margin-bottom":"3px","margin-right":"3px"},attrs:{src:a("b9af")}}),e._v(" "+e._s(t.name))])],1)]]}))],2)}))],2)],1),i("playback",{staticStyle:{padding:"60px 20px 20px 20px"},attrs:{videoType:e.videoType,checkboxArr:e.checkboxArr,cameraCode:e.cameraCode,getAllCamera:this.getFirstRedioList},on:{getType:e.getType,tabChange:e.palyAndPlaybackTabChange}})],1)],1)},c=[],n=a("5530"),o=(a("99af"),a("4de4"),a("a630"),a("d81d"),a("14d9"),a("a434"),a("b0c0"),a("e9c4"),a("b64b"),a("d3b7"),a("3ca3"),a("2f62")),r=a("2a1a"),l=a("1cdb"),s=a("d16d"),d=a("093a"),h={name:"videoService",components:{videoLine:r["a"],videoPlayer:l["a"],playback:s["default"]},computed:Object(n["a"])({},Object(o["b"])(["name"])),data:function(){return{checkboxArr:[],checkboxObj:{},videoList:[],type:0,getFirstRedioList:[],getSecondRedioList:[],isShow:!0,cameraCode:"",cameraTreeIndex:"-1",cameraTreeData:[],facilityQuantity:"",searchText:"",videoType:1,cameraInfo:{cameraCode:"",alarmType:"",lineDir:"",deptId:"",alarmMile:"",beginMile:"",installLongitude:"",releasedTime:""},historicalAlarm:{}}},mounted:function(){this.cameraTree()},methods:{clicks:function(){var e=this;this.checkboxObj={},Object.keys(this.checkboxObj).map((function(t){e.checkboxObj[t]=!1})),this.checkboxArr=JSON.parse(JSON.stringify([{},{},{},{}])),this.cameraTreeData=JSON.parse(JSON.stringify(this.cameraTreeData)),Array.from(document.querySelectorAll(".el-card__body .el-menu:nth-of-type(1) input")).map((function(e){e.checked&&e.click()})),this.$forceUpdate()},getNum:function(e){var t=0===this.type?1:4,a=this.checkboxArr.filter((function(e){return e.cameraCode})).length===t;return a?!this.checkboxArr.filter((function(t){return t.cameraCode===e})).length:a},getType:function(e){var t=this;this.type=e;var a=0===this.type?1:4;this.checkboxArr.length=a,Object.keys(this.checkboxObj).map((function(e){t.checkboxObj[e]=!1}));for(var i=0;i<this.checkboxArr.length;i++)this.checkboxArr[i]={};this.checkboxArr=JSON.parse(JSON.stringify(this.checkboxArr))},checkboxClick:function(e,t){var a=this,i=JSON.parse(JSON.stringify(this.checkboxArr));if(this.checkboxObj[e]){for(var c={cameraCode:e,value:this.checkboxObj[e]},n=0;n<i.length;n++){var o=i[n];if(!o.cameraCode){i[n]=c;break}}console.log(e,"fffff"),Object(d["d"])(e).then((function(t){for(var i=0;i<a.checkboxArr.length;i++)a.checkboxArr[i].cameraCode===e&&(a.checkboxArr[i].src=t.data.url+"?"+Math.random());a.checkboxArr=JSON.parse(JSON.stringify(a.checkboxArr))}))}else for(var r=0;r<i.length;r++)i[r].cameraCode===e&&(i[r]={});i.filter((function(e){return e.cameraCode})).length>4&&this.checkboxObj[e]&&(this.checkboxObj[e]=!1,this.checkboxObj=JSON.parse(JSON.stringify(this.checkboxObj)),i.splice(i.length-1,1)),this.checkboxArr=JSON.parse(JSON.stringify(i))},videoPlay:function(e,t){this.videoType=1,t&&(this.cameraTreeIndex=t),this.cameraCode=e},cameraTree:function(){var e=this;Object(d["e"])({railwayCode:this.searchText}).then((function(t){e.cameraTreeData=[];var a="";e.cameraTreeData=t.data.children.map((function(t,i){return t.index="".concat(i),t.label=t.name,t.value=t.code,t.isSelect=!1,t.children&&t.children.length>0?(t.isVideo=!1,t.children.map((function(t,c){return e.getFirstRedioList.push(t),console.log(e.getFirstRedioList,"*********"),t.index="".concat(i,"-").concat(c),t.label=t.name,t.value=t.code,t.isSelect=!1,t.children&&t.children.length>0?(t.isVideo=!1,t.children.map((function(t,n){return t.index="".concat(i,"-").concat(c,"-").concat(n),t.label=t.name,t.value=t.code,t.isSelect=!1,t.isVideo=!0,""==a&&(a=t.code,e.cameraTreeIndex=t.index),t}))):(t.isVideo=!0,""==a&&(a=t.code,e.cameraTreeIndex=t.index)),t}))):(t.isVideo=!0,""==a&&(a=t.code,e.cameraTreeIndex=t.index)),t})),console.log(e.cameraTreeData,"this.cameraTreeData**//////"),e.$set(e.cameraTreeData),a&&e.videoPlay(a)}))}}},u=h,p=(a("9ff2"),a("093a2"),a("2877")),f=Object(p["a"])(u,i,c,!1,null,"72a343c2",null);t["default"]=f.exports},"9ff2":function(e,t,a){"use strict";a("39db")},a1b11:function(e,t,a){},a264:function(e,t,a){"use strict";a("a1b11")},d16d:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-container",{staticStyle:{padding:"15px 10px"}},[i("el-header",{staticStyle:{padding:"0px",height:"35px"}},[i("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{width:"100px",height:"32px",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer"},style:{backgroundColor:1==e._videoType?"#2766dd":"",color:1==e._videoType?"#fff":""},on:{click:function(t){return e.navClick(1)}}},[e._v(" 实时监测 ")]),i("div",{staticStyle:{width:"100px",height:"32px",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer"},style:{backgroundColor:2==e._videoType?"#2766dd":"",color:2==e._videoType?"#fff":""},on:{click:function(t){return e.navClick(2)}}},[e._v(" 回放视频 ")])]),e.videoType?i("div",[1==e.videoListType?i("img",{staticClass:"button-base",attrs:{src:a("c112")},on:{click:function(t){return e.videoListTypeChange(1)}}}):i("img",{staticClass:"button-base",attrs:{src:a("a280")},on:{click:function(t){return e.videoListTypeChange(1)}}}),0==e.videoListType?i("div",{staticClass:"button-base",staticStyle:{"background-color":"#017ebc"}}):i("img",{staticClass:"button-base",attrs:{src:a("a89f")},on:{click:function(t){return e.videoListTypeChange(0)}}}),0==e.videoListMagnify?i("img",{staticClass:"fangda",staticStyle:{"margin-right":"0"},attrs:{src:a("3740")},on:{click:e.videoFullScreen}}):e._e(),1==e.videoListMagnify?i("img",{staticClass:"fangda",staticStyle:{"margin-right":"10px"},attrs:{src:a("3740")},on:{click:e.fullScreenChange}}):e._e(),i("img",{staticClass:"fangda",staticStyle:{"margin-right":"10px"},attrs:{src:a("834d")},on:{click:function(t){return t.stopPropagation(),e.toggleFullScreen(t)}}})]):e._e()])]),i("el-main",{class:"className1",staticStyle:{padding:"0px",overflow:"auto"}},[1==e.videoListType?i("div",{ref:"fullscreenModule",staticClass:"videoDiv",class:{fullscreen:e.isFullScreen},staticStyle:{width:"100%",height:"100%",display:"flex","flex-wrap":"wrap","flex-direction":"row"}},e._l(4,(function(t,a){return i("div",{staticStyle:{width:"50%",height:"50%",float:"left",border:"5px solid #fff"}},[i("videoLine",{attrs:{"camera-code":e.checkboxArr[a]?e.checkboxArr[a].cameraCode:"",items:!1,"all-camera":e.getAllCamera}}),i("Video",{attrs:{src:e.checkboxArr[a]?e.checkboxArr[a].src:""}})],1)})),0):e._e(),0==e.videoListType?i("div",{ref:"fullscreenModule",staticClass:"videoDiv",class:{fullscreen:e.isFullScreen},staticStyle:{width:"100%",height:"100%"}},[i("videoLine",{attrs:{items:!1,"camera-code":e.cameraCode?e.checkboxArr[0].cameraCode:""}}),i("Video",{attrs:{src:e.checkboxArr[0].src}})],1):e._e()]),e.playbackModal.show?i("el-dialog",{attrs:{visible:e.playbackModal.show,"before-close":e.playbackModalClose,title:"视频详情",width:"900px"},on:{"update:visible":function(t){return e.$set(e.playbackModal,"show",t)}}},[i("div",[i("videoLine",{attrs:{"camera-code":e.cameraCode}}),i("div",{ref:"mse",staticStyle:{width:"100%"}})],1)]):e._e()],1)},c=[],n=a("ade3"),o=(a("99af"),a("a630"),a("d81d"),a("14d9"),a("a9e3"),a("3ca3"),a("2a1a")),r=a("1cdb"),l=a("093a"),s=a("6445"),d=(a("5a0c"),Object(n["a"])(Object(n["a"])(Object(n["a"])({name:"PalyAndPlayback",components:{videoLine:o["a"],videoPlayer:r["a"],Video:s["default"]},data:function(){return{isFullScreen:!1}},props:{videoType:{type:Number,default:function(){return 1}},checkboxArr:{type:Array,default:function(){return""}},getAllCamera:{type:Array,default:function(){return""}},cameraCode:{type:String,default:function(){return""}},alarmTime:{type:String,default:function(){return""}}},watch:{checkboxArr:{handler:function(e){console.log(e)},deep:!0},cameraCode:function(e){console.log(e,"111"),this.cameraCodeVideo=e},cameraCodeVideo:function(e){var t,a=this;null===(t=Object(l["o"])(e,!0))||void 0===t||t.then((function(e){a.src=e.data+"?"+Math.random()}))},videoType:function(e){this._videoType=e||1,this.handleSelect(this._videoType)},videoListType:function(){console.log(this.videoListType)}}},"data",(function(){var e=this;return{videoListType:0,_videoType:1,tableData:[],isTime:!1,src:"",cameraCodeVideo:"",pickerOptions:{onPick:function(t){console.log(t,"time"),e.minDate=t.minDate},disabledDate:function(t,a){return!(!e.minDate||e.getTIme(e.minDate)==e.getTIme(t))||t.getTime()>Date.now()}},cameraCodeUrl:"",emptyText:"",playbackModal:{show:!1,date:"",time:""}}})),"mounted",(function(){this.handleSelect(this._videoType),this._videoType=this.videoType})),"methods",{navClick:function(e){this._videoType=e,Array.from(document.querySelectorAll(".videoDiv video")).map((function(e){e.currentTime=0,e.play()})),this.$forceUpdate()},toggleFullScreen:function(){var e=this.$refs.fullscreenModule;this.isFullScreen?document.exitFullscreen():e.requestFullscreen(),this.isFullScreen=!this.isFullScreen},videoListTypeChange:function(e,t){this.numIndex=0,console.log("[视频切换11111111]",e),this.numberVideos=e,this.videoListType=e;var a=1===e?4:1;this.$emit("getType",e),setTimeout((function(){for(var e=0;e<a;e++){var t=Array.from(document.querySelectorAll(".el-menu .el-checkbox"))[e];t.querySelector("input").checked||t.click()}}),800)},getTIme:function(e){var t=new Date(e),a=t.getFullYear(),i=t.getMonth()+1,c=t.getDate(),n="".concat(a,"-").concat(i<10?"0"+i:i,"-").concat(c<10?"0"+c:c);return new Date(n).getTime()},handleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;console.log("[视频服务]tab切换",e),1!=e&&2!=e||(this._videoType=e,this.cameraCodeUrl="",this.cameraCodeVideo=this.cameraCode,this.tableData=[],this.playbackModal.time="",this.isTime=!1,this.videoListTypeChange(0,e)),this.$emit("tabChange",e)},playbackModalShow:function(){this.playbackModal.show=!0},playbackModalClose:function(){this.cameraCodeUrl="",this.cameraCodeVideo="",this.playbackModal.show=!1},timeChage:function(){var e=this;console.log("timeChage",this.playbackModal),this.playbackModal.date&&this.playbackModal.time.length>1&&Object(l["c"])({cameraCode:this.cameraCode,startTime:this.playbackModal.date+" "+this.playbackModal.time[0],entTime:this.playbackModal.date+" "+this.playbackModal.time[1]}).then((function(t){e.tableData=t.data||[],console.log(t,"res")}))},playbackModalSuccess:function(){this.playbackModal.show=!1},play:function(e){var t=this;this.playbackModal.show=!0,console.log(this.tableData),this.$nextTick((function(){var a={el:t.$refs.mse,url:e.url,fluid:!0,playnext:{urlList:t.tableData.map((function(e){return e.url}))},poster:"",plugins:[],isLive:!1,autoplay:!0,autoplayMuted:!0};a.plugins.push(FlvPlayer),t.player=new Player(a)}))},invite:function(e,t){var a=this;Object(l["h"])({cameraCode:this.cameraCode,startTime:e,entTime:t}).then((function(e){"200"==e.code&&e.data?(a.cameraCodeUrl=e.data,a.cameraCodeVideo=""):(a.cameraCodeUrl="",a.cameraCodeVideo="",a.$message.error(e.msg))}))}})),h=d,u=(a("a264"),a("2877")),p=Object(u["a"])(h,i,c,!1,null,null,null);t["default"]=p.exports}}]);
|