648540858
2020-09-25 764daa8a364204aba021e9ff5295feec5098201d
1
2
(function(t){function e(e){for(var n,r,s=e[0],l=e[1],c=e[2],u=0,h=[];u<s.length;u++)r=s[u],i[r]&&h.push(i[r][0]),i[r]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(t[n]=l[n]);d&&d(e);while(h.length)h.shift()();return o.push.apply(o,c||[]),a()}function a(){for(var t,e=0;e<o.length;e++){for(var a=o[e],n=!0,s=1;s<a.length;s++){var l=a[s];0!==i[l]&&(n=!1)}n&&(o.splice(e--,1),t=r(r.s=a[0]))}return t}var n={},i={app:0},o=[];function r(e){if(n[e])return n[e].exports;var a=n[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=n,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/";var s=window["webpackJsonp"]=window["webpackJsonp"]||[],l=s.push.bind(s);s.push=e,s=s.slice();for(var c=0;c<s.length;c++)e(s[c]);var d=l;o.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("56d7")},"034f":function(t,e,a){"use strict";var n=a("64a9"),i=a.n(n);i.a},"085b":function(t,e,a){},1:function(t,e){},2:function(t,e){},3:function(t,e){},4:function(t,e){},"56d7":function(t,e,a){"use strict";a.r(e);a("cadf"),a("551c"),a("f751"),a("097d");var n=a("2b0e"),i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("router-view")],1)},o=[],r=(a("57e7"),a("28a5"),{name:"app",data:function(){return{isLogin:!1,userInfo:{nick:null,ulevel:null,uid:null,portrait:null}}},created:function(){this.$cookies.get("session")||this.$router.push("/login")},watch:{$route:"checkLogin"},mounted:function(){},methods:{getUserInfo:function(){this.$cookies.get("session")},checkLogin:function(){this.$cookies.get("session")||this.$router.push("/login")},getCookie:function(t){for(var e=t+"=",a=document.cookie.split(";"),n=0;n<a.length;n++){var i=a[n];while(" "==i.charAt(0))i=i.substring(1);if(-1!=i.indexOf(e))return i.substring(e.length,i.length)}return""}},components:{}}),s=r,l=(a("034f"),a("2877")),c=Object(l["a"])(s,i,o,!1,null,null,null),d=c.exports,u="127.0.0.1:10080",h="035c73f7-bb6b-4889-a715-d9eb2d1925cc",p="ws://"+u+"/";function m(t){return t}function f(t){return"/media"+t+"?secret="+h}var g={genApiUrl:f,genGb28181Url:m,baseMediaUrl:p,ZLServerIp:u},v=a("5c96"),b=a.n(v),y=(a("0fae"),a("8c4f")),S=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("el-container",[a("el-header",[a("uiHeader")],1),a("el-main",[a("div",{staticStyle:{"background-color":"#FFFFFF","margin-bottom":"1rem",position:"relative",padding:"0.5rem","text-align":"left"}},[a("span",{staticStyle:{"font-size":"1rem","font-weight":"bold"}},[t._v("控制台")]),a("div",{staticStyle:{position:"absolute",right:"1rem",top:"0.3rem"}},[a("el-popover",{attrs:{placement:"bottom",width:"750",height:"300",trigger:"click"}},[a("div",{staticStyle:{height:"600px",overflow:"auto"}},[a("table",{staticClass:"table-c",attrs:{cellspacing:"0"}},t._l(t.serverConfig,function(e,n,i){return a("tr",[a("td",{staticStyle:{width:"18rem","text-align":"right"}},[t._v(t._s(n))]),a("td",{staticStyle:{width:"33rem","text-align":"left"}},[t._v(t._s(e))])])}),0)]),a("el-button",{attrs:{slot:"reference",type:"primary",size:"mini"},on:{click:function(e){return t.getServerConfig()}},slot:"reference"},[t._v("查看服务器配置")])],1),a("el-button",{staticStyle:{"margin-left":"1rem"},attrs:{type:"danger",size:"mini"},on:{click:function(e){return t.reStartServer()}}},[t._v("重启服务器")])],1)]),a("el-row",{attrs:{gutter:30}},[a("el-col",{attrs:{span:12}},[a("div",{staticClass:"control-table",attrs:{id:"ThreadsLoad"}},[t._v("table1")])]),a("el-col",{attrs:{span:12}},[a("div",{staticClass:"control-table",attrs:{id:"WorkThreadsLoad"}},[t._v("table2")])])],1),a("el-table",{staticStyle:{"margin-top":"1rem"},attrs:{data:t.allSessionData}},[a("el-table-column",{attrs:{prop:"peer_ip",label:"远端"}}),a("el-table-column",{attrs:{prop:"local_ip",label:"本地"}}),a("el-table-column",{attrs:{prop:"typeid",label:"类型"}}),a("el-table-column",{attrs:{align:"right"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-button",{attrs:{icon:"el-icon-refresh-right",circle:""},on:{click:function(e){return t.getAllSession()}}})]}},{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),t.deleteRow(e.$index,t.allSessionData)}}},[t._v("移除")])]}}])})],1)],1)],1)],1)},w=[],C=(a("ac6a"),a("f3e2"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"UiHeader"}},[a("el-menu",{attrs:{router:"","default-active":this.$route.path,"background-color":"#545c64","text-color":"#fff","active-text-color":"#ffd04b",mode:"horizontal"}},[a("el-menu-item",{attrs:{index:"/"}},[t._v("控制台")]),a("el-menu-item",{attrs:{index:"/videoList"}},[t._v("设备列表")]),a("el-menu-item",{staticStyle:{float:"right"},on:{click:t.loginout}},[t._v("退出")])],1)],1)}),x=[],$={name:"UiHeader",methods:{loginout:function(){this.$cookies.remove("session"),this.$router.push("/login")}}},_=$,D=Object(l["a"])(_,C,x,!1,null,null,null),k=D.exports,L=a("313e"),T=a.n(L),O={name:"app",components:{echarts:T.a,uiHeader:k},data:function(){return{tableOption:{xAxis:{},yAxis:{},label:{},tooltip:{},dataZoom:[],series:[]},table1Option:{xAxis:{},yAxis:{},label:{},tooltip:{},series:[]},mChart:null,mChart1:null,charZoomStart:0,charZoomEnd:100,chartInterval:0,allSessionData:[],visible:!1,serverConfig:{}}},mounted:function(){this.getAllSession(),this.initTable(),this.updateData(),this.chartInterval=setInterval(this.updateData,3e3)},destroyed:function(){clearInterval(this.chartInterval)},methods:{updateData:function(){this.getThreadsLoad()},getThreadsLoad:function(){var t=this;this.$axios({method:"get",url:this.$global.genApiUrl("/index/api/getThreadsLoad")}).then(function(e){if(0==e.data.code){t.tableOption.xAxis.data.push((new Date).toLocaleTimeString()),t.table1Option.xAxis.data.push((new Date).toLocaleTimeString());for(var a=0;a<e.data.data.length;a++)if(void 0===t.tableOption.series[a]){var n={data:[],type:"line"},i={data:[],type:"line"};n.data.push(e.data.data[a].delay),i.data.push(e.data.data[a].load),t.tableOption.series.push(n),t.table1Option.series.push(i)}else t.tableOption.series[a].data.push(e.data.data[a].delay),t.table1Option.series[a].data.push(e.data.data[a].load);t.tableOption.dataZoom[0].start=t.charZoomStart,t.tableOption.dataZoom[0].end=t.charZoomEnd,t.table1Option.dataZoom[0].start=t.charZoomStart,t.table1Option.dataZoom[0].end=t.charZoomEnd,t.myChart.setOption(t.tableOption,!0),t.myChart1.setOption(t.table1Option,!0)}})},initTable:function(){var t=this;this.tableOption.xAxis={type:"category",data:[],name:"时间",nameTextStyle:{fontWeight:300,fontSize:15}},this.tableOption.yAxis={type:"value",name:"延迟率",boundaryGap:[0,"100%"],max:100,axisLabel:{show:!0,interval:"auto",formatter:"{value} %"},nameTextStyle:{fontWeight:300,fontSize:15}},this.tableOption.dataZoom=[{show:!0,start:this.charZoomStart,end:this.charZoomEnd}],this.myChart=T.a.init(document.getElementById("ThreadsLoad")),this.myChart.setOption(this.tableOption),this.myChart.on("dataZoom",function(e){e.batch?(t.charZoomStart=e.batch[0].start,t.charZoomEnd=e.batch[0].end):(t.charZoomStart=e.start,t.charZoomEnd=e.end)}),this.table1Option.xAxis={type:"category",data:[],name:"时间",nameTextStyle:{fontWeight:300,fontSize:15}},this.table1Option.yAxis={type:"value",name:"负载率",boundaryGap:[0,"100%"],max:100,axisLabel:{show:!0,interval:"auto",formatter:"{value} %"},nameTextStyle:{fontWeight:300,fontSize:15}},this.table1Option.dataZoom=[{show:!0,start:this.charZoomStart,end:this.charZoomEnd}],this.myChart1=T.a.init(document.getElementById("WorkThreadsLoad")),this.myChart1.setOption(this.table1Option),this.myChart1.on("dataZoom",function(e){e.batch?(t.charZoomStart=e.batch[0].start,t.charZoomEnd=e.batch[0].end):(t.charZoomStart=e.start,t.charZoomEnd=e.end)})},getAllSession:function(){var t=this;t.allSessionData=[],console.log("地址:"+this.$global.genApiUrl("/index/api/getAllSession")),this.$axios({method:"get",url:this.$global.genApiUrl("/index/api/getAllSession")}).then(function(e){e.data.data.forEach(function(e){var a={peer_ip:e.peer_ip,local_ip:e.local_ip,typeid:e.typeid,id:e.id};t.allSessionData.push(a)})})},getServerConfig:function(){var t=this;this.$axios({method:"get",url:this.$global.genApiUrl("/index/api/getServerConfig")}).then(function(e){t.serverConfig=e.data.data[0],t.visible=!0})},reStartServer:function(){var t=this;this.$confirm("此操作将重启媒体服务器, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var e=t;t.$axios({method:"get",url:t.$global.genApiUrl("/index/api/restartServer")}).then(function(t){e.getAllSession(),0==t.data.code&&e.$message({type:"success",message:"操作完成"})})})},deleteRow:function(t,e){var a=this,n=this;this.$confirm("此操作将断开该通信链路, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){n.deleteSession(e[t].id)}).catch(function(){console.log("id:"+JSON.stringify(e[t])),a.$message({type:"info",message:"已取消删除"})}),console.log(JSON.stringify(e[t]))},deleteSession:function(t){var e=this;this.$axios({method:"get",url:this.$global.genApiUrl("/index/api/kick_session")+"&id="+t}).then(function(t){e.getAllSession(),e.$message({type:"success",message:"删除成功!"})})}}},I=O,P=(a("791f"),Object(l["a"])(I,S,w,!1,null,null,null)),z=P.exports,U=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("el-container",[a("el-header",[a("uiHeader")],1),a("el-main",[a("div",{staticStyle:{"background-color":"#FFFFFF","margin-bottom":"1rem",position:"relative",padding:"0.5rem","text-align":"left"}},[a("span",{staticStyle:{"font-size":"1rem","font-weight":"bold"}},[t._v("设备列表")]),a("div",{staticStyle:{position:"absolute",right:"1rem",top:"0.3rem"}},[a("el-button",{attrs:{icon:"el-icon-refresh-right",circle:"",size:"mini"},on:{click:function(e){return t.getDeviceList()}}})],1)]),a("devicePlayer",{ref:"devicePlayer"}),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.deviceList,border:"",height:t.winHeight}},[a("el-table-column",{attrs:{prop:"name",label:"名称",width:"180",align:"center"}}),a("el-table-column",{attrs:{prop:"deviceId",label:"设备编号",width:"240",align:"center"}}),a("el-table-column",{attrs:{label:"地址",width:"180",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[a("el-tag",{attrs:{size:"medium"}},[t._v(t._s(e.row.host.address))])],1)]}}])}),a("el-table-column",{attrs:{prop:"manufacturer",label:"厂家",align:"center"}}),a("el-table-column",{attrs:{prop:"model",label:"固件版本",align:"center"}}),a("el-table-column",{attrs:{prop:"transport",label:"通讯方式",align:"center"}}),a("el-table-column",{attrs:{label:"状态",width:"180",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[a("el-tag",{attrs:{size:"medium"}},[t._v(t._s(1==e.row.online?"在线":"离线"))])],1)]}}])}),a("el-table-column",{attrs:{label:"操作",width:"200",align:"center",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini"},on:{click:function(a){return t.refDevice(e.row)}}},[t._v("刷新")]),a("el-button",{attrs:{size:"mini"},on:{click:function(a){return t.showChannelList(e.row)}}},[t._v("查看通道")])]}}])})],1),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":t.currentPage,"page-size":t.count,"page-sizes":[15,25,35,50],layout:"total, sizes, prev, pager, next",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.currentChange}}),a("el-dialog",{attrs:{title:"通道列表",visible:t.showDevicePushConfirm,width:"60%"},on:{"update:visible":function(e){t.showDevicePushConfirm=e}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.getcurrentDeviceChannels}},[a("el-table-column",{attrs:{prop:"channelId",label:"通道编号",width:"210"}}),a("el-table-column",{attrs:{prop:"name",label:"通道名称",width:"180"}}),a("el-table-column",{attrs:{prop:"address",label:"地址"}}),a("el-table-column",{attrs:{label:"操作",width:"240",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini"},on:{click:function(a){return t.sendDevicePush(e.row)}}},[t._v("预览视频")])]}}])})],1)],1)],1)],1)],1)},H=[],A=(a("456d"),a("6d67"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"devicePlayer"}},[a("el-dialog",{attrs:{title:"视频播放",top:"0",visible:t.showVideoDialog,"destroy-on-close":!0},on:{"update:visible":function(e){t.showVideoDialog=e},close:function(e){return t.stop()}}},[t.showVideoDialog?a("LivePlayer",{ref:"videoPlayer",attrs:{videoUrl:t.videoUrl,error:t.videoError,fluent:"",autoplay:"",live:"",stretch:""}}):t._e(),a("div",{staticStyle:{"text-align":"right","margin-top":"1rem"},attrs:{id:"shared"}},[a("el-tabs",{model:{value:t.tabActiveName,callback:function(e){t.tabActiveName=e},expression:"tabActiveName"}},[a("el-tab-pane",{attrs:{label:"媒体流信息",name:"media"}},[a("div",{staticStyle:{"margin-bottom":"0.5rem"}},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.playRecord(!0,"")}}},[t._v("播放")])],1),a("div",{staticStyle:{display:"flex","margin-bottom":"0.5rem",height:"2.5rem"}},[a("span",{staticStyle:{width:"5rem","line-height":"2.5rem","text-align":"right"}},[t._v("播放地址:")]),a("el-input",{attrs:{disabled:!0},nativeOn:{click:function(e){return t.copySharedInfo(t.getPlayerShared.sharedUrl)}},model:{value:t.getPlayerShared.sharedUrl,callback:function(e){t.$set(t.getPlayerShared,"sharedUrl",e)},expression:"getPlayerShared.sharedUrl"}})],1),a("div",{staticStyle:{display:"flex","margin-bottom":"0.5rem",height:"2.5rem"}},[a("span",{staticStyle:{width:"5rem","line-height":"2.5rem","text-align":"right"}},[t._v("iframe:")]),a("el-input",{attrs:{disabled:!0},nativeOn:{click:function(e){return t.copySharedInfo(t.getPlayerShared.sharedIframe)}},model:{value:t.getPlayerShared.sharedIframe,callback:function(e){t.$set(t.getPlayerShared,"sharedIframe",e)},expression:"getPlayerShared.sharedIframe"}})],1),a("div",{staticStyle:{display:"flex","margin-bottom":"0.5rem",height:"2.5rem"}},[a("span",{staticStyle:{width:"5rem","line-height":"2.5rem","text-align":"right"}},[t._v("资源地址:")]),a("el-input",{attrs:{disabled:!0},nativeOn:{click:function(e){return t.copySharedInfo(t.getPlayerShared.sharedRtmp)}},model:{value:t.getPlayerShared.sharedRtmp,callback:function(e){t.$set(t.getPlayerShared,"sharedRtmp",e)},expression:"getPlayerShared.sharedRtmp"}})],1)]),a("el-tab-pane",{attrs:{label:"录像查询",name:"second"}},[a("el-date-picker",{attrs:{type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"开始时间"},on:{change:function(e){return t.recordList()}},model:{value:t.videoHistory.startTime,callback:function(e){t.$set(t.videoHistory,"startTime",e)},expression:"videoHistory.startTime"}}),a("el-date-picker",{attrs:{type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"结束时间"},on:{change:function(e){return t.recordList()}},model:{value:t.videoHistory.endTime,callback:function(e){t.$set(t.videoHistory,"endTime",e)},expression:"videoHistory.endTime"}}),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.videoHistory.searchHistoryResult}},[a("el-table-column",{attrs:{label:"名称",prop:"name",width:"150"}}),a("el-table-column",{attrs:{label:"文件",prop:"filePath",width:"300"}}),a("el-table-column",{attrs:{label:"开始时间",prop:"startTime",width:"160"}}),a("el-table-column",{attrs:{label:"结束时间",prop:"endTime",width:"160"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){return t.playRecord(!1,e.row)}}},[t._v("播放")])]}}])})],1)],1),a("el-tab-pane",{attrs:{label:"云台控制",name:"third"}},[a("div",{staticStyle:{display:"flex","justify-content":"center"}},[a("div",{staticClass:"control-wrapper"},[a("div",{staticClass:"control-btn control-top",on:{mousedown:function(e){return t.ptzCamera(0,1,0)},mouseup:function(e){return t.ptzCamera(0,0,0)}}},[a("i",{staticClass:"el-icon-caret-top"}),a("div",{staticClass:"control-inner-btn control-inner"})]),a("div",{staticClass:"control-btn control-left",on:{mousedown:function(e){return t.ptzCamera(1,0,0)},mouseup:function(e){return t.ptzCamera(0,0,0)}}},[a("i",{staticClass:"el-icon-caret-left"}),a("div",{staticClass:"control-inner-btn control-inner"})]),a("div",{staticClass:"control-btn control-bottom",on:{mousedown:function(e){return t.ptzCamera(0,2,0)},mouseup:function(e){return t.ptzCamera(0,0,0)}}},[a("i",{staticClass:"el-icon-caret-bottom"}),a("div",{staticClass:"control-inner-btn control-inner"})]),a("div",{staticClass:"control-btn control-right",on:{mousedown:function(e){return t.ptzCamera(2,0,0)},mouseup:function(e){return t.ptzCamera(0,0,0)}}},[a("i",{staticClass:"el-icon-caret-right"}),a("div",{staticClass:"control-inner-btn control-inner"})]),a("div",{staticClass:"control-round"},[a("div",{staticClass:"control-round-inner"},[a("i",{staticClass:"fa fa-pause-circle"})])]),a("div",{staticStyle:{position:"absolute",left:"7.25rem",top:"2.25rem"},on:{mousedown:function(e){return t.ptzCamera(0,0,2)},mouseup:function(e){return t.ptzCamera(0,0,0)}}},[a("i",{staticClass:"el-icon-zoom-in",staticStyle:{"font-size":"1.875rem"}})]),a("div",{staticStyle:{position:"absolute",left:"7.25rem",top:"4.25rem","font-size":"1.875rem"},on:{mousedown:function(e){return t.ptzCamera(0,0,1)},mouseup:function(e){return t.ptzCamera(0,0,0)}}},[a("i",{staticClass:"el-icon-zoom-out"})])])])])],1)],1)],1)],1)}),Z=[],E=(a("6b54"),a("87b3"),a("3f2c")),j=a.n(E),N=[{deviceId:"37010200491320000001",name:"浪潮仓外",manufacturer:"Hikvision",model:"iDS-2DE7223IX-A/S1",firmware:"V5.5.23",transport:"TCP",host:{ip:"10.200.64.194",port:58206,address:"10.200.64.194:58206"},online:1,channelMap:{"37010200491320000001":{channelId:"37010200491320000001",name:"济南第一粮库大门",manufacture:"Hikvision",model:"IP Camera",owner:"Owner",civilCode:"CivilCode",block:null,address:"Address",parental:0,parentId:null,safetyWay:0,registerWay:1,certNum:null,certifiable:0,errCode:0,endTime:null,secrecy:"0",ipAddress:null,port:0,password:null,status:1,longitude:0,latitude:0}}},{deviceId:"34020000001320000004",name:null,manufacturer:"Dahua",model:"DH-SD-59D120T-HN",firmware:"V2.422.3.R.2016-11-30",transport:"UDP",host:{ip:"10.200.64.195",port:5060,address:"10.200.64.195:5060"},online:0,channelMap:{"34020000001320000004":{channelId:"34020000001320000004",name:"Camera 01",manufacture:"Dahua",model:"DH-SD-59D120T-HN",owner:"0",civilCode:"6532",block:null,address:"axy",parental:0,parentId:null,safetyWay:0,registerWay:1,certNum:null,certifiable:0,errCode:0,endTime:null,secrecy:"0",ipAddress:null,port:0,password:null,status:1,longitude:0,latitude:0},"34020000001320000005":{channelId:"34020000001320000005",name:"Camera 011",manufacture:"Dahua1",model:"DH-SD-59D120T-HN",owner:"0",civilCode:"6532",block:null,address:"axy1",parental:0,parentId:null,safetyWay:0,registerWay:1,certNum:null,certifiable:0,errCode:0,endTime:null,secrecy:"0",ipAddress:null,port:0,password:null,status:1,longitude:0,latitude:0}}}],F={deviceId:"34020000001320000001",name:"假数据中化梁抵库",sumNum:2,recordList:[{deviceId:"34020000001320000001",name:"假数据中化梁抵库",filePath:"1589112259_1589112788",address:"Address 1",startTime:"2020-05-10 20:04:19",endTime:"2020-05-10 20:13:08",secrecy:0,type:"time",recorderId:null},{deviceId:"34020000001320000001",name:"假数据中化梁抵库",filePath:"1589112788_1589113318",address:"Address 1",startTime:"2020-05-10 20:13:08",endTime:"2020-05-10 20:21:58",secrecy:0,type:"time",recorderId:null}]},R={devices:N,recordData:F},G={name:"devicePlayer",props:{},components:{LivePlayer:j.a},computed:{getPlayerShared:function(){var t={sharedUrl:window.location.host+"/"+this.videoUrl,sharedIframe:'<iframe src="'+window.location.host+"/"+this.videoUrl+'"></iframe>',sharedRtmp:this.videoUrl};return t}},created:function(){this.videoHistory.searchHistoryResult=R.recordData.recordList},data:function(){return{video:"http://lndxyj.iqilu.com/public/upload/2019/10/14/8c001ea0c09cdc59a57829dabc8010fa.mp4",videoUrl:"",videoHistory:{startTime:"",endTime:"",searchHistoryResult:[]},showVideoDialog:!1,normalssrc:"",ssrc:"",deviceId:"",channelId:"",tabActiveName:"media"}},methods:{getVideoUrlBySsrc:function(t){for(var e=parseInt(t).toString(16),a=8-e.length,n=0;n<a;n++)e="0"+e;console.log("hex_ssrc:"+e),this.ssrc=e.toLocaleUpperCase();var i=this.$global.baseMediaUrl+"rtp/"+this.ssrc+".flv?st="+(new Date).getTime();return i},play:function(t,e,a){this.normalssrc=t,this.deviceId=e,this.channelId=a,this.videoUrl=this.getVideoUrlBySsrc(t),this.showVideoDialog=!0,console.log(this.ssrc)},stop:function(){console.log("关闭视频"),this.videoUrl="",this.$refs.videoPlayer.pause(),this.showVideoDialog=!1;this.$axios({method:"post",url:this.$global.genGb28181Url("/api/play/"+this.ssrc+"/stop")}).then(function(t){console.log(JSON.stringify(t))}),this.$axios({method:"post",url:this.$global.genGb28181Url("/api/playback/"+this.ssrc+"/stop")}).then(function(t){console.log(JSON.stringify(t))})},copySharedInfo:function(t){console.log("复制内容:"+t);var e=this;this.$copyText(t).then(function(t){e.$message({showClose:!0,message:"复制成功",type:"success"})},function(t){e.$message({showClose:!0,message:"复制失败,请手动复制",type:"error"})})},recordList:function(){if(this.videoHistory.startTime&&this.videoHistory.endTime){var t=this;this.$axios({method:"get",url:this.$global.genGb28181Url("/api/record/"+this.deviceId+"/"+this.channelId)+"?startTime="+this.videoHistory.startTime+"&endTime="+this.videoHistory.endTime}).then(function(t){console.log(JSON.stringify(t))}).catch(function(e){t.videoHistory.searchHistoryResult=R.recordData})}},playRecord:function(t,e){var a=this;t?this.videoUrl=this.getVideoUrlBySsrc(this.normalssrc):this.$axios({method:"get",url:this.$global.genGb28181Url("/api/playback/"+this.deviceId+"/"+this.channelId+"?startTime="+e.startTime+"&endTime="+e.endTime)}).then(function(t){var e=t.data.ssrc;a.videoUrl=a.getVideoUrlBySsrc(e)})},ptzCamera:function(t,e,a){console.log("云台控制:"+t+" : "+e+" : "+a);this.$axios({method:"post",url:this.$global.genGb28181Url("/api/ptz/"+this.deviceId+"/"+this.channelId+"?leftRight="+t+"&upDown="+e+"&inOut="+a+"&moveSpeed=50&zoomSpeed=50")}).then(function(t){})},videoError:function(t){console.log("播放器错误:"+JSON.stringify(t))}}},M=G,W=(a("75f6"),Object(l["a"])(M,A,Z,!1,null,null,null)),J=W.exports,V={name:"app",components:{devicePlayer:J,uiHeader:k},data:function(){return{deviceList:[],currentDevice:{},showDevicePushConfirm:!1,videoComponentList:[],currentPlayerInfo:{},updateLooper:0,currentDeviceChannelsLenth:0,winHeight:window.innerHeight-200,currentPage:1,count:15,total:0}},computed:{getcurrentDeviceChannels:function(){var t=this.currentDevice["channelMap"],e=null;return t&&(e=Object.keys(t).map(function(e){return t[e]}),this.currentDeviceChannelsLenth=e.length),console.log("数据:"+JSON.stringify(e)),e}},mounted:function(){this.initData(),this.updateLooper=setInterval(this.initData,1e4)},destroyed:function(){this.$destroy("videojs"),clearTimeout(this.updateLooper)},methods:{initData:function(){this.getDeviceList()},currentChange:function(t){this.currentPage=t,this.getDeviceList()},handleSizeChange:function(t){this.count=t,this.getDeviceList()},getDeviceList:function(){var t=this;this.$axios.get(this.$global.genGb28181Url("/api/devices"),{params:{page:t.currentPage-1,count:t.count}}).then(function(e){console.log(e),t.total=e.data.total,t.deviceList=e.data.data}).catch(function(t){console.log(t)})},showChannelList:function(t){console.log(JSON.stringify(t)),this.$router.push("/channelList/".concat(t.deviceId))},refDevice:function(t){console.log("刷新对应设备:"+t.deviceId),this.$axios({method:"post",url:this.$global.genGb28181Url("/api/devices/"+t.deviceId+"/sync")}).then(function(t){}).catch(function(t){that.$message({showClose:!0,message:"请求成功",type:"success"})})},sendDevicePush:function(t){var e=this.currentDevice.deviceId,a=t.channelId;console.log("通知设备推流1:"+e+" : "+a);var n=this;this.$axios({method:"get",url:this.$global.genGb28181Url("/api/play/"+e+"/"+a)}).then(function(t){var i=t.data.ssrc;n.$refs.devicePlayer.play(i,e,a)}).catch(function(t){})}}},B=V,q=(a("672c"),Object(l["a"])(B,U,H,!1,null,null,null)),X=q.exports,K=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"channelList"}},[a("el-container",[a("el-header",[a("uiHeader")],1),a("el-main",[a("div",{staticStyle:{"background-color":"#FFFFFF","margin-bottom":"1rem",position:"relative",padding:"0.5rem","text-align":"left"}},[a("span",{staticStyle:{"font-size":"1rem","font-weight":"bold"}},[t._v("通道列表")])]),a("devicePlayer",{ref:"devicePlayer"}),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.deviceChannelList,height:t.winHeight,border:""}},[a("el-table-column",{attrs:{prop:"channelId",label:"通道编号",width:"210"}}),a("el-table-column",{attrs:{prop:"name",label:"通道名称",width:"180"}}),a("el-table-column",{attrs:{prop:"address",label:"地址"}}),a("el-table-column",{attrs:{label:"操作",width:"240",align:"center",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini"},on:{click:function(a){return t.sendDevicePush(e.row)}}},[t._v("预览视频")])]}}])})],1),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":t.currentPage,"page-size":t.count,"page-sizes":[15,25,35,50],layout:"total, sizes, prev, pager, next",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.currentChange}})],1)],1)],1)},Q=[],Y={name:"channelList",components:{devicePlayer:J,uiHeader:k},data:function(){return{deviceId:this.$route.params.id,deviceChannelList:[],videoComponentList:[],currentPlayerInfo:{},updateLooper:0,currentDeviceChannelsLenth:0,winHeight:window.innerHeight-200,currentPage:1,count:15,total:0}},computed:{getcurrentDeviceChannels:function(){var t=this.currentDevice["channelMap"],e=null;return t&&(e=Object.keys(t).map(function(e){return t[e]}),this.currentDeviceChannelsLenth=e.length),console.log("数据:"+JSON.stringify(e)),e}},mounted:function(){this.initData(),this.updateLooper=setInterval(this.initData,1e4)},destroyed:function(){this.$destroy("videojs"),clearTimeout(this.updateLooper)},methods:{initData:function(){this.getDeviceChannelList()},currentChange:function(t){this.currentPage=t,this.getDeviceChannelList()},handleSizeChange:function(t){this.count=t,this.getDeviceChannelList()},getDeviceChannelList:function(){var t=this;console.log(this.currentPage-1),this.$axios.get(this.$global.genGb28181Url("/api/devices/".concat(this.$route.params.id,"/channels")),{params:{page:t.currentPage-1,count:t.count}}).then(function(e){console.log(e),t.total=e.data.total,t.deviceChannelList=e.data.data}).catch(function(t){console.log(t)})},refDevice:function(t){console.log("刷新对应设备:"+t.deviceId),this.$axios({method:"post",url:this.$global.genGb28181Url("/api/devices/"+t.deviceId+"/sync")}).then(function(t){}).catch(function(t){that.$message({showClose:!0,message:"请求成功",type:"success"})})},sendDevicePush:function(t){var e=this.deviceId,a=t.channelId;console.log("通知设备推流1:"+e+" : "+a);var n=this;this.$axios({method:"get",url:this.$global.genGb28181Url("/api/play/"+e+"/"+a)}).then(function(t){var i=t.data.ssrc;n.$refs.devicePlayer.play(i,e,a)}).catch(function(t){})}}},tt=Y,et=(a("dc86"),Object(l["a"])(tt,K,Q,!1,null,null,null)),at=et.exports,nt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"login",attrs:{id:"login"}},[t._m(0),t._m(1),a("div",{staticClass:"log-email"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],class:"log-input"+(""==t.username?" log-input-empty":""),attrs:{type:"text",placeholder:"用户名"},domProps:{value:t.username},on:{input:function(e){e.target.composing||(t.username=e.target.value)}}}),a("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],class:"log-input"+(""==t.password?" log-input-empty":""),attrs:{type:"password",placeholder:"密码"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}}),a("a",{staticClass:"log-btn",attrs:{href:"javascript:;"},on:{click:t.login}},[t._v("登录")])]),t.isLoging?a("Loading",{attrs:{marginTop:"-30%"}}):t._e()],1)},it=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a",{staticClass:"log-close",attrs:{href:"javascript:;"}},[a("i",{staticClass:"icons close"})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"log-bg"},[a("div",{staticClass:"log-cloud cloud1"}),a("div",{staticClass:"log-cloud cloud2"}),a("div",{staticClass:"log-cloud cloud3"}),a("div",{staticClass:"log-cloud cloud4"}),a("div",{staticClass:"log-logo"},[t._v("Welcome!")]),a("div",{staticClass:"log-text"})])}],ot=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"loadEffect",style:{marginTop:t.marginTop?t.marginTop:"50%"}},[a("span",{staticClass:"ld-span"}),a("span",{staticClass:"ld-span"}),a("span",{staticClass:"ld-span"}),a("span",{staticClass:"ld-span"}),a("span",{staticClass:"ld-span"}),a("span",{staticClass:"ld-span"}),a("span",{staticClass:"ld-span"}),a("span",{staticClass:"ld-span"})])},rt=[],st={name:"Loading",props:["marginTop"]},lt=st,ct=(a("fe83"),Object(l["a"])(lt,ot,rt,!1,null,"f92cad2c",null)),dt=ct.exports,ut=a("1c46"),ht=a.n(ut),pt={name:"Login",data:function(){return{isLoging:!1,username:"",password:""}},components:{Loading:dt},created:function(){var t=this;document.onkeydown=function(e){var a=window.event.keyCode;13==a&&t.login()}},methods:{login:function(){""!=this.username&&""!=this.password&&this.toLogin()},toLogin:function(){var t={username:this.username,password:ht.a.createHash("md5").update(this.password,"utf8").digest("hex")},e=this;this.isLoging=!0,this.$axios.get(this.$global.genGb28181Url("/auth/login"),{params:t}).then(function(t){console.log(JSON.stringify(t)),"success"==t.data&&(e.$cookies.set("session",{username:e.username}),e.$router.push("/"))}).catch(function(t){console.log(t)})},setCookie:function(t,e,a){var n=new Date;n.setTime(n.getTime()+24*a*60*60*1e3);var i="expires="+n.toUTCString();console.info(t+"="+e+"; "+i),document.cookie=t+"="+e+"; "+i,console.info(document.cookie)}}},mt=pt,ft=(a("7098"),Object(l["a"])(mt,nt,it,!1,null,"8d2cae02",null)),gt=ft.exports;n["default"].use(y["a"]);var vt=new y["a"]({mode:"hash",routes:[{path:"/",component:z},{path:"/videoList",component:X},{path:"/login",name:"登录",component:gt},{path:"/channelList/:id",name:"channelList",component:at}]}),bt=a("bc3a"),yt=a.n(bt),St=a("2b27"),wt=a.n(St),Ct=a("4eb5"),xt=a.n(Ct);n["default"].config.productionTip=!1,n["default"].use(xt.a),n["default"].use(b.a),n["default"].use(wt.a),n["default"].prototype.$global=g,n["default"].prototype.$axios=yt.a,n["default"].prototype.$cookies.config(1800),new n["default"]({router:vt,render:function(t){return t(d)}}).$mount("#app")},"64a9":function(t,e,a){},"672c":function(t,e,a){"use strict";var n=a("b405"),i=a.n(n);i.a},7098:function(t,e,a){"use strict";var n=a("8e3a"),i=a.n(n);i.a},"75f6":function(t,e,a){"use strict";var n=a("99e7"),i=a.n(n);i.a},"791f":function(t,e,a){"use strict";var n=a("bd5c"),i=a.n(n);i.a},"7d26":function(t,e,a){},"8e3a":function(t,e,a){},"99e7":function(t,e,a){},b405:function(t,e,a){},bd5c:function(t,e,a){},dc86:function(t,e,a){"use strict";var n=a("7d26"),i=a.n(n);i.a},fe83:function(t,e,a){"use strict";var n=a("085b"),i=a.n(n);i.a}});
//# sourceMappingURL=app.d31a42f9.js.map