app.ca95fa7abcffdf14beef.js 341 KB

12
  1. webpackJsonp([1],{"+tSf":function(e,t){},"/EoW":function(e,t){},"/ILR":function(e,t){},0:function(e,t){},1:function(e,t){},"1bqR":function(e,t){e.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},"1zX3":function(e,t){},2:function(e,t){},"2Lcx":function(e,t){},3:function(e,t){},"3r45":function(e,t){},4:function(e,t){},"4X5j":function(e,t){},5:function(e,t){},6:function(e,t){},"6Nk1":function(e,t){},ACeG:function(e,t){},ETCO:function(e,t){},Fcae:function(e,t){},M7sA:function(e,t){e.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},NHnr:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("QV4D"),o=a.n(i),n=a("OksV"),r=a("Fdeo"),s=a.n(r),l=function(e){localStorage.setItem("wvp-user",s()(e))},c=function(){return JSON.parse(localStorage.getItem("wvp-user"))},d=function(){return localStorage.getItem("wvp-token")},u=function(){localStorage.removeItem("wvp-user"),localStorage.removeItem("wvp-token")},m=function(e){localStorage.setItem("wvp-token",e)},h={name:"app",data:function(){return{isLogin:!1,excludeLoginCheck:["/play/wasm","/play/rtc"],userInfo:{nick:null,ulevel:null,uid:null,portrait:null}}},created:function(){if(null==d()){console.log(22222),console.log(this.$route.path);try{if(this.excludeLoginCheck&&this.excludeLoginCheck.length>0)for(var e=0;e<this.excludeLoginCheck.length;e++)if(this.$route.path.startsWith(this.excludeLoginCheck[e]))return}catch(e){console.error(e)}this.$router.push("/login")}},mounted:function(){},methods:{},components:{}},p={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("router-view")],1)},staticRenderFns:[]};var f=a("owSs")(h,p,!1,function(e){a("nB9G")},null,null).exports,g=a("AB6P"),v=a.n(g),b=(a("qG22"),a("lSsp")),y=a("3/xA"),_=a.n(y),w={name:"changePassword",props:{},computed:{},created:function(){},data:function(){var e=this;return{oldPassword:null,newPassword:null,confirmPassword:null,showDialog:!1,isLoging:!1,rules:{oldPassword:[{required:!0,validator:function(e,t,a){""===t?a(new Error("请输入旧密码")):a()},trigger:"blur"}],newPassword:[{required:!0,validator:function(t,a,i){""===a?i(new Error("请输入新密码")):(""!==e.confirmPassword&&e.$refs.passwordForm.validateField("confirmPassword"),i())},trigger:"blur"},{pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,20}$/,message:"密码长度在8-20位之间,由字母+数字+特殊字符组成"}],confirmPassword:[{required:!0,validator:function(t,a,i){""===e.confirmPassword?i(new Error("请再次输入密码")):e.confirmPassword!==e.newPassword?i(new Error("两次输入密码不一致!")):i()},trigger:"blur"}]}}},methods:{openDialog:function(){this.showDialog=!0},onSubmit:function(){var e=this;this.$axios({method:"post",url:"/api/user/changePassword",params:{oldPassword:_.a.createHash("md5").update(this.oldPassword,"utf8").digest("hex"),password:this.newPassword}}).then(function(t){0===t.data.code?(e.$message({showClose:!0,message:"修改成功,请重新登录",type:"success"}),e.showDialog=!1,setTimeout(function(){u(),e.$router.push("/login"),e.sseSource.close()},800)):e.$message({showClose:!0,message:"修改密码失败,是否已登录(接口鉴权关闭无法修改密码)",type:"error"})}).catch(function(e){console.error(e)})},close:function(){this.showDialog=!1,this.oldPassword=null,this.newPassword=null,this.confirmPassword=null}}},S={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"changePassword"}},[a("el-dialog",{attrs:{title:"修改密码",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-right":"20px"},attrs:{id:"shared"}},[a("el-form",{ref:"passwordForm",attrs:{rules:e.rules,"status-icon":"","label-width":"80px"}},[a("el-form-item",{attrs:{label:"旧密码",prop:"oldPassword"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.oldPassword,callback:function(t){e.oldPassword=t},expression:"oldPassword"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"新密码",prop:"newPassword"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.newPassword,callback:function(t){e.newPassword=t},expression:"newPassword"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"确认密码",prop:"confirmPassword"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.confirmPassword,callback:function(t){e.confirmPassword=t},expression:"confirmPassword"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},x=a("owSs")(w,S,!1,null,null,null).exports,C={name:"UiHeader",components:{Notification:g.Notification,changePasswordDialog:x},data:function(){return{alarmNotify:!1,sseSource:null,username:c().username,activeIndex:this.$route.path,editUser:!!c()&&1===c().role.id}},created:function(){console.log(s()(c())),this.$route.path.startsWith("/channelList")&&(this.activeIndex="/deviceList")},mounted:function(){var e=this;window.addEventListener("beforeunload",function(t){return e.beforeunloadHandler(t)}),this.alarmNotify="true"===this.getAlarmSwitchStatus(),setTimeout(function(){e.sseControl()},3e3)},methods:{logout:function(){var e=this;this.$axios({method:"get",url:"/api/user/logout"}).then(function(t){u(),e.$router.push("/login"),null!=e.sseSource&&e.sseSource.close()}).catch(function(e){console.error("登出失败"),console.error(e)})},changePassword:function(){this.$refs.changePasswordDialog.openDialog()},openDoc:function(){console.log(Object({NODE_ENV:"production"}).BASE_API),window.open(Object({NODE_ENV:"production"}).BASE_API?Object({NODE_ENV:"production"}).BASE_API+"/doc.html":"/doc.html")},beforeunloadHandler:function(){this.sseSource.close()},alarmNotifyChange:function(){this.setAlarmSwitchStatus(),this.sseControl()},sseControl:function(){var e=this;this.alarmNotify?(console.log("申请SSE推送API调用,浏览器ID: "+this.$browserId),this.sseSource=new EventSource("/api/emit?browserId="+this.$browserId),this.sseSource.addEventListener("message",function(t){e.$notify({title:"报警信息",dangerouslyUseHTMLString:!0,message:t.data,type:"warning",position:"bottom-right",duration:3e3}),console.log("收到信息:"+t.data)}),this.sseSource.addEventListener("open",function(e){console.log("SSE连接打开.")},!1),this.sseSource.addEventListener("error",function(e){e.target.readyState===EventSource.CLOSED?console.log("SSE连接关闭"):console.log(e.target.readyState)},!1)):null!=this.sseSource&&(this.sseSource.removeEventListener("open",null),this.sseSource.removeEventListener("message",null),this.sseSource.removeEventListener("error",null),this.sseSource.close())},getAlarmSwitchStatus:function(){return null==localStorage.getItem("alarmSwitchStatus")&&localStorage.setItem("alarmSwitchStatus",!1),localStorage.getItem("alarmSwitchStatus")},setAlarmSwitchStatus:function(){localStorage.setItem("alarmSwitchStatus",this.alarmNotify)}},destroyed:function(){var e=this;window.removeEventListener("beforeunload",function(t){return e.beforeunloadHandler(t)}),null!=this.sseSource&&(this.sseSource.removeEventListener("open",null),this.sseSource.removeEventListener("message",null),this.sseSource.removeEventListener("error",null),this.sseSource.close())}},k={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"UiHeader"}},[a("el-menu",{attrs:{"default-active":e.activeIndex,"active-text-color":"#1890ff","background-color":"#001529","menu-trigger":"click",mode:"horizontal",router:"","text-color":"#fff"}},[a("el-menu-item",{attrs:{index:"/map"}},[e._v("城市一览")]),e._v(" "),a("el-menu-item",{attrs:{index:"/live"}},[e._v("视频监控")]),e._v(" "),a("el-menu-item",{attrs:{index:"/cloudRecord"}},[e._v("录像回放")]),e._v(" "),a("el-submenu",{attrs:{index:"1"},scopedSlots:e._u([{key:"title",fn:function(){return[e._v("设备一览")]},proxy:!0}])},[e._v(" "),a("el-menu-item",{attrs:{index:"/deviceList"}},[e._v("监控设备")]),e._v(" "),a("el-menu-item",{attrs:{index:"/weatherList"}},[e._v("气象设备")])],1),e._v(" "),a("el-menu-item",{attrs:{index:"/alarmInfo"}},[e._v("报警信息")]),e._v(" "),e.editUser?a("el-menu-item",{attrs:{index:"/userManager"}},[e._v("用户管理")]):e._e(),e._v(" "),a("el-menu-item",{attrs:{index:"/setting"}},[e._v("系统设置")]),e._v(" "),a("el-submenu",{staticStyle:{float:"right"},attrs:{index:"2"},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.username))]},proxy:!0}])},[e._v(" "),a("el-menu-item",{attrs:{index:"/console"}},[e._v("平台运行状态")]),e._v(" "),a("el-menu-item",[a("el-switch",{attrs:{"inactive-text":"报警信息推送"},on:{change:e.alarmNotifyChange},model:{value:e.alarmNotify,callback:function(t){e.alarmNotify=t},expression:"alarmNotify"}})],1),e._v(" "),a("el-menu-item",{on:{click:e.changePassword}},[e._v("修改密码")]),e._v(" "),a("el-menu-item",{on:{click:e.logout}},[e._v("注销")])],1)],1),e._v(" "),a("changePasswordDialog",{ref:"changePasswordDialog"})],1)},staticRenderFns:[]};var I=a("owSs")(C,k,!1,function(e){a("qXmQ")},null,null).exports,P={name:"index",components:{uiHeader:I}},D={render:function(){var e=this.$createElement,t=this._self._c||e;return t("el-container",{staticStyle:{height:"100%"}},[t("el-header",[t("ui-header")],1),this._v(" "),t("el-main",[t("el-container",[t("transition",{attrs:{name:"fade"}},[t("router-view")],1)],1)],1)],1)},staticRenderFns:[]};var $=a("owSs")(P,D,!1,function(e){a("oOUD"),a("Wndm")},"data-v-3378d9aa",null).exports,L=a("y9KL"),T=a.n(L),F={name:"consoleCPU",data:function(){return{chartData:{columns:["time","data"],rows:[]},extend:{title:{show:!0,text:"CPU",left:"center",top:20},grid:{show:!0,right:"30px",containLabel:!0},xAxis:{time:"time",max:"dataMax",boundaryGap:["20%","20%"],axisLabel:{formatter:function(e){return T()(e).format("HH:mm:ss")},showMaxLabel:!0}},yAxis:{type:"value",min:0,max:1,splitNumber:6,position:"left",silent:!0,axisLabel:{formatter:function(e){return 100*e+"%"}}},tooltip:{trigger:"axis",formatter:function(e){return console.log(e),T()(e[0].data[0]).format("HH:mm:ss")+"</br> "+e[0].marker+"使用:"+(100*e[0].data[1]).toFixed(2)+"%"}},series:{itemStyle:{color:"#409EFF"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#50a3f8"},{offset:1,color:"#69b0fa"}],global:!1}}}}}},created:function(){},mounted:function(){var e=this;this.$nextTick(function(t){setTimeout(function(){e.$refs.consoleCPU.echarts.resize()},100)})},destroyed:function(){},methods:{setData:function(e){this.chartData.rows=e}}},E={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{width:"100%",height:"100%",background:"#FFFFFF","text-align":"center"},attrs:{id:"consoleCPU"}},[t("ve-line",{ref:"consoleCPU",attrs:{data:this.chartData,extend:this.extend,width:"100%",height:"100%","legend-visible":!1}})],1)},staticRenderFns:[]},R=a("owSs")(F,E,!1,null,null,null).exports,z={name:"ConsoleMEM",data:function(){return{chartData:{columns:["time","data"],rows:[]},extend:{title:{show:!0,text:"内存",left:"center",top:20},grid:{show:!0,right:"30px",containLabel:!0},xAxis:{time:"time",max:"dataMax",boundaryGap:["20%","20%"],axisLabel:{formatter:function(e){return T()(e).format("HH:mm:ss")},showMaxLabel:!0}},yAxis:{type:"value",min:0,max:1,splitNumber:6,position:"left",silent:!0,axisLabel:{formatter:function(e){return 100*e+"%"}}},tooltip:{trigger:"axis",formatter:function(e){return console.log(e),T()(e[0].data[0]).format("HH:mm:ss")+"</br>"+e[0].marker+" 使用:"+(100*e[0].data[1]).toFixed(2)+"%"}},series:{itemStyle:{color:"#409EFF"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#50a3f8"},{offset:1,color:"#69b0fa"}],global:!1}}}}}},mounted:function(){var e=this;this.$nextTick(function(t){setTimeout(function(){e.$refs.ConsoleMEM.echarts.resize()},100)})},destroyed:function(){},methods:{setData:function(e){this.chartData.rows=e}}},A={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{width:"100%",height:"100%",background:"#FFFFFF","text-align":"center"},attrs:{id:"ConsoleMEM"}},[t("ve-line",{ref:"ConsoleMEM",attrs:{data:this.chartData,extend:this.extend,width:"100%",height:"100%","legend-visible":!1}})],1)},staticRenderFns:[]},M=a("owSs")(z,A,!1,null,null,null).exports,U={name:"ConsoleNet",data:function(){return{chartData:{columns:["time","out","in"],rows:[]},chartSettings:{area:!0,labelMap:{in:"下载",out:"上传"}},extend:{title:{show:!0,text:"网络",left:"center",top:20},grid:{show:!0,right:"30px",containLabel:!0},xAxis:{time:"time",max:"dataMax",boundaryGap:["20%","20%"],axisLabel:{formatter:function(e){return T()(e).format("HH:mm:ss")},showMaxLabel:!0}},yAxis:{type:"value",min:0,max:1e3,splitNumber:6,position:"left",silent:!0},tooltip:{trigger:"axis",formatter:function(e){return e[1].marker+"下载:"+parseFloat(e[1].data[1]).toFixed(2)+"Mbps</br> "+e[0].marker+" 上传:"+parseFloat(e[0].data[1]).toFixed(2)+"Mbps"}},legend:{left:"center",bottom:"15px"}}}},mounted:function(){var e=this;this.$nextTick(function(t){setTimeout(function(){e.$refs.ConsoleNet.echarts.resize()},100)})},destroyed:function(){},methods:{setData:function(e,t){this.chartData.rows=e,this.extend.yAxis.max=t}}},j={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{width:"100%",height:"100%",background:"#FFFFFF","text-align":"center"},attrs:{id:"ConsoleNet"}},[t("ve-line",{ref:"ConsoleNet",attrs:{data:this.chartData,extend:this.extend,settings:this.chartSettings,width:"100%",height:"100%"}})],1)},staticRenderFns:[]},N=a("owSs")(U,j,!1,null,null,null).exports,B={name:"ConsoleNodeLoad",data:function(){return{chartData:{columns:["id","push","proxy","gbReceive","gbSend"],rows:[]},chartSettings:{labelMap:{push:"直播推流",proxy:"拉流代理",gbReceive:"国标收流",gbSend:"国标推流"}},extend:{title:{show:!0,text:"节点负载",left:"center",top:20},legend:{left:"center",bottom:"15px"},label:{show:!0,position:"top"}}}},mounted:function(){var e=this;this.$nextTick(function(t){setTimeout(function(){e.$refs.consoleNodeLoad.echarts.resize()},100)})},destroyed:function(){},methods:{setData:function(e){this.chartData.rows=e}}},H={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{width:"100%",height:"100%",background:"#FFFFFF","text-align":"center"},attrs:{id:"ConsoleNodeLoad"}},[t("ve-histogram",{ref:"consoleNodeLoad",attrs:{data:this.chartData,extend:this.extend,settings:this.chartSettings,width:"100%",height:"100%","legend-visible":!0}})],1)},staticRenderFns:[]},O=a("owSs")(B,H,!1,null,null,null).exports,q={name:"ConsoleNet",data:function(){return{chartData:{columns:["path","free","use"],rows:[]},chartSettings:{stack:{xxx:["free","use"]},labelMap:{free:"剩余",use:"已使用"}},extend:{title:{show:!0,text:"磁盘",left:"center",top:20},grid:{show:!0,right:"30px",containLabel:!0},series:{barWidth:30},legend:{left:"center",bottom:"15px"},tooltip:{trigger:"axis",formatter:function(e){console.log(e);for(var t="",a=0;a<e.length;a++)t+=e[a].marker+e[a].seriesName+":"+e[a].value.toFixed(2)+"GB",a<e.length-1&&(t+="</br>");return t}}}}},mounted:function(){var e=this;this.$nextTick(function(t){setTimeout(function(){e.$refs.ConsoleNet.echarts.resize()},100)})},destroyed:function(){},methods:{setData:function(e){this.chartData.rows=e}}},G={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{width:"100%",height:"100%",background:"#FFFFFF","text-align":"center"},attrs:{id:"ConsoleNet"}},[t("ve-bar",{ref:"ConsoleNet",attrs:{data:this.chartData,extend:this.extend,settings:this.chartSettings,width:"100%",height:"100%"}})],1)},staticRenderFns:[]},K=a("owSs")(q,G,!1,null,null,null).exports,W={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%",height:"100%",background:"#FFFFFF","text-align":"center"},attrs:{id:"consoleResource"}},[a("div",{staticStyle:{width:"50%",height:"50%",float:"left"}},[e.deviceInfo.total>0?a("el-progress",{staticStyle:{"margin-top":"20px","font-size":"18px"},attrs:{width:100,"stroke-width":8,type:"circle",percentage:Math.floor(e.deviceInfo.online/e.deviceInfo.total*100)}}):e._e(),e._v(" "),0===e.deviceInfo.total?a("el-progress",{staticStyle:{"margin-top":"20px","font-size":"18px"},attrs:{width:100,"stroke-width":8,type:"circle",percentage:0}}):e._e(),e._v(" "),a("div",{staticClass:"resourceInfo"},[e._v("\n 设备总数:"+e._s(e.deviceInfo.total)),a("br"),e._v("\n 在线数:"+e._s(e.deviceInfo.online)+"\n ")])],1),e._v(" "),a("div",{staticStyle:{width:"50%",height:"50%",float:"left"}},[e.channelInfo.total>0?a("el-progress",{staticStyle:{"margin-top":"20px"},attrs:{width:100,"stroke-width":10,type:"circle",percentage:Math.floor(e.channelInfo.online/e.channelInfo.total*100)}}):e._e(),e._v(" "),0===e.channelInfo.total?a("el-progress",{staticStyle:{"margin-top":"20px"},attrs:{width:100,"stroke-width":10,type:"circle",percentage:0}}):e._e(),e._v(" "),a("div",{staticClass:"resourceInfo"},[e._v("\n 通道总数:"+e._s(e.channelInfo.total)),a("br"),e._v("\n 在线数:"+e._s(e.channelInfo.online)+"\n ")])],1),e._v(" "),a("div",{staticStyle:{width:"50%",height:"50%",float:"left"}},[e.pushInfo.total>0?a("el-progress",{staticStyle:{"margin-top":"20px"},attrs:{width:100,"stroke-width":10,type:"circle",percentage:Math.floor(e.pushInfo.online/e.pushInfo.total*100)}}):e._e(),e._v(" "),0===e.pushInfo.total?a("el-progress",{staticStyle:{"margin-top":"20px"},attrs:{width:100,"stroke-width":10,type:"circle",percentage:0}}):e._e(),e._v(" "),a("div",{staticClass:"resourceInfo"},[e._v("\n 推流总数:"+e._s(e.pushInfo.total)),a("br"),e._v("\n 在线数:"+e._s(e.pushInfo.online)+"\n ")])],1),e._v(" "),a("div",{staticStyle:{width:"50%",height:"50%",float:"left"}},[e.proxyInfo.total>0?a("el-progress",{staticStyle:{"margin-top":"20px"},attrs:{width:100,"stroke-width":10,type:"circle",percentage:Math.floor(e.proxyInfo.online/e.proxyInfo.total*100)}}):e._e(),e._v(" "),0===e.proxyInfo.total?a("el-progress",{staticStyle:{"margin-top":"20px"},attrs:{width:100,"stroke-width":10,type:"circle",percentage:0}}):e._e(),e._v(" "),a("div",{staticClass:"resourceInfo"},[e._v("\n 拉流代理总数:"+e._s(e.proxyInfo.total)),a("br"),e._v("\n 在线数:"+e._s(e.proxyInfo.online)+"\n ")])],1)])},staticRenderFns:[]};var V=a("owSs")({name:"consoleResource",data:function(){return{deviceInfo:{total:0,online:0},channelInfo:{total:0,online:0},pushInfo:{total:0,online:0},proxyInfo:{total:0,online:0}}},created:function(){},mounted:function(){},destroyed:function(){},methods:{setData:function(e){this.deviceInfo=e.device,this.channelInfo=e.channel,this.pushInfo=e.push,this.proxyInfo=e.proxy}}},W,!1,function(e){a("kfsN")},null,null).exports,Y={name:"configInfo",props:{},computed:{},created:function(){},data:function(){return{showDialog:!1,configInfoData:{sip:{}}}},methods:{openDialog:function(e){console.log(e),this.showDialog=!0,this.configInfoData=e},close:function(){this.showDialog=!1}}},J={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"configInfo"}},[a("el-dialog",{attrs:{title:"关于智慧城市云服务平台",width:"=80%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{attrs:{id:"shared"}},[e.configInfoData.sip?a("el-descriptions",{attrs:{title:"国标服务信息",span:2}},[a("el-descriptions-item",{attrs:{label:"编号"}},[e._v(e._s(e.configInfoData.sip.id))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"域"}},[e._v(e._s(e.configInfoData.sip.domain))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"IP"}},[e._v(e._s(e.configInfoData.sip.showIp))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"端口"}},[e._v(e._s(e.configInfoData.sip.port))])],1):e._e(),e._v(" "),a("el-descriptions",{attrs:{title:"平台信息"}},[a("el-descriptions-item",{attrs:{label:"研制"}},[e._v("北京理工大学、北京云智天下科技发展有限公司联合研制")]),e._v(" "),a("el-descriptions-item",{attrs:{label:"版本"}},[e._v("1.1")]),e._v(" "),a("el-descriptions-item",{attrs:{label:"时间"}},[e._v("2024年6月30日")])],1)],1)])],1)},staticRenderFns:[]},Z=a("owSs")(Y,J,!1,null,null,null).exports,X=a("w1Es"),Q={name:"app",components:{echarts:a.n(X).a,uiHeader:I,consoleCPU:R,consoleMem:M,consoleNet:N,consoleNodeLoad:O,consoleDisk:K,consoleResource:V,configInfo:Z},data:function(){return{timer:null}},created:function(){this.getSystemInfo(),this.getLoad(),this.getResourceInfo(),this.loopForSystemInfo()},destroyed:function(){},methods:{loopForSystemInfo:function(){var e=this;null!=this.timer&&window.clearTimeout(this.timer),this.timer=setTimeout(function(){"/console"===e.$route.path&&(e.getSystemInfo(),e.getLoad(),e.timer=null,e.loopForSystemInfo(),e.getResourceInfo())},2e3)},getSystemInfo:function(){var e=this;this.$axios({method:"get",url:"/api/server/system/info"}).then(function(t){0===t.data.code&&(e.$refs.consoleCPU.setData(t.data.data.cpu),e.$refs.consoleMem.setData(t.data.data.mem),e.$refs.consoleNet.setData(t.data.data.net,t.data.data.netTotal),e.$refs.consoleDisk.setData(t.data.data.disk))}).catch(function(e){})},getLoad:function(){var e=this;this.$axios({method:"get",url:"/api/server/media_server/load"}).then(function(t){0===t.data.code&&e.$refs.consoleNodeLoad.setData(t.data.data)}).catch(function(e){})},getResourceInfo:function(){var e=this;this.$axios({method:"get",url:"/api/server/resource/info"}).then(function(t){0===t.data.code&&e.$refs.consoleResource.setData(t.data.data)}).catch(function(e){})},showInfo:function(){var e=this;this.$axios({method:"get",url:"/api/server/system/configInfo"}).then(function(t){0===t.data.code&&e.$refs.configInfo.openDialog(t.data.data)}).catch(function(e){})}}},ee={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"app"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[e._v("智慧城市云服务平台")]),e._v(" "),a("div",{staticClass:"page-header-btn"},[a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-info",size:"mini",type:"primary"},on:{click:e.showInfo}},[e._v("平台信息\n ")])],1)]),e._v(" "),a("el-row",{staticStyle:{width:"100%"}},[a("el-col",{attrs:{lg:{span:8},md:{span:12},sm:{span:12},xl:{span:8},xs:{span:24}}},[a("div",{staticClass:"control-cell",attrs:{id:"ThreadsLoad"}},[a("div",{staticStyle:{width:"100%",height:"100%"}},[a("consoleCPU",{ref:"consoleCPU"})],1)])]),e._v(" "),a("el-col",{attrs:{lg:{span:8},md:{span:12},sm:{span:12},xl:{span:8},xs:{span:24}}},[a("div",{staticClass:"control-cell",attrs:{id:"WorkThreadsLoad"}},[a("div",{staticStyle:{width:"100%",height:"100%"}},[a("consoleResource",{ref:"consoleResource"})],1)])]),e._v(" "),a("el-col",{attrs:{lg:{span:8},md:{span:12},sm:{span:12},xl:{span:8},xs:{span:24}}},[a("div",{staticClass:"control-cell",attrs:{id:"WorkThreadsLoad"}},[a("div",{staticStyle:{width:"100%",height:"100%"}},[a("consoleNet",{ref:"consoleNet"})],1)])]),e._v(" "),a("el-col",{attrs:{lg:{span:8},md:{span:12},sm:{span:12},xl:{span:8},xs:{span:24}}},[a("div",{staticClass:"control-cell",attrs:{id:"WorkThreadsLoad"}},[a("div",{staticStyle:{width:"100%",height:"100%"}},[a("consoleMem",{ref:"consoleMem"})],1)])]),e._v(" "),a("el-col",{attrs:{lg:{span:8},md:{span:12},sm:{span:12},xl:{span:8},xs:{span:24}}},[a("div",{staticClass:"control-cell",attrs:{id:"WorkThreadsLoad"}},[a("div",{staticStyle:{width:"100%",height:"100%"}},[a("consoleNodeLoad",{ref:"consoleNodeLoad"})],1)])]),e._v(" "),a("el-col",{attrs:{lg:{span:8},md:{span:12},sm:{span:12},xl:{span:8},xs:{span:24}}},[a("div",{staticClass:"control-cell",attrs:{id:"WorkThreadsLoad"}},[a("div",{staticStyle:{width:"100%",height:"100%"}},[a("consoleDisk",{ref:"consoleDisk"})],1)])])],1),e._v(" "),a("configInfo",{ref:"configInfo"})],1)},staticRenderFns:[]};var te=a("owSs")(Q,ee,!1,function(e){a("hwMg")},null,null).exports,ae=a("Rae6"),ie=a.n(ae),oe=a("JCRo"),ne=a.n(oe),re=a("gLwi"),se=a.n(re),le=a("7SzJ"),ce=a.n(le),de=a("F1Uw"),ue=a.n(de),me=a("M6hd"),he=a.n(me),pe=function(){function e(){ce()(this,e),this.$axios=he.a}return ue()(e,[{key:"getOnlineMediaServerList",value:function(e){this.$axios({method:"get",url:"/api/server/media_server/online/list"}).then(function(t){"function"==typeof e&&e(t.data)}).catch(function(e){console.log(e)})}},{key:"getMediaServerList",value:function(e){this.$axios({method:"get",url:"/api/server/media_server/list"}).then(function(t){"function"==typeof e&&e(t.data)}).catch(function(e){console.log(e)})}},{key:"getMediaServer",value:function(e,t){this.$axios({method:"get",url:"/api/server/media_server/one/"+e}).then(function(e){"function"==typeof t&&t(e.data)}).catch(function(e){console.log(e)})}},{key:"checkServer",value:function(e,t){this.$axios({method:"get",url:"/api/server/media_server/check",params:{ip:e.ip,port:e.httpPort,secret:e.secret,type:e.type}}).then(function(e){"function"==typeof t&&t(e.data)}).catch(function(e){console.log(e)})}},{key:"checkRecordServer",value:function(e,t){this.$axios({method:"get",url:"/api/server/media_server/record/check",params:{ip:e.ip,port:e.recordAssistPort}}).then(function(e){"function"==typeof t&&t(e.data)}).catch(function(e){console.log(e)})}},{key:"addServer",value:function(e,t){this.$axios({method:"post",url:"/api/server/media_server/save",data:e}).then(function(e){"function"==typeof t&&t(e.data)}).catch(function(e){console.log(e)})}},{key:"delete",value:function(e,t){this.$axios({method:"delete",url:"/api/server/media_server/delete",params:{id:e}}).then(function(e){"function"==typeof t&&t(e.data)}).catch(function(e){console.log(e)})}}]),e}(),fe={name:"deviceEdit",props:{},computed:{},created:function(){},data:function(){return{listChangeCallback:null,showDialog:!1,isLoging:!1,hostNames:[],mediaServerList:[],mediaServerObj:new pe,form:{},isEdit:!1,rules:{deviceId:[{required:!0,message:"请输入设备编号",trigger:"blur"}]}}},methods:{openDialog:function(e,t){console.log(e),this.showDialog=!0,this.isEdit=!1,e&&(this.isEdit=!0),this.form={},this.listChangeCallback=t,null!=e&&(this.form=e),this.getMediaServerList()},getMediaServerList:function(){var e=this;e.mediaServerObj.getOnlineMediaServerList(function(t){e.mediaServerList=t.data})},onSubmit:function(){var e=this;console.log("onSubmit"),console.log(this.form),this.form.subscribeCycleForCatalog=this.form.subscribeCycleForCatalog||0,this.form.subscribeCycleForMobilePosition=this.form.subscribeCycleForMobilePosition||0,this.form.mobilePositionSubmissionInterval=this.form.mobilePositionSubmissionInterval||0,0===this.form.mobilePositionSubmissionInterval&&(this.form.mobilePositionSubmissionInterval=5),this.$axios({method:"post",url:"/api/device/query/device/"+(this.isEdit?"update":"add")+"/",params:this.form}).then(function(t){console.log(t.data),0===t.data.code?e.listChangeCallback():e.$message({showClose:!0,message:t.data.msg,type:"error"})}).catch(function(e){console.log(e)})},close:function(){this.showDialog=!1,this.$refs.form.resetFields()}}},ge={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"deviceEdit"}},[a("el-dialog",{attrs:{title:"设备编辑",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-top":"1rem","margin-right":"100px"},attrs:{id:"shared"}},[a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"200px"}},[a("el-form-item",{attrs:{label:"设备编号",prop:"deviceId"}},[e.isEdit?a("el-input",{attrs:{disabled:""},model:{value:e.form.deviceId,callback:function(t){e.$set(e.form,"deviceId",t)},expression:"form.deviceId"}}):e._e(),e._v(" "),e.isEdit?e._e():a("el-input",{attrs:{clearable:""},model:{value:e.form.deviceId,callback:function(t){e.$set(e.form,"deviceId",t)},expression:"form.deviceId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"设备名称",prop:"name"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"密码",prop:"password"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"收流IP",prop:"sdpIp"}},[a("el-input",{attrs:{type:"sdpIp",clearable:""},model:{value:e.form.sdpIp,callback:function(t){e.$set(e.form,"sdpIp",t)},expression:"form.sdpIp"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"流媒体ID",prop:"mediaServerId"}},[a("el-select",{staticStyle:{float:"left",width:"100%"},model:{value:e.form.mediaServerId,callback:function(t){e.$set(e.form,"mediaServerId",t)},expression:"form.mediaServerId"}},[a("el-option",{key:"auto",attrs:{label:"自动负载最小",value:"auto"}}),e._v(" "),e._l(e.mediaServerList,function(e){return a("el-option",{key:e.id,attrs:{label:e.id,value:e.id}})})],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"字符集",prop:"charset"}},[a("el-select",{staticStyle:{float:"left",width:"100%"},model:{value:e.form.charset,callback:function(t){e.$set(e.form,"charset",t)},expression:"form.charset"}},[a("el-option",{key:"GB2312",attrs:{label:"GB2312",value:"gb2312"}}),e._v(" "),a("el-option",{key:"UTF-8",attrs:{label:"UTF-8",value:"utf-8"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"语音发送通道",prop:"name"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.audioChannelForReceive,callback:function(t){e.$set(e.form,"audioChannelForReceive",t)},expression:"form.audioChannelForReceive"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"地理坐标系",prop:"geoCoordSys"}},[a("el-select",{staticStyle:{float:"left",width:"100%"},model:{value:e.form.geoCoordSys,callback:function(t){e.$set(e.form,"geoCoordSys",t)},expression:"form.geoCoordSys"}},[a("el-option",{key:"WGS84",attrs:{label:"WGS84",value:"WGS84"}}),e._v(" "),a("el-option",{key:"GCJ02",attrs:{label:"GCJ02",value:"GCJ02"}})],1)],1),e._v(" "),this.isEdit?a("el-form-item",{attrs:{label:"目录订阅",title:"0为取消订阅",prop:"subscribeCycleForCatalog"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.subscribeCycleForCatalog,callback:function(t){e.$set(e.form,"subscribeCycleForCatalog",t)},expression:"form.subscribeCycleForCatalog"}})],1):e._e(),e._v(" "),this.isEdit?a("el-form-item",{attrs:{label:"移动位置订阅",title:"0为取消订阅",prop:"subscribeCycleForCatalog"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.subscribeCycleForMobilePosition,callback:function(t){e.$set(e.form,"subscribeCycleForMobilePosition",t)},expression:"form.subscribeCycleForMobilePosition"}})],1):e._e(),e._v(" "),e.form.subscribeCycleForMobilePosition>0?a("el-form-item",{attrs:{label:"移动位置报送间隔",prop:"subscribeCycleForCatalog"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.mobilePositionSubmissionInterval,callback:function(t){e.$set(e.form,"mobilePositionSubmissionInterval",t)},expression:"form.mobilePositionSubmissionInterval"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"其他选项"}},[a("el-checkbox",{staticStyle:{float:"left"},attrs:{label:"SSRC校验"},model:{value:e.form.ssrcCheck,callback:function(t){e.$set(e.form,"ssrcCheck",t)},expression:"form.ssrcCheck"}}),e._v(" "),a("el-checkbox",{staticStyle:{float:"left"},attrs:{label:"作为消息通道"},model:{value:e.form.asMessageChannel,callback:function(t){e.$set(e.form,"asMessageChannel",t)},expression:"form.asMessageChannel"}}),e._v(" "),a("el-checkbox",{staticStyle:{float:"left"},attrs:{label:"收到ACK后发流"},model:{value:e.form.broadcastPushAfterAck,callback:function(t){e.$set(e.form,"broadcastPushAfterAck",t)},expression:"form.broadcastPushAfterAck"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确认")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},ve=a("owSs")(fe,ge,!1,null,null,null).exports,be={name:"SyncChannelProgress",computed:{},props:["platformId"],created:function(){},data:function(){return{syncStatus:null,percentage:0,total:0,current:0,showDialog:!1,isLoging:!1,syncFlag:!1,deviceId:null,timmer:null,msg:"正在同步"}},methods:{openDialog:function(e){console.log("deviceId: "+e),this.deviceId=e,this.showDialog=!0,this.msg="",this.percentage=0,this.total=0,this.current=0,this.syncFlag=!1,this.syncStatus=null,this.getProgress()},getProgress:function(){var e=this;this.$axios({method:"get",url:"/api/device/query/"+this.deviceId+"/sync_status/"}).then(function(t){0===t.data.code?(e.syncFlag||(e.syncFlag=!0),null!=t.data.data&&(t.data.data.syncIng?0==t.data.data.total?(e.msg="等待同步中",e.timmer=setTimeout(e.getProgress,300)):(e.total=t.data.data.total,e.current=t.data.data.current,e.percentage=Math.floor(Number(t.data.data.current)/Number(t.data.data.total)*1e4)/100,e.msg="同步中...["+t.data.data.current+"/"+t.data.data.total+"]",e.timmer=setTimeout(e.getProgress,300)):t.data.data.errorMsg?(e.msg=t.data.data.errorMsg,e.syncStatus="exception"):(e.syncStatus="success",e.percentage=100,e.msg="同步成功",setTimeout(function(){e.showDialog=!1},3e3)))):e.syncFlag?(e.syncStatus="success",e.percentage=100,e.msg="同步成功"):(e.syncStatus="error",e.msg=t.data.msg)}).catch(function(t){console.log(t),e.syncStatus="error",e.msg=t.response.data.msg})},close:function(){window.clearTimeout(this.timmer)}}},ye={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"SyncChannelProgress"}},[a("el-dialog",{staticStyle:{"text-align":"center"},attrs:{width:"240px",top:"13%","append-to-body":!0,"close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0,"show-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("el-progress",{attrs:{type:"circle",percentage:e.percentage,status:e.syncStatus}}),e._v(" "),a("div",{staticStyle:{"text-align":"center"}},[e._v("\n "+e._s(e.msg)+"\n ")])],1)],1)},staticRenderFns:[]},_e=a("owSs")(be,ye,!1,null,null,null).exports,we={name:"app",components:{uiHeader:I,deviceEdit:ve,syncChannelProgress:_e},data:function(){return{deviceList:[],currentDevice:{},category:1,videoComponentList:[],updateLooper:0,currentDeviceChannelsLenth:0,winHeight:window.innerHeight-200,currentPage:1,count:15,total:0,getDeviceListLoading:!1}},computed:{getcurrentDeviceChannels:function(){var e=this.currentDevice.channelMap,t=null;return e&&(t=se()(e).map(function(t){return e[t]}),this.currentDeviceChannelsLenth=t.length),t}},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(e){this.currentPage=e,this.getDeviceList()},handleSizeChange:function(e){this.count=e,this.getDeviceList()},getDeviceList:function(){var e=this;this.getDeviceListLoading=!0,this.$axios({method:"get",url:"/api/device/query/devices",params:{page:this.currentPage,count:this.count,category:this.category}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.deviceList=t.data.data.list),e.getDeviceListLoading=!1}).catch(function(t){console.error(t),e.getDeviceListLoading=!1})},deleteDevice:function(e){var t=this,a="确定删除此设备?";0!==e.online&&(a="在线设备删除后仍可通过注册再次上线。<br/>如需彻底删除请先将设备离线。<br/><strong>确定删除此设备?</strong>"),this.$confirm(a,"提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",center:!0,type:"warning"}).then(function(){t.$axios({method:"delete",url:"/api/device/query/devices/"+e.deviceId+"/delete"}).then(function(e){t.getDeviceList()}).catch(function(e){console.error(e)})}).catch(function(){})},showChannelList:function(e){this.$router.push("/channelList/"+e.deviceId+"/0")},showDevicePosition:function(e){this.$router.push("/map?deviceId="+e.deviceId)},refDevice:function(e){var t=this;console.log("刷新对应设备:"+e.deviceId);var a=this;this.$axios({method:"get",url:"/api/device/query/devices/"+e.deviceId+"/sync"}).then(function(i){console.log("刷新设备结果:"+s()(i)),0!==i.data.code?a.$message({showClose:!0,message:i.data.msg,type:"error"}):t.$refs.syncChannelProgress.openDialog(e.deviceId),a.initData()}).catch(function(e){console.error(e),a.$message({showClose:!0,message:e,type:"error"})})},getTooltipContent:function(){var e=ne()(ie.a.mark(function e(t){var a;return ie.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a="",e.next=3,this.$axios({method:"get",async:!1,url:"/api/device/query/"+t+"/sync_status/"}).then(function(e){0==e.data.code&&(a=null!==e.data.data.errorMsg?e.data.data.errorMsg:null!==e.data.msg?e.data.msg:"同步中...["+e.data.data.current+"/"+e.data.data.total+"]")});case 3:return e.abrupt("return",a);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),transportChange:function(e){console.log("修改传输方式为 "+e.streamMode+":"+e.deviceId+" ");this.$axios({method:"post",url:"/api/device/query/transport/"+e.deviceId+"/"+e.streamMode}).then(function(e){}).catch(function(e){})},edit:function(e){var t=this;this.$refs.deviceEdit.openDialog(e,function(){t.$refs.deviceEdit.close(),t.$message({showClose:!0,message:"设备修改成功,通道字符集将在下次更新生效",type:"success"}),setTimeout(t.getDeviceList,200)})},add:function(){var e=this;this.$refs.deviceEdit.openDialog(null,function(){e.$refs.deviceEdit.close(),e.$message({showClose:!0,message:"添加成功",type:"success"}),setTimeout(e.getDeviceList,200)})}}},Se={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"app"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[e._v("监控设备列表")]),e._v(" "),a("div",{staticClass:"page-header-btn"},[a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.add}},[e._v("添加设备\n ")]),e._v(" "),a("el-button",{attrs:{loading:e.getDeviceListLoading,circle:"",icon:"el-icon-refresh-right",size:"mini"},on:{click:function(t){return e.getDeviceList()}}})],1)]),e._v(" "),a("el-table",{staticStyle:{width:"100%","font-size":"12px"},attrs:{data:e.deviceList,height:e.winHeight,"header-row-class-name":"table-header"}},[a("el-table-column",{attrs:{label:"名称","min-width":"160",prop:"name"}}),e._v(" "),a("el-table-column",{attrs:{label:"设备编号","min-width":"200",prop:"deviceId"}}),e._v(" "),a("el-table-column",{attrs:{label:"地址","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.hostAddress?a("el-tag",{attrs:{size:"medium"}},[e._v(e._s(t.row.hostAddress))]):e._e(),e._v(" "),t.row.hostAddress?e._e():a("el-tag",{attrs:{size:"medium"}},[e._v("未知")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"厂家","min-width":"120",prop:"manufacturer"}}),e._v(" "),a("el-table-column",{attrs:{label:"信令传输模式","min-width":"120",prop:"transport"}}),e._v(" "),a("el-table-column",{attrs:{label:"流传输模式","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"请选择",size:"mini"},on:{change:function(a){return e.transportChange(t.row)}},model:{value:t.row.streamMode,callback:function(a){e.$set(t.row,"streamMode",a)},expression:"scope.row.streamMode"}},[a("el-option",{key:"UDP",attrs:{label:"UDP",value:"UDP"}}),e._v(" "),a("el-option",{key:"TCP-ACTIVE",attrs:{label:"TCP主动模式",value:"TCP-ACTIVE"}}),e._v(" "),a("el-option",{key:"TCP-PASSIVE",attrs:{label:"TCP被动模式",value:"TCP-PASSIVE"}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"通道数","min-width":"120",prop:"channelCount"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.onLine?a("el-tag",{attrs:{size:"medium"}},[e._v("在线")]):e._e(),e._v(" "),t.row.onLine?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("离线")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"最近心跳","min-width":"160",prop:"keepaliveTime"}}),e._v(" "),a("el-table-column",{attrs:{label:"最近注册","min-width":"160",prop:"registerTime"}}),e._v(" "),a("el-table-column",{attrs:{fixed:"right",label:"操作","min-width":"450"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{icon:"el-icon-refresh",size:"medium",type:"text",disabled:0==t.row.online},on:{click:function(a){return e.refDevice(t.row)},mouseover:function(a){return e.getTooltipContent(t.row.deviceId)}}},[e._v("刷新\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{icon:"el-icon-video-camera",size:"medium",type:"text"},on:{click:function(a){return e.showChannelList(t.row)}}},[e._v("通道\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{icon:"el-icon-location",size:"medium",type:"text"},on:{click:function(a){return e.showDevicePosition(t.row)}}},[e._v("定位\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{icon:"el-icon-edit",size:"medium",type:"text"},on:{click:function(a){return e.edit(t.row)}}},[e._v("编辑")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{staticStyle:{color:"#f56c6c"},attrs:{icon:"el-icon-delete",size:"medium",type:"text"},on:{click:function(a){return e.deleteDevice(t.row)}}},[e._v("删除\n ")])]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],total:e.total,layout:"total, sizes, prev, pager, next"},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}}),e._v(" "),a("deviceEdit",{ref:"deviceEdit"}),e._v(" "),a("syncChannelProgress",{ref:"syncChannelProgress"})],1)},staticRenderFns:[]};var xe=a("owSs")(we,Se,!1,function(e){a("TcMi")},null,null).exports,Ce=null,ke={name:"rtcPlayer",data:function(){return{timer:null}},props:["videoUrl","error","hasaudio"],mounted:function(){var e=this,t=decodeURIComponent(this.$route.params.url);this.$nextTick(function(){void 0===e.videoUrl&&(e.videoUrl=t),console.log("初始化时的地址为: "+e.videoUrl),e.play(e.videoUrl)})},watch:{videoUrl:function(e,t){this.pause(),this.play(e)},immediate:!0},methods:{play:function(e){var t=this;(Ce=new ZLMRTCClient.Endpoint({element:document.getElementById("webRtcPlayerBox"),debug:!0,zlmsdpUrl:e,simulecast:!1,useCamera:!1,audioEnable:!0,videoEnable:!0,recvOnly:!0,usedatachannel:!1})).on(ZLMRTCClient.Events.WEBRTC_ICE_CANDIDATE_ERROR,function(e){console.error("ICE 协商出错"),t.eventcallbacK("ICE ERROR","ICE 协商出错")}),Ce.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,function(e){console.log("播放成功",e.streams),t.eventcallbacK("playing","播放成功")}),Ce.on(ZLMRTCClient.Events.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED,function(a){console.error("offer anwser 交换失败",a),t.eventcallbacK("OFFER ANSWER ERROR ","offer anwser 交换失败"),-400==a.code&&"流不存在"==a.msg&&(console.log("流不存在"),t.timer=setTimeout(function(){t.webrtcPlayer.close(),t.play(e)},100))}),Ce.on(ZLMRTCClient.Events.WEBRTC_ON_LOCAL_STREAM,function(e){t.eventcallbacK("LOCAL STREAM","获取到了本地流")})},pause:function(){null!=Ce&&(Ce.close(),Ce=null)},eventcallbacK:function(e,t){console.log("player 事件回调"),console.log(e),console.log(t)}},destroyed:function(){clearTimeout(this.timer)}},Ie={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"rtcPlayer"}},[t("video",{staticStyle:{"text-align":"left"},attrs:{id:"webRtcPlayerBox",controls:"",autoplay:""}},[this._v("\n Your browser is too old which doesn't support HTML5 video.\n ")])])}]};var Pe=a("owSs")(ke,Ie,!1,function(e){a("zme4")},null,null).exports,De=a("jm36"),$e=a.n(De),Le=a("bQ0r"),Te=a.n(Le),Fe={},Ee={name:"jessibuca",data:function(){return{playing:!1,isNotMute:!1,quieting:!1,fullscreen:!1,loaded:!1,speed:0,performance:"",kBps:0,btnDom:null,videoInfo:null,volume:1,rotate:0,vod:!0,forceNoOffscreen:!1}},props:["videoUrl","error","hasAudio","height"],created:function(){var e=this,t=decodeURIComponent(this.$route.params.url);this.$nextTick(function(){console.log(2222),e.updatePlayerDomSize(),window.onresize=e.updatePlayerDomSize,void 0===e.videoUrl&&(e.videoUrl=t),e.btnDom=document.getElementById("buttonsBox")})},mounted:function(){this.updatePlayerDomSize()},watch:{videoUrl:{handler:function(e,t){var a=this;this.$nextTick(function(){a.play(e)})},immediate:!0}},methods:{updatePlayerDomSize:function(){var e=this.$refs.container,t=e.parentNode.clientWidth,a=9/16*t;console.log(a),console.log(e.clientHeight),a>e.clientHeight&&(t=16/9*(a=e.clientHeight)),t>0&&a>0&&(e.style.width=t+"px",e.style.height=a+"px",e.style.paddingTop=0,console.log(t),console.log(a))},create:function(){var e={container:this.$refs.container,autoWasm:!0,background:"",controlAutoHide:!1,debug:!1,decoder:"static/js/jessibuca/decoder.js",forceNoOffscreen:!1,hasAudio:void 0===this.hasAudio||this.hasAudio,heartTimeout:5,heartTimeoutReplay:!0,heartTimeoutReplayTimes:3,hiddenAutoPause:!1,hotKey:!0,isFlv:!1,isFullResize:!1,isNotMute:this.isNotMute,isResize:!1,keepScreenOn:!0,loadingText:"请稍等, 视频加载中......",loadingTimeout:10,loadingTimeoutReplay:!0,loadingTimeoutReplayTimes:3,openWebglAlignment:!1,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1},recordType:"mp4",rotate:0,showBandwidth:!1,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:"localhost"===location.hostname||"https:"===location.protocol,useWebFullScreen:!0,videoBuffer:.1,wasmDecodeErrorReplay:!0,wcsUseVideoRender:!0};console.log("Jessibuca -> options: ",e),Fe[this._uid]=new window.Jessibuca(Te()({},e));var t=Fe[this._uid],a=this;t.on("pause",function(){a.playing=!1}),t.on("play",function(){a.playing=!0}),t.on("fullscreen",function(e){a.fullscreen=e}),t.on("mute",function(e){a.isNotMute=!e}),t.on("performance",function(e){var t="卡顿";2===e?t="非常流畅":1===e&&(t="流畅"),a.performance=t}),t.on("kBps",function(e){a.kBps=Math.round(e)}),t.on("videoInfo",function(e){console.log("Jessibuca -> videoInfo: ",e)}),t.on("audioInfo",function(e){console.log("Jessibuca -> audioInfo: ",e)}),t.on("error",function(e){console.log("Jessibuca -> error: ",e)}),t.on("timeout",function(e){console.log("Jessibuca -> timeout: ",e)}),t.on("loadingTimeout",function(e){console.log("Jessibuca -> timeout: ",e)}),t.on("delayTimeout",function(e){console.log("Jessibuca -> timeout: ",e)}),t.on("playToRenderTimes",function(e){console.log("Jessibuca -> playToRenderTimes: ",e)})},playBtnClick:function(e){this.play(this.videoUrl)},play:function(e){var t=this;console.log("Jessibuca -> url: ",e),Fe[this._uid]&&this.destroy(),this.create(),Fe[this._uid].on("play",function(){t.playing=!0,t.loaded=!0,t.quieting=jessibuca.quieting}),Fe[this._uid].hasLoaded()?Fe[this._uid].play(e):Fe[this._uid].on("load",function(){Fe[t._uid].play(e)})},pause:function(){Fe[this._uid]&&Fe[this._uid].pause(),this.playing=!1,this.err="",this.performance=""},screenshot:function(){Fe[this._uid]&&Fe[this._uid].screenshot()},mute:function(){Fe[this._uid]&&Fe[this._uid].mute()},cancelMute:function(){Fe[this._uid]&&Fe[this._uid].cancelMute()},destroy:function(){Fe[this._uid]&&Fe[this._uid].destroy(),null==document.getElementById("buttonsBox")&&this.$refs.container.appendChild(this.btnDom),Fe[this._uid]=null,this.playing=!1,this.err="",this.performance=""},fullscreenSwich:function(){var e=this.isFullscreen();Fe[this._uid].setFullscreen(!e),this.fullscreen=!e},isFullscreen:function(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1}},destroyed:function(){Fe[this._uid]&&Fe[this._uid].destroy(),this.playing=!1,this.loaded=!1,this.performance=""}},Re={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"container",staticStyle:{width:"100%",height:"100%","background-color":"#000000",margin:"0 auto",position:"relative"},on:{dblclick:e.fullscreenSwich}},[a("div",{staticStyle:{width:"100%","padding-top":"56.25%",position:"relative"}}),e._v(" "),a("div",{staticClass:"buttons-box",attrs:{id:"buttonsBox"}},[a("div",{staticClass:"buttons-box-left"},[e.playing?e._e():a("i",{staticClass:"iconfont icon-play jessibuca-btn",on:{click:e.playBtnClick}}),e._v(" "),e.playing?a("i",{staticClass:"iconfont icon-pause jessibuca-btn",on:{click:e.pause}}):e._e(),e._v(" "),a("i",{staticClass:"iconfont icon-stop jessibuca-btn",on:{click:e.destroy}}),e._v(" "),e.isNotMute?a("i",{staticClass:"iconfont icon-audio-high jessibuca-btn",on:{click:function(t){return e.mute()}}}):e._e(),e._v(" "),e.isNotMute?e._e():a("i",{staticClass:"iconfont icon-audio-mute jessibuca-btn",on:{click:function(t){return e.cancelMute()}}})]),e._v(" "),a("div",{staticClass:"buttons-box-right"},[a("span",{staticClass:"jessibuca-btn"},[e._v(e._s(e.kBps)+" kb/s")]),e._v(" "),a("i",{staticClass:"iconfont icon-camera1196054easyiconnet jessibuca-btn",staticStyle:{"font-size":"1rem !important"},on:{click:e.screenshot}}),e._v(" "),a("i",{staticClass:"iconfont icon-shuaxin11 jessibuca-btn",on:{click:e.playBtnClick}}),e._v(" "),e.fullscreen?e._e():a("i",{staticClass:"iconfont icon-weibiaoti10 jessibuca-btn",on:{click:e.fullscreenSwich}}),e._v(" "),e.fullscreen?a("i",{staticClass:"iconfont icon-weibiaoti11 jessibuca-btn",on:{click:e.fullscreenSwich}}):e._e()])])])},staticRenderFns:[]};var ze=a("owSs")(Ee,Re,!1,function(e){a("Of+7")},null,null).exports,Ae={name:"devicePlayer",props:{},components:{LivePlayer:$e.a,jessibucaPlayer:ze,rtcPlayer:Pe},computed:{getPlayerShared:function(){return{sharedUrl:window.location.origin+"/#/play/wasm/"+encodeURIComponent(this.videoUrl),sharedIframe:'<iframe src="'+window.location.origin+"/#/play/wasm/"+encodeURIComponent(this.videoUrl)+'"></iframe>',sharedRtmp:this.videoUrl}}},created:function(){console.log("created"),console.log(this.player),this.broadcastStatus=-1,1===se()(this.player).length&&(this.activePlayer=se()(this.player)[0])},data:function(){return{video:"http://lndxyj.iqilu.com/public/upload/2019/10/14/8c001ea0c09cdc59a57829dabc8010fa.mp4",videoUrl:"",activePlayer:"jessibuca",player:{jessibuca:["ws_flv","wss_flv"],webRTC:["rtc","rtcs"]},showVideoDialog:!1,streamId:"",app:"",mediaServerId:"",convertKey:"",deviceId:"",channelId:"",tabActiveName:"media",hasAudio:!1,loadingRecords:!1,recordsLoading:!1,isLoging:!1,controSpeed:30,timeVal:0,timeMin:0,timeMax:1440,presetPos:1,cruisingSpeed:100,cruisingTime:5,cruisingGroup:0,scanSpeed:100,scanGroup:0,tracks:[],coverPlaying:!1,tracksLoading:!1,showPtz:!0,showRrecord:!0,tracksNotLoaded:!1,sliderTime:0,seekTime:0,recordStartTime:0,showTimeText:"00:00:00",streamInfo:null,broadcastMode:!0,broadcastRtc:null,broadcastStatus:-1,tablabel:"实时视频"}},mounted:function(){},methods:{tabHandleClick:function(e,t){console.log(e);var a=this;a.tracks=[],a.tracksLoading=!0,a.tracksNotLoaded=!1,"codec"===e.name&&this.$axios({method:"get",url:"/zlm/"+this.mediaServerId+"/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtsp&app="+this.app+"&stream="+this.streamId}).then(function(e){a.tracksLoading=!1,0==e.data.code&&e.data.tracks?a.tracks=e.data.tracks:(a.tracksNotLoaded=!0,a.$message({showClose:!0,message:"获取编码信息失败,",type:"warning"}))}).catch(function(e){})},changePlayer:function(e){console.log(this.player[e.name][0]),this.activePlayer=e.name,this.videoUrl=this.getUrlByStreamInfo(),console.log(this.videoUrl)},openDialog:function(e,t,a,i){if(console.log("openDialog"),!this.showVideoDialog)switch(this.tabActiveName=e,this.channelId=a,this.deviceId=t,this.streamId="",this.mediaServerId="",this.app="",this.videoUrl="",this.$refs[this.activePlayer]&&this.$refs[this.activePlayer].pause(),e){case"media":this.play(i.streamInfo,i.hasAudio,i.deviceName);break;case"streamPlay":this.tabActiveName="media",this.showRrecord=!1,this.showPtz=!1,this.play(i.streamInfo,i.hasAudio,i.deviceName)}},play:function(e,t,a){this.streamInfo=e,this.hasAudio=t,this.isLoging=!1,this.videoUrl=this.getUrlByStreamInfo(),this.streamId=e.stream,this.app=e.app,this.mediaServerId=e.mediaServerId,this.tablabel=a+"实时视频",this.playFromStreamInfo(!1,e)},getUrlByStreamInfo:function(){return console.log(this.streamInfo),"https:"===location.protocol?this.videoUrl=this.streamInfo[this.player[this.activePlayer][1]]:this.videoUrl=this.streamInfo[this.player[this.activePlayer][0]],this.videoUrl},coverPlay:function(){var e=this;this.coverPlaying=!0,this.$refs[this.activePlayer].pause(),e.$axios({method:"post",url:"/api/play/convert/"+e.streamId}).then(function(t){0===t.data.code?(e.convertKey=t.data.key,setTimeout(function(){e.isLoging=!1,e.playFromStreamInfo(!1,t.data.data)},2e3)):(e.isLoging=!1,e.coverPlaying=!1,e.$message({showClose:!0,message:"转码失败",type:"error"}))}).catch(function(t){console.log(t),e.coverPlaying=!1,e.$message({showClose:!0,message:"播放错误",type:"error"})})},convertStopClick:function(){var e=this;this.convertStop(function(){e.$refs[e.activePlayer].play(e.videoUrl)})},convertStop:function(e){this.$refs.videoPlayer.pause(),this.$axios({method:"post",url:"/api/play/convertStop/"+this.convertKey}).then(function(t){0==t.data.code?console.log(t.data.msg):console.error(t.data.msg),e&&e()}).catch(function(e){}),this.coverPlaying=!1,this.convertKey=""},playFromStreamInfo:function(e,t){var a=this;this.showVideoDialog=!0,this.hasaudio=e&&this.hasaudio,this.$refs[this.activePlayer]?this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(t)):this.$nextTick(function(){a.$refs[a.activePlayer].play(a.getUrlByStreamInfo(t))})},close:function(){console.log("关闭视频"),this.$refs[this.activePlayer]&&this.$refs[this.activePlayer].pause(),this.videoUrl="",this.coverPlaying=!1,this.showVideoDialog=!1,""!=this.convertKey&&this.convertStop(),this.convertKey="",this.stopBroadcast()},copySharedInfo:function(e){console.log("复制内容:"+e),this.coverPlaying=!1,this.tracks=[];var t=this;this.$copyText(e).then(function(e){t.$message({showClose:!0,message:"复制成功",type:"success"})},function(e){t.$message({showClose:!0,message:"复制失败,请手动复制",type:"error"})})},ptzCamera:function(e){console.log("云台控制:"+e);this.$axios({method:"post",url:"/api/ptz/control/"+this.deviceId+"/"+this.channelId+"?command="+e+"&horizonSpeed="+this.controSpeed+"&verticalSpeed="+this.controSpeed+"&zoomSpeed="+this.controSpeed}).then(function(e){})},videoError:function(e){console.log("播放器错误:"+s()(e))},presetPosition:function(e,t){console.log("预置位控制:"+this.presetPos+" : 0x"+e.toString(16));this.$axios({method:"post",url:"/api/ptz/front_end_command/"+this.deviceId+"/"+this.channelId+"?cmdCode="+e+"&parameter1=0&parameter2="+t+"&combindCode2=0"}).then(function(e){})},setSpeedOrTime:function(e,t,a){var i=a%256,o=16*Math.floor(a/256);console.log("前端控制:0x"+e.toString(16)+" 0x"+t.toString(16)+" 0x"+i.toString(16)+" 0x"+o.toString(16)),this.$axios({method:"post",url:"/api/ptz/front_end_command/"+this.deviceId+"/"+this.channelId+"?cmdCode="+e+"&parameter1="+t+"&parameter2="+i+"&combindCode2="+o}).then(function(e){})},setCommand:function(e,t,a){console.log("前端控制:0x"+e.toString(16)+" 0x"+t.toString(16)+" 0x"+a.toString(16)+" 0x0"),this.$axios({method:"post",url:"/api/ptz/front_end_command/"+this.deviceId+"/"+this.channelId+"?cmdCode="+e+"&parameter1="+t+"&parameter2="+a+"&combindCode2=0"}).then(function(e){})},copyUrl:function(e){var t=this;console.log(e),this.$copyText(e).then(function(e){t.$message.success("成功拷贝到粘贴板")},function(e){})},getBroadcastStatus:function(){return-2==this.broadcastStatus?"primary":-1==this.broadcastStatus?"primary":0==this.broadcastStatus?"warning":1==this.broadcastStatus?"danger":void 0},broadcastStatusClick:function(){var e=this;-1==this.broadcastStatus?(this.broadcastStatus=0,this.$axios({method:"get",url:"/api/play/broadcast/"+this.deviceId+"/"+this.channelId+"?timeout=30&broadcastMode="+this.broadcastMode}).then(function(t){if(0===t.data.code){var a=t.data.data.streamInfo;document.location.protocol.includes("https")?e.startBroadcast(a.rtcs):e.startBroadcast(a.rtc)}else e.$message({showClose:!0,message:t.data.msg,type:"error"})})):1===this.broadcastStatus&&(this.broadcastStatus=-1,this.broadcastRtc.close())},startBroadcast:function(e){var t=this;this.$axios({method:"post",url:"/api/user/userInfo"}).then(function(a){if(0!==a.data.code)t.$message({showClose:!0,message:"获取推流鉴权Key失败",type:"error"}),t.broadcastStatus=-1;else{var i=a.data.data.pushKey;e+="&sign="+_.a.createHash("md5").update(i,"utf8").digest("hex"),console.log("开始语音喊话: "+e),t.broadcastRtc=new ZLMRTCClient.Endpoint({debug:!0,zlmsdpUrl:e,simulecast:!1,useCamera:!1,audioEnable:!0,videoEnable:!1,recvOnly:!1}),t.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_NOT_SUPPORT,function(e){console.error("不支持webrtc",e),t.$message({showClose:!0,message:"不支持webrtc, 无法进行语音喊话",type:"error"}),t.broadcastStatus=-1}),t.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_ICE_CANDIDATE_ERROR,function(e){console.error("ICE 协商出错"),t.$message({showClose:!0,message:"ICE 协商出错",type:"error"}),t.broadcastStatus=-1}),t.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED,function(e){console.error("offer anwser 交换失败",e),t.$message({showClose:!0,message:"offer anwser 交换失败"+e,type:"error"}),t.broadcastStatus=-1}),t.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_ON_CONNECTION_STATE_CHANGE,function(e){console.log("状态改变",e),"connecting"===e?t.broadcastStatus=0:"connected"===e?t.broadcastStatus=1:"disconnected"===e&&(t.broadcastStatus=-1)}),t.broadcastRtc.on(ZLMRTCClient.Events.CAPTURE_STREAM_FAILED,function(e){console.log("捕获流失败",e),t.$message({showClose:!0,message:"捕获流失败"+e,type:"error"}),t.broadcastStatus=-1})}}).catch(function(e){t.$message({showClose:!0,message:e,type:"error"}),t.broadcastStatus=-1})},stopBroadcast:function(){var e=this;this.broadcastRtc.close(),this.broadcastStatus=-1,this.$axios({method:"get",url:"/api/play/broadcast/stop/"+this.deviceId+"/"+this.channelId}).then(function(t){0==t.data.code||e.$message({showClose:!0,message:t.data.msg,type:"error"})})}}},Me={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"devicePlayer"}},[e.showVideoDialog?a("el-dialog",{attrs:{title:e.tablabel,top:"0","close-on-click-modal":!1,visible:e.showVideoDialog},on:{"update:visible":function(t){e.showVideoDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{width:"100%",height:"100%"}},[Object.keys(this.player).length>1?a("el-tabs",{attrs:{type:"card",stretch:!0},on:{"tab-click":e.changePlayer},model:{value:e.activePlayer,callback:function(t){e.activePlayer=t},expression:"activePlayer"}},["jessibuca"===e.activePlayer?a("jessibucaPlayer",{ref:"jessibuca",attrs:{visible:e.showVideoDialog,videoUrl:e.videoUrl,error:e.videoError,message:e.videoError,hasAudio:e.hasAudio,fluent:"",autoplay:"",live:""},on:{"update:visible":function(t){e.showVideoDialog=t}}}):e._e()],1):e._e(),e._v(" "),1==Object.keys(this.player).length&&this.player.jessibuca?a("jessibucaPlayer",{ref:"jessibuca",attrs:{visible:e.showVideoDialog,videoUrl:e.videoUrl,error:e.videoError,message:e.videoError,hasAudio:e.hasAudio,fluent:"",autoplay:"",live:""},on:{"update:visible":function(t){e.showVideoDialog=t}}}):e._e(),e._v(" "),1==Object.keys(this.player).length&&this.player.webRTC?a("rtc-player",{ref:"jessibuca",attrs:{visible:e.showVideoDialog,videoUrl:e.videoUrl,error:e.videoError,message:e.videoError,height:"100px",hasAudio:e.hasAudio,fluent:"",autoplay:"",live:""},on:{"update:visible":function(t){e.showVideoDialog=t}}}):e._e()],1),e._v(" "),a("div",{staticStyle:{"text-align":"right","margin-top":"1rem"},attrs:{id:"shared"}},[a("el-tabs",{on:{"tab-click":e.tabHandleClick},model:{value:e.tabActiveName,callback:function(t){e.tabActiveName=t},expression:"tabActiveName"}},[e.showPtz?a("el-tab-pane",{attrs:{label:"云台控制",name:"control"}},[a("div",{staticStyle:{display:"flex","justify-content":"left"}},[a("div",{staticClass:"control-wrapper"},[a("div",{staticClass:"control-btn control-top",on:{mousedown:function(t){return e.ptzCamera("up")},mouseup:function(t){return e.ptzCamera("stop")}}},[a("i",{staticClass:"el-icon-caret-top"}),e._v(" "),a("div",{staticClass:"control-inner-btn control-inner"})]),e._v(" "),a("div",{staticClass:"control-btn control-left",on:{mousedown:function(t){return e.ptzCamera("left")},mouseup:function(t){return e.ptzCamera("stop")}}},[a("i",{staticClass:"el-icon-caret-left"}),e._v(" "),a("div",{staticClass:"control-inner-btn control-inner"})]),e._v(" "),a("div",{staticClass:"control-btn control-bottom",on:{mousedown:function(t){return e.ptzCamera("down")},mouseup:function(t){return e.ptzCamera("stop")}}},[a("i",{staticClass:"el-icon-caret-bottom"}),e._v(" "),a("div",{staticClass:"control-inner-btn control-inner"})]),e._v(" "),a("div",{staticClass:"control-btn control-right",on:{mousedown:function(t){return e.ptzCamera("right")},mouseup:function(t){return e.ptzCamera("stop")}}},[a("i",{staticClass:"el-icon-caret-right"}),e._v(" "),a("div",{staticClass:"control-inner-btn control-inner"})]),e._v(" "),a("div",{staticClass:"control-round"},[a("div",{staticClass:"control-round-inner"},[a("i",{staticClass:"fa fa-pause-circle"})])]),e._v(" "),a("div",{staticStyle:{position:"absolute",left:"7.25rem",top:"1.25rem"},on:{mousedown:function(t){return e.ptzCamera("zoomin")},mouseup:function(t){return e.ptzCamera("stop")}}},[a("i",{staticClass:"el-icon-zoom-in control-zoom-btn",staticStyle:{"font-size":"1.875rem"}})]),e._v(" "),a("div",{staticStyle:{position:"absolute",left:"7.25rem",top:"3.25rem","font-size":"1.875rem"},on:{mousedown:function(t){return e.ptzCamera("zoomout")},mouseup:function(t){return e.ptzCamera("stop")}}},[a("i",{staticClass:"el-icon-zoom-out control-zoom-btn"})]),e._v(" "),a("div",{staticClass:"contro-speed",staticStyle:{position:"absolute",left:"4px",top:"7rem",width:"9rem"}},[a("el-slider",{attrs:{max:255},model:{value:e.controSpeed,callback:function(t){e.controSpeed=t},expression:"controSpeed"}})],1)]),e._v(" "),a("div",{staticClass:"control-panel"},[a("el-button-group",[a("el-tag",{staticStyle:{position:"absolute",left:"0rem",top:"0rem",width:"5rem","text-align":"center"},attrs:{size:"medium"}},[e._v("预置位编号\n ")]),e._v(" "),a("el-input-number",{staticStyle:{position:"absolute",left:"5rem",top:"0rem",width:"6rem"},attrs:{size:"mini","controls-position":"right",precision:0,step:1,min:1,max:255},model:{value:e.presetPos,callback:function(t){e.presetPos=t},expression:"presetPos"}}),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"11rem",top:"0rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-add-location"},on:{click:function(t){return e.presetPosition(129,e.presetPos)}}},[e._v("设置\n ")]),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"27rem",top:"0rem",width:"5rem"},attrs:{size:"mini",type:"primary",icon:"el-icon-place"},on:{click:function(t){return e.presetPosition(130,e.presetPos)}}},[e._v("调用\n ")]),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"16rem",top:"0rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-delete-location"},on:{click:function(t){return e.presetPosition(131,e.presetPos)}}},[e._v("删除\n ")]),e._v(" "),a("el-tag",{staticStyle:{position:"absolute",left:"0rem",top:"2.5rem",width:"5rem","text-align":"center"},attrs:{size:"medium"}},[e._v("巡航速度\n ")]),e._v(" "),a("el-input-number",{staticStyle:{position:"absolute",left:"5rem",top:"2.5rem",width:"6rem"},attrs:{size:"mini","controls-position":"right",precision:0,min:1,max:4095},model:{value:e.cruisingSpeed,callback:function(t){e.cruisingSpeed=t},expression:"cruisingSpeed"}}),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"11rem",top:"2.5rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-loading"},on:{click:function(t){return e.setSpeedOrTime(134,e.cruisingGroup,e.cruisingSpeed)}}},[e._v("设置\n ")]),e._v(" "),a("el-tag",{staticStyle:{position:"absolute",left:"16rem",top:"2.5rem",width:"5rem","text-align":"center"},attrs:{size:"medium"}},[e._v("停留时间\n ")]),e._v(" "),a("el-input-number",{staticStyle:{position:"absolute",left:"21rem",top:"2.5rem",width:"6rem"},attrs:{size:"mini","controls-position":"right",precision:0,min:1,max:4095},model:{value:e.cruisingTime,callback:function(t){e.cruisingTime=t},expression:"cruisingTime"}}),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"27rem",top:"2.5rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-timer"},on:{click:function(t){return e.setSpeedOrTime(135,e.cruisingGroup,e.cruisingTime)}}},[e._v("设置\n ")]),e._v(" "),a("el-tag",{staticStyle:{position:"absolute",left:"0rem",top:"4.5rem",width:"5rem","text-align":"center"},attrs:{size:"medium"}},[e._v("巡航组编号\n ")]),e._v(" "),a("el-input-number",{staticStyle:{position:"absolute",left:"5rem",top:"4.5rem",width:"6rem"},attrs:{size:"mini","controls-position":"right",precision:0,min:0,max:255},model:{value:e.cruisingGroup,callback:function(t){e.cruisingGroup=t},expression:"cruisingGroup"}}),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"11rem",top:"4.5rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-add-location"},on:{click:function(t){return e.setCommand(132,e.cruisingGroup,e.presetPos)}}},[e._v("添加点\n ")]),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"16rem",top:"4.5rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-delete-location"},on:{click:function(t){return e.setCommand(133,e.cruisingGroup,e.presetPos)}}},[e._v("删除点\n ")]),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"21rem",top:"4.5rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-delete"},on:{click:function(t){return e.setCommand(133,e.cruisingGroup,0)}}},[e._v("删除组\n ")]),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"27rem",top:"5rem",width:"5rem"},attrs:{size:"mini",type:"primary",icon:"el-icon-video-camera-solid"},on:{click:function(t){return e.setCommand(136,e.cruisingGroup,0)}}},[e._v("巡航\n ")]),e._v(" "),a("el-tag",{staticStyle:{position:"absolute",left:"0rem",top:"7rem",width:"5rem","text-align":"center"},attrs:{size:"medium"}},[e._v("扫描速度\n ")]),e._v(" "),a("el-input-number",{staticStyle:{position:"absolute",left:"5rem",top:"7rem",width:"6rem"},attrs:{size:"mini","controls-position":"right",precision:0,min:1,max:4095},model:{value:e.scanSpeed,callback:function(t){e.scanSpeed=t},expression:"scanSpeed"}}),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"11rem",top:"7rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-loading"},on:{click:function(t){return e.setSpeedOrTime(138,e.scanGroup,e.scanSpeed)}}},[e._v("设置\n ")]),e._v(" "),a("el-tag",{staticStyle:{position:"absolute",left:"0rem",top:"9rem",width:"5rem","text-align":"center"},attrs:{size:"medium"}},[e._v("扫描组编号\n ")]),e._v(" "),a("el-input-number",{staticStyle:{position:"absolute",left:"5rem",top:"9rem",width:"6rem"},attrs:{size:"mini","controls-position":"right",precision:0,step:1,min:0,max:255},model:{value:e.scanGroup,callback:function(t){e.scanGroup=t},expression:"scanGroup"}}),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"11rem",top:"9rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-d-arrow-left"},on:{click:function(t){return e.setCommand(137,e.scanGroup,1)}}},[e._v("左边界\n ")]),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"16rem",top:"9rem",width:"5rem"},attrs:{size:"mini",icon:"el-icon-d-arrow-right"},on:{click:function(t){return e.setCommand(137,e.scanGroup,2)}}},[e._v("右边界\n ")]),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"27rem",top:"7rem",width:"5rem"},attrs:{size:"mini",type:"primary",icon:"el-icon-video-camera-solid"},on:{click:function(t){return e.setCommand(137,e.scanGroup,0)}}},[e._v("扫描\n ")]),e._v(" "),a("el-button",{staticStyle:{position:"absolute",left:"27rem",top:"9rem",width:"5rem"},attrs:{size:"mini",type:"danger",icon:"el-icon-switch-button"},on:{click:function(t){return e.ptzCamera("stop")}}},[e._v("停止\n ")])],1)],1)])]):e._e(),e._v(" "),a("el-tab-pane",{attrs:{label:"语音对讲",name:"broadcast"}},[a("div",{staticStyle:{padding:"0 10px"}},[a("el-switch",{attrs:{disabled:-1!==e.broadcastStatus,"active-color":"#409EFF","active-text":"喊话(Broadcast)","inactive-text":"对讲(Talk)"},model:{value:e.broadcastMode,callback:function(t){e.broadcastMode=t},expression:"broadcastMode"}})],1),e._v(" "),a("div",{staticClass:"trank",staticStyle:{"text-align":"center"}},[a("el-button",{staticStyle:{"font-size":"32px",padding:"24px","margin-top":"24px"},attrs:{type:e.getBroadcastStatus(),disabled:-2===e.broadcastStatus,circle:"",icon:"el-icon-microphone"},on:{click:function(t){return e.broadcastStatusClick()}}}),e._v(" "),a("p",[-2===e.broadcastStatus?a("span",[e._v("正在释放资源")]):e._e(),e._v(" "),-1===e.broadcastStatus?a("span",[e._v("点击开始对讲")]):e._e(),e._v(" "),0===e.broadcastStatus?a("span",[e._v("等待接通中...")]):e._e(),e._v(" "),1===e.broadcastStatus?a("span",[e._v("请说话")]):e._e()])],1)])],1)],1)]):e._e()],1)},staticRenderFns:[]};var Ue=a("owSs")(Ae,Me,!1,function(e){a("+tSf")},null,null).exports,je=function(){function e(){ce()(this,e),this.$axios=he.a}return ue()(e,[{key:"getDeviceList",value:function(e,t,a,i,o){this.$axios({method:"get",url:"/api/device/query/devices",params:{page:e,count:t,category:a}}).then(function(e){"function"==typeof i&&i(e.data)}).catch(function(e){console.log(e),"function"==typeof o&&o(e)})}},{key:"getDevice",value:function(e,t,a){this.$axios({method:"get",url:"/api/device/query/devices/"+e}).then(function(e){"function"==typeof t&&t(e.data)}).catch(function(e){console.log(e),"function"==typeof a&&a(e)})}},{key:"getAllDeviceList",value:function(e,t,a,i){this.getAllDeviceListIteration(e,[],1,100,t,a,i)}},{key:"getAllDeviceListIteration",value:function(e,t,a,i,o,n,r){var s=this;this.getDeviceList(a,i,e,function(e){0===e.code&&e.data.list&&("function"==typeof o&&o(e.data.list),(t=t.concat(e.data.list)).length<e.data.total?(a++,s.getAllDeviceListIteration(t,a,i,o,n,r)):"function"==typeof n&&n(t))},r)}},{key:"getAllChannel",value:function(e,t,a,i,o,n){this.getAllChannelIteration(e,t,a,[],1,100,i,o,n)}},{key:"getAllChannelIteration",value:function(e,t,a,i,o,n,r,s,l){var c=this;this.getChanel(e,t,a,o,n,function(d){var u=d.data;u.list&&("function"==typeof r&&r(u.list),(i=i.concat(u.list)).length<u.total?(o++,c.getAllChannelIteration(e,t,a,i,o,n,r,l)):"function"==typeof s&&s(i))},l)}},{key:"getChanel",value:function(e,t,a,i,o,n,r){this.$axios({method:"get",url:"/api/device/query/devices/"+a+"/channels",params:{page:i,count:o,query:"",online:"",channelType:e,catalogUnderDevice:t}}).then(function(e){"function"==typeof n&&n(e.data)}).catch(r)}},{key:"getAllChannelWithoutDeviceId",value:function(e,t,a,i){this.$axios({method:"get",url:"/api/device/query/devices/allChannels",params:{page:e,count:t,query:"",online:"",channelType:null,catalogUnderDevice:null}}).then(function(e){var t=e.data;0===t.code&&t.data.list&&("function"==typeof a?a(t.data.list):"function"==typeof i&&i(t.data.list))}).catch(i)}},{key:"getAllSubChannel",value:function(e,t,a,i,o,n){this.getAllSubChannelIteration(e,t,a,[],1,100,i,o,n)}},{key:"getAllSubChannelIteration",value:function(e,t,a,i,o,n,r,s,l){var c=this;this.getSubChannel(e,t,a,o,n,function(d){d.list&&("function"==typeof r&&r(d.list),(i=i.concat(d.list)).length<d.total?(o++,c.getAllSubChannelIteration(e,t,a,i,o,n,r,s,l)):"function"==typeof s&&s(i))},l)}},{key:"getSubChannel",value:function(e,t,a,i,o,n,r){this.$axios({method:"get",url:"/api/device/query/sub_channels/"+t+"/"+a+"/channels",params:{page:i,count:o,query:"",online:"",channelType:e}}).then(function(e){"function"==typeof n&&n(e.data)}).catch(r)}},{key:"getTree",value:function(e,t,a,i,o,n){this.getTreeIteration(e,t,a,[],1,100,i,o,n)}},{key:"getTreeIteration",value:function(e,t,a,i,o,n,r,s,l){var c=this;this.getTreeInfo(e,t,a,o,n,function(d){0===d.code&&d.data.list&&("function"==typeof r&&r(d.data.list),(i=i.concat(d.data.list)).length<d.data.total?(o++,c.getTreeIteration(e,t,a,i,o,n,r,s,l)):"function"==typeof s&&s(i))},l)}},{key:"getTreeInfo",value:function(e,t,a,i,o,n,r){null!=a&&void 0!==a||(a=!1),this.$axios({method:"get",url:"/api/device/query/tree/"+e,params:{page:i,count:o,parentId:t,onlyCatalog:a}}).then(function(e){"function"==typeof n&&n(e.data)}).catch(r)}}]),e}(),Ne=function(){function e(){ce()(this,e)}return ue()(e,[{key:"getLatestWeatherData",value:function(e){he.a.get("/api/weather/latest").then(function(t){e(t.data)}).catch(function(e){console.error("Error fetching weather data:",e)})}}]),e}(),Be={name:"DeviceTree",data:function(){return{deviceService:new je,weatherService:new Ne,defaultProps:{children:"children",label:"name",isLeaf:"isLeaf"},deviceCategory:{monitorDevice:1,weatherDevice:2}}},props:["device","onlyCatalog","clickEvent","contextMenuEvent","isMap"],methods:{handleNodeClick:function(e,t,a){"function"==typeof this.clickEvent&&this.clickEvent(e.userData,e.userData,2===e.type)},getTypeName:function(e){return{7:"气象设备"}[e]||"未知设备"},handleContextMenu:function(e,t,a,i){"function"==typeof this.contextMenuEvent&&this.contextMenuEvent(t.userData,e,t.userData,2===t.type)},loadMonitorNode:function(e,t){var a=this;if(0===e.level)if(this.device){var i={name:this.device.name||this.device.deviceId,isLeaf:!1,id:this.device.deviceId,type:this.device.online,online:1===this.device.online,userData:this.device};t([i])}else this.deviceService.getAllDeviceList(this.deviceCategory.monitorDevice,function(e){if(console.log("getAllMonitorDeviceList : ",e),e.length>0){for(var a=[],i=0;i<e.length;i++){var o={name:e[i].name||e[i].deviceId,isLeaf:!1,id:e[i].deviceId,type:0,online:e[i].online,userData:e[i]};a.push(o)}t(a)}else t([])},function(e){},function(e){});else{var o=[];this.deviceService.getTree(e.data.userData.deviceId,e.data.id,this.onlyCatalog,function(e){o=o.concat(e),a.channelDataHandler(o,t)},function(e){})}},loadWeatherNode:function(e,t){var a=this;if(0===e.level)if(this.device){var i={name:this.device.name||this.device.deviceId,isLeaf:!1,id:this.device.deviceId,type:this.device.online,online:1===this.device.online,userData:this.device};t([i])}else this.deviceService.getAllDeviceList(this.deviceCategory.weatherDevice,function(e){if(console.log("getAllWeatherDeviceList : ",e),e.length>0){for(var a=[],i=0;i<e.length;i++){var o={name:e[i].name||e[i].deviceId,isLeaf:!1,id:e[i].deviceId,type:0,online:e[i].online,userData:e[i]};a.push(o)}t(a)}else t([])},function(e){},function(e){});else{console.log("node : ",e);var o=[];this.deviceService.getTree(e.data.userData.deviceId,e.data.id,this.onlyCatalog,function(e){console.log("catalogData : ",e),o=o.concat(e),a.channelDataHandler(o,t)},function(e){})}},channelDataHandler:function(e,t){if(console.log("channelDataHandler data : ",e),e.length>0){for(var a=[],i=0;i<e.length;i++){var o=e[i],n={name:o.name||o.basicData.channelId,isLeaf:0===o.basicData.subCount,id:o.id,deviceId:o.deviceId,type:o.basicData.ptzType,online:o.basicData.status,hasGPS:o.basicData.longitude*o.basicData.latitude!=0,userData:o.basicData};a.push(n)}t(a)}else t([])},reset:function(){this.$forceUpdate()},created:function(){var e=this;this.weatherService.getLatestWeatherData(function(t){var a={name:"气象站设备",isLeaf:!1,id:t.messageid,type:7,online:!1,userData:t,children:[{label:"温度",value:t.messagewendu},{label:"湿度",value:t.messageshidu},{label:"风力",value:t.messagefengli},{label:"风速",value:t.messagefengsu},{label:"风向",value:t.messagefengxiang},{label:"风向360",value:t.messagefengxiang360},{label:"PM10",value:t.messagePM10},{label:"PM2.5",value:t.messagePM25},{label:"气压",value:t.messageqiya},{label:"光照",value:t.messageguang},{label:"雨量",value:t.messageyu}]};e.weatherDevices.push(a)})}},destroyed:function(){}},He={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%",height:"100%","background-color":"#FFFFFF",overflow:"auto"},attrs:{id:"DeviceTree"}},[a("el-container",[a("el-header",[e._v("监控设备")]),e._v(" "),a("el-main",{staticStyle:{"background-color":"#ffffff"}},[a("div",{staticClass:"tree-container"},[a("el-tree",{ref:"gdTree",attrs:{load:e.loadMonitorNode,props:e.defaultProps,lazy:"","node-key":"id"},on:{"node-click":e.handleNodeClick,"node-contextmenu":e.handleContextMenu},scopedSlots:e._u([{key:"default",fn:function(t){t.node;var i=t.data;return[a("span",{staticClass:"custom-device-tree-node",staticStyle:{width:"100%"}},[0===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-jiedianleilianjipingtai",attrs:{title:"目录"}},[e._v(e._s(i.name))]):e._e(),e._v(" "),0!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-jiedianleilianjipingtai",attrs:{title:"目录"}},[e._v(e._s(i.name))]),e._v(" "),1===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-shebeileijiankongdian",attrs:{title:"未知在线通道"}},[e._v(e._s(i.name))]):e._e(),e._v(" "),1!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-shebeileijiankongdian",attrs:{title:"未知离线通道"}},[e._v(e._s(i.name))]),e._v(" "),2===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-shebeileiqiuji",attrs:{title:"在线通道-球机"}},[e._v(e._s(i.name)+" ")]):e._e(),e._v(" "),2!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-shebeileiqiuji",attrs:{title:"离线通道-球机"}},[e._v(" "+e._s(i.name)+" ")]),e._v(" "),3===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-shebeileibanqiu",attrs:{title:"在线通道-半球"}},[e._v(e._s(i.name))]):e._e(),e._v(" "),3!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-shebeileibanqiu",attrs:{title:"离线通道-半球"}},[e._v(e._s(i.name))]),e._v(" "),4===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-shebeileiqiangjitongdao",attrs:{title:"在线通道-固定枪机"}},[e._v(e._s(i.name))]):e._e(),e._v(" "),4!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-shebeileiqiangjitongdao",attrs:{title:"离线通道-固定枪机"}},[e._v(e._s(i.name))]),e._v(" "),5===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-shebeileiqiangjitongdao",attrs:{title:"在线通道-遥控枪机"}},[e._v(e._s(i.name))]):e._e(),e._v(" "),5!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-shebeileiqiangjitongdao",attrs:{title:"离线通道-遥控枪机"}},[e._v(e._s(i.name))])])]}}])})],1)])],1),e._v(" "),e.isMap?a("el-container",[a("el-header",[e._v("气象设备")]),e._v(" "),a("el-main",{staticStyle:{"background-color":"#ffffff"}},[a("div",{staticClass:"tree-container"},[a("el-tree",{ref:"gdTree",attrs:{load:e.loadWeatherNode,props:e.defaultProps,lazy:"","node-key":"id"},on:{"node-click":e.handleNodeClick,"node-contextmenu":e.handleContextMenu},scopedSlots:e._u([{key:"default",fn:function(t){t.node;var i=t.data;return[a("span",{staticClass:"custom-device-tree-node",staticStyle:{width:"100%"}},[0===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-jiedianleilianjipingtai",attrs:{title:"目录"}},[e._v(e._s(i.name))]):e._e(),e._v(" "),0!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-jiedianleilianjipingtai",attrs:{title:"目录"}},[e._v(e._s(i.name))]),e._v(" "),1===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-shebeileijiankongdian",attrs:{title:"未知在线气象设备"}},[e._v(e._s(i.name))]):e._e(),e._v(" "),1!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-shebeileijiankongdian",attrs:{title:"未知离线气象设备"}},[e._v(e._s(i.name))]),e._v(" "),6===i.type&&i.online?a("span",{staticClass:"device-online iconfont icon-weather-station",attrs:{title:"在线气象设备"}},[e._v(e._s(i.name))]):e._e(),e._v(" "),6!==i.type||i.online?e._e():a("span",{staticClass:"device-offline iconfont icon-weather-station",attrs:{title:"离线气象设备"}},[e._v(e._s(i.name))])])]}}],null,!1,1577204741)},[e._v("\n --\x3e\n\n ")])],1)])],1):e._e()],1)},staticRenderFns:[]};var Oe=a("owSs")(Be,He,!1,function(e){a("xEBp")},null,null).exports,qe={name:"channelList",components:{devicePlayer:Ue,uiHeader:I,DeviceTree:Oe},data:function(){return{deviceService:new je,device:null,deviceId:this.$route.params.deviceId,parentChannelId:this.$route.params.parentChannelId,deviceChannelList:[],videoComponentList:[],currentPlayerInfo:{},updateLooper:0,searchSrt:"",channelType:"",online:"",subStream:"",winHeight:window.innerHeight-200,currentPage:1,count:15,total:0,beforeUrl:"/deviceList",isLoging:!1,showTree:!1,loadSnap:{},ptzTypes:{0:"未知",1:"球机",2:"半球",3:"固定枪机",4:"遥控枪机"}}},mounted:function(){var e=this;this.$refs.devicePlayer?console.log("子组件引用成功"):console.log("子组件引用失败"),this.deviceId&&this.deviceService.getDevice(this.deviceId,function(t){e.device=t},function(e){console.log("获取设备信息失败"),console.error(e)}),this.initData()},destroyed:function(){this.$destroy("videojs"),clearTimeout(this.updateLooper)},methods:{initData:function(){void 0===this.parentChannelId||0==this.parentChannelId?this.getDeviceChannelList():this.showSubchannels()},initParam:function(){this.deviceId=this.$route.params.deviceId,this.parentChannelId=this.$route.params.parentChannelId,this.currentPage=1,this.count=15,""!=this.parentChannelId&&0!=this.parentChannelId||(this.beforeUrl="/deviceList")},currentChange:function(e){this.currentPage=e,this.initData()},handleSizeChange:function(e){this.count=e,this.getDeviceChannelList()},getDeviceChannelList:function(){var e=this;void 0!==this.$route.params.deviceId&&this.$axios({method:"get",url:"/api/device/query/devices/"+this.$route.params.deviceId+"/channels",params:{page:e.currentPage,count:e.count,query:e.searchSrt,online:e.online,channelType:e.channelType}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.deviceChannelList=t.data.data.list,e.deviceChannelList.forEach(function(t){t.ptzType=t.ptzType+"",e.$set(t,"edit",!1),e.$set(t,"location",""),t.customLongitude&&t.customLatitude?e.$set(t,"location",t.customLongitude+","+t.customLatitude):t.longitude&&t.latitude&&e.$set(t,"location",t.longitude+","+t.latitude)}),e.$nextTick(function(){e.$refs.channelListTable.doLayout()}))}).catch(function(e){console.log(e)})},sendDevicePush:function(e){var t=this.deviceId;this.isLoging=!0;var a=e.channelId;console.log("通知设备推流1:"+t+" : "+a);var i=this;this.$axios({method:"get",url:"/api/play/start/"+t+"/"+a,params:{isSubStream:this.isSubStream}}).then(function(o){i.isLoging=!1,0===o.data.code?(setTimeout(function(){var e=t+"_"+a;i.loadSnap[t+a]=0,i.getSnapErrorEvent(e)},5e3),e.streamId=o.data.data.stream,i.$refs.devicePlayer.openDialog("media",t,a,{streamInfo:o.data.data,hasAudio:e.hasAudio,deviceName:e.name}),setTimeout(function(){i.initData()},1e3)):i.$message.error(o.data.msg)}).catch(function(e){console.error(e),i.isLoging=!1})},moreClick:function(e,t){"records"===e?this.queryRecords(t):"cloudRecords"===e&&this.queryCloudRecords(t)},queryRecords:function(e){var t=this.deviceId,a=e.channelId;this.$router.push("/gbRecordDetail/"+t+"/"+a)},queryCloudRecords:function(e){var t=this.deviceId,a=e.channelId;this.$router.push("/cloudRecordDetail/rtp/"+t+"_"+a)},stopDevicePush:function(e){var t=this;this.$axios({method:"get",url:"/api/play/stop/"+this.deviceId+"/"+e.channelId,params:{isSubStream:this.isSubStream}}).then(function(e){t.initData()}).catch(function(e){402===e.response.status?t.initData():console.log(e)})},getSnap:function(e){return(window.baseUrl?window.baseUrl:"")+"/api/device/query/snap/"+e.deviceId+"/"+e.channelId},getBigSnap:function(e){return[this.getSnap(e)]},getSnapErrorEvent:function(e,t){var a=this;if(void 0!==this.loadSnap[e+t]){if(console.log("下载截图"+this.loadSnap[e+t]),this.loadSnap[e+t]>5)return void delete this.loadSnap[e+t];setTimeout(function(){var i="/api/device/query/snap/"+e+"/"+t;a.loadSnap[e+t]++,document.getElementById(e+t).setAttribute("src",i+"?"+(new Date).getTime())},1e3)}},showDevice:function(){var e=this;this.$router.push(this.beforeUrl).then(function(){e.initParam(),e.initData()})},changeSubchannel:function(e){var t=this;this.beforeUrl=this.$router.currentRoute.path;var a="/"+this.$router.currentRoute.name+"/"+this.$router.currentRoute.params.deviceId+"/"+e.channelId;this.$router.push(a).then(function(){t.searchSrt="",t.channelType="",t.online="",t.initParam(),t.initData()})},showSubchannels:function(e){var t=this;this.showTree?this.$axios({method:"get",url:"/api/device/query/tree/channel/"+this.deviceId,params:{parentId:this.parentChannelId,page:this.currentPage,count:this.count}}).then(function(e){0===e.data.code&&(t.total=e.data.total,t.deviceChannelList=e.data.list,t.$nextTick(function(){t.$refs.channelListTable.doLayout()}))}).catch(function(e){console.log(e)}):this.$axios({method:"get",url:"/api/device/query/sub_channels/"+this.deviceId+"/"+this.parentChannelId+"/channels",params:{page:this.currentPage,count:this.count,query:this.searchSrt,online:this.online,channelType:this.channelType}}).then(function(e){0===e.data.code&&(t.total=e.data.data.total,t.deviceChannelList=e.data.data.list,t.deviceChannelList.forEach(function(e){e.ptzType=e.ptzType+"",t.$set(e,"edit",!1),t.$set(e,"location",""),e.customLongitude&&e.customLatitude?t.$set(e,"location",e.customLongitude+","+e.customLatitude):e.longitude&&e.latitude&&t.$set(e,"location",e.longitude+","+e.latitude)}),t.$nextTick(function(){t.$refs.channelListTable.doLayout()}))}).catch(function(e){console.log(e)})},search:function(){this.currentPage=1,this.total=0,this.initData()},updateChannel:function(e){this.$axios({method:"post",url:"/api/device/query/channel/update/"+this.deviceId,params:e}).then(function(e){console.log(s()(e))})},subStreamChange:function(){var e=this;this.$confirm("确定重置所有通道的码流类型?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$axios({method:"post",url:"/api/device/query/channel/stream/identification/update/",params:{deviceId:e.deviceId,streamIdentification:e.subStream}}).then(function(t){console.log(s()(t)),e.initData()}).finally(function(){e.subStream=""})}).catch(function(){e.subStream=""})},channelSubStreamChange:function(e){this.$axios({method:"post",url:"/api/device/query/channel/stream/identification/update/",params:{deviceId:this.deviceId,channelId:e.channelId,streamIdentification:e.streamIdentification}}).then(function(e){console.log(s()(e))})},refresh:function(){this.initData()},switchTree:function(){this.showTree=!0,this.deviceChannelList=[],this.parentChannelId=0,this.currentPage=1},switchList:function(){this.showTree=!1,this.deviceChannelList=[],this.parentChannelId=0,this.currentPage=1,this.initData()},treeNodeClickEvent:function(e,t,a){console.log(e),t.channelId?this.parentChannelId=t.channelId:this.parentChannelId=e.deviceId,this.initData()},handleSave:function(e){var t=this;if(e.location){var a=e.location.split(",");if(2!==a.length)return void this.$message.warning("位置信息格式有误,例:117.234,36.378");if(e.customLongitude=parseFloat(a[0]),e.custom_latitude=parseFloat(a[1]),!e.longitude||!e.latitude)return void this.$message.warning("位置信息格式有误,例:117.234,36.378")}else delete e.longitude,delete e.latitude;se()(e).forEach(function(t){var a=e[t];(null===a||void 0===a||"string"==typeof a&&""===a.trim())&&delete e[t]}),this.$axios({method:"post",url:"/api/device/query/channel/update/"+this.deviceId,params:e}).then(function(e){0===e.data.code?(t.$message.success("修改成功!"),t.initData()):t.$message.error("修改失败!")}).catch(function(e){t.$message.error("修改失败!")})},isEdit:function(){var e=!1;return this.deviceChannelList.forEach(function(t){t.edit&&(e=!0)}),e},handleEdit:function(e){this.isEdit()?this.$message.warning("请保存当前编辑项!"):e.edit=!0}}},Ge={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"channelList"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[a("el-button",{staticStyle:{"font-size":"20px",color:"#000"},attrs:{icon:"el-icon-back",size:"mini",type:"text"},on:{click:e.showDevice}}),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v("\n 通道列表\n ")],1),e._v(" "),a("div",{staticClass:"page-header-btn"},[e.showTree?e._e():a("div",{staticStyle:{display:"inline"}},[e._v("\n 搜索:\n "),a("el-input",{staticStyle:{"margin-right":"1rem",width:"auto"},attrs:{size:"mini",placeholder:"关键字","prefix-icon":"el-icon-search",clearable:""},on:{input:e.search},model:{value:e.searchSrt,callback:function(t){e.searchSrt=t},expression:"searchSrt"}}),e._v("\n\n 通道类型:\n "),a("el-select",{staticStyle:{width:"8rem","margin-right":"1rem"},attrs:{size:"mini",placeholder:"请选择","default-first-option":""},on:{change:e.search},model:{value:e.channelType,callback:function(t){e.channelType=t},expression:"channelType"}},[a("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),a("el-option",{attrs:{label:"设备",value:"false"}}),e._v(" "),a("el-option",{attrs:{label:"子目录",value:"true"}})],1),e._v("\n 在线状态:\n "),a("el-select",{staticStyle:{width:"8rem","margin-right":"1rem"},attrs:{size:"mini",placeholder:"请选择","default-first-option":""},on:{change:e.search},model:{value:e.online,callback:function(t){e.online=t},expression:"online"}},[a("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),a("el-option",{attrs:{label:"在线",value:"true"}}),e._v(" "),a("el-option",{attrs:{label:"离线",value:"false"}})],1),e._v("\n 码流类型重置:\n "),a("el-select",{staticStyle:{width:"16rem","margin-right":"1rem"},attrs:{size:"mini",placeholder:"请选择码流类型","default-first-option":""},on:{change:e.subStreamChange},model:{value:e.subStream,callback:function(t){e.subStream=t},expression:"subStream"}},[a("el-option",{attrs:{label:"stream:0(主码流)",value:"stream:0"}}),e._v(" "),a("el-option",{attrs:{label:"stream:1(子码流)",value:"stream:1"}}),e._v(" "),a("el-option",{attrs:{label:"streamnumber:0(主码流-2022)",value:"streamnumber:0"}}),e._v(" "),a("el-option",{attrs:{label:"streamnumber:1(子码流-2022)",value:"streamnumber:1"}}),e._v(" "),a("el-option",{attrs:{label:"streamprofile:0(主码流-大华)",value:"streamprofile:0"}}),e._v(" "),a("el-option",{attrs:{label:"streamprofile:1(子码流-大华)",value:"streamprofile:1"}}),e._v(" "),a("el-option",{attrs:{label:"streamMode:main(主码流-水星+TP-LINK)",value:"streamMode:main"}}),e._v(" "),a("el-option",{attrs:{label:"streamMode:sub(子码流-水星+TP-LINK)",value:"streamMode:sub"}})],1)],1),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh-right",circle:"",size:"mini"},on:{click:function(t){return e.refresh()}}}),e._v(" "),e.showTree?a("el-button",{attrs:{icon:"iconfont icon-list",circle:"",size:"mini"},on:{click:function(t){return e.switchList()}}}):e._e(),e._v(" "),e.showTree?e._e():a("el-button",{attrs:{icon:"iconfont icon-tree",circle:"",size:"mini"},on:{click:function(t){return e.switchTree()}}})],1)]),e._v(" "),a("devicePlayer",{ref:"devicePlayer"}),e._v(" "),a("el-container",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],staticStyle:{height:"82vh"}},[e.showTree?a("el-aside",{staticStyle:{height:"82vh","background-color":"#ffffff",overflow:"auto"},attrs:{width:"auto"}},[a("DeviceTree",{ref:"deviceTree",attrs:{device:e.device,onlyCatalog:!0,clickEvent:e.treeNodeClickEvent}})],1):e._e(),e._v(" "),a("el-main",{staticStyle:{padding:"5px"}},[a("el-table",{ref:"channelListTable",staticStyle:{width:"100%"},attrs:{data:e.deviceChannelList,height:e.winHeight,"header-row-class-name":"table-header"}},[a("el-table-column",{attrs:{prop:"channelId",label:"通道编号","min-width":"180"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deviceId",label:"设备编号","min-width":"180"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"通道名称","min-width":"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{directives:[{name:"show",rawName:"v-show",value:t.row.edit,expression:"scope.row.edit"}],attrs:{placeholder:"通道名称",maxlength:255,"show-word-limit":"",clearable:""},model:{value:t.row.name,callback:function(a){e.$set(t.row,"name",a)},expression:"scope.row.name"}}),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:!t.row.edit,expression:"!scope.row.edit"}]},[e._v(e._s(t.row.name))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"快照","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-image",{staticStyle:{width:"60px"},attrs:{src:e.getSnap(t.row),"preview-src-list":e.getBigSnap(t.row),fit:"contain"},on:{error:function(a){return e.getSnapErrorEvent(t.row.deviceId,t.row.channelId)}}},[a("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[a("i",{staticClass:"el-icon-picture-outline"})])])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"subCount",label:"子节点数","min-width":"100"}}),e._v(" "),a("el-table-column",{attrs:{prop:"manufacture",label:"厂家","min-width":"100"}}),e._v(" "),a("el-table-column",{attrs:{label:"位置信息","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{directives:[{name:"show",rawName:"v-show",value:t.row.edit,expression:"scope.row.edit"}],attrs:{placeholder:"例:117.234,36.378",maxlength:30,"show-word-limit":"",clearable:""},model:{value:t.row.location,callback:function(a){e.$set(t.row,"location",a)},expression:"scope.row.location"}}),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:!t.row.edit,expression:"!scope.row.edit"}]},[e._v(e._s(t.row.location))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"ptzType",label:"云台类型","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{directives:[{name:"show",rawName:"v-show",value:t.row.edit,expression:"scope.row.edit"}],attrs:{placeholder:"云台类型",filterable:""},model:{value:t.row.ptzType,callback:function(a){e.$set(t.row,"ptzType",a)},expression:"scope.row.ptzType"}},e._l(e.ptzTypes,function(e,t){return a("el-option",{key:t,attrs:{label:e,value:t}})}),1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!t.row.edit,expression:"!scope.row.edit"}]},[e._v(e._s(t.row.ptzTypeText))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"开启音频","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-color":"#409EFF"},on:{change:function(a){return e.updateChannel(t.row)}},model:{value:t.row.hasAudio,callback:function(a){e.$set(t.row,"hasAudio",a)},expression:"scope.row.hasAudio"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"码流类型","min-width":"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{"margin-right":"1rem"},attrs:{size:"mini",placeholder:"请选择码流类型","default-first-option":""},on:{change:function(a){return e.channelSubStreamChange(t.row)}},model:{value:t.row.streamIdentification,callback:function(a){e.$set(t.row,"streamIdentification",a)},expression:"scope.row.streamIdentification"}},[a("el-option",{attrs:{label:"stream:0(主码流)",value:"stream:0"}}),e._v(" "),a("el-option",{attrs:{label:"stream:1(子码流)",value:"stream:1"}}),e._v(" "),a("el-option",{attrs:{label:"streamnumber:0(主码流-2022)",value:"streamnumber:0"}}),e._v(" "),a("el-option",{attrs:{label:"streamnumber:1(子码流-2022)",value:"streamnumber:1"}}),e._v(" "),a("el-option",{attrs:{label:"streamprofile:0(主码流-大华)",value:"streamprofile:0"}}),e._v(" "),a("el-option",{attrs:{label:"streamprofile:1(子码流-大华)",value:"streamprofile:1"}}),e._v(" "),a("el-option",{attrs:{label:"streamMode:main(主码流-水星+TP-LINK)",value:"streamMode:main"}}),e._v(" "),a("el-option",{attrs:{label:"streamMode:sub(子码流-水星+TP-LINK)",value:"streamMode:sub"}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[!0===t.row.status?a("el-tag",{attrs:{size:"medium"}},[e._v("在线")]):e._e(),e._v(" "),!1===t.row.status?a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("离线")]):e._e()],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"340",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"medium",disabled:null==e.device||0===e.device.online,icon:"el-icon-video-play",type:"text"},on:{click:function(a){return e.sendDevicePush(t.row)}}},[e._v("播放\n ")]),e._v(" "),t.row.streamId?a("el-button",{staticStyle:{color:"#f56c6c"},attrs:{size:"medium",disabled:null==e.device||0===e.device.online,icon:"el-icon-switch-button",type:"text"},on:{click:function(a){return e.stopDevicePush(t.row)}}},[e._v("停止\n ")]):e._e(),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),t.row.edit?a("el-button",{attrs:{size:"medium",type:"text",icon:"el-icon-edit-outline"},on:{click:function(a){return e.handleSave(t.row)}}},[e._v("\n 保存\n ")]):a("el-button",{attrs:{size:"medium",type:"text",icon:"el-icon-edit"},on:{click:function(a){return e.handleEdit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),t.row.subCount>0||1===t.row.parental?a("el-button",{attrs:{size:"medium",icon:"el-icon-s-open",type:"text"},on:{click:function(a){return e.changeSubchannel(t.row)}}},[e._v("查看\n ")]):e._e(),e._v(" "),t.row.subCount>0||1===t.row.parental?a("el-divider",{attrs:{direction:"vertical"}}):e._e(),e._v(" "),a("el-dropdown",{on:{command:function(a){e.moreClick(a,t.row)}}},[a("el-button",{attrs:{size:"medium",type:"text"}},[e._v("\n 更多功能"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"records",disabled:null==e.device||0===e.device.online}},[e._v("\n 设备录像")]),e._v(" "),a("el-dropdown-item",{attrs:{command:"cloudRecords",disabled:null==e.device||0===e.device.online}},[e._v("\n 云端录像")])],1)],1)]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}})],1)],1)],1)},staticRenderFns:[]};var Ke=a("owSs")(qe,Ge,!1,function(e){a("lZPw")},null,null).exports,We={name:"recordDownload",created:function(){window.addEventListener("beforeunload",this.stopDownloadRecord)},data:function(){return{title:"下载中...",deviceId:"",channelId:"",app:"",stream:"",mediaServerId:"",showDialog:!1,scale:1,percentage:0,streamInfo:null,taskId:null,getProgressRun:!1,timer:null,downloadFile:null}},methods:{openDialog:function(e,t,a,i,o){this.deviceId=e,this.channelId=t,this.app=a,this.stream=i,this.mediaServerId=o,this.showDialog=!0,this.getProgressRun=!0,this.percentage=0,this.getProgressTimer()},getProgressTimer:function(){var e=this;this.getProgressRun&&100!=this.percentage&&setTimeout(function(){e.showDialog&&e.getProgress(e.getProgressTimer())},5e3)},getProgress:function(e){var t=this;this.$axios({method:"get",url:"/api/gb_record/download/progress/"+this.deviceId+"/"+this.channelId+"/"+this.stream}).then(function(a){0===a.data.code?(t.streamInfo=a.data.data,1==parseFloat(a.data.progress)?t.percentage=100:t.percentage=(100*parseFloat(a.data.data.progress)).toFixed(1),t.streamInfo.downLoadFilePath&&("https:"===location.protocol?t.downloadFile=t.streamInfo.downLoadFilePath.httpsPath:t.downloadFile=t.streamInfo.downLoadFilePath.httpPath,t.getProgressRun=!1,t.downloadFileClientEvent()),e&&e()):(t.$message({showClose:!0,message:a.data.msg,type:"error"}),t.close())}).catch(function(e){console.log(e)})},close:function(){this.streamInfo.progress<1&&this.stopDownloadRecord(),null!==this.timer&&(window.clearTimeout(this.timer),this.timer=null),this.showDialog=!1,this.getProgressRun=!1},gbScale:function(e){this.scale=e},stopDownloadRecord:function(e){this.$axios({method:"get",url:"/api/gb_record/download/stop/"+this.deviceId+"/"+this.channelId+"/"+this.stream}).then(function(t){e&&e(t)})},downloadFileClientEvent:function(){var e=this,t=new XMLHttpRequest;t.open("GET",this.downloadFile,!0),t.responseType="blob",t.onload=function(a){var i=window.URL.createObjectURL(t.response),o=document.createElement("a");o.href=i,o.download=e.deviceId+"-"+e.channelId+".mp4",o.click()},t.send()}},destroyed:function(){window.removeEventListener("beforeunload",this.stopDownloadRecord)}},Ve={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"recordDownload"}},[e.showDialog?a("el-dialog",{attrs:{title:e.title,width:"45rem","append-to-body":!0,"close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0,center:""},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("el-row",[a("el-col",{staticStyle:{"padding-top":"7px"},attrs:{span:18}},[a("el-progress",{attrs:{percentage:e.percentage}})],1),e._v(" "),a("el-col",{attrs:{span:6}},[e.downloadFile?a("el-button",{attrs:{icon:"el-icon-download",size:"mini",title:"点击下载"},on:{click:function(t){return e.downloadFileClientEvent()}}},[e._v("下载")]):e._e()],1)],1)],1):e._e()],1)},staticRenderFns:[]};var Ye={name:"app",components:{uiHeader:I,player:ze,recordDownload:a("owSs")(We,Ve,!1,function(e){a("tPA5")},null,null).exports},data:function(){return{deviceId:this.$route.params.deviceId,channelId:this.$route.params.channelId,recordsLoading:!1,streamId:"",hasAudio:!1,detailFiles:[],chooseDate:null,videoUrl:null,chooseFile:null,streamInfo:null,app:null,mediaServerId:null,ssrc:null,sliderMIn:0,sliderMax:86400,autoPlay:!0,taskUpdate:null,tabVal:"running",recordListStyle:{height:this.winHeight+"px",overflow:"auto",margin:"10px auto 10px auto"},playerStyle:{margin:"0 auto 20px auto",height:this.winHeight+"px"},winHeight:window.innerHeight-240,playTime:null,timeRange:null,startTime:null,endTime:null,playTimeSliderMarks:{0:"00:00",3600:"01:00",7200:"02:00",10800:"03:00",14400:"04:00",18000:"05:00",21600:"06:00",25200:"07:00",28800:"08:00",32400:"09:00",36000:"10:00",39600:"11:00",43200:"12:00",46800:"13:00",50400:"14:00",54000:"15:00",57600:"16:00",61200:"17:00",64800:"18:00",68400:"19:00",72000:"20:00",75600:"21:00",79200:"22:00",82800:"23:00",86400:"24:00"}}},computed:{},mounted:function(){this.recordListStyle.height=this.winHeight+"px",this.playerStyle.height=this.winHeight+"px",this.chooseDate=T()().format("YYYY-MM-DD"),this.dateChange(),window.addEventListener("beforeunload",this.stopPlayRecord)},destroyed:function(){this.$destroy("recordVideoPlayer"),window.removeEventListener("beforeunload",this.stopPlayRecord)},methods:{dateChange:function(){var e=this;this.chooseDate&&(this.setTime(this.chooseDate+" 00:00:00",this.chooseDate+" 23:59:59"),this.recordsLoading=!0,this.detailFiles=[],this.$axios({method:"get",url:"/api/gb_record/query/"+this.deviceId+"/"+this.channelId+"?startTime="+this.startTime+"&endTime="+this.endTime}).then(function(t){e.recordsLoading=!1,0===t.data.code?e.detailFiles=t.data.data.recordList:e.$message({showClose:!0,message:t.data.msg,type:"error"})}).catch(function(t){e.recordsLoading=!1}))},moment:function(e){return T()(e)},setTime:function(e,t){this.startTime=e,this.endTime=t;var a=(new Date(this.startTime).getTime()-new Date(this.chooseDate+" 00:00:00").getTime())/1e3,i=(new Date(this.endTime).getTime()-new Date(this.chooseDate+" 00:00:00").getTime())/1e3;console.log(a),console.log(i),this.playTime=[a,i],this.timeRange=[e,t]},videoError:function(e){console.log("播放器错误:"+s()(e))},checkedFile:function(e){this.chooseFile=e,this.setTime(e.startTime,e.endTime),this.playRecord()},playRecord:function(){var e=this;""!==this.streamId?this.stopPlayRecord(function(){e.streamId="",e.playRecord()}):this.$axios({method:"get",url:"/api/playback/start/"+this.deviceId+"/"+this.channelId+"?startTime="+this.startTime+"&endTime="+this.endTime}).then(function(t){0===t.data.code?(e.streamInfo=t.data.data,e.app=e.streamInfo.app,e.streamId=e.streamInfo.stream,e.mediaServerId=e.streamInfo.mediaServerId,e.ssrc=e.streamInfo.ssrc,e.videoUrl=e.getUrlByStreamInfo(),e.hasAudio=e.streamInfo.tracks&&e.streamInfo.tracks.length>1):e.$message({showClose:!0,message:t.data.msg,type:"error"})})},gbPlay:function(){var e=this;console.log("前端控制:播放"),this.$axios({method:"get",url:"/api/playback/resume/"+this.streamId}).then(function(t){e.$refs.recordVideoPlayer.play(e.videoUrl)})},gbPause:function(){console.log("前端控制:暂停"),this.$axios({method:"get",url:"/api/playback/pause/"+this.streamId}).then(function(e){})},gbScale:function(e){console.log("前端控制:倍速 "+e),this.$axios({method:"get",url:"/api/playback/speed/"+this.streamId+"/"+e}).then(function(e){})},downloadRecord:function(e){var t=this;if(!e){var a=T()(new Date(this.chooseDate+" 00:00:00").getTime()+1e3*this.playTime[0]).format("YYYY-MM-DD HH:mm:ss"),i=T()(new Date(this.chooseDate+" 00:00:00").getTime()+1e3*this.playTime[1]).format("YYYY-MM-DD HH:mm:ss");console.log(a),console.log(i),e={startTime:a,endTime:i}}""!==this.streamId?this.stopPlayRecord(function(){t.streamId="",t.downloadRecord(e)}):this.$axios({method:"get",url:"/api/gb_record/download/start/"+this.deviceId+"/"+this.channelId+"?startTime="+e.startTime+"&endTime="+e.endTime+"&downloadSpeed=4"}).then(function(e){if(0===e.data.code){var a=e.data.data;t.$refs.recordDownload.openDialog(t.deviceId,t.channelId,a.app,a.stream,a.mediaServerId)}else t.$message({showClose:!0,message:e.data.msg,type:"error"})})},stopDownloadRecord:function(e){this.$refs.recordVideoPlayer.pause(),this.videoUrl="",this.$axios({method:"get",url:"/api/gb_record/download/stop/"+this.deviceId+"/"+this.channelId+"/"+this.streamId}).then(function(t){e&&e(t)})},stopPlayRecord:function(e){console.log("停止录像回放"),""!==this.streamId&&(this.$refs.recordVideoPlayer.pause(),this.videoUrl="",this.$axios({method:"get",url:"/api/playback/stop/"+this.deviceId+"/"+this.channelId+"/"+this.streamId}).then(function(t){e&&e()}))},getDataWidth:function(e){return 100*(this.getTimeForFile(e)[2]/(1e3*(this.sliderMax-this.sliderMIn)))},getDataLeft:function(e){var t=this.getTimeForFile(e)[0].getTime()-new Date(this.chooseDate+" 00:00:00").getTime();return 100*parseFloat((t-1e3*this.sliderMIn)/(1e3*(this.sliderMax-this.sliderMIn)))},getUrlByStreamInfo:function(){return"https:"===location.protocol?this.videoUrl=this.streamInfo.wss_flv:this.videoUrl=this.streamInfo.ws_flv,this.videoUrl},timePickerChange:function(e){this.setTime(e[0],e[1])},playTimeChange:function(e){console.log(e);var t=T()(new Date(this.chooseDate+" 00:00:00").getTime()+1e3*e[0]).format("YYYY-MM-DD HH:mm:ss"),a=T()(new Date(this.chooseDate+" 00:00:00").getTime()+1e3*e[1]).format("YYYY-MM-DD HH:mm:ss");this.setTime(t,a),this.playRecord()},setSliderFit:function(){if(0===this.sliderMIn&&86400===this.sliderMax){if(this.detailFiles.length>0){var e=this.getTimeForFile(this.detailFiles[0]),t=this.getTimeForFile(this.detailFiles[this.detailFiles.length-1]),a=e[0].getTime()-new Date(this.chooseDate+" 00:00:00").getTime(),i=t[1].getTime()-new Date(this.chooseDate+" 00:00:00").getTime();this.playTime=parseInt(a/1e3),this.sliderMIn=parseInt(a/1e3-a/1e3%3600),this.sliderMax=parseInt(i/1e3-i/1e3%3600)+3600,this.playTime=[this.sliderMIn,this.sliderMax]}}else this.sliderMIn=0,this.sliderMax=86400},getTimeForFile:function(e){var t=new Date(e.startTime),a=new Date(e.endTime);return[t,a,a.getTime()-t.getTime()]},playTimeFormat:function(e){var t=parseInt(e/3600),a=parseInt((e-3600*t)/60),i=parseInt(e-3600*t-60*a),o=t,n=a,r=i;return t<10&&(o="0"+o),a<10&&(n="0"+n),i<10&&(r="0"+r),o+":"+n+":"+r},goBack:function(){var e=this;""!==this.streamId&&this.stopPlayRecord(function(){e.streamId=""}),window.history.go(-1)}}},Je={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[a("el-page-header",{attrs:{content:"国标录像"},on:{back:e.goBack}})],1)]),e._v(" "),a("el-container",[a("el-aside",{attrs:{width:"300px"}},[a("div",{staticClass:"record-list-box-box"},[a("el-date-picker",{attrs:{size:"mini",type:"date","value-format":"yyyy-MM-dd",placeholder:"日期"},on:{change:function(t){return e.dateChange()}},model:{value:e.chooseDate,callback:function(t){e.chooseDate=t},expression:"chooseDate"}}),e._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.recordsLoading,expression:"recordsLoading"}],staticClass:"record-list-box",style:e.recordListStyle},[e.detailFiles.length>0?a("ul",{staticClass:"infinite-list record-list"},e._l(e.detailFiles,function(t){return a("li",{staticClass:"infinite-list-item record-list-item"},[e.chooseFile!=t?a("el-tag",{on:{click:function(a){return e.checkedFile(t)}}},[a("i",{staticClass:"el-icon-video-camera"}),e._v("\n "+e._s(e.moment(t.startTime).format("HH:mm:ss"))+"-"+e._s(e.moment(t.endTime).format("HH:mm:ss"))+"\n ")]):e._e(),e._v(" "),e.chooseFile==t?a("el-tag",{attrs:{type:"danger"}},[a("i",{staticClass:"el-icon-video-camera"}),e._v("\n "+e._s(e.moment(t.startTime).format("HH:mm:ss"))+"-"+e._s(e.moment(t.endTime).format("HH:mm:ss"))+"\n ")]):e._e(),e._v(" "),a("i",{staticClass:"el-icon-download",staticStyle:{color:"#409EFF","margin-left":"5px"},on:{click:function(a){return e.downloadRecord(t)}}})],1)}),0):e._e()]),e._v(" "),0==e.detailFiles.length?a("div",{staticClass:"record-list-no-val",attrs:{size:"mini"}},[e._v("暂无数据")]):e._e()],1)]),e._v(" "),a("el-main",{staticStyle:{"padding-bottom":"10px"}},[a("div",{staticClass:"playBox",style:e.playerStyle},[a("player",{ref:"recordVideoPlayer",staticStyle:{"max-height":"100%"},attrs:{videoUrl:e.videoUrl,error:e.videoError,message:e.videoError,hasAudio:e.hasAudio,fluent:"",autoplay:"",live:""}})],1),e._v(" "),a("div",{staticClass:"player-option-box"},[a("div",[a("el-button-group",[a("el-time-picker",{attrs:{size:"mini","is-range":"",align:"left","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",placeholder:"选择时间范围"},on:{change:e.timePickerChange},model:{value:e.timeRange,callback:function(t){e.timeRange=t},expression:"timeRange"}})],1),e._v(" "),a("el-button-group",[a("el-button",{staticClass:"iconfont icon-zanting",attrs:{size:"mini",title:"开始"},on:{click:function(t){return e.gbPause()}}}),e._v(" "),a("el-button",{staticClass:"iconfont icon-kaishi",attrs:{size:"mini",title:"暂停"},on:{click:function(t){return e.gbPlay()}}}),e._v(" "),a("el-dropdown",{attrs:{size:"mini",title:"播放倍速"},on:{command:e.gbScale}},[a("el-button",{attrs:{size:"mini"}},[e._v("\n 倍速 "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"0.25"}},[e._v("0.25倍速")]),e._v(" "),a("el-dropdown-item",{attrs:{command:"0.5"}},[e._v("0.5倍速")]),e._v(" "),a("el-dropdown-item",{attrs:{command:"1.0"}},[e._v("1倍速")]),e._v(" "),a("el-dropdown-item",{attrs:{command:"2.0"}},[e._v("2倍速")]),e._v(" "),a("el-dropdown-item",{attrs:{command:"4.0"}},[e._v("4倍速")])],1)],1),e._v(" "),a("el-button",{staticClass:"iconfont icon-xiazai1",attrs:{size:"mini",title:"下载选定录像"},on:{click:function(t){return e.downloadRecord()}}}),e._v(" "),0===e.sliderMIn&&86400===e.sliderMax?a("el-button",{staticClass:"iconfont icon-slider",attrs:{size:"mini",title:"放大滑块"},on:{click:function(t){return e.setSliderFit()}}}):e._e(),e._v(" "),0!==e.sliderMIn||86400!==e.sliderMax?a("el-button",{staticClass:"iconfont icon-slider-right",attrs:{size:"mini",title:"恢复滑块"},on:{click:function(t){return e.setSliderFit()}}}):e._e()],1)],1),e._v(" "),a("el-slider",{staticClass:"playtime-slider",attrs:{id:"playtimeSlider",disabled:0===e.detailFiles.length,min:e.sliderMIn,max:e.sliderMax,range:!0,"format-tooltip":e.playTimeFormat,marks:e.playTimeSliderMarks},on:{change:e.playTimeChange},model:{value:e.playTime,callback:function(t){e.playTime=t},expression:"playTime"}}),e._v(" "),a("div",{staticClass:"slider-val-box"},e._l(e.detailFiles,function(t){return a("div",{staticClass:"slider-val",style:"width:"+e.getDataWidth(t)+"%; left:"+e.getDataLeft(t)+"%"})}),0)],1)])],1),e._v(" "),a("recordDownload",{ref:"recordDownload"})],1)},staticRenderFns:[]};var Ze=a("owSs")(Ye,Je,!1,function(e){a("3r45")},null,null).exports,Xe={name:"streamProxyEdit",props:{},computed:{},created:function(){},data:function(){return{listChangeCallback:null,showDialog:!1,isLoging:!1,dialogLoading:!1,onSubmit_text:"立即创建",platformList:[],mediaServer:new pe,proxyParam:{name:null,type:"default",app:null,stream:null,url:"",srcUrl:null,timeoutMs:null,ffmpegCmdKey:null,gbId:null,rtpType:null,enable:!0,enableAudio:!0,enableMp4:!1,noneReader:null,enableRemoveNoneReader:!1,enableDisableNoneReader:!1,platformGbId:null,mediaServerId:null},mediaServerList:{},ffmpegCmdList:{},rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],app:[{required:!0,message:"请输入应用名",trigger:"blur"}],stream:[{required:!0,message:"请输入流ID",trigger:"blur"}],url:[{required:!0,message:"请输入要代理的流",trigger:"blur"}],srcUrl:[{required:!0,message:"请输入要代理的流",trigger:"blur"}],timeoutMs:[{required:!0,message:"请输入FFmpeg推流成功超时时间",trigger:"blur"}],ffmpegCmdKey:[{required:!1,message:"请输入FFmpeg命令参数模板(可选)",trigger:"blur"}]}}},methods:{openDialog:function(e,t){var a=this;this.showDialog=!0,this.listChangeCallback=t,null!=e&&(this.proxyParam=e,this.proxyParam.noneReader=null);var i=this;this.$axios({method:"get",url:"/api/platform/query/10000/1"}).then(function(e){i.platformList=e.data.data.list}).catch(function(e){console.log(e)}),this.mediaServer.getOnlineMediaServerList(function(e){a.mediaServerList=e.data,a.proxyParam.mediaServerId=a.mediaServerList[0].id,a.mediaServerIdChange()})},mediaServerIdChange:function(){var e=this;"auto"!==e.proxyParam.mediaServerId&&e.$axios({method:"get",url:"/api/proxy/ffmpeg_cmd/list",params:{mediaServerId:e.proxyParam.mediaServerId}}).then(function(t){e.ffmpegCmdList=t.data.data,e.proxyParam.ffmpegCmdKey=se()(t.data.data)[0]}).catch(function(e){console.log(e)})},onSubmit:function(){var e=this;this.dialogLoading=!0,this.noneReaderHandler(),this.$axios({method:"post",url:"/api/proxy/save",data:this.proxyParam}).then(function(t){e.dialogLoading=!1,void 0!==t.data.code&&0===t.data.code&&(e.$message({showClose:!0,message:t.data.msg,type:"success"}),e.showDialog=!1,null!=e.listChangeCallback&&(e.listChangeCallback(),e.dialogLoading=!1))}).catch(function(t){console.log(t),e.dialogLoading=!1})},close:function(){this.showDialog=!1,this.dialogLoading=!1,this.$refs.streamProxy.resetFields()},deviceGBIdExit:function(){var e=ne()(ie.a.mark(function e(t){var a,i;return ie.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=!1,i=this,e.next=4,i.$axios({method:"get",url:"/api/platform/exit/"+t}).then(function(e){a=e.data}).catch(function(e){console.log(e)});case 4:return e.abrupt("return",a);case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),checkExpires:function(){this.platform.enable&&"0"==this.platform.expires&&(this.platform.expires="300")},noneReaderHandler:function(){null===this.proxyParam.noneReader||"0"===this.proxyParam.noneReader?(this.proxyParam.enableDisableNoneReader=!1,this.proxyParam.enableRemoveNoneReader=!1):"1"===this.proxyParam.noneReader?(this.proxyParam.enableDisableNoneReader=!0,this.proxyParam.enableRemoveNoneReader=!1):"2"===this.proxyParam.noneReader&&(this.proxyParam.enableDisableNoneReader=!1,this.proxyParam.enableRemoveNoneReader=!0)}}},Qe={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"addStreamProxy"}},[a("el-dialog",{attrs:{title:"添加代理",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-top":"1rem","margin-right":"100px"},attrs:{id:"shared"}},[a("el-form",{ref:"streamProxy",attrs:{rules:e.rules,model:e.proxyParam,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"类型",prop:"type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择代理类型"},model:{value:e.proxyParam.type,callback:function(t){e.$set(e.proxyParam,"type",t)},expression:"proxyParam.type"}},[a("el-option",{attrs:{label:"默认",value:"default"}}),e._v(" "),a("el-option",{attrs:{label:"FFmpeg",value:"ffmpeg"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{attrs:{clearable:""},model:{value:e.proxyParam.name,callback:function(t){e.$set(e.proxyParam,"name",t)},expression:"proxyParam.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"流应用名",prop:"app"}},[a("el-input",{attrs:{clearable:""},model:{value:e.proxyParam.app,callback:function(t){e.$set(e.proxyParam,"app",t)},expression:"proxyParam.app"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"流ID",prop:"stream"}},[a("el-input",{attrs:{clearable:""},model:{value:e.proxyParam.stream,callback:function(t){e.$set(e.proxyParam,"stream",t)},expression:"proxyParam.stream"}})],1),e._v(" "),"default"==e.proxyParam.type?a("el-form-item",{attrs:{label:"拉流地址",prop:"url"}},[a("el-input",{attrs:{clearable:""},model:{value:e.proxyParam.url,callback:function(t){e.$set(e.proxyParam,"url",t)},expression:"proxyParam.url"}})],1):e._e(),e._v(" "),"ffmpeg"==e.proxyParam.type?a("el-form-item",{attrs:{label:"拉流地址",prop:"srcUrl"}},[a("el-input",{attrs:{clearable:""},model:{value:e.proxyParam.srcUrl,callback:function(t){e.$set(e.proxyParam,"srcUrl",t)},expression:"proxyParam.srcUrl"}})],1):e._e(),e._v(" "),"ffmpeg"==e.proxyParam.type?a("el-form-item",{attrs:{label:"超时时间:毫秒",prop:"timeoutMs"}},[a("el-input",{attrs:{clearable:""},model:{value:e.proxyParam.timeoutMs,callback:function(t){e.$set(e.proxyParam,"timeoutMs",t)},expression:"proxyParam.timeoutMs"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"节点选择",prop:"rtpType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择拉流节点"},on:{change:e.mediaServerIdChange},model:{value:e.proxyParam.mediaServerId,callback:function(t){e.$set(e.proxyParam,"mediaServerId",t)},expression:"proxyParam.mediaServerId"}},e._l(e.mediaServerList,function(e){return a("el-option",{key:e.id,attrs:{label:e.id,value:e.id}})}),1)],1),e._v(" "),"ffmpeg"==e.proxyParam.type?a("el-form-item",{attrs:{label:"FFmpeg命令模板",prop:"ffmpegCmdKey"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择FFmpeg命令模板"},model:{value:e.proxyParam.ffmpegCmdKey,callback:function(t){e.$set(e.proxyParam,"ffmpegCmdKey",t)},expression:"proxyParam.ffmpegCmdKey"}},e._l(Object.keys(e.ffmpegCmdList),function(t){return a("el-option",{key:t,attrs:{label:e.ffmpegCmdList[t],value:t}})}),1)],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"国标编码",prop:"gbId"}},[a("el-input",{attrs:{placeholder:"设置国标编码可推送到国标",clearable:""},model:{value:e.proxyParam.gbId,callback:function(t){e.$set(e.proxyParam,"gbId",t)},expression:"proxyParam.gbId"}})],1),e._v(" "),"default"==e.proxyParam.type?a("el-form-item",{attrs:{label:"拉流方式",prop:"rtpType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择拉流方式"},model:{value:e.proxyParam.rtpType,callback:function(t){e.$set(e.proxyParam,"rtpType",t)},expression:"proxyParam.rtpType"}},[a("el-option",{attrs:{label:"TCP",value:"0"}}),e._v(" "),a("el-option",{attrs:{label:"UDP",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"组播",value:"2"}})],1)],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"无人观看",prop:"rtpType"}},[a("el-radio",{attrs:{label:"0"},model:{value:e.proxyParam.noneReader,callback:function(t){e.$set(e.proxyParam,"noneReader",t)},expression:"proxyParam.noneReader"}},[e._v("不做处理")]),e._v(" "),a("el-radio",{attrs:{label:"1"},model:{value:e.proxyParam.noneReader,callback:function(t){e.$set(e.proxyParam,"noneReader",t)},expression:"proxyParam.noneReader"}},[e._v("停用")]),e._v(" "),a("el-radio",{attrs:{label:"2"},model:{value:e.proxyParam.noneReader,callback:function(t){e.$set(e.proxyParam,"noneReader",t)},expression:"proxyParam.noneReader"}},[e._v("移除")])],1),e._v(" "),a("el-form-item",{attrs:{label:"其他选项"}},[a("div",{staticStyle:{float:"left"}},[a("el-checkbox",{attrs:{label:"启用"},model:{value:e.proxyParam.enable,callback:function(t){e.$set(e.proxyParam,"enable",t)},expression:"proxyParam.enable"}}),e._v(" "),a("el-checkbox",{attrs:{label:"开启音频"},model:{value:e.proxyParam.enableAudio,callback:function(t){e.$set(e.proxyParam,"enableAudio",t)},expression:"proxyParam.enableAudio"}}),e._v(" "),a("el-checkbox",{attrs:{label:"录制"},model:{value:e.proxyParam.enableMp4,callback:function(t){e.$set(e.proxyParam,"enableMp4",t)},expression:"proxyParam.enableMp4"}})],1)]),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary",loading:e.dialogLoading},on:{click:e.onSubmit}},[e._v(e._s(e.onSubmit_text))]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},et=a("owSs")(Xe,Qe,!1,null,null,null).exports,tt={name:"pushStreamEdit",props:{},computed:{},created:function(){},data:function(){return{listChangeCallback:null,showDialog:!1,isLoging:!1,edit:!1,proxyParam:{name:null,app:null,stream:null,gbId:null,longitude:null,latitude:null},rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],app:[{required:!0,message:"请输入应用名",trigger:"blur"}],stream:[{required:!0,message:"请输入流ID",trigger:"blur"}],gbId:[{required:!0,message:"请输入国标编码",trigger:"blur"}]}}},methods:{openDialog:function(e,t){this.showDialog=!0,this.listChangeCallback=t,null!=e?(this.proxyParam=e,this.edit=!0):(this.proxyParam={name:null,app:null,stream:null,gbId:null,longitude:null,latitude:null},this.edit=!1)},onSubmit:function(){var e=this;console.log("onSubmit"),this.edit?this.$axios({method:"post",url:"/api/push/save_to_gb",data:this.proxyParam}).then(function(t){0===t.data.code&&(e.$message({showClose:!0,message:"保存成功",type:"success"}),e.showDialog=!1,null!=e.listChangeCallback&&e.listChangeCallback())}).catch(function(e){console.log(e)}):this.$axios({method:"post",url:"/api/push/add",data:this.proxyParam}).then(function(t){0===t.data.code&&(e.$message({showClose:!0,message:"保存成功",type:"success"}),e.showDialog=!1,null!=e.listChangeCallback&&e.listChangeCallback())}).catch(function(e){console.log(e)})},close:function(){console.log("关闭加入GB"),this.showDialog=!1,this.$refs.streamProxy.resetFields()},deviceGBIdExit:function(){var e=ne()(ie.a.mark(function e(t){var a,i;return ie.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=!1,i=this,e.next=4,i.$axios({method:"get",url:"/api/platform/exit/"+t}).then(function(e){a=e.data}).catch(function(e){console.log(e)});case 4:return e.abrupt("return",a);case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),checkExpires:function(){this.platform.enable&&"0"==this.platform.expires&&(this.platform.expires="300")},handleNodeClick:function(e){}}},at={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"addStreamProxy"}},[a("el-dialog",{attrs:{title:" 加入",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-top":"1rem","margin-right":"100px"},attrs:{id:"shared"}},[a("el-form",{ref:"streamProxy",attrs:{rules:e.rules,model:e.proxyParam,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{attrs:{clearable:""},model:{value:e.proxyParam.name,callback:function(t){e.$set(e.proxyParam,"name",t)},expression:"proxyParam.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"流应用名",prop:"app"}},[a("el-input",{attrs:{clearable:"",disabled:e.edit},model:{value:e.proxyParam.app,callback:function(t){e.$set(e.proxyParam,"app",t)},expression:"proxyParam.app"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"流ID",prop:"stream"}},[a("el-input",{attrs:{clearable:"",disabled:e.edit},model:{value:e.proxyParam.stream,callback:function(t){e.$set(e.proxyParam,"stream",t)},expression:"proxyParam.stream"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"国标编码",prop:"gbId"}},[a("el-input",{attrs:{placeholder:"设置国标编码可推送到国标",clearable:""},model:{value:e.proxyParam.gbId,callback:function(t){e.$set(e.proxyParam,"gbId",t)},expression:"proxyParam.gbId"}})],1),e._v(" "),e.proxyParam.gbId?a("el-form-item",{attrs:{label:"经度",prop:"longitude"}},[a("el-input",{attrs:{placeholder:"经度",clearable:""},model:{value:e.proxyParam.longitude,callback:function(t){e.$set(e.proxyParam,"longitude",t)},expression:"proxyParam.longitude"}})],1):e._e(),e._v(" "),e.proxyParam.gbId?a("el-form-item",{attrs:{label:"纬度",prop:"latitude"}},[a("el-input",{attrs:{placeholder:"经度",clearable:""},model:{value:e.proxyParam.latitude,callback:function(t){e.$set(e.proxyParam,"latitude",t)},expression:"proxyParam.latitude"}})],1):e._e(),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},it=a("owSs")(tt,at,!1,null,null,null).exports,ot={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"importChannelShowErrorData"}},[a("el-dialog",{attrs:{title:"导入通道数据成功,但数据存在重复",width:"30rem",top:"2rem","append-to-body":!0,"close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",[e._v("\n 重复国标ID:\n "),a("el-button",{directives:[{name:"clipboard",rawName:"v-clipboard",value:e.gbIds.join(","),expression:"gbIds.join(',')"}],staticStyle:{float:"right"},attrs:{type:"primary",size:"mini",icon:"el-icon-document-copy",title:"点击拷贝"},on:{success:function(t){return e.$message({type:"success",message:"成功拷贝到粘贴板"})}}},[e._v("复制")]),e._v(" "),a("ul",{staticClass:"errDataBox"},e._l(e.gbIds,function(t){return a("li",[e._v("\n "+e._s(t)+"\n ")])}),0)],1),e._v(" "),a("div",[e._v("\n 重复App/stream:\n "),a("el-button",{directives:[{name:"clipboard",rawName:"v-clipboard",value:e.streams.join(","),expression:"streams.join(',')"}],staticStyle:{float:"right"},attrs:{type:"primary",size:"mini",icon:"el-icon-document-copy",title:"点击拷贝"},on:{success:function(t){return e.$message({type:"success",message:"成功拷贝到粘贴板"})}}},[e._v("复制")]),e._v(" "),a("ul",{staticClass:"errDataBox"},e._l(e.streams,function(t){return a("li",[e._v("\n "+e._s(t)+"\n ")])}),0)],1)])],1)},staticRenderFns:[]};var nt={name:"importChannel",components:{ShowErrorData:a("owSs")({name:"importChannelShowErrorData",computed:{},created:function(){},props:["gbIds","streams"],data:function(){return{isLoging:!1,showDialog:!1}},methods:{openDialog:function(){this.showDialog=!0},close:function(){this.showDialog=!1}}},ot,!1,function(e){a("UdsP")},null,null).exports},created:function(){},data:function(){return{submitCallback:null,showDialog:!1,isLoging:!1,isEdit:!1,errorStreams:[],errorGBIds:[],headers:{"access-token":d()},uploadUrl:(window.baseUrl?window.baseUrl:"")+"/api/push/upload"}},methods:{openDialog:function(e){this.showDialog=!0,this.submitCallback=e},onSubmit:function(){var e=this;console.log("onSubmit"),console.log(this.form),this.$axios({method:"post",url:"/api/platform/catalog/"+(this.isEdit?"edit":"add"),data:this.form}).then(function(t){0===t.data.code?(console.log("添加/修改成功"),e.submitCallback&&e.submitCallback()):e.$message({showClose:!0,message:t.data.msg,type:"error"}),e.close()}).catch(function(e){console.log(e)})},close:function(){this.showDialog=!1},successHook:function(e,t,a){0===e.code?this.$message({showClose:!0,message:e.msg,type:"success"}):1===e.code?(this.errorGBIds=e.data.gbId,this.errorStreams=e.data.stream,console.log(this.$refs),console.log(this.$refs.showErrorData),this.$refs.showErrorData.openDialog()):this.$message({showClose:!0,message:e.msg,type:"error"})},errorHook:function(e,t,a){this.$message({showClose:!0,message:e,type:"error"})}}},rt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"importChannel"}},[a("el-dialog",{attrs:{title:"导入通道数据",width:"30rem",top:"2rem","append-to-body":!0,"close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",[a("el-upload",{staticClass:"upload-box",attrs:{drag:"",action:e.uploadUrl,name:"file",headers:e.headers,"on-success":e.successHook,"on-error":e.errorHook}},[a("i",{staticClass:"el-icon-upload"}),e._v(" "),a("div",{staticClass:"el-upload__text"},[e._v("将文件拖到此处,或"),a("em",[e._v("点击上传")])]),e._v(" "),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("只能上传 csv / xls / xlsx 文件")])])],1)]),e._v(" "),a("ShowErrorData",{ref:"showErrorData",attrs:{gbIds:e.errorGBIds,streams:e.errorStreams}})],1)},staticRenderFns:[]};var st={name:"pushVideoList",components:{devicePlayer:Ue,addStreamTOGB:it,streamProxyEdit:et,uiHeader:I,importChannel:a("owSs")(nt,rt,!1,function(e){a("Fcae")},null,null).exports},data:function(){return{pushList:[],currentPusher:{},updateLooper:0,currentDeviceChannelsLenth:0,winHeight:window.innerHeight-250,mediaServerObj:new pe,currentPage:1,count:15,total:0,searchSrt:"",pushing:"",mediaServerId:"",mediaServerList:[],multipleSelection:[],getDeviceListLoading:!1}},computed:{},mounted:function(){this.initData(),this.updateLooper=setInterval(this.getPushList,2e3)},destroyed:function(){clearTimeout(this.updateLooper)},methods:{initData:function(){var e=this;this.mediaServerObj.getOnlineMediaServerList(function(t){e.mediaServerList=t.data}),this.getPushList()},currentChange:function(e){this.currentPage=e,this.getPushList()},handleSizeChange:function(e){this.count=e,this.getPushList()},getPushList:function(){var e=this;this.getDeviceListLoading=!0,this.$axios({method:"get",url:"/api/push/list",params:{page:e.currentPage,count:e.count,query:e.searchSrt,pushing:e.pushing,mediaServerId:e.mediaServerId}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.pushList=t.data.data.list),e.getDeviceListLoading=!1}).catch(function(t){console.error(t),e.getDeviceListLoading=!1})},playPush:function(e){var t=this;this.getListLoading=!0,this.$axios({method:"get",url:"/api/push/getPlayUrl",params:{app:e.app,stream:e.stream,mediaServerId:e.mediaServerId}}).then(function(e){t.getListLoading=!1,0===e.data.code?t.$refs.devicePlayer.openDialog("streamPlay",null,null,{streamInfo:e.data.data,hasAudio:!0}):t.$message.error(e.data.msg)}).catch(function(e){console.error(e),t.getListLoading=!1})},stopPush:function(e){var t=this;t.$axios({method:"post",url:"/api/push/stop",params:{app:e.app,streamId:e.stream}}).then(function(e){0===e.data.code&&t.initData()}).catch(function(e){console.error(e)})},addToGB:function(e){this.$refs.addStreamTOGB.openDialog({app:e.app,stream:e.stream,mediaServerId:e.mediaServerId},this.initData)},removeFromGB:function(e){var t=this;t.$axios({method:"delete",url:"/api/push/remove_form_gb",data:e}).then(function(e){0===e.data.code&&t.initData()}).catch(function(e){console.error(e)})},queryCloudRecords:function(e){this.$router.push("/cloudRecordDetail/"+e.app+"/"+e.stream)},importChannel:function(){this.$refs.importChannel.openDialog(function(){})},addStream:function(){this.$refs.addStreamTOGB.openDialog(null,this.initData)},batchDel:function(){var e=this;this.$confirm("确定删除选中的"+this.multipleSelection.length+"个通道?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$axios({method:"delete",url:"/api/push/batchStop",data:{gbStreams:e.multipleSelection}}).then(function(t){e.initData(),e.$refs.pushListTable.clearSelection()}).catch(function(e){console.error(e)})}).catch(function(){})},handleSelectionChange:function(e){this.multipleSelection=e},refresh:function(){this.initData()}}},lt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"pushVideoList"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[e._v("推流列表")]),e._v(" "),a("div",{staticClass:"page-header-btn"},[e._v("\n 搜索:\n "),a("el-input",{staticStyle:{"margin-right":"1rem",width:"auto"},attrs:{size:"mini",placeholder:"关键字","prefix-icon":"el-icon-search",clearable:""},on:{input:e.getPushList},model:{value:e.searchSrt,callback:function(t){e.searchSrt=t},expression:"searchSrt"}}),e._v("\n 流媒体:\n "),a("el-select",{staticStyle:{"margin-right":"1rem"},attrs:{size:"mini",placeholder:"请选择","default-first-option":""},on:{change:e.getPushList},model:{value:e.mediaServerId,callback:function(t){e.mediaServerId=t},expression:"mediaServerId"}},[a("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),e._l(e.mediaServerList,function(e){return a("el-option",{key:e.id,attrs:{label:e.id,value:e.id}})})],2),e._v("\n 推流状态:\n "),a("el-select",{staticStyle:{"margin-right":"1rem"},attrs:{size:"mini",placeholder:"请选择","default-first-option":""},on:{change:e.getPushList},model:{value:e.pushing,callback:function(t){e.pushing=t},expression:"pushing"}},[a("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),a("el-option",{attrs:{label:"推流进行中",value:"true"}}),e._v(" "),a("el-option",{attrs:{label:"推流未进行",value:"false"}})],1),e._v(" "),a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-upload2",size:"mini",type:"primary"},on:{click:e.importChannel}},[e._v("\n 通道导入\n ")]),e._v(" "),a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-download",size:"mini",type:"primary"}},[a("a",{staticStyle:{color:"#FFFFFF","text-align":"center","text-decoration":"none"},attrs:{href:"/static/file/推流通道导入.zip",download:"推流通道导入.zip"}},[e._v("下载模板")])]),e._v(" "),a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-delete",size:"mini",disabled:0===e.multipleSelection.length,type:"danger"},on:{click:e.batchDel}},[e._v("批量移除\n ")]),e._v(" "),a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.addStream}},[e._v("添加通道\n ")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh-right",circle:"",size:"mini"},on:{click:function(t){return e.refresh()}}})],1)]),e._v(" "),a("devicePlayer",{ref:"devicePlayer"}),e._v(" "),a("addStreamTOGB",{ref:"addStreamTOGB"}),e._v(" "),a("el-table",{ref:"pushListTable",staticStyle:{width:"100%"},attrs:{data:e.pushList,height:e.winHeight,"row-key":function(e){return e.app+e.stream}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection","reserve-selection":!0,"min-width":"55"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"app",label:"APP","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"stream",label:"流ID","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"gbId",label:"国标编码","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mediaServerId",label:"流媒体","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{label:"开始时间","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button-group",[e._v("\n "+e._s(null==t.row.pushTime?"-":t.row.pushTime)+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"正在推流","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.pushIng?"是":"否")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"本平台推流","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.pushIng&&t.row.self?"是":"否")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"360",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[!0===t.row.pushIng?a("el-button",{attrs:{size:"medium",icon:"el-icon-video-play",type:"text"},on:{click:function(a){return e.playPush(t.row)}}},[e._v("播放\n ")]):e._e(),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{staticStyle:{color:"#f56c6c"},attrs:{size:"medium",icon:"el-icon-delete",type:"text"},on:{click:function(a){return e.stopPush(t.row)}}},[e._v("移除")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),t.row.gbId?e._e():a("el-button",{attrs:{size:"medium",icon:"el-icon-position",type:"text"},on:{click:function(a){return e.addToGB(t.row)}}},[e._v("加入国标\n ")]),e._v(" "),t.row.gbId?e._e():a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),t.row.gbId?a("el-button",{attrs:{size:"medium",icon:"el-icon-position",type:"text"},on:{click:function(a){return e.removeFromGB(t.row)}}},[e._v("移出国标\n ")]):e._e(),e._v(" "),a("el-button",{attrs:{size:"medium",icon:"el-icon-cloudy",type:"text"},on:{click:function(a){return e.queryCloudRecords(t.row)}}},[e._v("云端录像\n ")])]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}}),e._v(" "),a("streamProxyEdit",{ref:"streamProxyEdit"}),e._v(" "),a("importChannel",{ref:"importChannel"})],1)},staticRenderFns:[]};var ct=a("owSs")(st,lt,!1,function(e){a("rJg5")},null,null).exports,dt={name:"onvifEdit",props:{},computed:{},created:function(){},data:function(){return{listChangeCallback:null,showDialog:!1,isLoging:!1,hostNames:[],form:{hostName:null,username:"admin",password:"admin123"},rules:{hostName:[{required:!0,message:"请选择",trigger:"blur"}],username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}}},methods:{openDialog:function(e,t){console.log(e),this.showDialog=!0,this.listChangeCallback=t,null!=e&&(this.hostNames=e)},onSubmit:function(){var e=this;console.log("onSubmit"),console.log(this.form),this.$axios({method:"get",url:"/api/onvif/rtsp",params:{hostname:this.form.hostName,timeout:3e3,username:this.form.username,password:this.form.password}}).then(function(t){console.log(t.data),0===t.data.code&&null!=t.data.data?e.listChangeCallback(t.data.data):e.$message({showClose:!0,message:t.data.msg,type:"error"})}).catch(function(e){console.log(e)})},close:function(){this.showDialog=!1,this.$refs.form.resetFields()}}},ut={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"onvif搜索"}},[a("el-dialog",{attrs:{title:"onvif搜索",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-top":"1rem","margin-right":"100px"},attrs:{id:"shared"}},[a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"地址",prop:"hostName"}},[a("el-select",{staticStyle:{float:"left",width:"100%"},model:{value:e.form.hostName,callback:function(t){e.$set(e.form,"hostName",t)},expression:"form.hostName"}},e._l(e.hostNames,function(e){return a("el-option",{key:e,attrs:{label:e.replace("http://",""),value:e}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"用户名",prop:"username"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"密码",prop:"password"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确认")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},mt={name:"streamProxyList",components:{devicePlayer:Ue,streamProxyEdit:et,onvifEdit:a("owSs")(dt,ut,!1,null,null,null).exports,uiHeader:I},data:function(){return{streamProxyList:[],currentPusher:{},updateLooper:0,currentDeviceChannelsLenth:0,winHeight:window.innerHeight-250,currentPage:1,count:15,total:0,startBtnLoading:!1}},computed:{},mounted:function(){this.initData(),this.startUpdateList()},destroyed:function(){this.$destroy("videojs"),clearTimeout(this.updateLooper)},methods:{initData:function(){this.getStreamProxyList()},stopUpdateList:function(){window.clearInterval(this.updateLooper)},startUpdateList:function(){this.updateLooper=setInterval(this.initData,1e3)},currentChange:function(e){this.currentPage=e,this.getStreamProxyList()},handleSizeChange:function(e){this.count=e,this.getStreamProxyList()},getStreamProxyList:function(){var e=this;this.$axios({method:"get",url:"/api/proxy/list",params:{page:e.currentPage,count:e.count}}).then(function(t){if(0===t.data.code){e.total=t.data.data.total;for(var a=0;a<t.data.data.list.length;a++)t.data.data.list[a].startBtnLoading=!1;e.streamProxyList=t.data.data.list}}).catch(function(e){console.log(e)})},addStreamProxy:function(){this.$refs.streamProxyEdit.openDialog(null,this.initData)},addOnvif:function(){var e=this;this.$axios({method:"get",url:"/api/onvif/search?timeout=3000"}).then(function(t){0===t.data.code?t.data.data.length>0?e.$refs.onvifEdit.openDialog(t.data.data,function(t){null!=t&&(e.$refs.onvifEdit.close(),e.$refs.streamProxyEdit.openDialog({type:"default",url:t,srcUrl:t},e.initData()))}):e.$message.success("未找到可用设备"):e.$message.error(t.data.msg)}).catch(function(t){e.$message.error(t.response.data.msg)})},saveStreamProxy:function(){},play:function(e){var t=this;this.$axios({method:"get",url:"/api/push/getPlayUrl",params:{app:e.app,stream:e.stream,mediaServerId:e.mediaServerId}}).then(function(e){0===e.data.code?t.$refs.devicePlayer.openDialog("streamPlay",null,null,{streamInfo:e.data.data,hasAudio:!0}):t.$message({showClose:!0,message:"获取地址失败:"+e.data.msg,type:"error"})}).catch(function(e){console.log(e)})},queryCloudRecords:function(e){this.$router.push("/cloudRecordDetail/"+e.app+"/"+e.stream)},deleteStreamProxy:function(e){var t=this;this.$confirm("确定删除此代理吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$axios({method:"delete",url:"/api/proxy/del",params:{app:e.app,stream:e.stream}}).then(function(e){t.initData()}).catch(function(e){console.log(e)})}).catch(function(){})},start:function(e){var t=this;this.stopUpdateList(),this.$set(e,"startBtnLoading",!0),this.$axios({method:"get",url:"/api/proxy/start",params:{app:e.app,stream:e.stream}}).then(function(a){0===a.data.code?t.initData():t.$message({showClose:!0,message:"启动失败,请检查地址是否可用!",type:"error"}),t.$set(e,"startBtnLoading",!1),t.startUpdateList()}).catch(function(a){console.log(a),t.$message({showClose:!0,message:"启动失败,请检查地址是否可用!",type:"error"}),t.$set(e,"startBtnLoading",!1),t.startUpdateList()})},stop:function(e){var t=this;this.$axios({method:"get",url:"/api/proxy/stop",params:{app:e.app,stream:e.stream}}).then(function(e){t.initData()}).catch(function(e){console.log(e)})},refresh:function(){this.initData()}}},ht={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"streamProxyList"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[e._v("拉流代理列表")]),e._v(" "),a("div",{staticClass:"page-header-btn"},[a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.addStreamProxy}},[e._v("添加代理")]),e._v(" "),e._e(),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh-right",circle:"",size:"mini"},on:{click:function(t){return e.refresh()}}})],1)]),e._v(" "),a("devicePlayer",{ref:"devicePlayer"}),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.streamProxyList,height:e.winHeight}},[a("el-table-column",{attrs:{prop:"name",label:"名称","min-width":"120","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"app",label:"流应用名","min-width":"120","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"stream",label:"流ID","min-width":"120","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"流地址","min-width":"400","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},["default"==t.row.type?a("el-tag",{attrs:{size:"medium"}},[a("i",{directives:[{name:"clipboard",rawName:"v-clipboard",value:t.row.url,expression:"scope.row.url"}],staticClass:"cpoy-btn el-icon-document-copy",attrs:{title:"点击拷贝"},on:{success:function(t){return e.$message({type:"success",message:"成功拷贝到粘贴板"})}}}),e._v("\n "+e._s(t.row.url)+"\n ")]):e._e(),e._v(" "),"default"!=t.row.type?a("el-tag",{attrs:{size:"medium"}},[a("i",{directives:[{name:"clipboard",rawName:"v-clipboard",value:t.row.srcUrl,expression:"scope.row.srcUrl"}],staticClass:"cpoy-btn el-icon-document-copy",attrs:{title:"点击拷贝"},on:{success:function(t){return e.$message({type:"success",message:"成功拷贝到粘贴板"})}}}),e._v("\n "+e._s(t.row.srcUrl)+"\n ")]):e._e()],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"mediaServerId",label:"流媒体","min-width":"180"}}),e._v(" "),a("el-table-column",{attrs:{label:"类型",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[a("el-tag",{attrs:{size:"medium"}},[e._v(e._s("default"===t.row.type?"直接代理":"FFMPEG代理"))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"gbId",label:"国标编码","min-width":"180","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.status?a("el-tag",{attrs:{size:"medium"}},[e._v("在线")]):e._e(),e._v(" "),t.row.status?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("离线")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"启用","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.enable?a("el-tag",{attrs:{size:"medium"}},[e._v("已启用")]):e._e(),e._v(" "),t.row.enable?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("未启用")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间","min-width":"150","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"音频","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.enableAudio?a("el-tag",{attrs:{size:"medium"}},[e._v("已启用")]):e._e(),e._v(" "),t.row.enableAudio?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("未启用")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"录制","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.enableMp4?a("el-tag",{attrs:{size:"medium"}},[e._v("已启用")]):e._e(),e._v(" "),t.row.enableMp4?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("未启用")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"无人观看","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.enableRemoveNoneReader?a("el-tag",{attrs:{size:"medium"}},[e._v("移除")]):e._e(),e._v(" "),t.row.enableDisableNoneReader?a("el-tag",{attrs:{size:"medium"}},[e._v("停用")]):e._e(),e._v(" "),t.row.enableRemoveNoneReader||t.row.enableDisableNoneReader?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("不做处理")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"360",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.enable?a("el-button",{attrs:{size:"medium",icon:"el-icon-video-play",type:"text"},on:{click:function(a){return e.play(t.row)}}},[e._v("播放")]):e._e(),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),t.row.enable?a("el-button",{attrs:{size:"medium",icon:"el-icon-switch-button",type:"text"},on:{click:function(a){return e.stop(t.row)}}},[e._v("停用")]):e._e(),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),t.row.enable?e._e():a("el-button",{attrs:{size:"medium",icon:"el-icon-check",type:"text",loading:t.row.startBtnLoading},on:{click:function(a){return e.start(t.row)}}},[e._v("启用")]),e._v(" "),t.row.enable?e._e():a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{staticStyle:{color:"#f56c6c"},attrs:{size:"medium",icon:"el-icon-delete",type:"text"},on:{click:function(a){return e.deleteStreamProxy(t.row)}}},[e._v("删除")]),e._v(" "),a("el-button",{attrs:{size:"medium",icon:"el-icon-cloudy",type:"text"},on:{click:function(a){return e.queryCloudRecords(t.row)}}},[e._v("云端录像\n ")])]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}}),e._v(" "),a("streamProxyEdit",{ref:"streamProxyEdit"}),e._v(" "),a("onvifEdit",{ref:"onvifEdit"})],1)},staticRenderFns:[]};var pt=a("owSs")(mt,ht,!1,function(e){a("bkQN")},null,null).exports,ft=(a("XEAn"),a("0zw2")),gt=a("Ob4H"),vt=a("sIRu"),bt=a("lQ+5"),yt=a("OJdl"),_t=a("NEjH"),wt=a("MmoT"),St=a("Ctv2"),xt=a("0ni3"),Ct=a("u0y6"),kt=a("2JGy"),It=a("5P71"),Pt=a("1/Zn"),Dt=a("YOAf"),$t=a("zf4/"),Lt=a("qxpn"),Tt=a("zeKr"),Ft=null,Et={name:"MapComponent",components:{DevicePlayer:Ue},data:function(){return{infoBoxId:null,isInfoBoxOpen:!1,longitudeStr:"longitude",latitudeStr:"latitude",isLoging:!1,loadSnap:{},mydata:null}},created:function(){var e=this;"GCJ-02"===window.mapParam.coordinateSystem?(this.longitudeStr="longitudeGcj02",this.latitudeStr="latitudeGcj02"):"WGS84"===window.mapParam.coordinateSystem?(this.longitudeStr="longitudeWgs84",this.latitudeStr="latitudeWgs84"):(this.longitudeStr="longitude",this.latitudeStr="latitude"),this.$nextTick(function(){setTimeout(function(){e.init()},100)})},props:{parentMessage:{type:[],required:!0}},watch:{parentMessage:function(e){var t=this;this.$nextTick(function(){setTimeout(function(){t.drawPoints()},100)})}},mounted:function(){},methods:{init:function(){var e=Object(Dt.e)([116.31374,39.958339]);e=Object(Dt.e)([this.latitude,this.longitude]),mapParam.center&&(e=Object(Dt.e)(mapParam.center));var t=new Ct.a({center:e,zoom:mapParam.zoom||10,projection:this.projection,maxZoom:mapParam.maxZoom||19,minZoom:mapParam.minZoom||1}),a=null;a=mapParam.tilesUrl?new yt.a({source:new vt.a({projection:Object(Dt.i)("EPSG:3857"),wrapX:!1,tileSize:256,url:mapParam.tilesUrl})}):new yt.a({preload:4,source:new gt.a}),Ft=new ft.a({target:this.$refs.mapContainer,layers:[a],view:t,controls:[new $t.a]})},drawPoints:function(){var e=this;console.log("parentMessage : ",this.$props.parentMessage),this.mydata=this.$props.parentMessage.map(function(e){return{position:[parseFloat(e.this.longitudeStr),parseFloat(e.this.latitudeStr)],data:{id:e.id,name:e.name,type:e.deviceCategory,deviceId:e.deviceId,channelId:"34020000001310000001",hasAudio:!0,streamId:""},image:{anchor:[.5,.5],src:"static/images/gis/weather.png"}}}),null==Ft?console.log("variable is null"):console.log("variable is not null"),this.mydata.forEach(function(t){"2"===t.data.type?e.addLayer([t],e.onMapClick):(e.addLayer([t],e.sendDevicePush),e.$axios({method:"get",url:"/api/alarm/latest/"+t.data.deviceId}).then(function(a){console.log("/api/alarm/latest/"),console.log(a.data.data);var i="",o="white",n="";switch(a.data.data.alarmPriority){case"1":o="red",n="Ⅰ";break;case"2":o="orange",n="Ⅱ";break;case"3":o="yellow",n="Ⅲ";break;case"4":o="blue",n="Ⅳ";break;default:o="blue",n=a.data.data.alarmPriority}i+="报警级别:"+n+"级<br>",i+="报警时间:"+a.data.data.alarmTime+"<br>",i+="报警信息:"+a.data.data.alarmDescription+"<br>";e.openInfoBox(t.position,i,[0,0],o)}).catch(function(e){console.log(e)}))})},onMapClick:function(e){var t=this;if(this.isInfoBoxOpen)this.closeInfoBox(this.infoBoxId),this.isInfoBoxOpen=!1;else{var a="";this.$axios({method:"get",url:"http://62.234.27.199:5000/api/weather_data",withCredentials:!0,headers:{"Content-Type":"application/json"}}).then(function(e){for(var i=["设备ID:","设备地址:","风力信息:","风速信息:","风向信息:"," ","温度信息:","湿度信息:","噪音信息:","PM10信息:","PM2.5信息:","大气压信息:","光照度信息:","降雨量:"],o=[" "," ","级","m/s","°"," ","℃","%","db","ug/m3","ug/m3","Kpa","lux","mm"],n=0;n<e.data.length;n++){var r=se()(e.data)[n];5!=n&&(a+=i[n]+e.data[r]+o[n]+"<br>")}console.log(a);var s=t.openInfoBox([116.31374,39.958339],a,[0,0]);t.infoBoxId=s,t.isInfoBoxOpen=!0}).catch(function(e){console.error(e)})}},getVectorLayer:function(){return this.someVectorLayerRef},setCenter:function(e){},zoomIn:function(e){},zoomOut:function(e){},centerAndZoom:function(e,t,a){var i=Ft.getView().getZoom();t=t||i;Ft.getView().setCenter(Object(Dt.e)(e)),Ft.getView().animate({zoom:t,duration:600})},panTo:function(e,t){Ft.getView().cancelAnimations(),Ft.getView().animate({center:Object(Dt.e)(e),duration:800}),Object(Lt.f)(Ft.getView().calculateExtent(),Object(Dt.e)(e))||Ft.getView().animate({zoom:Ft.getView().getZoom()-1,duration:400},{zoom:t||Ft.getView().getZoom(),duration:400})},fit:function(e){var t=e.getSource().getExtent();t&&Ft.getView().fit(t,{duration:600,padding:[100,100,100,100]})},openInfoBox:function(e,t,a){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var i=Object(Tt.a)(),o=new It.a({id:i,autoPan:!0,autoPanAnimation:{duration:250},element:t,positioning:"bottom-center",offset:a});return Ft.addOverlay(o),o.setPosition(Object(Dt.e)(e)),i},closeInfoBox:function(e){Ft.getOverlayById(e).setPosition(void 0)},addLayer:function(e,t){var a=new wt.c;if(e.length>0){for(var i=[],o=0;o<e.length;o++){var n=new kt.a(new Pt.b(Object(Dt.e)(e[o].position)));n.customData=e[o].data;var r=a.clone();r.setImage(new xt.a({anchor:e[o].image.anchor,crossOrigin:"Anonymous",src:e[o].image.src})),n.setStyle(r),i.push(n)}var s=new bt.a;s.addFeatures(i);var l=new _t.a({source:s,style:a,renderMode:"image",declutter:!1});return Ft.addLayer(l),"function"==typeof t&&Ft.on("click",function(e){l.getFeatures(e.pixel).then(function(e){if(e.length>0){for(var a=[],i=0;i<e.length;i++)a.push(e[i].customData);t(a)}})}),l}},removeLayer:function(e){Ft.removeLayer(e)},addLineLayer:function(e){if(e.length>0){for(var t=[],a=0;a<e.length;a++)t.push(Object(Dt.e)(e[a]));var i=new Pt.a(t),o=new kt.a(i);o.setStyle(new wt.c({stroke:new St.a({width:4,color:"#0c6d6a"})}));var n=new bt.a;n.addFeature(o);var r=new _t.a({source:n});return Ft.addLayer(r),r}},getLocation:function(){navigator.geolocation?navigator.geolocation.getCurrentPosition(this.showPosition,this.showError):alert("Geolocation is not supported by this browser.")},showPosition:function(e){this.latitude=e.coords.latitude,this.longitude=e.coords.longitude,console.log("Latitude: "+this.latitude+", Longitude: "+this.longitude)},showError:function(e){switch(e.code){case e.PERMISSION_DENIED:alert("User denied the request for Geolocation.");break;case e.POSITION_UNAVAILABLE:alert("Location information is unavailable.");break;case e.TIMEOUT:alert("The request to get user location timed out.");break;case e.UNKNOWN_ERROR:alert("An unknown error occurred.")}},sendDevicePush:function(e){console.log(e[0]),this.$emit("channelData",e[0])},getSnapErrorEvent:function(e,t){var a=this;if(void 0!==this.loadSnap[e+t]){if(console.log("下载截图"+this.loadSnap[e+t]),this.loadSnap[e+t]>5)return void delete this.loadSnap[e+t];setTimeout(function(){var i="/api/device/query/snap/"+e+"/"+t;a.loadSnap[e+t]++,document.getElementById(e+t).setAttribute("src",i+"?"+(new Date).getTime())},1e3)}}},destroyed:function(){}},Rt={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{ref:"mapContainer",staticStyle:{width:"100%",height:"100%"},attrs:{id:"mapContainer"}},[t("devicePlayer",{ref:"devicePlayer"})],1)},staticRenderFns:[]};var zt={name:"channelMapInfobox",props:["channel"],computed:{devicePlayer:Ue},created:function(){},data:function(){return{showDialog:!1,isLoging:!1}},methods:{play:function(){var e=this.channel.deviceId;this.isLoging=!0;var t=this.channel.channelId;console.log("通知设备推流1:"+e+" : "+t);var a=this;this.$axios({method:"get",url:"/api/play/start/"+e+"/"+t}).then(function(i){a.isLoging=!1,0===i.data.code?a.$refs.devicePlayer.openDialog("media",e,t,{streamInfo:i.data.data,hasAudio:this.channel.hasAudio}):a.$message.error(i.data.msg)}).catch(function(e){})},close:function(){}}},At={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{display:"none"},attrs:{id:"channelMapInfobox"}},[a("div",[a("el-descriptions",{staticClass:"margin-top",attrs:{title:"channel.name",column:4,direction:"vertical"}},[a("el-descriptions-item",{attrs:{label:"生产厂商"}},[e._v(e._s(e.channel.manufacture))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"型号"}},[e._v(e._s(e.channel.model))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"设备归属"}},[e._v(e._s(e.channel.owner))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"行政区域"}},[e._v(e._s(e.channel.civilCode))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"安装地址"}},[e._v(e._s(e.channel.address))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"云台类型"}},[e._v(e._s(e.channel.ptzTypeText))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"经纬度"}},[e._v(e._s(e.channel.longitude)+","+e._s(e.channel.latitude))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"状态"}},[1===e.channel.status?a("el-tag",{attrs:{size:"small"}},[e._v("在线")]):e._e(),e._v(" "),0===e.channel.status?a("el-tag",{attrs:{size:"small"}},[e._v("离线")]):e._e()],1)],1)],1),e._v(" "),a("devicePlayer",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],ref:"devicePlayer"})],1)},staticRenderFns:[]},Mt={name:"deviceEdit",props:[],computed:{},created:function(){},data:function(){return{deviceService:new je,pickerOptions:{shortcuts:[{text:"今天",onClick:function(e){e.$emit("pick",new Date)}},{text:"昨天",onClick:function(e){var t=new Date;t.setTime(t.getTime()-864e5),e.$emit("pick",t)}},{text:"一周前",onClick:function(e){var t=new Date;t.setTime(t.getTime()-6048e5),e.$emit("pick",t)}}]},searchFrom:null,searchTo:null,listChangeCallback:null,showDialog:!1,isLoging:!1,channel:null,callback:null}},methods:{openDialog:function(e,t){console.log(e),this.showDialog=!0,this.callback=t,this.channel=e},onSubmit:function(){var e=this;console.log("onSubmit"),this.isLoging=!0;var t="/api/position/history/"+this.channel.deviceId+"?start="+this.searchFrom+"&end="+this.searchTo;this.channel.channelId&&(t+="&channelId=${this.channel.channelId}"),this.$axios.get(t,{}).then(function(t){e.isLoging=!1,"function"==typeof e.callback&&(0==t.data.code?(e.callback(t.data.data),e.close()):e.$message.error(t.data.msg))}).catch(function(e){this.isLoging=!1,console.error(e)})},close:function(){this.showDialog=!1,this.isLoging=!1,this.callback=null,this.channel=null}}},Ut={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"queryTrace"}},[a("el-dialog",{attrs:{title:"查询轨迹",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}]},[a("el-date-picker",{staticStyle:{width:"11rem"},attrs:{type:"datetime",placeholder:"选择开始日期时间","default-time":"00:00:00","value-format":"yyyy-MM-dd HH:mm:ss",size:"mini",align:"right","picker-options":e.pickerOptions},model:{value:e.searchFrom,callback:function(t){e.searchFrom=t},expression:"searchFrom"}}),e._v(" "),a("el-date-picker",{staticStyle:{width:"11rem"},attrs:{type:"datetime",placeholder:"选择结束日期时间","default-time":"00:00:00","value-format":"yyyy-MM-dd HH:mm:ss",size:"mini",align:"right","picker-options":e.pickerOptions},model:{value:e.searchTo,callback:function(t){e.searchTo=t},expression:"searchTo"}}),e._v(" "),a("el-button",{attrs:{icon:"el-icon-search",size:"mini",type:"primary"},on:{click:e.onSubmit}},[e._v("查询")])],1)])],1)},staticRenderFns:[]},jt={components:{MapComponent:a("owSs")(Et,Rt,!1,function(e){a("neli")},null,null).exports,DeviceTree:Oe,channelMapInfobox:a("owSs")(zt,At,!1,null,null,null).exports,devicePlayer:Ue,queryTrace:a("owSs")(Mt,Ut,!1,null,null,null).exports},data:function(){return{onOff:void 0!==window.mapParam&&window.mapParam.enable,deviceService:new je,layer:null,lineLayer:null,channel:null,device:null,infoBoxId:null,labelStyle:{width:"56px"},isLoging:!1,longitudeStr:"longitude",latitudeStr:"latitude",hciDeviceList:[]}},created:function(){var e=this;this.$route.query.deviceId&&setTimeout(function(){e.deviceService.getAllChannel(!1,!1,e.$route.query.deviceId,e.channelsHandler)},1e3),"GCJ-02"===window.mapParam.coordinateSystem?(this.longitudeStr="longitudeGcj02",this.latitudeStr="latitudeGcj02"):"WGS84"===window.mapParam.coordinateSystem?(this.longitudeStr="longitudeWgs84",this.latitudeStr="latitudeWgs84"):(this.longitudeStr="longitude",this.latitudeStr="latitude"),this.deviceService.getAllDeviceList(2,function(t){e.hciDeviceList=t},null),this.$nextTick(function(){setTimeout(function(){e.init()},500)}),this.drawAllChannels()},destroyed:function(){},mounted:function(){},updated:function(){},methods:{init:function(){},clickEvent:function(e,t,a){this.device=e,t.channelId&&!a&&(t[this.longitudeStr]*t[this.latitudeStr]==0?this.$message.error("未获取到位置信息"):(null!=this.layer&&this.$refs.theMap.removeLayer(this.layer),this.closeInfoBox(),this.layer=this.$refs.theMap.addLayer([{position:[t[this.longitudeStr],t[this.latitudeStr]],image:{src:this.getImageByChannel(t),anchor:[.5,1]},data:t}],this.featureClickEvent),this.$refs.theMap.panTo([t[this.longitudeStr],t[this.latitudeStr]],mapParam.maxZoom)))},contextmenuEventHandler:function(e,t,a,i){var o=this;this.device=e,a.channelId&&!i?(console.log("点击通道"),this.$contextmenu({items:[{label:"播放",icon:"el-icon-video-play",disabled:0===e.online,onClick:function(){o.play(a)}},{label:"编辑位置",icon:"el-icon-edit",disabled:!1,onClick:function(){o.edit(a)}},{label:"轨迹查询",icon:"el-icon-map-location",disabled:!1,onClick:function(){o.getTrace(a)}}],event:t,customClass:"custom-class",zIndex:3e3})):(a.channelId,this.deviceOrSubChannelMenu(t,a))},drawAllChannels:function(){this.deviceService.getAllChannelWithoutDeviceId(1,100,this.channelsHandler)},deviceOrSubChannelMenu:function(e,t){var a=this;console.log("点击设备"),this.$contextmenu({items:[{label:"定位",icon:"el-icon-s-promotion",disabled:!1,onClick:function(){t.channelId||a.deviceService.getAllChannel(!1,!1,t.deviceId,a.channelsHandler),t.channelId&&t.subCount>0&&a.deviceService.getAllSubChannel(!1,t.deviceId,t.channelId,a.channelsHandler)}},{label:"查询轨迹",icon:"el-icon-map-location",disabled:!1,onClick:function(){a.getTrace(t)}}],event:e,customClass:"custom-class",zIndex:3e3})},channelsHandler:function(e){if(console.log("channels :",e),e.length>0){this.clean(),this.closeInfoBox();for(var t=[],a=0;a<e.length;a++){var i=e[a][this.longitudeStr],o=e[a][this.latitudeStr];if(i*o!=0){var n={position:[i,o],image:{src:this.getImageByChannel(e[a]),anchor:[.5,1]},data:e[a]};t.push(n)}}this.layer=this.$refs.theMap.addLayer(t,this.featureClickEvent),1===t.length?this.$refs.theMap.panTo([e[0][this.longitudeStr],e[0][this.latitudeStr]],mapParam.maxZoom):t.length>1?this.$refs.theMap.fit(this.layer):this.$message.error("未获取到位置信息")}else this.$message.error("未获取到位置信息")},getImageByChannel:function(e){var t="static/images/gis/camera.png";switch(e.ptzType){case 1:t=1===e.status?"static/images/gis/camera1.png":"static/images/gis/camera1-offline.png";break;case 2:t=1===e.status?"static/images/gis/camera2.png":"static/images/gis/camera2-offline.png";break;case 3:t=1===e.status?"static/images/gis/camera3.png":"static/images/gis/camera3-offline.png";break;default:t=1===e.status?"static/images/gis/camera.png":"static/images/gis/camera-offline.png"}return t},featureClickEvent:function(e){var t=this;this.closeInfoBox(),e.length>0&&(this.channel=e[0]),this.$nextTick(function(){var e=[t.channel[t.longitudeStr],t.channel[t.latitudeStr]];t.infoBoxId=t.$refs.theMap.openInfoBox(e,t.$refs.infobox,[0,-50])})},closeInfoBox:function(){null!=this.infoBoxId&&this.$refs.theMap.closeInfoBox(this.infoBoxId)},channelData:function(e){console.log("getmsg"),console.log(e),this.play(e)},play:function(e){var t=e.deviceId;this.isLoging=!0;var a=e.channelId,i=this;this.$axios({method:"get",url:"/api/play/start/"+t+"/"+a}).then(function(o){i.isLoging=!1,0===o.data.code?i.$refs.devicePlayer.openDialog("media",t,a,{streamInfo:o.data.data,hasAudio:e.hasAudio,deviceName:e.name}):i.$message.error(o.data.msg)}).catch(function(e){})},stopDevicePush:function(e){var t=this;this.$axios({method:"get",url:"/api/play/stop/"+this.deviceId+"/"+e.channelId,params:{isSubStream:this.isSubStream}}).then(function(e){t.initData()}).catch(function(e){402===e.response.status?t.initData():console.log(e)})},edit:function(e){this.$message.warning("暂不支持")},getTrace:function(e){var t=this;this.clean(),this.$refs.queryTrace.openDialog(e,function(e){if(0===e.length)t.$message.success("未查询到轨迹信息");else{for(var a=[],i=0;i<e.length;i++)e[i][t.longitudeStr]*e[i][t.latitudeStr]>0&&a.push([e[i][t.longitudeStr],e[i][t.latitudeStr]]);if(0===a.length)return void t.$message.success("未查询到轨迹信息");t.lineLayer=t.$refs.theMap.addLineLayer(a),t.$refs.theMap.fit(t.lineLayer)}})},clean:function(){null!=this.lineLayer&&this.$refs.theMap.removeLayer(this.lineLayer),null!=this.infoBoxId&&this.$refs.theMap.closeInfoBox(this.infoBoxId),null!=this.layer&&this.$refs.theMap.removeLayer(this.layer)}}},Nt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100vw",height:"91vh"},attrs:{id:"devicePosition"}},[e.onOff?a("el-container",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],staticStyle:{height:"91vh"}},[a("el-aside",{staticStyle:{"background-color":"#ffffff"},attrs:{width:"auto"}},[a("DeviceTree",{ref:"deviceTree",attrs:{clickEvent:e.clickEvent,contextMenuEvent:e.contextmenuEventHandler,isMap:!0}})],1),e._v(" "),a("el-main",{staticStyle:{height:"91vh",padding:"0"}},[a("MapComponent",{ref:"theMap",attrs:{parentMessage:e.hciDeviceList},on:{channelData:e.channelData}})],1)],1):e._e(),e._v(" "),e.onOff?e._e():a("div",{staticStyle:{width:"100%",height:"100%","text-align":"center","line-height":"5rem"}},[a("p",[e._v("地图功能已关闭")])]),e._v(" "),null!=e.channel?a("div",{ref:"infobox"},[a("div",{staticClass:"infobox-content"},[a("el-descriptions",{staticClass:"margin-top",attrs:{colon:!0,column:1,labelStyle:e.labelStyle,title:e.channel.name,size:"mini"}},[a("el-descriptions-item",{attrs:{label:"编号"}},[e._v(e._s(e.channel.channelId))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"型号"}},[e._v(e._s(e.channel.model))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"经度"}},[e._v(e._s(e.channel[e.longitudeStr]))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"纬度"}},[e._v(e._s(e.channel[e.latitudeStr]))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"生产厂商"}},[e._v(e._s(e.channel.manufacture))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"行政区域"}},[e._v(e._s(e.channel.civilCode))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"设备归属"}},[e._v(e._s(e.channel.owner))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"安装地址"}},[e._v(e._s(null==e.channel.address?"未知":e.channel.address)+"\n ")]),e._v(" "),a("el-descriptions-item",{attrs:{label:"云台类型"}},[e._v(e._s(e.channel.PTZTypeText))]),e._v(" "),a("el-descriptions-item",{attrs:{label:"通道状态"}},[!0===e.channel.status?a("el-tag",{attrs:{size:"small"}},[e._v("在线")]):e._e(),e._v(" "),!1===e.channel.status?a("el-tag",{attrs:{size:"small",type:"info"}},[e._v("离线")]):e._e()],1)],1),e._v(" "),a("div",{staticStyle:{"padding-top":"10px"}},[a("el-button",{attrs:{icon:"el-icon-video-play",size:"small",title:"播放",type:"primary",disabled:null==e.device||0===e.device.online},on:{click:function(t){return e.play(e.channel)}}}),e._v(" "),a("el-button",{attrs:{icon:"el-icon-edit",size:"small",title:"编辑位置",type:"primary"},on:{click:function(t){return e.edit(e.channel)}}}),e._v(" "),a("el-button",{attrs:{icon:"el-icon-map-location",size:"small",title:"轨迹查询",type:"primary"},on:{click:function(t){return e.getTrace(e.channel)}}})],1),e._v(" "),a("span",{staticClass:"infobox-close el-icon-close",on:{click:function(t){return e.closeInfoBox()}}})],1)]):e._e(),e._v(" "),a("devicePlayer",{ref:"devicePlayer"}),e._v(" "),a("queryTrace",{ref:"queryTrace"})],1)},staticRenderFns:[]};var Bt=a("owSs")(jt,Nt,!1,function(e){a("/ILR")},null,null).exports,Ht={name:"Login",data:function(){return{isLoging:!1,showPassword:!1,loginLoading:!1,username:"",password:""}},methods:{login:function(){""!==this.username&&""!==this.password&&this.toLogin()},toLogin:function(){var e={username:this.username,password:_.a.createHash("md5").update(this.password,"utf8").digest("hex")},t=this;this.isLoging=!0;var a=setTimeout(function(){t.$message.error("登录超时"),t.isLoging=!1},1e3);this.$axios({method:"get",url:"/api/user/login",params:e}).then(function(e){window.clearTimeout(a),0===e.data.code?(console.log("登录成功"),l(e.data.data),t.$router.push("/")):(t.isLoging=!1,t.$message({showClose:!0,message:"登录失败,用户名或密码错误",type:"error"}))}).catch(function(e){console.log(e),window.clearTimeout(a),t.$message.error(e.response.data.msg),t.isLoging=!1})}}},Ot={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"login",attrs:{id:"login"}},[a("div",{staticClass:"limiter"},[a("div",{staticClass:"container-login100"},[a("div",{staticClass:"wrap-login100"},[a("span",{staticClass:"login100-form-title p-b-26"},[e._v("智慧城市云服务平台")]),e._v(" "),e._m(0),e._v(" "),a("div",{staticClass:"wrap-input100 validate-input",attrs:{"data-validate":"Valid email is: a@b.c"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],class:"input100 "+(""===e.username?"":"has-val"),attrs:{name:"username",type:"text"},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value)}}}),e._v(" "),a("span",{staticClass:"focus-input100",attrs:{"data-placeholder":"用户名"}})]),e._v(" "),a("div",{staticClass:"wrap-input100 validate-input",attrs:{"data-validate":"Enter password"},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.login.apply(null,arguments)}}},[a("span",{staticClass:"btn-show-pass"},[a("i",{class:"fa "+(e.showPassword?"fa-eye-slash":"fa-eye"),on:{click:function(t){e.showPassword=!e.showPassword}}})]),e._v(" "),"checkbox"==(e.showPassword?"text":"password")?a("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:"input100 "+(""===e.password?"":"has-val"),attrs:{name:"password",type:"checkbox"},domProps:{checked:Array.isArray(e.password)?e._i(e.password,null)>-1:e.password},on:{change:function(t){var a=e.password,i=t.target,o=!!i.checked;if(Array.isArray(a)){var n=e._i(a,null);i.checked?n<0&&(e.password=a.concat([null])):n>-1&&(e.password=a.slice(0,n).concat(a.slice(n+1)))}else e.password=o}}}):"radio"==(e.showPassword?"text":"password")?a("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:"input100 "+(""===e.password?"":"has-val"),attrs:{name:"password",type:"radio"},domProps:{checked:e._q(e.password,null)},on:{change:function(t){e.password=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],class:"input100 "+(""===e.password?"":"has-val"),attrs:{name:"password",type:e.showPassword?"text":"password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}}),e._v(" "),a("span",{staticClass:"focus-input100",attrs:{"data-placeholder":"密码"}})]),e._v(" "),a("div",{staticClass:"container-login100-form-btn"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],staticClass:"wrap-login100-form-btn",class:{"login-loading":e.isLoging},attrs:{"element-loading-background":"rgb(0 0 0 / 0%);","element-loading-custom-class":"login-loading-class"}},[a("div",{staticClass:"login100-form-bgbtn"}),e._v(" "),a("button",{staticClass:"login100-form-btn",on:{click:e.login}},[e._v("登录")])])])])])])])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"login100-form-title p-b-48"},[t("i",{staticClass:"fa fa-video-camera"})])}]},qt=a("owSs")(Ht,Ot,!1,null,null,null).exports,Gt={name:"platformEdit",props:{},computed:{},data:function(){var e,t=this;return{listChangeCallback:null,showDialog:!1,isLoging:!1,onSubmit_text:"立即创建",saveUrl:"/api/platform/save",platform:{id:null,enable:!0,ptz:!0,rtcp:!1,asMessageChannel:!1,autoPushChannel:!1,name:null,serverGBId:null,serverGBDomain:null,serverIP:null,serverPort:null,deviceGBId:null,deviceIp:null,devicePort:null,username:null,password:null,expires:3600,keepTimeout:60,transport:"UDP",characterSet:"GB2312",startOfflinePush:!1,catalogGroup:1,administrativeDivision:"",sendStreamIp:null},deviceIps:[],rules:{name:[{required:!0,message:"请输入平台名称",trigger:"blur"}],serverGBId:[{required:!0,message:"请输入SIP服务国标编码",trigger:"blur"}],serverGBDomain:[{required:!0,message:"请输入SIP服务国标域",trigger:"blur"}],serverIP:[{required:!0,message:"请输入SIP服务IP",trigger:"blur"}],serverPort:[{required:!0,message:"请输入SIP服务端口",trigger:"blur"}],deviceGBId:[{validator:(e=ne()(ie.a.mark(function e(a,i,o){return ie.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(i),""!==i){e.next=5;break}o(new Error("请输入设备国标编号")),e.next=9;break;case 5:return e.next=7,t.deviceGBIdExit(i);case 7:e.sent?o(new Error("设备国标编号已存在")):o();case 9:case"end":return e.stop()}},e,t)})),function(t,a,i){return e.apply(this,arguments)}),trigger:"blur"}],username:[{required:!1,message:"请输入SIP认证用户名",trigger:"blur"}],password:[{required:!1,message:"请输入SIP认证密码",trigger:"blur"}],expires:[{required:!0,message:"请输入注册周期",trigger:"blur"}],keepTimeout:[{required:!0,message:"请输入心跳周期",trigger:"blur"}],transport:[{required:!0,message:"请选择信令传输",trigger:"blur"}],characterSet:[{required:!0,message:"请选择编码字符集",trigger:"blur"}],deviceIp:[{required:!0,message:"请选择本地IP",trigger:"blur"}]}}},methods:{openDialog:function(e,t){var a=this;this.$axios({method:"get",url:"/api/platform/server_config"}).then(function(t){null==e?0===t.data.code&&(a.platform.deviceGBId=t.data.data.username,a.deviceIps=t.data.data.deviceIp.split(","),a.platform.deviceIp=a.deviceIps[0],a.platform.devicePort=t.data.data.devicePort,a.platform.username=t.data.data.username,a.platform.password=t.data.data.password,a.platform.sendStreamIp=t.data.data.sendStreamIp,a.platform.administrativeDivision=t.data.data.username.substr(0,6)):a.deviceIps=t.data.data.deviceIp.split(",")}).catch(function(e){console.log(e)}),null==e?(this.onSubmit_text="立即创建",this.saveUrl="/api/platform/add"):(this.platform.id=e.id,this.platform.enable=e.enable,this.platform.ptz=e.ptz,this.platform.rtcp=e.rtcp,this.platform.asMessageChannel=e.asMessageChannel,this.platform.autoPushChannel=e.autoPushChannel,this.platform.name=e.name,this.platform.serverGBId=e.serverGBId,this.platform.serverGBDomain=e.serverGBDomain,this.platform.serverIP=e.serverIP,this.platform.serverPort=e.serverPort,this.platform.deviceGBId=e.deviceGBId,this.platform.deviceIp=e.deviceIp,this.platform.devicePort=e.devicePort,this.platform.username=e.username,this.platform.password=e.password,this.platform.expires=e.expires,this.platform.keepTimeout=e.keepTimeout,this.platform.transport=e.transport,this.platform.characterSet=e.characterSet,this.platform.catalogId=e.catalogId,this.platform.startOfflinePush=e.startOfflinePush,this.platform.catalogGroup=e.catalogGroup,this.platform.sendStreamIp=e.sendStreamIp,this.platform.administrativeDivision=e.administrativeDivision,this.onSubmit_text="保存",this.saveUrl="/api/platform/save"),this.showDialog=!0,this.listChangeCallback=t},serverGBIdChange:function(){this.platform.serverGBId.length>10&&(this.platform.serverGBDomain=this.platform.serverGBId.substr(0,10))},deviceGBIdChange:function(){this.platform.username=this.platform.deviceGBId,null==this.platform.administrativeDivision&&(this.platform.administrativeDivision=this.platform.deviceGBId.substr(0,6))},onSubmit:function(){this.saveForm()},saveForm:function(){var e=this;this.$axios({method:"post",url:this.saveUrl,data:this.platform}).then(function(t){0===t.data.code?(e.$message({showClose:!0,message:"保存成功",type:"success"}),e.showDialog=!1,null!=e.listChangeCallback&&e.listChangeCallback()):e.$message({showClose:!0,message:t.data.msg,type:"error"})}).catch(function(e){console.log(e)})},close:function(){this.showDialog=!1,this.$refs.platform1.resetFields(),this.$refs.platform2.resetFields(),this.platform={id:null,enable:!0,ptz:!0,rtcp:!1,asMessageChannel:!1,autoPushChannel:!1,name:null,serverGBId:null,administrativeDivision:null,serverGBDomain:null,serverIP:null,serverPort:null,deviceGBId:null,deviceIp:null,devicePort:null,username:null,password:null,expires:3600,keepTimeout:60,transport:"UDP",characterSet:"GB2312",startOfflinePush:!1,catalogGroup:1}},deviceGBIdExit:function(){var e=ne()(ie.a.mark(function e(t){var a,i;return ie.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=!1,i=this,e.next=4,i.$axios({method:"get",url:"/api/platform/exit/"+t}).then(function(e){0===e.data.code&&(a=e.data.data)}).catch(function(e){console.log(e)});case 4:return e.abrupt("return",a);case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),checkExpires:function(){this.platform.enable&&"0"===this.platform.expires&&(this.platform.expires="3600")},rtcpCheckBoxChange:function(e){e&&this.$message({showClose:!0,message:"开启RTCP保活需要上级平台支持,可以避免无效推流",type:"warning"})}}},Kt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"addlatform"}},[a("el-dialog",{attrs:{title:"添加平台",width:"70%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"text-align":"right","margin-top":"1rem"},attrs:{id:"shared"}},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:11}},[a("el-form",{ref:"platform1",attrs:{rules:e.rules,model:e.platform,"label-width":"160px"}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{model:{value:e.platform.name,callback:function(t){e.$set(e.platform,"name",t)},expression:"platform.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SIP服务国标编码",prop:"serverGBId"}},[a("el-input",{attrs:{clearable:""},on:{input:e.serverGBIdChange},model:{value:e.platform.serverGBId,callback:function(t){e.$set(e.platform,"serverGBId",t)},expression:"platform.serverGBId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SIP服务国标域",prop:"serverGBDomain"}},[a("el-input",{attrs:{clearable:""},model:{value:e.platform.serverGBDomain,callback:function(t){e.$set(e.platform,"serverGBDomain",t)},expression:"platform.serverGBDomain"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SIP服务IP",prop:"serverIP"}},[a("el-input",{attrs:{clearable:""},model:{value:e.platform.serverIP,callback:function(t){e.$set(e.platform,"serverIP",t)},expression:"platform.serverIP"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SIP服务端口",prop:"serverPort"}},[a("el-input",{attrs:{clearable:"",type:"number"},model:{value:e.platform.serverPort,callback:function(t){e.$set(e.platform,"serverPort",t)},expression:"platform.serverPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"设备国标编号",prop:"deviceGBId"}},[a("el-input",{attrs:{clearable:""},on:{input:e.deviceGBIdChange},model:{value:e.platform.deviceGBId,callback:function(t){e.$set(e.platform,"deviceGBId",t)},expression:"platform.deviceGBId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"本地IP",prop:"deviceIp"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择与上级相通的网卡"},model:{value:e.platform.deviceIp,callback:function(t){e.$set(e.platform,"deviceIp",t)},expression:"platform.deviceIp"}},e._l(e.deviceIps,function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"本地端口",prop:"devicePort"}},[a("el-input",{attrs:{disabled:!0,type:"number"},model:{value:e.platform.devicePort,callback:function(t){e.$set(e.platform,"devicePort",t)},expression:"platform.devicePort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SDP发流IP",prop:"sendStreamIp"}},[a("el-input",{model:{value:e.platform.sendStreamIp,callback:function(t){e.$set(e.platform,"sendStreamIp",t)},expression:"platform.sendStreamIp"}})],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form",{ref:"platform2",attrs:{rules:e.rules,model:e.platform,"label-width":"160px"}},[a("el-form-item",{attrs:{label:"行政区划",prop:"administrativeDivision"}},[a("el-input",{attrs:{clearable:""},model:{value:e.platform.administrativeDivision,callback:function(t){e.$set(e.platform,"administrativeDivision",t)},expression:"platform.administrativeDivision"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SIP认证用户名",prop:"username"}},[a("el-input",{model:{value:e.platform.username,callback:function(t){e.$set(e.platform,"username",t)},expression:"platform.username"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SIP认证密码",prop:"password"}},[a("el-input",{model:{value:e.platform.password,callback:function(t){e.$set(e.platform,"password",t)},expression:"platform.password"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"注册周期(秒)",prop:"expires"}},[a("el-input",{model:{value:e.platform.expires,callback:function(t){e.$set(e.platform,"expires",t)},expression:"platform.expires"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"心跳周期(秒)",prop:"keepTimeout"}},[a("el-input",{model:{value:e.platform.keepTimeout,callback:function(t){e.$set(e.platform,"keepTimeout",t)},expression:"platform.keepTimeout"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"信令传输",prop:"transport"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择信令传输方式"},model:{value:e.platform.transport,callback:function(t){e.$set(e.platform,"transport",t)},expression:"platform.transport"}},[a("el-option",{attrs:{label:"UDP",value:"UDP"}}),e._v(" "),a("el-option",{attrs:{label:"TCP",value:"TCP"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"目录分组",prop:"catalogGroup"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择目录分组"},model:{value:e.platform.catalogGroup,callback:function(t){e.$set(e.platform,"catalogGroup",t)},expression:"platform.catalogGroup"}},[a("el-option",{attrs:{label:"1",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"2",value:"2"}}),e._v(" "),a("el-option",{attrs:{label:"4",value:"4"}}),e._v(" "),a("el-option",{attrs:{label:"8",value:"8"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"字符集",prop:"characterSet"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择字符集"},model:{value:e.platform.characterSet,callback:function(t){e.$set(e.platform,"characterSet",t)},expression:"platform.characterSet"}},[a("el-option",{attrs:{label:"GB2312",value:"GB2312"}}),e._v(" "),a("el-option",{attrs:{label:"UTF-8",value:"UTF-8"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"其他选项"}},[a("el-checkbox",{attrs:{label:"启用"},on:{change:e.checkExpires},model:{value:e.platform.enable,callback:function(t){e.$set(e.platform,"enable",t)},expression:"platform.enable"}}),e._v(" "),a("el-checkbox",{attrs:{label:"拉起推流"},model:{value:e.platform.startOfflinePush,callback:function(t){e.$set(e.platform,"startOfflinePush",t)},expression:"platform.startOfflinePush"}}),e._v(" "),a("el-checkbox",{attrs:{label:"RTCP保活"},on:{change:e.rtcpCheckBoxChange},model:{value:e.platform.rtcp,callback:function(t){e.$set(e.platform,"rtcp",t)},expression:"platform.rtcp"}}),e._v(" "),a("el-checkbox",{attrs:{label:"消息通道"},model:{value:e.platform.asMessageChannel,callback:function(t){e.$set(e.platform,"asMessageChannel",t)},expression:"platform.asMessageChannel"}}),e._v(" "),a("el-checkbox",{attrs:{label:"推送通道"},model:{value:e.platform.autoPushChannel,callback:function(t){e.$set(e.platform,"autoPushChannel",t)},expression:"platform.autoPushChannel"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(e._s(e.onSubmit_text)+"\n ")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)],1)],1)],1)],1)])],1)},staticRenderFns:[]};var Wt=a("owSs")(Gt,Kt,!1,function(e){a("k0+9")},null,null).exports,Vt={name:"getCatalog",beforeCreate:function(){},created:function(){var e=this;this.chooseId=this.defaultCatalogId,this.defaultCatalogIdSign=this.defaultCatalogId,this.initData(),setTimeout(function(){e.catalogIdChange&&e.catalogIdChange(e.defaultCatalogId)},100)},props:["platformId"],data:function(){return{props:{label:"name",children:"children",isLeaf:"leaf"},platformName:null,defaultCatalogId:null,catalogIdResult:null,showDialog:!1,defaultCatalogIdSign:null,chooseNode:null,chooseId:"",catalogTree:null,contextmenuShow:!1}},methods:{openDialog:function(e){console.log(this.chooseId),this.showDialog=!0,this.catalogIdResult=e},initData:function(){this.getCatalog()},getCatalog:function(e,t){this.$axios({method:"get",url:"/api/platform/catalog",params:{platformId:this.platformId,parentId:e}}).then(function(e){0===e.data.code&&"function"==typeof t&&t(e.data.data)}).catch(function(e){console.log(e)})},loadNode:function(e,t){var a=this;0===e.level&&this.$axios({method:"get",url:"/api/platform/info/"+this.platformId}).then(function(e){0===e.data.code&&(a.platformName=e.data.data.name,a.defaultCatalogId=e.data.data.catalogId,a.defaultCatalogIdSign=e.data.data.catalogId,a.chooseId=e.data.data.catalogId,t([{name:a.platformName,id:e.data.data.deviceGBId,type:0}]))}).catch(function(e){console.log(e)}),e.level>=1&&this.getCatalog(e.data.id,t)},nodeClickHandler:function(e,t,a){this.chooseId=e.id},close:function(){this.chooseId=null,this.showDialog=!1},submit:function(){console.log(this.chooseId),null!==this.chooseId?(this.catalogIdResult&&this.catalogIdResult(this.chooseId),this.showDialog=!1):this.$message({showClose:!0,message:"未选择任何节点,",type:"warning"})}}},Yt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"getCatalog"}},[e.showDialog?a("el-dialog",{attrs:{title:"选择要添加到的节点",width:"50%","append-to-body":!0,"close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0,center:""},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",[a("el-tree",{ref:"tree",staticClass:"el-scrollbar",attrs:{id:"catalogTree","empty-text":"未知节点","node-key":"id","default-expand-all":"","highlight-current":!1,"expand-on-click-node":!1,props:e.props,load:e.loadNode,lazy:""},on:{"node-click":e.nodeClickHandler},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.node;return t.data,a("span",{staticClass:"custom-tree-node",staticStyle:{width:"100%"}},[0===i.data.type||-1===i.data.type?a("el-radio",{staticStyle:{"margin-right":"0"},attrs:{label:i.data.id},model:{value:e.chooseId,callback:function(t){e.chooseId=t},expression:"chooseId"}},[e._v(e._s(""))]):e._e(),e._v(" "),-1===i.data.type&&1===i.level?a("span",{staticClass:"iconfont icon-ziyuan",staticStyle:{"font-size":"12px"}}):e._e(),e._v(" "),0===i.data.type&&1===i.level?a("span",{staticClass:"el-icon-s-home"}):e._e(),e._v(" "),0===i.data.type&&i.level>1?a("span",{staticClass:"el-icon-folder-opened"}):e._e(),e._v(" "),1===i.data.type?a("span",{staticClass:"iconfont icon-shexiangtou"}):e._e(),e._v(" "),2===i.data.type?a("span",{staticClass:"iconfont icon-zhibo"}):e._e(),e._v(" "),a("span",{staticStyle:{"padding-left":"1px"}},[e._v(e._s(i.label))]),e._v(" "),a("span",[i.data.id===e.defaultCatalogIdSign?a("i",{staticStyle:{"margin-left":"5rem",color:"#9d9d9d","padding-right":"20px"}},[e._v("默认")]):e._e()])],1)}}],null,!1,1597484897)})],1),e._v(" "),a("div",{staticStyle:{float:"right",height:"13rem"}},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.submit()}}},[e._v("确认")]),e._v(" "),a("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.close()}}},[e._v("取消")])],1)]):e._e()],1)},staticRenderFns:[]};var Jt=a("owSs")(Vt,Yt,!1,function(e){a("6Nk1")},null,null).exports,Zt={name:"chooseChannelForGb",computed:{},props:["platformId","catalogId","catalogName"],created:function(){this.initData()},components:{getCatalog:Jt},data:function(){return{loading:!1,gbChannels:[],gbChoosechannel:{},searchSrt:"",channelType:"",online:"",choosed:"",currentPage:1,count:10,total:0,eventEnable:!1,multipleSelection:[],winHeight:window.innerHeight-400}},watch:{platformId:function(e,t){console.log(e),this.getChannelList()},catalogId:function(e,t){this.getChannelList()}},methods:{initData:function(){this.getChannelList()},currentChange:function(e){this.currentPage=e,this.initData()},handleSizeChange:function(e){this.count=e,console.log(e),this.initData()},add:function(e){var t=this,a=void 0===e;this.getCatalogFromUser(function(i){var o=null;t.$axios({method:"post",url:"/api/platform/update_channel_for_gb",data:{platformId:t.platformId,all:a,channelReduces:a?[]:[e],catalogId:i}}).then(function(e){console.log("保存成功"),window.clearTimeout(o),t.loading=!1,t.getChannelList()}).catch(function(e){window.clearTimeout(o),t.loading=!1,console.log(e)}),o=setTimeout(function(){t.loading=!0},200)})},remove:function(e){var t=this,a=void 0===e;this.$confirm("确定移除"+(a?"所有通道":"")+"吗?","提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){console.log(e),t.$axios({method:"delete",url:"/api/platform/del_channel_for_gb",data:{platformId:t.platformId,all:a,channelReduces:a?[]:[e]}}).then(function(e){console.log("移除成功"),t.getChannelList()}).catch(function(e){console.log(e)})}).catch(function(){})},getChannelList:function(){var e=this;this.$axios({method:"get",url:"/api/platform/channel_list",params:{page:e.currentPage,count:e.count,query:e.searchSrt,online:e.online,catalogId:e.catalogId,platformId:e.platformId,channelType:e.channelType}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.gbChannels=t.data.data.list,e.gbChoosechannel={}),e.$nextTick(function(){e.$refs.gbChannelsTable.doLayout(),e.eventEnable=!0})}).catch(function(e){console.log(e)})},search:function(){this.initData()},handleGBSelectionChange:function(){this.initData()},batchDel:function(){var e=this;this.$confirm("确认这"+this.multipleSelection.length+"个通道吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$axios({method:"delete",url:"/api/platform/del_channel_for_gb",data:{platformId:e.platformId,channelReduces:e.multipleSelection}}).then(function(t){console.log("移除成功"),e.$refs.gbChannelsTable.clearSelection(),e.getChannelList()}).catch(function(e){console.log(e)})}).catch(function(){})},batchAdd:function(){var e=this;this.getCatalogFromUser(function(t){e.$axios({method:"post",url:"/api/platform/update_channel_for_gb",data:{platformId:e.platformId,channelReduces:e.multipleSelection,catalogId:t}}).then(function(t){console.log("保存成功"),e.$refs.gbChannelsTable.clearSelection(),e.getChannelList()}).catch(function(e){console.log(e)})})},handleSelectionChange:function(e){this.multipleSelection=e},getCatalogFromUser:function(e){this.$refs.getCatalog.openDialog(e)}}},Xt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{id:"chooseChannelForGb"}},[a("div",{staticStyle:{"font-size":"17px",color:"#606060","white-space":"nowrap","line-height":"30px","font-family":"monospace"}},[null==e.catalogId?a("span",[e._v(e._s(e.catalogName)+"的国标通道")]):e._e(),e._v(" "),null!=e.catalogId?a("span",[e._v(e._s(e.catalogName)+"("+e._s(e.catalogId)+")的国标通道")]):e._e()]),e._v(" "),a("div",{staticStyle:{"background-color":"#FFFFFF",position:"relative",padding:"0.5rem","text-align":"left","font-size":"14px"}},[e._v("\n 搜索: "),a("el-input",{staticStyle:{"margin-right":"1rem",width:"auto"},attrs:{size:"mini",placeholder:"关键字","prefix-icon":"el-icon-search",clearable:""},on:{input:e.search},model:{value:e.searchSrt,callback:function(t){e.searchSrt=t},expression:"searchSrt"}}),e._v("\n\n 通道类型: "),a("el-select",{staticStyle:{"margin-right":"1rem",width:"6rem"},attrs:{size:"mini",placeholder:"请选择","default-first-option":""},on:{change:e.search},model:{value:e.channelType,callback:function(t){e.channelType=t},expression:"channelType"}},[a("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),a("el-option",{attrs:{label:"设备",value:"false"}}),e._v(" "),a("el-option",{attrs:{label:"子目录",value:"true"}})],1),e._v("\n\n 在线状态: "),a("el-select",{staticStyle:{"margin-right":"1rem",width:"6rem"},attrs:{size:"mini",placeholder:"请选择","default-first-option":""},on:{change:e.search},model:{value:e.online,callback:function(t){e.online=t},expression:"online"}},[a("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),a("el-option",{attrs:{label:"在线",value:"true"}}),e._v(" "),a("el-option",{attrs:{label:"离线",value:"false"}})],1),e._v(" "),null!==e.catalogId?a("el-button",{attrs:{icon:"el-icon-delete",size:"mini",disabled:0===e.gbChannels.length||0===e.multipleSelection.length,type:"danger"},on:{click:e.batchDel}},[e._v("批量移除")]):e._e(),e._v(" "),null===e.catalogId?a("el-button",{attrs:{icon:"el-icon-plus",size:"mini",disabled:0===e.gbChannels.length||0===e.multipleSelection.length},on:{click:e.batchAdd}},[e._v("批量添加")]):e._e(),e._v(" "),null===e.catalogId?a("el-button",{attrs:{icon:"el-icon-plus",size:"mini"},on:{click:function(t){return e.add()}}},[e._v("全部添加")]):e._e(),e._v(" "),null!==e.catalogId?a("el-button",{attrs:{type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:function(t){return e.remove()}}},[e._v("全部移除")]):e._e()],1),e._v(" "),a("el-table",{ref:"gbChannelsTable",staticStyle:{width:"100%"},attrs:{data:e.gbChannels,border:"",height:e.winHeight,"row-key":function(e){return e.deviceId+e.channelId}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{align:"center",type:"selection","reserve-selection":!0,width:"55"}}),e._v(" "),a("el-table-column",{attrs:{prop:"channelId",label:"通道编号",width:"180",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"通道名称","show-overflow-tooltip":"",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deviceId",label:"设备编号",width:"180",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"设备地址",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[a("el-tag",{attrs:{size:"medium"}},[e._v(e._s(t.row.hostAddress))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"manufacturer",label:"厂家",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"100",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button-group",[null===e.catalogId?a("el-button",{attrs:{size:"mini",icon:"el-icon-plus"},on:{click:function(a){return e.add(t.row)}}},[e._v("添加")]):e._e(),e._v(" "),null!==e.catalogId?a("el-button",{attrs:{size:"mini",icon:"el-icon-delete",type:"danger"},on:{click:function(a){return e.remove(t.row)}}},[e._v("移除")]):e._e()],1)]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right","margin-top":"1rem"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[10,20,30,50],layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}}),e._v(" "),a("getCatalog",{ref:"getCatalog",attrs:{platformId:e.platformId}})],1)},staticRenderFns:[]};var Qt=a("owSs")(Zt,Xt,!1,function(e){a("2Lcx")},null,null).exports,ea={name:"chooseChannelFoStream",computed:{},props:["platformId","catalogId","catalogName"],created:function(){this.initData(),console.log(this.catalogId)},components:{getCatalog:Jt},data:function(){return{loading:!1,gbStreams:[],gbChoosechannel:{},channelType:"",online:"",choosed:"",currentPage:1,count:10,total:0,searchSrt:"",pushing:"",mediaServerId:"",mediaServerList:[],mediaServerObj:new pe,eventEnable:!1,multipleSelection:[],winHeight:window.innerHeight-350}},watch:{platformId:function(e,t){this.getChannelList()},catalogId:function(e,t){this.getChannelList()}},methods:{initData:function(){var e=this;this.mediaServerObj.getOnlineMediaServerList(function(t){e.mediaServerList=t.data}),this.getChannelList()},currentChange:function(e){this.currentPage=e,this.getChannelList()},handleSizeChange:function(e){this.count=e,console.log(e),this.getChannelList()},add:function(e,t){var a=this,i=void 0===e;this.getCatalogFromUser(function(t){var o=null;a.$axios({method:"post",url:"/api/gbStream/add",data:{platformId:a.platformId,catalogId:t,all:i,gbStreams:i?[]:[e]}}).then(function(e){console.log("保存成功"),window.clearTimeout(o),a.loading=!1,a.getChannelList()}).catch(function(e){window.clearTimeout(o),this.loading=!1,console.log(e)}),o=setTimeout(function(){a.loading=!0},200)})},remove:function(e,t){var a=this,i=void 0===e;this.$confirm("确定移除"+(i?"所有通道":"")+"吗?","提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.$axios({method:"delete",url:"/api/gbStream/del",data:{platformId:a.platformId,all:i,gbStreams:i?[]:[e]}}).then(function(e){console.log("移除成功"),a.getChannelList()}).catch(function(e){console.log(e)})}).catch(function(){})},getChannelList:function(){var e=this;this.$axios({method:"get",url:"/api/gbStream/list",params:{page:e.currentPage,count:e.count,query:e.searchSrt,platformId:e.platformId,catalogId:e.catalogId,mediaServerId:e.mediaServerId}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.gbStreams=t.data.data.list,e.gbChoosechannel={},e.$nextTick(function(){e.$refs.gbStreamsTable.doLayout(),e.eventEnable=!0}))}).catch(function(e){console.log(e)})},batchDel:function(){var e=this;this.$confirm("确认这"+this.multipleSelection.length+"个通道吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$axios({method:"delete",url:"/api/gbStream/del",data:{platformId:e.platformId,gbStreams:e.multipleSelection}}).then(function(t){console.log("移除成功"),e.$refs.gbStreamsTable.clearSelection(),e.getChannelList()}).catch(function(e){console.log(e)})}).catch(function(){})},batchAdd:function(){var e=this;this.getCatalogFromUser(function(t){e.$axios({method:"post",url:"/api/gbStream/add",data:{platformId:e.platformId,catalogId:t,gbStreams:e.multipleSelection}}).then(function(t){console.log("保存成功"),e.$refs.gbStreamsTable.clearSelection(),e.getChannelList()}).catch(function(e){console.log(e)})})},getCatalogFromUser:function(e){this.$refs.getCatalog.openDialog(e)},handleSelectionChange:function(e){this.multipleSelection=e}}},ta={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{id:"chooseChannelFoStream"}},[a("div",{staticStyle:{"font-size":"17px",color:"#606060","white-space":"nowrap","line-height":"30px","font-family":"monospace"}},[null==e.catalogId?a("span",[e._v(e._s(e.catalogName)+"的直播通道")]):e._e(),e._v(" "),null!=e.catalogId?a("span",[e._v(e._s(e.catalogName)+"("+e._s(e.catalogId)+")的直播通道")]):e._e()]),e._v(" "),a("div",{staticStyle:{"background-color":"#FFFFFF","margin-bottom":"1rem",position:"relative",padding:"0.5rem","text-align":"left","font-size":"14px"}},[e._v("\n\n 搜索: "),a("el-input",{staticStyle:{"margin-right":"1rem",width:"auto"},attrs:{size:"mini",placeholder:"关键字","prefix-icon":"el-icon-search",clearable:""},on:{input:e.getChannelList},model:{value:e.searchSrt,callback:function(t){e.searchSrt=t},expression:"searchSrt"}}),e._v(" "),e._v("\n 推流状态: "),a("el-select",{staticStyle:{"margin-right":"1rem"},attrs:{size:"mini",placeholder:"请选择","default-first-option":""},on:{change:e.getChannelList},model:{value:e.pushing,callback:function(t){e.pushing=t},expression:"pushing"}},[a("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),a("el-option",{attrs:{label:"推流进行中",value:"true"}}),e._v(" "),a("el-option",{attrs:{label:"推流未进行",value:"false"}})],1),e._v(" "),null!==e.catalogId?a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-delete",size:"mini",disabled:0===e.gbStreams.length||0===e.multipleSelection.length,type:"danger"},on:{click:e.batchDel}},[e._v("批量移除")]):e._e(),e._v(" "),null===e.catalogId?a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",disabled:0===e.gbStreams.length||0===e.multipleSelection.length},on:{click:e.batchAdd}},[e._v("批量添加")]):e._e(),e._v(" "),null===e.catalogId?a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini"},on:{click:function(t){return e.add()}}},[e._v("全部添加")]):e._e(),e._v(" "),null!==e.catalogId?a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:function(t){return e.remove()}}},[e._v("全部移除")]):e._e()],1),e._v(" "),a("el-table",{ref:"gbStreamsTable",staticStyle:{width:"100%"},attrs:{data:e.gbStreams,border:"",height:e.winHeight,"row-key":function(e){return e.app+e.stream}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{align:"center",type:"selection","reserve-selection":!0,width:"55"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称","show-overflow-tooltip":"",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"app",label:"应用名","show-overflow-tooltip":"",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"stream",label:"流ID","show-overflow-tooltip":"",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"gbId",label:"国标编码","show-overflow-tooltip":"",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"流来源",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},["proxy"==t.row.streamType?a("el-tag",{attrs:{size:"medium"}},[e._v("拉流代理")]):e._e(),e._v(" "),"push"==t.row.streamType?a("el-tag",{attrs:{size:"medium"}},[e._v("推流")]):e._e()],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"100",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button-group",[null===e.catalogId?a("el-button",{attrs:{size:"mini",icon:"el-icon-plus"},on:{click:function(a){return e.add(t.row,t)}}},[e._v("添加")]):e._e(),e._v(" "),null!==e.catalogId?a("el-button",{attrs:{size:"mini",icon:"el-icon-delete",type:"danger"},on:{click:function(a){return e.remove(t.row,t)}}},[e._v("移除")]):e._e()],1)]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right","margin-top":"1rem"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[10,20,30,50],layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}}),e._v(" "),a("getCatalog",{ref:"getCatalog",attrs:{platformId:e.platformId}})],1)},staticRenderFns:[]};var aa=a("owSs")(ea,ta,!1,function(e){a("qOAA")},null,null).exports,ia={name:"catalogEdit",computed:{},props:["platformId","platformDeviceId"],created:function(){},data:function(){var e=this;return{submitCallback:null,showDialog:!1,isLoging:!1,isEdit:!1,level:0,form:{id:null,name:null,platformId:null,parentId:null},rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],id:[{required:!0,trigger:"blur",validator:function(t,a,i){if(console.log("checkId"),console.log(t),console.log(a),console.log(a.length),console.log(e.level),!a)return i(new Error("编号不能为空"));if(a.trim().length<=8){if(a.trim().length%2!=0)return i(new Error("行政区划编号必须为2/4/6/8位"));if(e.form.parentId!==e.platformDeviceId&&e.form.parentId.length>=a.trim().length)return 20===e.form.parentId.length?i(new Error("业务分组/虚拟组织下不可创建行政区划")):i(new Error("行政区划编号长度应该每次两位递增"))}else{if(20!==a.trim().length)return i(new Error("编号必须为2/4/6/8位的行政区划或20位的虚拟组织/业务分组"));var o=a.substring(10,13);if(console.log(o),"215"!==o&&"216"!==o)return i(new Error("编号错误,业务分组11-13位为215,虚拟组织11-13位为216"));if("216"===o&&e.form.parentId!==e.platformDeviceId&&e.form.parentId.length<=8)return i(new Error("编号错误,建立虚拟组织前必须先建立业务分组(11-13位为215)"));if("215"===o&&"215"===e.form.parentId.length)return i(new Error("编号错误,业务分组下只能建立虚拟组织(11-13位为216)"))}i()}}]}}},methods:{openDialog:function(e,t,a,i,o,n){console.log("parentId: "+i),console.log(this.form),this.isEdit=e,this.form.id=t,this.form.name=a,this.form.platformId=this.platformId,this.form.parentId=i,this.showDialog=!0,this.submitCallback=n,this.level=o},onSubmit:function(){var e=this;this.$refs.form.validate(function(t){if(!t)return!1;e.$axios({method:"post",url:"/api/platform/catalog/"+(e.isEdit?"edit":"add"),data:e.form}).then(function(t){0===t.data.code?e.submitCallback&&e.submitCallback(e.form):e.$message({showClose:!0,message:t.data.msg,type:"error"}),e.close()}).catch(function(e){console.log(e)})})},close:function(){this.isEdit=!1,this.form.id=null,this.form.name=null,this.form.platformId=null,this.form.parentId=null,this.callback=null,this.showDialog=!1,console.log(this.form)}}},oa={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"catalogEdit"}},[a("el-dialog",{attrs:{title:"节点编辑",width:"40%",top:"2rem","append-to-body":!0,"close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-top":"1rem","margin-right":"100px"},attrs:{id:"shared"}},[a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"节点编号",prop:"id"}},[a("el-input",{attrs:{disabled:e.isEdit,clearable:""},model:{value:e.form.id,callback:function(t){e.$set(e.form,"id",t)},expression:"form.id"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"节点名称",prop:"name"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确认")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},na={name:"chooseChannelForCatalog",props:["platformId","platformDeviceId","platformName","defaultCatalogId","catalogIdChange"],created:function(){var e=this;this.chooseId=this.defaultCatalogId,this.defaultCatalogIdSign=this.defaultCatalogId,this.initData(),setTimeout(function(){e.catalogIdChange&&e.catalogIdChange(e.defaultCatalogId,e.platformName)},100)},components:{catalogEdit:a("owSs")(ia,oa,!1,null,null,null).exports},data:function(){return{props:{label:"name",children:"children",isLeaf:"leaf"},defaultCatalogIdSign:null,chooseNode:null,chooseId:"",chooseName:"",catalogTree:null,contextmenuShow:!1}},watch:{platformId:function(e,t){console.log(e),this.initData()}},methods:{initData:function(){this.getCatalog()},getCatalog:function(e,t){this.$axios({method:"get",url:"/api/platform/catalog",params:{platformId:this.platformId,parentId:e}}).then(function(e){0===e.data.code&&"function"==typeof t&&t(e.data.data)}).catch(function(e){console.log(e)})},addCatalog:function(e,t){console.log(this.platformId),console.log(e),this.$refs.catalogEdit.openDialog(!1,null,null,e,t.level,function(){t.loaded=!1,t.expand()})},refreshCatalog:function(e){e.loaded=!1,e.expand()},refreshCatalogById:function(e){if(e){var t=this.$refs.tree.getNode(e);this.refreshCatalog(t)}},editCatalog:function(e,t){var a=this;this.$refs.catalogEdit.openDialog(!0,e.id,e.name,e.parentId,function(i){t.parent.loaded=!1,t.parent.expand(),e.id===a.chooseId&&i.name!==e.name&&a.catalogIdChange&&a.catalogIdChange(a.chooseId,i.name)})},removeCatalog:function(e,t){var a=this;this.$axios({method:"delete",url:"/api/platform/catalog/del",params:{id:e,platformId:this.platformId}}).then(function(e){0===e.data.code&&(console.log("移除成功"),t.parent.loaded=!1,t.parent.expand(),e.data.data&&(a.defaultCatalogIdSign=e.data.data))}).catch(function(e){console.log(e)})},setDefaultCatalog:function(e){var t=this;this.$axios({method:"post",url:"/api/platform/catalog/default/update",params:{platformId:this.platformId,catalogId:e}}).then(function(a){0===a.data.code&&(t.defaultCatalogIdSign=e)}).catch(function(e){console.log(e)})},loadNode:function(e,t){console.log("this.platformDeviceId: "+this.platformDeviceId),0===e.level&&t([{name:"未分配",id:null,type:-1},{name:this.platformName,id:this.platformDeviceId,type:0}]),e.level>=1&&this.getCatalog(e.data.id,t)},contextmenuEventHandler:function(e,t,a,i){var o=this;return 0!==a.data.type?(t.parentId=a.parent.data.id,this.$contextmenu({items:[{label:"移除通道",icon:"el-icon-delete",disabled:!1,onClick:function(){o.$axios({method:"delete",url:"/api/platform/catalog/relation/del",data:t}).then(function(e){console.log("移除成功"),a.parent.loaded=!1,a.parent.expand()}).catch(function(e){console.log(e)})}}],event:e,customClass:"custom-class",zIndex:3e3})):this.$contextmenu({items:[{label:"刷新节点",icon:"el-icon-refresh",disabled:!1,onClick:function(){o.refreshCatalog(a)}},{label:"新建节点",icon:"el-icon-plus",disabled:!1,onClick:function(){o.addCatalog(t.id,a)}},{label:"修改节点",icon:"el-icon-edit",disabled:1===a.level,onClick:function(){o.editCatalog(t,a)}},{label:"删除节点",icon:"el-icon-delete",disabled:1===a.level,divided:!0,onClick:function(){o.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){o.removeCatalog(t.id,a)}).catch(function(){})}},{label:"设为默认",icon:"el-icon-folder-checked",disabled:a.data.id===this.defaultCatalogIdSign,onClick:function(){o.setDefaultCatalog(t.id)}}],event:e,customClass:"custom-class",zIndex:3e3}),!1},nodeClickHandler:function(e,t,a){console.log(e),console.log(t),this.chooseId=e.id,this.chooseName=e.name,this.catalogIdChange&&this.catalogIdChange(this.chooseId,this.chooseName)}}},ra={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"chooseChannelForCatalog"}},[a("div",{staticStyle:{"background-color":"#FFFFFF","margin-bottom":"1rem",position:"relative",padding:"0.5rem","text-align":"left","font-size":"14px"}},[a("el-tree",{ref:"tree",staticClass:"el-scrollbar",attrs:{id:"catalogTree","empty-text":"未知节点","node-key":"id","default-expand-all":"","highlight-current":!1,"expand-on-click-node":!1,props:e.props,load:e.loadNode,lazy:""},on:{"node-contextmenu":e.contextmenuEventHandler,"node-click":e.nodeClickHandler},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.node;return t.data,a("span",{staticClass:"custom-tree-node",staticStyle:{width:"100%"}},[0===i.data.type||-1===i.data.type?a("el-radio",{staticStyle:{"margin-right":"0"},attrs:{label:i.data.id},model:{value:e.chooseId,callback:function(t){e.chooseId=t},expression:"chooseId"}},[e._v(e._s(""))]):e._e(),e._v(" "),-1===i.data.type&&1===i.level?a("span",{staticClass:"iconfont icon-ziyuan",staticStyle:{"font-size":"12px"}}):e._e(),e._v(" "),0===i.data.type&&1===i.level?a("span",{staticClass:"el-icon-s-home"}):e._e(),e._v(" "),0===i.data.type&&i.level>1?a("span",{staticClass:"el-icon-folder-opened"}):e._e(),e._v(" "),1===i.data.type?a("span",{staticClass:"iconfont icon-shexiangtou"}):e._e(),e._v(" "),2===i.data.type?a("span",{staticClass:"iconfont icon-zhibo"}):e._e(),e._v(" "),a("span",{staticStyle:{"padding-left":"1px"}},[e._v(e._s(i.label))]),e._v(" "),a("span",[i.data.id===e.defaultCatalogIdSign?a("i",{staticStyle:{"margin-left":"5rem",color:"#9d9d9d","padding-right":"20px"}},[e._v("默认")]):e._e()])],1)}}])})],1),e._v(" "),a("catalogEdit",{ref:"catalogEdit",attrs:{platformId:e.platformId,platformDeviceId:e.platformDeviceId}})],1)},staticRenderFns:[]};var sa={name:"chooseChannel",props:{},components:{chooseChannelForGb:Qt,chooseChannelFoStream:aa,chooseChannelForCatalog:a("owSs")(na,ra,!1,function(e){a("WHnb")},null,null).exports},computed:{},data:function(){return{loading:!1,tabActiveName:"gbChannel",catalogTabActiveName:"catalog",platformId:"",platformDeviceId:"",catalogId:"",catalogName:"",currentCatalogId:"",platformName:"",defaultCatalogId:"",showDialog:!1,chooseData:{},winHeight:window.innerHeight-250}},methods:{openDialog:function(e,t,a,i,o){console.log("defaultCatalogId: "+i),this.platformId=e,this.platformDeviceId=t,this.platformName=a,this.defaultCatalogId=i,this.showDialog=!0,this.closeCallback=o},tabClick:function(e,t){},close:function(){this.closeCallback()},search:function(){},save:function(){var e=this;this.$axios({method:"post",url:"/api/platform/update_channel_for_gb",data:{platformId:this.platformId,channelReduces:this.chooseData}}).then(function(t){0===t.data.code&&e.$message({showClose:!0,message:"保存成功,",type:"success"})}).catch(function(e){console.log(e)})},catalogIdChange:function(e,t){this.catalogId=e,this.catalogName=t}}},la={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"chooseChannel"}},[e.showDialog?a("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{title:"选择通道",top:"2rem",width:"90%","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("el-row",[a("el-col",{attrs:{span:10}},[a("el-tabs",{model:{value:e.catalogTabActiveName,callback:function(t){e.catalogTabActiveName=t},expression:"catalogTabActiveName"}},[a("el-tab-pane",{attrs:{label:"目录结构",name:"catalog"}},[a("el-container",[a("el-main",{style:{backgroundColor:"#FFF",maxHeight:e.winHeight+"px"}},[a("chooseChannelForCatalog",{ref:"chooseChannelForCatalog",attrs:{platformId:e.platformId,platformDeviceId:e.platformDeviceId,platformName:e.platformName,defaultCatalogId:e.defaultCatalogId,catalogIdChange:e.catalogIdChange}})],1)],1)],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:14}},[a("el-tabs",{on:{"tab-click":e.tabClick},model:{value:e.tabActiveName,callback:function(t){e.tabActiveName=t},expression:"tabActiveName"}},[a("el-tab-pane",{attrs:{label:"国标通道",name:"gbChannel"}},[a("el-container",[a("el-main",{staticStyle:{"background-color":"#FFF"}},[a("chooseChannelForGb",{ref:"chooseChannelForGb",attrs:{catalogId:e.catalogId,catalogName:e.catalogName,platformId:e.platformId}})],1)],1)],1),e._v(" "),a("el-tab-pane",{attrs:{label:"直播流通道",name:"streamchannel"}},[a("el-container",[a("el-main",{staticStyle:{"background-color":"#FFF"}},[a("chooseChannelFoStream",{ref:"chooseChannelFoStream",attrs:{catalogId:e.catalogId,catalogName:e.catalogName,currentCatalogId:e.currentCatalogId,platformId:e.platformId}})],1)],1)],1)],1)],1)],1)],1):e._e()],1)},staticRenderFns:[]};var ca={name:"app",components:{platformEdit:Wt,uiHeader:I,chooseChannelDialog:a("owSs")(sa,la,!1,function(e){a("yw8S")},null,null).exports},data:function(){return{platformList:[],winHeight:window.innerHeight-260,currentPage:1,count:15,total:0}},computed:{getcurrentDeviceChannels:function(){}},mounted:function(){this.initData(),this.updateLooper=setInterval(this.initData,1e4)},destroyed:function(){clearTimeout(this.updateLooper)},methods:{addParentPlatform:function(){this.$refs.platformEdit.openDialog(null,this.initData)},editPlatform:function(e){console.log(e),this.$refs.platformEdit.openDialog(e,this.initData)},deletePlatform:function(e){var t=this;t.$confirm("确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.deletePlatformCommit(e)})},deletePlatformCommit:function(e){var t=this;t.$axios({method:"delete",url:"/api/platform/delete/"+e.serverGBId}).then(function(e){0===e.data.code&&(t.$message({showClose:!0,message:"删除成功",type:"success"}),t.initData())}).catch(function(e){console.log(e)})},chooseChannel:function(e){console.log("platform.name: "+e.name),this.$refs.chooseChannelDialog.openDialog(e.serverGBId,e.deviceGBId,e.name,e.catalogId,this.initData)},initData:function(){this.getPlatformList()},currentChange:function(e){this.currentPage=e,this.getPlatformList()},handleSizeChange:function(e){this.count=e,this.getPlatformList()},getPlatformList:function(){var e=this;this.$axios({method:"get",url:"/api/platform/query/"+e.count+"/"+e.currentPage}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.platformList=t.data.data.list)}).catch(function(e){console.log(e)})},refresh:function(){this.initData()}}},da={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"app"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[e._v("上级平台列表")]),e._v(" "),a("div",{staticClass:"page-header-btn"},[a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.addParentPlatform}},[e._v("添加")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh-right",circle:"",size:"mini"},on:{click:function(t){return e.refresh()}}})],1)]),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.platformList,height:e.winHeight}},[a("el-table-column",{attrs:{prop:"name",label:"名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"serverGBId",label:"平台编号","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{label:"是否启用","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.enable?a("el-tag",{attrs:{size:"medium"}},[e._v("已启用")]):e._e(),e._v(" "),t.row.enable?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("未启用")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.status?a("el-tag",{attrs:{size:"medium"}},[e._v("在线")]):e._e(),e._v(" "),t.row.status?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("离线")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"地址","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[a("el-tag",{attrs:{size:"medium"}},[e._v(e._s(t.row.serverIP)+":"+e._s(t.row.serverPort))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"deviceGBId",label:"设备国标编号","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"transport",label:"信令传输模式","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"channelCount",label:"通道数","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{label:"订阅信息","min-width":"120",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.alarmSubscribe?a("i",{staticClass:"iconfont icon-gbaojings subscribe-on",staticStyle:{"font-size":"20px"},attrs:{title:"报警订阅"}}):e._e(),e._v(" "),t.row.alarmSubscribe?e._e():a("i",{staticClass:"iconfont icon-gbaojings subscribe-off",staticStyle:{"font-size":"20px"},attrs:{title:"报警订阅"}}),e._v(" "),t.row.catalogSubscribe?a("i",{staticClass:"iconfont icon-gjichus subscribe-on",attrs:{title:"目录订阅"}}):e._e(),e._v(" "),t.row.catalogSubscribe?e._e():a("i",{staticClass:"iconfont icon-gjichus subscribe-off",attrs:{title:"目录订阅"}}),e._v(" "),t.row.mobilePositionSubscribe?a("i",{staticClass:"iconfont icon-gxunjians subscribe-on",attrs:{title:"位置订阅"}}):e._e(),e._v(" "),t.row.mobilePositionSubscribe?e._e():a("i",{staticClass:"iconfont icon-gxunjians subscribe-off",attrs:{title:"位置订阅"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"240",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"medium",icon:"el-icon-edit",type:"text"},on:{click:function(a){return e.editPlatform(t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{size:"medium",icon:"el-icon-share",type:"text"},on:{click:function(a){return e.chooseChannel(t.row)}}},[e._v("选择通道")]),e._v(" "),a("el-button",{staticStyle:{color:"#f56c6c"},attrs:{size:"medium",icon:"el-icon-delete",type:"text"},on:{click:function(a){return e.deletePlatform(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}}),e._v(" "),a("platformEdit",{ref:"platformEdit"}),e._v(" "),a("chooseChannelDialog",{ref:"chooseChannelDialog"})],1)},staticRenderFns:[]};var ua=a("owSs")(ca,da,!1,function(e){a("oSjI")},null,null).exports,ma={name:"player",data:function(){return{easyPlayer:null}},props:["videoUrl","error","hasaudio","height"],mounted:function(){var e=this,t=decodeURIComponent(this.$route.params.url);this.$nextTick(function(){void 0===e.videoUrl&&(e.videoUrl=t),console.log("初始化时的地址为: "+e.videoUrl),e.play(e.videoUrl)})},watch:{videoUrl:function(e,t){this.play(e)},immediate:!0},methods:{play:function(e){console.log(this.height),null!=this.easyPlayer&&this.easyPlayer.destroy(),void 0===this.height&&(this.height=!1),this.easyPlayer=new WasmPlayer(null,"easyplayer",this.eventcallbacK,{Height:this.height}),this.easyPlayer.play(e,1)},pause:function(){this.easyPlayer.destroy(),this.easyPlayer=null},eventcallbacK:function(e,t){}},destroyed:function(){this.easyPlayer.destroy()}},ha={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{attrs:{id:"easyplayer"}})},staticRenderFns:[]};var pa=a("owSs")(ma,ha,!1,function(e){a("jLwy")},null,null).exports,fa={name:"app",components:{uiHeader:I,easyPlayer:pa},data:function(){return{search:"",startTime:"",endTime:"",showPlayer:!1,playerTitle:"",videoUrl:"",playerStyle:{margin:"auto","margin-bottom":"20px",width:window.innerWidth/2+"px",height:this.winHeight/2+"px"},mediaServerList:[],mediaServerId:"",mediaServerPath:null,recordList:[],chooseRecord:null,updateLooper:0,winHeight:window.innerHeight-250,currentPage:1,count:15,total:0,loading:!1,mediaServerObj:new pe,clickRefreshFlag:!1}},computed:{},mounted:function(){this.initData()},destroyed:function(){this.$destroy("recordVideoPlayer")},methods:{initData:function(){this.getMediaServerList(),this.getRecordList()},currentChange:function(e){this.currentPage=e,this.getRecordList()},handleSizeChange:function(e){this.count=e,this.getRecordList()},getMediaServerList:function(){var e=this;e.mediaServerObj.getOnlineMediaServerList(function(t){e.mediaServerList=t.data})},setMediaServerPath:function(e){var t=void 0;for(t=0;t<this.mediaServerList.length&&e!==this.mediaServerList[t].id;t++);var a=this.mediaServerList[t].httpPort;"https:"===location.protocol&&this.mediaServerList[t].httpSSlPort&&(a=this.mediaServerList[t].httpSSlPort),this.mediaServerPath=location.protocol+"//"+this.mediaServerList[t].streamIp+":"+a,console.log(this.mediaServerPath)},getRecordList:function(){var e=this;this.$axios({method:"get",url:"/api/cloud/record/list",params:{app:"",stream:"",query:this.search,startTime:this.startTime,endTime:this.endTime,mediaServerId:this.mediaServerId,page:this.currentPage,count:this.count}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.recordList=t.data.data.list,e.$nextTick(function(){e.clickRefresh()})),e.loading=!1}).catch(function(t){console.log(t),e.loading=!1})},clickRefresh:function(){this.clickRefreshFlag?this.$message({showClose:!0,message:"录像信息已更新",type:"success"}):this.clickRefreshFlag=!0},play:function(e){var t=this;console.log(e),this.chooseRecord=e,this.showPlayer=!0,this.$axios({method:"get",url:"/api/cloud/record/play/path",params:{recordId:e.id}}).then(function(e){console.log(e),0===e.data.code&&("https:"===location.protocol?t.videoUrl=e.data.data.httpsPath:t.videoUrl=e.data.data.httpPath)}).catch(function(e){console.log(e)})},downloadFile:function(e){console.log(e),this.$axios({method:"get",url:"/api/cloud/record/play/path",params:{recordId:e.id}}).then(function(t){console.log(t);var a=document.createElement("a");a.target="_blank",0===t.data.code&&("https:"===location.protocol?a.href=t.data.data.httpsPath+"&save_name="+e.fileName:a.href=t.data.data.httpPath+"&save_name="+e.fileName,a.click())}).catch(function(e){console.log(e)})},deleteRecord:function(){var e=this;this.$axios({method:"delete",url:"/record_proxy/api/record/delete",params:{page:e.currentPage,count:e.count}}).then(function(t){console.log(t),0===t.data.code&&(e.total=t.data.data.total,e.recordList=t.data.data.list)}).catch(function(e){console.log(e)})},formatTime:function(e){var t=parseInt(e/3600/1e3),a=parseInt((e-3600*t*1e3)/60/1e3),i=Math.ceil((e-3600*t*1e3-60*a*1e3)/1e3);return i<0&&(i=0),(t>0?t+"小时":"")+(a>0?a+"分":"")+(i>0?i+"秒":"")},formatTimeStamp:function(e){return T.a.unix(e/1e3).format("yyyy-MM-DD HH:mm:ss")}}},ga={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"app"}},[a("div",{staticClass:"page-header"},[e._m(0),e._v(" "),a("div",{staticClass:"page-header-btn"},[e._v("\n 搜索:\n "),a("el-input",{staticStyle:{"margin-right":"1rem",width:"auto"},attrs:{clearable:"",placeholder:"关键字","prefix-icon":"el-icon-search",size:"mini"},on:{input:e.getMediaServerList},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),e._v("\n 开始时间:\n "),a("el-date-picker",{attrs:{placeholder:"选择日期时间",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss"},on:{change:e.getMediaServerList},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),e._v("\n 结束时间:\n "),a("el-date-picker",{attrs:{placeholder:"选择日期时间",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss"},on:{change:e.getMediaServerList},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}}),e._v("\n 节点选择:\n "),a("el-select",{staticStyle:{width:"16rem","margin-right":"1rem"},attrs:{placeholder:"请选择",size:"mini"},on:{change:e.getMediaServerList},model:{value:e.mediaServerId,callback:function(t){e.mediaServerId=t},expression:"mediaServerId"}},[a("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),e._l(e.mediaServerList,function(e){return a("el-option",{key:e.id,attrs:{label:e.id,value:e.id}})})],2),e._v(" "),a("el-button",{attrs:{loading:e.loading,circle:"",icon:"el-icon-refresh-right",size:"mini"},on:{click:function(t){return e.getRecordList()}}})],1)]),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.recordList,height:e.winHeight}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{label:"应用名",prop:"app"}}),e._v(" "),a("el-table-column",{attrs:{label:"流ID",prop:"stream",width:"380"}}),e._v(" "),a("el-table-column",{attrs:{label:"开始时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.formatTimeStamp(t.row.startTime))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"结束时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.formatTimeStamp(t.row.endTime))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"时长"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-tag",[e._v(e._s(e.formatTime(t.row.timeLen)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"文件名称",prop:"fileName"}}),e._v(" "),a("el-table-column",{attrs:{label:"流媒体",prop:"mediaServerId"}}),e._v(" "),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{icon:"el-icon-video-play",size:"medium",type:"text"},on:{click:function(a){return e.play(t.row)}}},[e._v("播放\n ")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-download",size:"medium",type:"text"},on:{click:function(a){return e.downloadFile(t.row)}}},[e._v("下载\n ")])]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],total:e.total,layout:"total, sizes, prev, pager, next"},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}}),e._v(" "),a("el-dialog",{attrs:{title:e.playerTitle,visible:e.showPlayer,width:"50%"},on:{"update:visible":function(t){e.showPlayer=t}}},[a("easyPlayer",{ref:"recordVideoPlayer",attrs:{height:!1,videoUrl:e.videoUrl}})],1)],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"page-title"},[t("div",[this._v("云端录像")])])}]};var va=a("owSs")(fa,ga,!1,function(e){a("ltAp")},null,null).exports,ba=a("6G0y"),ya=a.n(ba),_a=a("iWTb"),wa=a.n(_a),Sa=a("egMM"),xa=a.n(Sa),Ca={name:"app",components:{uiHeader:I,player:pa},data:function(){var e=this;return{app:this.$route.params.app,stream:this.$route.params.stream,mediaServerId:this.$route.params.mediaServerId,dateFilesObj:[],mediaServerList:[],detailFiles:[],loading:!1,chooseDate:null,videoUrl:null,choosedFile:null,queryDate:new Date,currentPage:1,count:1e6,total:0,direction:"ltr",drawer:!1,showTaskBox:!1,taskTimeRange:[],taskListEnded:[],taskListForRuning:[],sliderMIn:0,sliderMax:86400,autoPlay:!0,taskUpdate:null,tabVal:"running",recordListStyle:{height:this.winHeight+"px",overflow:"auto",margin:"10px auto 10px auto"},playerStyle:{margin:"auto","margin-bottom":"20px",height:this.winHeight+"px"},timeFormat:"00:00:00",winHeight:window.innerHeight-240,playTime:0,playTimeSliderMarks:{0:"00:00",3600:"01:00",7200:"02:00",10800:"03:00",14400:"04:00",18000:"05:00",21600:"06:00",25200:"07:00",28800:"08:00",32400:"09:00",36000:"10:00",39600:"11:00",43200:"12:00",46800:"13:00",50400:"14:00",54000:"15:00",57600:"16:00",61200:"17:00",64800:"18:00",68400:"19:00",72000:"20:00",75600:"21:00",79200:"22:00",82800:"23:00",86400:"24:00"},pickerOptions:{cellClassName:function(t){var a=T()(t).format("YYYY-MM-DD");return e.dateFilesObj[a]?"data-picker-true":"data-picker-false"}}}},computed:{},mounted:function(){var e=this;this.recordListStyle.height=this.winHeight+"px",this.playerStyle.height=this.winHeight+"px",this.getDateInYear(function(){xa()(e.dateFilesObj).length>0&&(e.chooseDate=xa()(e.dateFilesObj)[xa()(e.dateFilesObj).length-1],e.dateChange())})},destroyed:function(){this.$destroy("recordVideoPlayer")},methods:{dateChange:function(){var e=this;this.playTime=0,this.detailFiles=[],this.currentPage=1,this.sliderMIn=0,this.sliderMax=86400;var t=new Date(this.chooseDate+" "+this.timeFormat);t.getFullYear()===this.queryDate.getFullYear()&&t.getMonth()===this.queryDate.getMonth()||(this.queryDate=t,this.getDateInYear()),this.queryRecordDetails(function(){if(e.detailFiles.length>0){console.log(e.detailFiles);var t=e.getTimeForFile(e.detailFiles[0]),a=e.getTimeForFile(e.detailFiles[e.detailFiles.length-1]),i=t[0].getTime()-new Date(e.chooseDate+" "+e.timeFormat).getTime();console.log(i);var o=a[1].getTime()-new Date(e.chooseDate+" "+e.timeFormat).getTime();e.playTime=parseInt(i/1e3),e.sliderMIn=parseInt(i/1e3-i/1e3%3600),console.log(e.sliderMIn),e.sliderMax=parseInt(o/1e3-o/1e3%3600)+3600,console.log(e.sliderMax)}})},infiniteScroll:function(){this.total>this.detailFiles.length&&(this.currentPage++,this.queryRecordDetails())},queryRecordDetails:function(e){var t=this;this.$axios({method:"get",url:"/api/cloud/record/list",params:{app:this.app,stream:this.stream,startTime:this.chooseDate+" 00:00:00",endTime:this.chooseDate+" 23:59:59",page:this.currentPage,count:this.count,mediaServerId:this.mediaServerId}}).then(function(a){if(0===a.data.code){t.total=a.data.data.total,t.detailFiles=t.detailFiles.concat(a.data.data.list);for(var i=new wa.a,o=0;o<t.detailFiles.length;o++)i.add(t.detailFiles[o].mediaServerId);t.mediaServerList=ya()(i),1===t.mediaServerList.length&&(t.mediaServerId=t.mediaServerList[0])}t.loading=!1,e&&e()}).catch(function(e){console.log(e),t.loading=!1})},chooseFile:function(e){var t=this;console.log(e),null==e?(this.videoUrl="",this.choosedFile=""):(this.choosedFile=e.fileName,this.$axios({method:"get",url:"/api/cloud/record/play/path",params:{recordId:e.id}}).then(function(e){console.log(e),0===e.data.code&&("https:"===location.protocol?t.videoUrl=e.data.data.httpsPath:t.videoUrl=e.data.data.httpPath)}).catch(function(e){console.log(e)}))},downloadFile:function(e){console.log(e),this.$axios({method:"get",url:"/api/cloud/record/play/path",params:{recordId:e.id}}).then(function(t){console.log(t);var a=document.createElement("a");a.target="_blank",0===t.data.code&&("https:"===location.protocol?a.href=t.data.data.httpsPath+"&save_name="+e.fileName:a.href=t.data.data.httpPath+"&save_name="+e.fileName,a.click())}).catch(function(e){console.log(e)})},backToList:function(){this.$router.back()},getFileShowName:function(e){return T()(e.startTime).format("HH:mm:ss")+"-"+T()(e.endTime).format("HH:mm:ss")},chooseMediaChange:function(){},getRecordList:function(){},getFileBasePath:function(e){return he.a.defaults.baseURL.startsWith("http")?he.a.defaults.baseURL+"/record_proxy/"+e.mediaServerId:""+window.location.origin+he.a.defaults.baseURL+"/record_proxy/"+e.mediaServerId},getDataWidth:function(e){return 100*(this.getTimeForFile(e)[2]/(1e3*(this.sliderMax-this.sliderMIn)))},getDataLeft:function(e){var t=this.getTimeForFile(e)[0].getTime()-new Date(this.chooseDate+" "+this.timeFormat).getTime();return 100*parseFloat((t-1e3*this.sliderMIn)/(1e3*(this.sliderMax-this.sliderMIn)))},playTimeChange:function(e){var t=this.getTimeForFile(this.detailFiles[0])[0],a=this.getTimeForFile(this.detailFiles[this.detailFiles.length-1])[1];this.chooseFile(null);var i=new Date(this.chooseDate+" "+this.timeFormat).getTime()+1e3*e;if(i>=t.getTime()&&i<=a.getTime())for(var o=0;o<this.detailFiles.length;o++){var n=this.getTimeForFile(this.detailFiles[o]);if(i>=n[0].getTime()&&i<=n[1].getTime())return void this.chooseFile(this.detailFiles[o])}},getTimeForFile:function(e){console.log(e);var t=new Date(1e3*e.startTime),a=new Date(1e3*e.endTime);return this.checkIsOver24h(t,a)&&(a=new Date(this.chooseDate+" 23:59:59")),[t,a,a.getTime()-t.getTime()]},checkIsOver24h:function(e,t){return e>t},playTimeFormat:function(e){var t=parseInt(e/3600),a=parseInt((e-3600*t)/60),i=parseInt(e-3600*t-60*a),o=t,n=a,r=i;return t<10&&(o="0"+o),a<10&&(n="0"+n),i<10&&(r="0"+r),o+":"+n+":"+r},deleteRecord:function(){var e=this;this.$axios({method:"delete",url:"/record_proxy/"+e.mediaServerId+"/api/record/delete",params:{page:e.currentPage,count:e.count}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.recordList=t.data.data.list)}).catch(function(e){console.log(e)})},getDateInYear:function(e){var t=this;this.dateFilesObj={},this.$axios({method:"get",url:"/api/cloud/record/date/list",params:{app:this.app,stream:this.stream,year:this.queryDate.getFullYear(),month:this.queryDate.getMonth()+1,mediaServerId:this.mediaServerId}}).then(function(a){if(console.log(a),0===a.data.code&&a.data.data.length>0){for(var i=0;i<a.data.data.length;i++)t.dateFilesObj[a.data.data[i]]=a.data.data[i];console.log(t.dateFilesObj)}e&&e()}).catch(function(e){console.log(e)})},tabClick:function(){this.getTaskList("ended"===this.tabVal)},drawerClose:function(){this.drawer=!1,null!=this.taskUpdate&&window.clearInterval(this.taskUpdate)},drawerOpen:function(){var e=this;this.drawer=!0,null!=this.taskUpdate&&window.clearInterval(this.taskUpdate),this.taskUpdate=setInterval(function(){e.getTaskList("ended"===e.tabVal)},1e3)},addTask:function(){this.showTaskBox=!0;var e=this.chooseDate+" "+this.detailFiles[0].fileName.substring(0,8),t=this.chooseDate+" "+this.detailFiles[this.detailFiles.length-1].fileName.substring(9,17);this.taskTimeRange[0]=new Date(e),this.taskTimeRange[1]=new Date(t)},addTaskToServer:function(){var e=this;this.$axios({method:"get",url:"/api/cloud/record/task/add",params:{app:this.app,stream:this.stream,mediaServerId:this.mediaServerId,startTime:T()(this.taskTimeRange[0]).format("YYYY-MM-DD HH:mm:ss"),endTime:T()(this.taskTimeRange[1]).format("YYYY-MM-DD HH:mm:ss")}}).then(function(t){0===t.data.code?(e.showTaskBox=!1,e.getTaskList(!1)):e.$message.error(t.data.msg)}).catch(function(e){console.log(e)})},handleTabClick:function(){this.getTaskList("ended"===this.tabVal)},getTaskList:function(e){var t=this;this.$axios({method:"get",url:"/api/cloud/record/task/list",params:{mediaServerId:this.mediaServerId,isEnd:e}}).then(function(a){0===a.data.code&&(e?t.taskListEnded=a.data.data:t.taskListForRuning=a.data.data)}).catch(function(e){console.log(e)})},goBack:function(){this.$router.push("/cloudRecord")}}},ka={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"recordDetail"}},[a("div",{staticClass:"page-header",staticStyle:{"margin-bottom":"0"}},[a("div",{staticClass:"page-title"},[a("el-page-header",{attrs:{content:"云端录像"},on:{back:e.backToList}})],1),e._v(" "),this.$route.params.mediaServerId?e._e():a("div",{staticClass:"page-header-btn",staticStyle:{"padding-right":"1rem"}},[a("b",[e._v("节点:")]),e._v(" "+e._s(e.mediaServerId)+"\n ")]),e._v(" "),this.$route.params.mediaServerId?a("div",{staticStyle:{"margin-right":"1rem"}},[a("span",[e._v("流媒体:"+e._s(this.$route.params.mediaServerId))])]):e._e()]),e._v(" "),a("el-container",[a("el-aside",{attrs:{width:"260px"}},[a("div",{staticClass:"record-list-box-box"},[a("div",{staticStyle:{"margin-top":"20px"}},[a("el-date-picker",{attrs:{size:"mini","picker-options":e.pickerOptions,type:"date","value-format":"yyyy-MM-dd",placeholder:"日期"},on:{change:function(t){return e.dateChange()}},model:{value:e.chooseDate,callback:function(t){e.chooseDate=t},expression:"chooseDate"}})],1),e._v(" "),a("div",{staticClass:"record-list-box",style:e.recordListStyle},[e.detailFiles.length>0?a("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.infiniteScroll,expression:"infiniteScroll"}],staticClass:"infinite-list record-list"},e._l(e.detailFiles,function(t,i){return a("li",{key:i,staticClass:"infinite-list-item record-list-item"},[e.choosedFile!==t.fileName?a("el-tag",{on:{click:function(a){return e.chooseFile(t)}}},[a("i",{staticClass:"el-icon-video-camera"}),e._v("\n "+e._s(e.getFileShowName(t))+"\n ")]):e._e(),e._v(" "),e.choosedFile===t.fileName?a("el-tag",{attrs:{type:"danger"}},[a("i",{staticClass:"el-icon-video-camera"}),e._v("\n "+e._s(e.getFileShowName(t))+"\n ")]):e._e(),e._v(" "),a("a",{staticClass:"el-icon-download",staticStyle:{color:"#409EFF","font-weight":"600","margin-left":"10px"},attrs:{target:"_blank"},on:{click:function(a){return e.downloadFile(t)}}})],1)}),0):e._e()]),e._v(" "),0===e.detailFiles.length?a("div",{staticClass:"record-list-no-val"},[e._v("暂无数据")]):e._e()])]),e._v(" "),a("el-main",{staticStyle:{padding:"22px"}},[a("div",{staticClass:"playBox",style:e.playerStyle},[a("player",{ref:"recordVideoPlayer",staticStyle:{width:"100%"},attrs:{videoUrl:e.videoUrl,height:!0}})],1),e._v(" "),a("div",{staticClass:"player-option-box"},[a("el-slider",{staticClass:"playtime-slider",attrs:{id:"playtimeSlider",disabled:0===e.detailFiles.length,min:e.sliderMIn,max:e.sliderMax,"format-tooltip":e.playTimeFormat,marks:e.playTimeSliderMarks},on:{change:e.playTimeChange},model:{value:e.playTime,callback:function(t){e.playTime=t},expression:"playTime"}}),e._v(" "),a("div",{staticClass:"slider-val-box"},e._l(e.detailFiles,function(t,i){return a("div",{key:i,staticClass:"slider-val",style:"width:"+e.getDataWidth(t)+"%; left:"+e.getDataLeft(t)+"%"})}),0)],1)])],1),e._v(" "),a("el-drawer",{attrs:{title:"录像下载",visible:e.drawer,direction:e.direction,"before-close":e.drawerClose},on:{"update:visible":function(t){e.drawer=t}}},[a("div",{staticClass:"drawer-box"},[a("el-button",{attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.addTask}}),e._v(" "),a("el-tabs",{staticStyle:{height:"100%"},attrs:{type:"border-card"},on:{"tab-click":e.tabClick},model:{value:e.tabVal,callback:function(t){e.tabVal=t},expression:"tabVal"}},[a("el-tab-pane",{attrs:{name:"running"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-scissors"}),e._v("进行中")]),e._v(" "),a("ul",{staticClass:"task-list"},e._l(e.taskListForRuning,function(t,i){return a("li",{key:i,staticClass:"task-list-item"},[a("div",{staticClass:"task-list-item-box"},[a("span",[e._v(e._s(t.startTime.substr(10))+"-"+e._s(t.endTime.substr(10)))]),e._v(" "),a("el-progress",{attrs:{percentage:(100*parseFloat(t.percentage)).toFixed(1)}})],1)])}),0)]),e._v(" "),a("el-tab-pane",{attrs:{name:"ended"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("i",{staticClass:"el-icon-finished"}),e._v("已完成")]),e._v(" "),a("ul",{staticClass:"task-list"},e._l(e.taskListEnded,function(t,i){return a("li",{key:i,staticClass:"task-list-item"},[a("div",{staticClass:"task-list-item-box",staticStyle:{height:"2rem","line-height":"2rem"}},[a("span",[e._v(e._s(t.startTime.substr(10))+"-"+e._s(t.endTime.substr(10)))]),e._v(" "),a("a",{staticClass:"el-icon-download download-btn",attrs:{href:e.getFileBasePath()+"/download.html?url=download/",target:"_blank"}})])])}),0)])],1)],1)]),e._v(" "),a("el-dialog",{attrs:{title:"选择时间段",visible:e.showTaskBox},on:{"update:visible":function(t){e.showTaskBox=t}}},[a("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",format:"HH:mm:ss",placeholder:"选择时间范围"},model:{value:e.taskTimeRange,callback:function(t){e.taskTimeRange=t},expression:"taskTimeRange"}}),e._v(" "),a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.addTaskToServer}},[e._v("确认")])],1)],1)},staticRenderFns:[]};var Ia=a("owSs")(Ca,ka,!1,function(e){a("vAxO")},null,null).exports,Pa={name:"streamProxyEdit",props:{},computed:{},created:function(){this.setDialogWidth()},data:function(){var e=this,t=function(t,a,i){return/^(([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5]))$/.test(e.mediaServerForm.httpPort)?(i(),!0):i(new Error("请输入有效的端口号"))};return{dialogWidth:0,defaultWidth:1e3,listChangeCallback:null,showDialog:!1,isLoging:!1,dialogLoading:!1,currentStep:1,platformList:[],mediaServer:new pe,serverCheck:0,recordServerCheck:0,mediaServerForm:{id:"",ip:"",autoConfig:!0,hookIp:"",sdpIp:"",streamIp:"",secret:"",httpPort:"",httpSSlPort:"",recordAssistPort:"",rtmpPort:"",rtmpSSlPort:"",rtpEnable:!1,rtpPortRange:"",sendRtpPortRange:"",rtpProxyPort:"",rtspPort:"",rtspSSLPort:"",type:"zlm"},rtpPortRange1:3e4,rtpPortRange2:30500,sendRtpPortRange1:5e4,sendRtpPortRange2:6e4,rules:{ip:[{required:!0,validator:function(t,a,i){return console.log(e.mediaServerForm.ip),/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e.mediaServerForm.ip)?(i(),!0):i(new Error("请输入有效的IP地址"))},message:"请输入有效的IP地址",trigger:"blur"}],httpPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],httpSSlPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],recordAssistPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtmpPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtmpSSlPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtpPortRange1:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtpPortRange2:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtpProxyPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtspPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtspSSLPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],secret:[{required:!0,message:"请输入secret",trigger:"blur"}],timeout_ms:[{required:!0,message:"请输入FFmpeg推流成功超时时间",trigger:"blur"}],ffmpeg_cmd_key:[{required:!1,message:"请输入FFmpeg命令参数模板(可选)",trigger:"blur"}]}}},methods:{setDialogWidth:function(){document.body.clientWidth<this.defaultWidth?this.dialogWidth="100%":this.dialogWidth=this.defaultWidth+"px"},openDialog:function(e,t){if(this.showDialog=!0,this.listChangeCallback=t,null!=e&&(this.mediaServerForm=e,this.currentStep=3,e.rtpPortRange)){var a=this.mediaServerForm.rtpPortRange.split(","),i=this.mediaServerForm.sendRtpPortRange.split(",");a.length>0&&(this.rtpPortRange1=a[0],this.rtpPortRange2=a[1]),i.length>0&&(this.sendRtpPortRange1=i[0],this.sendRtpPortRange2=i[1])}},checkServer:function(){var e=this;e.serverCheck=0,e.mediaServer.checkServer(e.mediaServerForm,function(t){if(0===t.code){parseInt(e.mediaServerForm.httpPort)!==parseInt(t.data.httpPort)&&e.$message({showClose:!0,message:"如果你正在使用docker部署你的媒体服务,请注意的端口映射。",type:"warning",duration:0});var a=e.mediaServerForm.httpPort;e.mediaServerForm=t.data,e.mediaServerForm.httpPort=a,e.mediaServerForm.autoConfig=!0,e.rtpPortRange1=3e4,e.rtpPortRange2=30500,e.sendRtpPortRange1=5e4,e.sendRtpPortRange2=6e4,e.serverCheck=1}else e.serverCheck=-1,e.$message({showClose:!0,message:t.msg,type:"error"})})},next:function(){this.currentStep=2,this.defaultWidth=900,this.setDialogWidth()},checkRecordServer:function(){var e=this;if(e.recordServerCheck=2,e.mediaServerForm.recordAssistPort<=0||e.mediaServerForm.recordAssistPort>65535)return e.recordServerCheck=-1,void e.$message({showClose:!0,message:"端口号应该在-65535之间",type:"error"});e.mediaServer.checkRecordServer(e.mediaServerForm,function(t){0===t.code?e.recordServerCheck=1:(e.recordServerCheck=-1,e.$message({showClose:!0,message:t.msg,type:"error"}))})},onSubmit:function(){var e=this;this.dialogLoading=!0;var t=this;t.mediaServer.addServer(this.mediaServerForm,function(a){0===a.code?(t.$message({showClose:!0,message:"保存成功",type:"success"}),e.listChangeCallback&&e.listChangeCallback(),t.close()):t.$message({showClose:!0,message:a.msg,type:"error"})})},close:function(){this.showDialog=!1,this.dialogLoading=!1,this.mediaServerForm={id:"",ip:"",autoConfig:!0,hookIp:"",sdpIp:"",streamIp:"",secret:"",httpPort:"",httpSSlPort:"",recordAssistPort:"",rtmpPort:"",rtmpSSlPort:"",rtpEnable:!1,rtpPortRange:"",sendRtpPortRange:"",rtpProxyPort:"",rtspPort:"",rtspSSLPort:""},this.rtpPortRange1=30500,this.rtpPortRange2=30500,this.sendRtpPortRange1=5e4,this.sendRtpPortRange2=6e4,this.listChangeCallback=null,this.currentStep=1},deviceGBIdExit:function(){var e=ne()(ie.a.mark(function e(t){var a,i;return ie.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=!1,i=this,e.next=4,i.$axios({method:"get",url:"/api/platform/exit/"+t}).then(function(e){a=e.data}).catch(function(e){console.log(e)});case 4:return e.abrupt("return",a);case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),checkExpires:function(){this.platform.enable&&"0"==this.platform.expires&&(this.platform.expires="300")},portRangeChange:function(){this.mediaServerForm.rtpEnable&&(this.mediaServerForm.rtpPortRange=this.rtpPortRange1+","+this.rtpPortRange2,this.mediaServerForm.sendRtpPortRange=this.sendRtpPortRange1+","+this.sendRtpPortRange2)}}},Da={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"mediaServerEdit"}},[a("el-dialog",{attrs:{title:"媒体节点",width:e.dialogWidth,top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-top":"1rem","margin-right":"20px"},attrs:{id:"formStep"}},[1==e.currentStep?a("el-form",{ref:"mediaServerForm",attrs:{rules:e.rules,model:e.mediaServerForm,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"IP",prop:"ip"}},[a("el-input",{attrs:{placeholder:"媒体服务IP",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.ip,callback:function(t){e.$set(e.mediaServerForm,"ip",t)},expression:"mediaServerForm.ip"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"HTTP端口",prop:"httpPort"}},[a("el-input",{attrs:{placeholder:"媒体服务HTTP端口",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.httpPort,callback:function(t){e.$set(e.mediaServerForm,"httpPort",t)},expression:"mediaServerForm.httpPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SECRET",prop:"secret"}},[a("el-input",{attrs:{placeholder:"媒体服务SECRET",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.secret,callback:function(t){e.$set(e.mediaServerForm,"secret",t)},expression:"mediaServerForm.secret"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"类型",prop:"type"}},[a("el-select",{staticStyle:{float:"left",width:"100%"},model:{value:e.mediaServerForm.type,callback:function(t){e.$set(e.mediaServerForm,"type",t)},expression:"mediaServerForm.type"}},[a("el-option",{key:"zlm",attrs:{label:"ZLMediaKit",value:"zlm"}}),e._v(" "),a("el-option",{key:"abl",attrs:{label:"ABLMediaServer",value:"abl"}})],1)],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[1===e.currentStep&&1===e.serverCheck?a("el-button",{attrs:{type:"primary"},on:{click:e.next}},[e._v("下一步")]):e._e(),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.checkServer}},[e._v("测试")]),e._v(" "),1===e.serverCheck?a("i",{staticClass:"el-icon-success",staticStyle:{color:"#3caf36"}}):e._e(),e._v(" "),-1===e.serverCheck?a("i",{staticClass:"el-icon-error",staticStyle:{color:"#c80000"}}):e._e()],1)])],1):e._e(),e._v(" "),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:12}},[2===e.currentStep||3===e.currentStep?a("el-form",{ref:"mediaServerForm1",attrs:{rules:e.rules,model:e.mediaServerForm,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"IP",prop:"ip"}},[2===e.currentStep?a("el-input",{attrs:{disabled:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.ip,callback:function(t){e.$set(e.mediaServerForm,"ip",t)},expression:"mediaServerForm.ip"}}):e._e(),e._v(" "),3===e.currentStep?a("el-input",{attrs:{disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.ip,callback:function(t){e.$set(e.mediaServerForm,"ip",t)},expression:"mediaServerForm.ip"}}):e._e()],1),e._v(" "),a("el-form-item",{attrs:{label:"HTTP端口",prop:"httpPort"}},[2===e.currentStep?a("el-input",{attrs:{disabled:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.httpPort,callback:function(t){e.$set(e.mediaServerForm,"httpPort",t)},expression:"mediaServerForm.httpPort"}}):e._e(),e._v(" "),3===e.currentStep?a("el-input",{attrs:{disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.httpPort,callback:function(t){e.$set(e.mediaServerForm,"httpPort",t)},expression:"mediaServerForm.httpPort"}}):e._e()],1),e._v(" "),a("el-form-item",{attrs:{label:"HOOK IP",prop:"ip"}},[a("el-input",{attrs:{placeholder:"媒体服务HOOK_IP",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.hookIp,callback:function(t){e.$set(e.mediaServerForm,"hookIp",t)},expression:"mediaServerForm.hookIp"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SDP IP",prop:"ip"}},[a("el-input",{attrs:{placeholder:"媒体服务SDP_IP",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.sdpIp,callback:function(t){e.$set(e.mediaServerForm,"sdpIp",t)},expression:"mediaServerForm.sdpIp"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"流IP",prop:"ip"}},[a("el-input",{attrs:{placeholder:"媒体服务流IP",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.streamIp,callback:function(t){e.$set(e.mediaServerForm,"streamIp",t)},expression:"mediaServerForm.streamIp"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"HTTPS PORT",prop:"httpSSlPort"}},[a("el-input",{attrs:{placeholder:"媒体服务HTTPS_PORT",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.httpSSlPort,callback:function(t){e.$set(e.mediaServerForm,"httpSSlPort",t)},expression:"mediaServerForm.httpSSlPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"RTSP PORT",prop:"rtspPort"}},[a("el-input",{attrs:{placeholder:"媒体服务RTSP_PORT",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.rtspPort,callback:function(t){e.$set(e.mediaServerForm,"rtspPort",t)},expression:"mediaServerForm.rtspPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"RTSPS PORT",prop:"rtspSSLPort"}},[a("el-input",{attrs:{placeholder:"媒体服务RTSPS_PORT",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.rtspSSLPort,callback:function(t){e.$set(e.mediaServerForm,"rtspSSLPort",t)},expression:"mediaServerForm.rtspSSLPort"}})],1)],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:12}},[2===e.currentStep||3===e.currentStep?a("el-form",{ref:"mediaServerForm2",attrs:{rules:e.rules,model:e.mediaServerForm,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"RTMP PORT",prop:"rtmpPort"}},[a("el-input",{attrs:{placeholder:"媒体服务RTMP_PORT",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.rtmpPort,callback:function(t){e.$set(e.mediaServerForm,"rtmpPort",t)},expression:"mediaServerForm.rtmpPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"RTMPS PORT",prop:"rtmpSSlPort"}},[a("el-input",{attrs:{placeholder:"媒体服务RTMPS_PORT",clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.rtmpSSlPort,callback:function(t){e.$set(e.mediaServerForm,"rtmpSSlPort",t)},expression:"mediaServerForm.rtmpSSlPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"SECRET",prop:"secret"}},[2===e.currentStep?a("el-input",{attrs:{disabled:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.secret,callback:function(t){e.$set(e.mediaServerForm,"secret",t)},expression:"mediaServerForm.secret"}}):e._e(),e._v(" "),3===e.currentStep?a("el-input",{attrs:{disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.secret,callback:function(t){e.$set(e.mediaServerForm,"secret",t)},expression:"mediaServerForm.secret"}}):e._e()],1),e._v(" "),a("el-form-item",{attrs:{label:"自动配置媒体服务"}},[a("el-switch",{attrs:{disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.autoConfig,callback:function(t){e.$set(e.mediaServerForm,"autoConfig",t)},expression:"mediaServerForm.autoConfig"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"收流端口模式"}},[a("el-switch",{attrs:{"active-text":"多端口","inactive-text":"单端口",disabled:e.mediaServerForm.defaultServer},on:{change:e.portRangeChange},model:{value:e.mediaServerForm.rtpEnable,callback:function(t){e.$set(e.mediaServerForm,"rtpEnable",t)},expression:"mediaServerForm.rtpEnable"}})],1),e._v(" "),e.mediaServerForm.rtpEnable?e._e():a("el-form-item",{attrs:{label:"收流端口",prop:"rtpProxyPort"}},[a("el-input",{attrs:{clearable:"",disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.rtpProxyPort,callback:function(t){e.$set(e.mediaServerForm,"rtpProxyPort",e._n(t))},expression:"mediaServerForm.rtpProxyPort"}})],1),e._v(" "),e.mediaServerForm.rtpEnable?a("el-form-item",{attrs:{label:"收流端口"}},[a("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:"起始",clearable:"",prop:"rtpPortRange1",disabled:e.mediaServerForm.defaultServer},on:{change:e.portRangeChange},model:{value:e.rtpPortRange1,callback:function(t){e.rtpPortRange1=t},expression:"rtpPortRange1"}}),e._v("\n -\n "),a("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:"终止",clearable:"",prop:"rtpPortRange2",disabled:e.mediaServerForm.defaultServer},on:{change:e.portRangeChange},model:{value:e.rtpPortRange2,callback:function(t){e.rtpPortRange2=t},expression:"rtpPortRange2"}})],1):e._e(),e._v(" "),e.mediaServerForm.sendRtpEnable?a("el-form-item",{attrs:{label:"发流端口"}},[a("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:"起始",clearable:"",prop:"rtpPortRange1",disabled:e.mediaServerForm.defaultServer},on:{change:e.portRangeChange},model:{value:e.sendRtpPortRange1,callback:function(t){e.sendRtpPortRange1=t},expression:"sendRtpPortRange1"}}),e._v("\n -\n "),a("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:"终止",clearable:"",prop:"rtpPortRange2",disabled:e.mediaServerForm.defaultServer},on:{change:e.portRangeChange},model:{value:e.sendRtpPortRange2,callback:function(t){e.sendRtpPortRange2=t},expression:"sendRtpPortRange2"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"录像管理服务端口",prop:"recordAssistPort"}},[a("el-input",{attrs:{disabled:e.mediaServerForm.defaultServer},model:{value:e.mediaServerForm.recordAssistPort,callback:function(t){e.$set(e.mediaServerForm,"recordAssistPort",e._n(t))},expression:"mediaServerForm.recordAssistPort"}},[e.mediaServerForm.recordAssistPort>0?a("el-button",{staticClass:"el-icon-check",attrs:{slot:"append",type:"primary"},on:{click:e.checkRecordServer},slot:"append"}):e._e()],1),e._v(" "),1==e.recordServerCheck?a("i",{staticClass:"el-icon-success",staticStyle:{color:"#3caf36",position:"absolute",top:"14px"}}):e._e(),e._v(" "),2==e.recordServerCheck?a("i",{staticClass:"el-icon-loading",staticStyle:{color:"#3caf36",position:"absolute",top:"14px"}}):e._e(),e._v(" "),-1===e.recordServerCheck?a("i",{staticClass:"el-icon-error",staticStyle:{color:"#c80000",position:"absolute",top:"14px"}}):e._e()],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[e.mediaServerForm.defaultServer?e._e():a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("提交")]),e._v(" "),e.mediaServerForm.defaultServer?e._e():a("el-button",{on:{click:e.close}},[e._v("取消")]),e._v(" "),e.mediaServerForm.defaultServer?a("el-button",{on:{click:e.close}},[e._v("关闭")]):e._e()],1)])],1):e._e()],1)],1)],1)])],1)},staticRenderFns:[]},$a={name:"mediaServerManger",components:{uiHeader:I,mediaServerEdit:a("owSs")(Pa,Da,!1,null,null,null).exports},data:function(){return{mediaServerObj:new pe,mediaServerList:[],winHeight:window.innerHeight-200,updateLooper:!1,currentPage:1,count:15,num:this.getNumberByWidth(),total:0}},computed:{},mounted:function(){this.initData(),this.updateLooper=setInterval(this.initData,2e3)},destroyed:function(){clearTimeout(this.updateLooper)},methods:{initData:function(){this.getServerList()},currentChange:function(e){this.currentPage=e,this.getServerList()},handleSizeChange:function(e){this.count=e,this.getServerList()},getServerList:function(){var e=this;this.mediaServerObj.getMediaServerList(function(t){e.mediaServerList=t.data})},add:function(){this.$refs.mediaServerEdit.openDialog(null,this.initData)},edit:function(e){this.$refs.mediaServerEdit.openDialog(e,this.initData)},del:function(e){var t=this;this.$confirm("确认删除此节点?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.mediaServerObj.delete(e.id,function(e){0===e.code&&t.$message({type:"success",message:"删除成功!"})})}).catch(function(){})},getNumberByWidth:function(){for(var e=[1,2,3,4,6,8,12,24],t=(window.innerWidth-30+20)/380,a=Math.ceil(24/t),i=0;i<e.length;i++){var o=e[i];if(i+1>=e.length)return 24;if(o<=a&&e[i+1]>a)return o}return 24},dateFormat:function(){var e,t,a,i,o,n,r,s=arguments[0]||0;return t=(e=s?new Date(1e3*s):new Date).getFullYear(),a=e.getMonth()+1,i=e.getDate(),o=e.getHours(),n=e.getMinutes(),r=e.getSeconds(),t+"-"+(a<10?"0"+a:a)+"-"+(i<10?"0"+i:i)+" "+(o<10?"0"+o:o)+":"+(n<10?"0"+n:n)+":"+(r<10?"0"+r:r)}}},La={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"mediaServerManger"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[e._v("节点列表")]),e._v(" "),a("div",{staticClass:"page-header-btn"},[a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.add}},[e._v("添加节点")])],1)]),e._v(" "),a("el-row",{attrs:{gutter:12}},e._l(e.mediaServerList,function(t){return a("el-col",{key:t.id,attrs:{span:e.num}},[a("el-card",{staticClass:"server-card",attrs:{shadow:"hover","body-style":{padding:"0px"}}},["zlm"===t.type?a("div",{staticClass:"card-img-zlm"}):e._e(),e._v(" "),"abl"===t.type?a("div",{staticClass:"card-img-abl"}):e._e(),e._v(" "),a("div",{staticStyle:{padding:"14px","text-align":"left"}},[a("span",{staticStyle:{"font-size":"16px"}},[e._v(e._s(t.id))]),e._v(" "),t.defaultServer?e._e():a("el-button",{staticStyle:{padding:"0",float:"right"},attrs:{icon:"el-icon-edit",type:"text"},on:{click:function(a){return e.edit(t)}}},[e._v("编辑")]),e._v(" "),t.defaultServer?a("el-button",{staticStyle:{padding:"0",float:"right"},attrs:{icon:"el-icon-edit",type:"text"},on:{click:function(a){return e.edit(t)}}},[e._v("查看")]):e._e(),e._v(" "),t.defaultServer?e._e():a("el-button",{staticStyle:{"margin-right":"10px",padding:"0",float:"right"},attrs:{icon:"el-icon-delete",type:"text"},on:{click:function(a){return e.del(t)}}},[e._v("移除")]),e._v(" "),a("div",{staticStyle:{"margin-top":"13px","line-height":"12px"}},[a("span",{staticStyle:{"font-size":"14px",color:"#999","margin-top":"5px"}},[e._v(e._s(t.ip))]),e._v(" "),a("span",{staticStyle:{"font-size":"14px",color:"#999","margin-top":"5px",float:"right"}},[e._v(e._s(t.createTime))])])],1),e._v(" "),t.status?a("i",{staticClass:"iconfont icon-online server-card-status-online",attrs:{title:"在线"}}):e._e(),e._v(" "),t.status?e._e():a("i",{staticClass:"iconfont icon-online server-card-status-offline",attrs:{title:"离线"}}),e._v(" "),t.defaultServer?a("i",{staticClass:"server-card-default"},[e._v("默认")]):e._e()])],1)}),1),e._v(" "),a("mediaServerEdit",{ref:"mediaServerEdit"})],1)},staticRenderFns:[]};var Ta=a("owSs")($a,La,!1,function(e){a("wLVp")},null,null).exports,Fa={name:"SettingForWeb",components:{uiHeader:I},data:function(){return{form:{port:null,autoApplyPlay:null,seniorSdp:null,savePositionHistory:null,playTimeout:null,waitTrack:null,interfaceAuthentication:null},rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],app:[{required:!0,message:"请输入应用名",trigger:"blur"}],stream:[{required:!0,message:"请输入流ID",trigger:"blur"}],gbId:[{required:!0,message:"请输入国标编码",trigger:"blur"}]}}}},Ea={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"SettingForWeb"}},[e._m(0),e._v(" "),a("div",{staticStyle:{width:"60%",margin:"0 auto","background-color":"#FFFFFF",position:"relative",padding:"5rem 6.5rem","text-align":"left","font-size":"14px","max-width":"400px"}},[a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"HTTP端口",prop:"port"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.port,callback:function(t){e.$set(e.form,"port",e._n(t))},expression:"form.port"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"点播超时"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.playTimeout,callback:function(t){e.$set(e.form,"playTimeout",e._n(t))},expression:"form.playTimeout"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"自动点播"}},[a("el-switch",{model:{value:e.form.autoApplyPlay,callback:function(t){e.$set(e.form,"autoApplyPlay",t)},expression:"form.autoApplyPlay"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"扩展SDP"}},[a("el-switch",{model:{value:e.form.seniorSdp,callback:function(t){e.$set(e.form,"seniorSdp",t)},expression:"form.seniorSdp"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"保存轨迹"}},[a("el-switch",{model:{value:e.form.savePositionHistory,callback:function(t){e.$set(e.form,"savePositionHistory",t)},expression:"form.savePositionHistory"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"等待音视频编码信息"}},[a("el-switch",{model:{value:e.form.waitTrack,callback:function(t){e.$set(e.form,"waitTrack",t)},expression:"form.waitTrack"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开启接口鉴权"}},[a("el-switch",{model:{value:e.form.interfaceAuthentication,callback:function(t){e.$set(e.form,"interfaceAuthentication",t)},expression:"form.interfaceAuthentication"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)])],1)],1)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"page-header"},[t("div",{staticClass:"page-title"},[this._v("WEB服务")])])}]};var Ra=a("owSs")(Fa,Ea,!1,function(e){a("xJdS")},"data-v-d4b89836",null).exports,za={name:"SettingForSip",components:{uiHeader:I},data:function(){return{form:{ip:null,port:null,domain:null,id:null,password:null},rules:{ip:[{required:!0,message:"请输入名称",trigger:"blur"}],port:[{required:!0,message:"请输入应用名",trigger:"blur"}],domain:[{required:!0,message:"请输入流ID",trigger:"blur"}],id:[{required:!0,message:"请输入国标编码",trigger:"blur"}],password:[{required:!0,message:"请输入国标编码",trigger:"blur"}]}}}},Aa={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"SettingForSip"}},[e._m(0),e._v(" "),a("div",{staticStyle:{width:"60%",margin:"0 auto","background-color":"#FFFFFF",position:"relative",padding:"5rem 6.5rem","text-align":"left","font-size":"14px","max-width":"400px"}},[a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"ip",prop:"ip"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.ip,callback:function(t){e.$set(e.form,"ip",t)},expression:"form.ip"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"端口",prop:"port"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.port,callback:function(t){e.$set(e.form,"port",e._n(t))},expression:"form.port"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"域",prop:"domain"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.domain,callback:function(t){e.$set(e.form,"domain",t)},expression:"form.domain"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"id",prop:"id"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.id,callback:function(t){e.$set(e.form,"id",t)},expression:"form.id"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"密码",prop:"password"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)])],1)],1)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"page-header"},[t("div",{staticClass:"page-title"},[this._v("国标服务")])])}]};var Ma=a("owSs")(za,Aa,!1,function(e){a("ACeG")},"data-v-6e9180f8",null).exports,Ua={name:"SettingForMedia",components:{uiHeader:I},data:function(){return{dockerStr:null,form:{ip:null,wanIp:null,hookIp:null,httpPort:null,httpSSlPort:null,rtmpPort:null,rtpProxyPort:null,rtspPort:null,rtspSSLPort:null,autoConfig:!0,secret:"035c73f7-bb6b-4889-a715-d9eb2d1925cc",rtp:{enable:!1,portRange:null}},rules:{IP:[{required:!0,message:"请输入名称",trigger:"blur"}],wanIp:[{required:!1,message:"请输入应用名",trigger:"blur"}],hookIp:[{required:!1,message:"请输入流ID",trigger:"blur"}]}}}},ja={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"SettingForMedia"}},[e._m(0),e._v(" "),a("div",{staticStyle:{width:"60%",margin:"0 auto","background-color":"#FFFFFF",position:"relative",padding:"5rem 6.5rem","text-align":"left","font-size":"14px","max-width":"400px"}},[a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"IP",prop:"IP"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.IP,callback:function(t){e.$set(e.form,"IP",t)},expression:"form.IP"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"公网IP",prop:"wanIp"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.wanIp,callback:function(t){e.$set(e.form,"wanIp",t)},expression:"form.wanIp"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"HOOK IP",prop:"hookIp"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.hookIp,callback:function(t){e.$set(e.form,"hookIp",t)},expression:"form.hookIp"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"HTTP端口"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.httpPort,callback:function(t){e.$set(e.form,"httpPort",e._n(t))},expression:"form.httpPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"HTTP SSL端口"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.httpSSlPort,callback:function(t){e.$set(e.form,"httpSSlPort",e._n(t))},expression:"form.httpSSlPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"RTMP端口"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.rtmpPort,callback:function(t){e.$set(e.form,"rtmpPort",e._n(t))},expression:"form.rtmpPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"RTMP SSL端口"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.rtmpSSlPort,callback:function(t){e.$set(e.form,"rtmpSSlPort",e._n(t))},expression:"form.rtmpSSlPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"RTSP端口"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.rtspPort,callback:function(t){e.$set(e.form,"rtspPort",e._n(t))},expression:"form.rtspPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"RTSP SSL端口"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.rtspSSLPort,callback:function(t){e.$set(e.form,"rtspSSLPort",e._n(t))},expression:"form.rtspSSLPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"RTP端口"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.rtpProxyPort,callback:function(t){e.$set(e.form,"rtpProxyPort",e._n(t))},expression:"form.rtpProxyPort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"自动点播"}},[a("el-switch",{model:{value:e.form.autoApplyPlay,callback:function(t){e.$set(e.form,"autoApplyPlay",t)},expression:"form.autoApplyPlay"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"接口密钥",prop:"secret"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.secret,callback:function(t){e.$set(e.form,"secret",t)},expression:"form.secret"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"自动配置"}},[a("el-switch",{model:{value:e.form.autoConfig,callback:function(t){e.$set(e.form,"autoConfig",t)},expression:"form.autoConfig"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"使用多端口"}},[a("el-switch",{model:{value:e.form.rtp.enable,callback:function(t){e.$set(e.form.rtp,"enable",t)},expression:"form.rtp.enable"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"端口范围"}},[a("el-input",{attrs:{clearable:""},model:{value:e.form.rtp.portRange,callback:function(t){e.$set(e.form.rtp,"portRange",e._n(t))},expression:"form.rtp.portRange"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"DOCKER智能识别"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.dockerStr,callback:function(t){e.dockerStr=t},expression:"dockerStr"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)])],1)],1)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"page-header"},[t("div",{staticClass:"page-title"},[this._v("媒体服务")])])}]};var Na=a("owSs")(Ua,ja,!1,function(e){a("kiYe")},"data-v-2e6f0cc2",null).exports,Ba={name:"live",components:{uiHeader:I,player:ze,DeviceTree:Oe},data:function(){return{videoUrl:[""],spilt:1,playerIdx:0,updateLooper:0,count:15,total:0,loading:!1}},mounted:function(){},created:function(){this.checkPlayByParam()},computed:{liveStyle:function(){var e=this,t={width:"100%",height:"100%"};switch(this.spilt){case 4:t={width:"49%",height:"49%"};break;case 9:t={width:"32%",height:"32%"}}return this.$nextTick(function(){for(var t=0;t<e.spilt;t++){var a=e.$refs.player;a&&a[t]&&a[t].updatePlayerDomSize()}}),t}},watch:{spilt:function(e){var t=this;console.log("切换画幅;"+e);for(var a=this,i=function(e){if(!a.$refs["player"+e])return"continue";t.$nextTick(function(){a.$refs["player"+e]instanceof Array?a.$refs["player"+e][0].resize():a.$refs["player"+e].resize()})},o=1;o<=e;o++)i(o);window.localStorage.setItem("split",e)},"$route.fullPath":"checkPlayByParam"},destroyed:function(){clearTimeout(this.updateLooper)},methods:{destroy:function(e){console.log(e),this.clear(e.substring(e.length-1))},clickEvent:function(e,t,a){t.channelId&&!a&&(0===e.online?this.$message.error("设备离线!不允许点播"):this.sendDevicePush(t))},contextMenuEvent:function(e,t,a,i){},sendDevicePush:function(e){this.save(e);var t=e.deviceId,a=e.channelId;console.log("通知设备推流1:"+t+" : "+a);var i=this.playerIdx,o=this;this.loading=!0,this.$axios({method:"get",url:"/api/play/start/"+t+"/"+a}).then(function(t){if(0===t.data.code&&t.data.data){var a=void 0;a="https:"===location.protocol?t.data.data.wss_flv:t.data.data.ws_flv,e.playUrl=a,o.setPlayUrl(a,i)}else o.$message.error(t.data.msg)}).catch(function(e){}).finally(function(){o.loading=!1})},setPlayUrl:function(e,t){this.$set(this.videoUrl,t,e);var a=this;setTimeout(function(){window.localStorage.setItem("videoUrl",s()(a.videoUrl))},100)},checkPlayByParam:function(){var e=this.$route.query,t=e.deviceId,a=e.channelId;t&&a&&this.sendDevicePush({deviceId:t,channelId:a})},shot:function(e){var t=document.createElement("a"),a=function(e){for(var t=e.split(";base64,"),a=t[0].split(":")[1],i=window.atob(t[1]),o=i.length,n=new Uint8Array(o),r=0;r<o;++r)n[r]=i.charCodeAt(r);return new Blob([n],{type:a})}(e);document.createEvent("HTMLEvents").initEvent("click",!0,!0),t.download="截图",t.href=URL.createObjectURL(a),t.click()},save:function(e){var t=window.localStorage.getItem("playData")||"[]",a=JSON.parse(t);a[this.playerIdx]=e,window.localStorage.setItem("playData",s()(a))},clear:function(e){var t=window.localStorage.getItem("playData")||"[]",a=JSON.parse(t);a[e-1]=null,console.log(a),window.localStorage.setItem("playData",s()(a))}}},Ha={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100vw",height:"91vh"},attrs:{id:"devicePosition"}},[a("el-container",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{height:"91vh"},attrs:{"element-loading-text":"拼命加载中"}},[a("el-aside",{staticStyle:{"background-color":"#ffffff"},attrs:{width:"300px"}},[a("DeviceTree",{attrs:{clickEvent:e.clickEvent,contextMenuEvent:e.contextMenuEvent,isMap:!1}})],1),e._v(" "),a("el-container",[a("el-header",{staticStyle:{"text-align":"left","font-size":"17px","line-height":"5vh"},attrs:{height:"5vh"}},[e._v("\n 分屏:\n "),a("i",{staticClass:"el-icon-full-screen btn",class:{active:1==e.spilt},on:{click:function(t){e.spilt=1}}}),e._v(" "),a("i",{staticClass:"el-icon-menu btn",class:{active:4==e.spilt},on:{click:function(t){e.spilt=4}}}),e._v(" "),a("i",{staticClass:"el-icon-s-grid btn",class:{active:9==e.spilt},on:{click:function(t){e.spilt=9}}})]),e._v(" "),a("el-main",{staticStyle:{padding:"0"}},[a("div",{staticStyle:{width:"99%",height:"85vh",display:"flex","flex-wrap":"wrap","background-color":"#000"}},e._l(e.spilt,function(t){return a("div",{key:t,staticClass:"play-box",class:{redborder:e.playerIdx==t-1},style:e.liveStyle,on:{click:function(a){e.playerIdx=t-1}}},[e.videoUrl[t-1]?a("player",{ref:"player",refInFor:!0,attrs:{videoUrl:e.videoUrl[t-1],autoplay:"",fluent:""},on:{destroy:e.destroy,screenshot:e.shot}}):a("div",{staticStyle:{color:"#ffffff","font-size":"30px","font-weight":"bold"}},[e._v(e._s(t))])],1)}),0)])],1)],1)],1)},staticRenderFns:[]};var Oa=a("owSs")(Ba,Ha,!1,function(e){a("ETCO"),a("/EoW")},null,null).exports,qa={name:"changePasswordForAdmin",props:{},computed:{},created:function(){},data:function(){var e=this;return{newPassword:null,confirmPassword:null,userId:null,showDialog:!1,isLoging:!1,listChangeCallback:null,form:{},rules:{newPassword:[{required:!0,validator:function(t,a,i){""===a?i(new Error("请输入新密码")):(""!==e.confirmPassword&&e.$refs.passwordForm.validateField("confirmPassword"),i())},trigger:"blur"},{pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,20}$/,message:"密码长度在8-20位之间,由字母+数字+特殊字符组成"}],confirmPassword:[{required:!0,validator:function(t,a,i){""===e.confirmPassword?i(new Error("请再次输入密码")):e.confirmPassword!==e.newPassword?i(new Error("两次输入密码不一致!")):i()},trigger:"blur"}]}}},methods:{openDialog:function(e,t){console.log(e),this.showDialog=!0,this.listChangeCallback=t,null!=e&&(this.form=e)},onSubmit:function(){var e=this;this.$axios({method:"post",url:"/api/user/changePasswordForAdmin",params:{password:this.newPassword,userId:this.form.id}}).then(function(t){0===t.data.code?(e.$message({showClose:!0,message:"修改成功",type:"success"}),e.showDialog=!1):e.$message({showClose:!0,message:"修改密码失败,是否已登录(接口鉴权关闭无法修改密码)",type:"error"})}).catch(function(e){console.error(e)})},close:function(){this.showDialog=!1,this.newPassword=null,this.confirmPassword=null,this.userId=null,this.adminId=null}}},Ga={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"changePassword"}},[a("el-dialog",{attrs:{title:"修改密码",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-right":"20px"},attrs:{id:"shared"}},[a("el-form",{ref:"passwordForm",attrs:{rules:e.rules,"status-icon":"","label-width":"80px"}},[a("el-form-item",{attrs:{label:"新密码",prop:"newPassword"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.newPassword,callback:function(t){e.newPassword=t},expression:"newPassword"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"确认密码",prop:"confirmPassword"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.confirmPassword,callback:function(t){e.confirmPassword=t},expression:"confirmPassword"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},Ka={name:"changePushKey",props:{},computed:{},created:function(){},data:function(){return{newPushKey:null,confirmpushKey:null,userId:null,showDialog:!1,isLoging:!1,listChangeCallback:null,form:{},rules:{newpushKey:[{required:!0,validator:function(e,t,a){""===t?a(new Error("请输入新pushKey")):a()},trigger:"blur"}]}}},methods:{openDialog:function(e,t){console.log(e),this.showDialog=!0,this.listChangeCallback=t,null!=e&&(this.form=e)},onSubmit:function(){var e=this;this.$axios({method:"post",url:"/api/user/changePushKey",params:{pushKey:this.newPushKey,userId:this.form.id}}).then(function(t){0===t.data.code?(e.$message({showClose:!0,message:"修改成功",type:"success"}),e.showDialog=!1,e.listChangeCallback()):e.$message({showClose:!0,message:"修改pushKey失败,是否已登录(接口鉴权关闭无法修改pushKey)",type:"error"})}).catch(function(e){console.error(e)})},close:function(){this.showDialog=!1,this.newpushKey=null,this.userId=null,this.adminId=null}}},Wa={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"changepushKey"}},[a("el-dialog",{attrs:{title:"修改pushKey",width:"42%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-right":"18px"},attrs:{id:"shared"}},[a("el-form",{ref:"pushKeyForm",attrs:{rules:e.rules,"status-icon":"","label-width":"86px"}},[a("el-form-item",{attrs:{label:"新pushKey",prop:"newPushKey"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.newPushKey,callback:function(t){e.newPushKey=t},expression:"newPushKey"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},Va={name:"addUser",props:{},computed:{},created:function(){this.getAllRole()},data:function(){var e=this;return{value:"",options:[],loading:!1,username:null,password:null,roleId:null,confirmPassword:null,listChangeCallback:null,showDialog:!1,isLoging:!1,rules:{newPassword:[{required:!0,validator:function(t,a,i){""===a?i(new Error("请输入新密码")):(""!==e.confirmPassword&&e.$refs.passwordForm.validateField("confirmPassword"),i())},trigger:"blur"},{pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,20}$/,message:"密码长度在8-20位之间,由字母+数字+特殊字符组成"}],confirmPassword:[{required:!0,validator:function(t,a,i){""===e.confirmPassword?i(new Error("请再次输入密码")):e.confirmPassword!==e.password?i(new Error("两次输入密码不一致!")):i()},trigger:"blur"}]}}},methods:{openDialog:function(e){this.listChangeCallback=e,this.showDialog=!0},onSubmit:function(){var e=this;this.$axios({method:"post",url:"/api/user/add",params:{username:this.username,password:this.password,roleId:this.roleId}}).then(function(t){0===t.data.code?(e.$message({showClose:!0,message:"添加成功",type:"success"}),e.showDialog=!1,e.listChangeCallback()):e.$message({showClose:!0,message:t.data.msg,type:"error"})}).catch(function(e){console.error(e)})},close:function(){this.showDialog=!1,this.password=null,this.confirmPassword=null,this.username=null,this.roleId=null},getAllRole:function(){var e=this;this.$axios({method:"get",url:"/api/role/all"}).then(function(t){e.loading=!0,0===t.data.code&&(e.options=t.data.data)}).catch(function(e){console.error(e)})}}},Ya={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"addUser"}},[a("el-dialog",{attrs:{title:"添加用户",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-right":"20px"},attrs:{id:"shared"}},[a("el-form",{ref:"passwordForm",attrs:{rules:e.rules,"status-icon":"","label-width":"80px"}},[a("el-form-item",{attrs:{label:"用户名",prop:"username"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用户类型",prop:"roleId"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.roleId,callback:function(t){e.roleId=t},expression:"roleId"}},e._l(e.options,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"密码",prop:"password"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"确认密码",prop:"confirmPassword"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.confirmPassword,callback:function(t){e.confirmPassword=t},expression:"confirmPassword"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},Ja={name:"userManager",components:{uiHeader:I,changePasswordForAdmin:a("owSs")(qa,Ga,!1,null,null,null).exports,changePushKey:a("owSs")(Ka,Wa,!1,null,null,null).exports,addUser:a("owSs")(Va,Ya,!1,null,null,null).exports},data:function(){return{userList:[],currentUser:{},videoComponentList:[],updateLooper:0,currentUserLenth:0,winHeight:window.innerHeight-200,currentPage:1,count:15,total:0,getUserListLoading:!1}},mounted:function(){this.initData(),this.updateLooper=setInterval(this.initData,1e4)},destroyed:function(){this.$destroy("videojs"),clearTimeout(this.updateLooper)},methods:{initData:function(){this.getUserList()},currentChange:function(e){this.currentPage=e,this.getUserList()},handleSizeChange:function(e){this.count=e,this.getUserList()},getUserList:function(){var e=this;this.getUserListLoading=!0,this.$axios({method:"get",url:"/api/user/users",params:{page:e.currentPage,count:e.count}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.userList=t.data.data.list),e.getUserListLoading=!1}).catch(function(t){e.getUserListLoading=!1})},edit:function(e){var t=this;this.$refs.changePasswordForAdmin.openDialog(e,function(){t.$refs.changePasswordForAdmin.close(),t.$message({showClose:!0,message:"密码修改成功",type:"success"}),setTimeout(t.getUserList,200)})},deleteUser:function(e){var t=this,a="确定删除此用户?";0!==e.online&&(a="<strong>确定删除此用户?</strong>"),this.$confirm(a,"提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",center:!0,type:"warning"}).then(function(){t.$axios({method:"delete",url:"/api/user/delete?id="+e.id}).then(function(e){t.getUserList()}).catch(function(e){console.error(e)})}).catch(function(){})},changePushKey:function(e){var t=this;this.$refs.changePushKey.openDialog(e,function(){t.$refs.changePushKey.close(),t.$message({showClose:!0,message:"pushKey修改成功",type:"success"}),setTimeout(t.getUserList,200)})},addUser:function(){var e=this;this.$refs.addUser.openDialog(function(){e.$refs.addUser.close(),e.$message({showClose:!0,message:"用户添加成功",type:"success"}),setTimeout(e.getUserList,200)})},showUserApiKeyManager:function(e){this.$router.push("/userApiKeyManager/"+e.id)}}},Za={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"app"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[e._v("用户列表")]),e._v(" "),a("div",{staticClass:"page-header-btn"},[a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.addUser}},[e._v("\n 添加用户\n ")])],1)]),e._v(" "),a("el-table",{staticStyle:{width:"100%","font-size":"12px"},attrs:{data:e.userList,height:e.winHeight,"header-row-class-name":"table-header"}},[a("el-table-column",{attrs:{prop:"username",label:"用户名","min-width":"160"}}),e._v(" "),a("el-table-column",{attrs:{prop:"pushKey",label:"pushkey","min-width":"160"}}),e._v(" "),a("el-table-column",{attrs:{prop:"role.name",label:"类型","min-width":"160"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"450",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"medium",icon:"el-icon-edit",type:"text"},on:{click:function(a){return e.edit(t.row)}}},[e._v("修改密码")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{size:"medium",icon:"el-icon-edit",type:"text"},on:{click:function(a){return e.changePushKey(t.row)}}},[e._v("修改pushkey")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{size:"medium",icon:"el-icon-edit",type:"text"},on:{click:function(a){return e.showUserApiKeyManager(t.row)}}},[e._v("管理ApiKey")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{staticStyle:{color:"#f56c6c"},attrs:{size:"medium",icon:"el-icon-delete",type:"text"},on:{click:function(a){return e.deleteUser(t.row)}}},[e._v("删除\n ")])]}}])})],1),e._v(" "),a("changePasswordForAdmin",{ref:"changePasswordForAdmin"}),e._v(" "),a("changePushKey",{ref:"changePushKey"}),e._v(" "),a("addUser",{ref:"addUser"}),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}})],1)},staticRenderFns:[]};var Xa=a("owSs")(Ja,Za,!1,function(e){a("xcg5")},null,null).exports,Qa={name:"addUserApiKey",props:{},computed:{},created:function(){},data:function(){return{userId:null,form:{app:null,enable:!0,expiresAt:null,remark:null},rules:{app:[{required:!0,trigger:"blur",message:"应用名不能为空"}]},listChangeCallback:null,showDialog:!1,isLoading:!1}},methods:{resetForm:function(){this.form={app:null,enable:!0,expiresAt:null,remark:null}},openDialog:function(e,t){this.resetForm(),this.userId=e,this.listChangeCallback=t,this.showDialog=!0},onSubmit:function(){var e=this;this.$refs.formRef.validate(function(t){t&&e.$axios({method:"post",url:"/api/userApiKey/add",params:{userId:e.userId,app:e.form.app,enable:e.form.enable,expiresAt:e.form.expiresAt,remark:e.form.remark}}).then(function(t){0===t.data.code?(e.$message({showClose:!0,message:"添加成功",type:"success"}),e.showDialog=!1,e.listChangeCallback&&e.listChangeCallback()):e.$message({showClose:!0,message:t.data.msg,type:"error"})}).catch(function(e){console.error(e)})})},close:function(){this.showDialog=!1}}},ei={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoading,expression:"isLoading"}],attrs:{id:"addUserApiKey"}},[a("el-dialog",{attrs:{title:"添加ApiKey",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-right":"20px"},attrs:{id:"shared"}},[a("el-form",{ref:"formRef",attrs:{model:e.form,rules:e.rules,"status-icon":"","label-width":"80px"}},[a("el-form-item",{attrs:{label:"应用名",prop:"app"}},[a("el-input",{attrs:{property:"app",autocomplete:"off"},model:{value:e.form.app,callback:function(t){e.$set(e.form,"app",t)},expression:"form.app"}})],1),e._v(" "),a("el-form-item",{staticStyle:{"text-align":"left"},attrs:{label:"启用状态",prop:"enable"}},[a("el-switch",{attrs:{property:"enable","active-text":"启用","inactive-text":"停用"},model:{value:e.form.enable,callback:function(t){e.$set(e.form,"enable",t)},expression:"form.enable"}})],1),e._v(" "),a("el-form-item",{staticStyle:{"text-align":"left"},attrs:{label:"过期时间",prop:"expiresAt"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{property:"expiresAt",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss",placeholder:"选择过期时间"},model:{value:e.form.expiresAt,callback:function(t){e.$set(e.form,"expiresAt",t)},expression:"form.expiresAt"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注信息",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",property:"remark",autocomplete:"off",autosize:{minRows:5},maxlength:"255","show-word-limit":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},ti={name:"remarkUserApiKey",props:{},computed:{},created:function(){},data:function(){return{userApiKeyId:null,form:{remark:null},rules:{},listChangeCallback:null,showDialog:!1,isLoading:!1}},methods:{resetForm:function(){this.form={remark:null}},openDialog:function(e,t){this.resetForm(),this.userApiKeyId=e,this.listChangeCallback=t,this.showDialog=!0},onSubmit:function(){var e=this;this.$axios({method:"post",url:"/api/userApiKey/remark",params:{id:this.userApiKeyId,remark:this.form.remark}}).then(function(t){0===t.data.code?(e.$message({showClose:!0,message:"备注修改成功!",type:"success"}),e.showDialog=!1,e.listChangeCallback()):e.$message({showClose:!0,message:"备注修改失败",type:"error"})}).catch(function(e){console.error(e)})},close:function(){this.showDialog=!1}}},ai={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoading,expression:"isLoading"}],attrs:{id:"remarkUserApiKey"}},[a("el-dialog",{attrs:{title:"ApiKey备注",width:"40%",top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[a("div",{staticStyle:{"margin-right":"20px"},attrs:{id:"shared"}},[a("el-form",{ref:"form",attrs:{rules:e.rules,"status-icon":"","label-width":"80px"}},[a("el-form-item",{attrs:{label:"备注",prop:"oldPassword"}},[a("el-input",{attrs:{type:"textarea",autocomplete:"off",autosize:{minRows:5},maxlength:"255","show-word-limit":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1),e._v(" "),a("el-form-item",[a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])],1)],1)])],1)},staticRenderFns:[]},ii={name:"userApiKeyManager",components:{uiHeader:I,addUserApiKey:a("owSs")(Qa,ei,!1,null,null,null).exports,remarkUserApiKey:a("owSs")(ti,ai,!1,null,null,null).exports},data:function(){return{userList:[],currentUser:{},winHeight:window.innerHeight-200,currentPage:1,count:15,total:0,getUserApiKeyListLoading:!1}},mounted:function(){this.initParam(),this.initData()},methods:{goBack:function(){this.$router.back()},initParam:function(){this.userId=this.$route.params.userId},initData:function(){this.getUserApiKeyList()},currentChange:function(e){this.currentPage=e,this.getUserApiKeyList()},handleSizeChange:function(e){this.count=e,this.getUserApiKeyList()},getUserApiKeyList:function(){var e=this;this.getUserApiKeyListLoading=!0,this.$axios({method:"get",url:"/api/userApiKey/userApiKeys",params:{page:e.currentPage,count:e.count}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.userList=t.data.data.list),e.getUserApiKeyListLoading=!1}).catch(function(t){e.getUserApiKeyListLoading=!1})},addUserApiKey:function(){var e=this;this.$refs.addUserApiKey.openDialog(this.userId,function(){e.$refs.addUserApiKey.close(),e.$message({showClose:!0,message:"ApiKey添加成功",type:"success"}),setTimeout(e.getUserApiKeyList,200)})},remarkUserApiKey:function(e){var t=this;this.$refs.remarkUserApiKey.openDialog(e.id,function(){t.$refs.remarkUserApiKey.close(),t.$message({showClose:!0,message:"备注修改成功",type:"success"}),setTimeout(t.getUserApiKeyList,200)})},enableUserApiKey:function(e){var t=this,a="确定启用此ApiKey?";0!==e.online&&(a="<strong>确定启用此ApiKey?</strong>"),this.$confirm(a,"提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",center:!0,type:"warning"}).then(function(){t.$axios({method:"post",url:"/api/userApiKey/enable?id="+e.id}).then(function(e){t.$message({showClose:!0,message:"启用成功",type:"success"}),t.getUserApiKeyList()}).catch(function(e){t.$message({showClose:!0,message:"启用失败",type:"error"}),console.error(e)})}).catch(function(){})},disableUserApiKey:function(e){var t=this,a="确定停用此ApiKey?";0!==e.online&&(a="<strong>确定停用此ApiKey?</strong>"),this.$confirm(a,"提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",center:!0,type:"warning"}).then(function(){t.$axios({method:"post",url:"/api/userApiKey/disable?id="+e.id}).then(function(e){t.$message({showClose:!0,message:"停用成功",type:"success"}),t.getUserApiKeyList()}).catch(function(e){t.$message({showClose:!0,message:"停用失败",type:"error"}),console.error(e)})}).catch(function(){})},resetUserApiKey:function(e){var t=this,a="确定重置此ApiKey?";0!==e.online&&(a="<strong>确定重置此ApiKey?</strong>"),this.$confirm(a,"提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",center:!0,type:"warning"}).then(function(){t.$axios({method:"post",url:"/api/userApiKey/reset?id="+e.id}).then(function(e){t.$message({showClose:!0,message:"重置成功",type:"success"}),t.getUserApiKeyList()}).catch(function(e){t.$message({showClose:!0,message:"重置失败",type:"error"}),console.error(e)})}).catch(function(){})},deleteUserApiKey:function(e){var t=this,a="确定删除此ApiKey?";0!==e.online&&(a="<strong>确定删除此ApiKey?</strong>"),this.$confirm(a,"提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",center:!0,type:"warning"}).then(function(){t.$axios({method:"delete",url:"/api/userApiKey/delete?id="+e.id}).then(function(e){t.$message({showClose:!0,message:"删除成功",type:"success"}),t.getUserApiKeyList()}).catch(function(e){t.$message({showClose:!0,message:"删除失败",type:"error"}),console.error(e)})}).catch(function(){})}}},oi={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"app"}},[a("div",{staticClass:"page-header",staticStyle:{"margin-bottom":"0"}},[a("div",{staticClass:"page-title"},[a("el-page-header",{attrs:{content:"ApiKey列表"},on:{back:e.goBack}})],1),e._v(" "),a("div",{staticClass:"page-header-btn"},[a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.addUserApiKey}},[e._v("\n 添加ApiKey\n ")])],1)]),e._v(" "),a("el-table",{staticStyle:{width:"100%","font-size":"12px"},attrs:{data:e.userList,height:e.winHeight,"header-row-class-name":"table-header"}},[a("el-table-column",{attrs:{prop:"user.username",label:"用户名","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"app",label:"应用名","min-width":"160"}}),e._v(" "),a("el-table-column",{attrs:{label:"ApiKey","show-overflow-tooltip":!0,"min-width":"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("i",{directives:[{name:"clipboard",rawName:"v-clipboard",value:t.row.apiKey,expression:"scope.row.apiKey"}],staticClass:"cpoy-btn el-icon-document-copy",attrs:{title:"点击拷贝"},on:{success:function(t){return e.$message({type:"success",message:"成功拷贝到粘贴板"})}}}),e._v(" "),a("span",[e._v(e._s(t.row.apiKey))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"enable",label:"启用",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.enable?a("el-tag",[e._v("\n 启用\n ")]):a("el-tag",{attrs:{type:"info"}},[e._v("\n 停用\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"expiredAt",label:"过期时间",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{prop:"remark",label:"备注信息","min-width":"160"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"260",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.enable?a("el-button",{attrs:{size:"medium",icon:"el-icon-circle-close",type:"text"},on:{click:function(a){return e.disableUserApiKey(t.row)}}},[e._v("\n 停用\n ")]):a("el-button",{attrs:{size:"medium",icon:"el-icon-circle-check",type:"text"},on:{click:function(a){return e.enableUserApiKey(t.row)}}},[e._v("\n 启用\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{size:"medium",icon:"el-icon-refresh",type:"text"},on:{click:function(a){return e.resetUserApiKey(t.row)}}},[e._v("\n 重置\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{size:"medium",icon:"el-icon-edit",type:"text"},on:{click:function(a){return e.remarkUserApiKey(t.row)}}},[e._v("\n 备注\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{staticStyle:{color:"#f56c6c"},attrs:{size:"medium",icon:"el-icon-delete",type:"text"},on:{click:function(a){return e.deleteUserApiKey(t.row)}}},[e._v("\n 删除\n ")])]}}])})],1),e._v(" "),a("addUserApiKey",{ref:"addUserApiKey"}),e._v(" "),a("remarkUserApiKey",{ref:"remarkUserApiKey"}),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}})],1)},staticRenderFns:[]};var ni=a("owSs")(ii,oi,!1,function(e){a("YB+f")},null,null).exports,ri={name:"app",components:{uiHeader:I,deviceEdit:ve,syncChannelProgress:_e},data:function(){return{deviceList:[],currentDevice:{},category:2,videoComponentList:[],updateLooper:0,currentDeviceChannelsLenth:0,winHeight:window.innerHeight-200,currentPage:1,count:15,total:0,getDeviceListLoading:!1}},computed:{getcurrentDeviceChannels:function(){var e=this.currentDevice.channelMap,t=null;return e&&(t=se()(e).map(function(t){return e[t]}),this.currentDeviceChannelsLenth=t.length),t}},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(e){this.currentPage=e,this.getDeviceList()},handleSizeChange:function(e){this.count=e,this.getDeviceList()},getDeviceList:function(){var e=this;this.getDeviceListLoading=!0,this.$axios({method:"get",url:"/api/device/query/devices",params:{page:this.currentPage,count:this.count,category:this.category}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.deviceList=t.data.data.list),e.getDeviceListLoading=!1}).catch(function(t){console.error(t),e.getDeviceListLoading=!1})},deleteDevice:function(e){var t=this,a="确定删除此设备?";0!==e.online&&(a="在线设备删除后仍可通过注册再次上线。<br/>如需彻底删除请先将设备离线。<br/><strong>确定删除此设备?</strong>"),this.$confirm(a,"提示",{dangerouslyUseHTMLString:!0,confirmButtonText:"确定",cancelButtonText:"取消",center:!0,type:"warning"}).then(function(){t.$axios({method:"delete",url:"/api/device/query/devices/"+e.deviceId+"/delete"}).then(function(e){t.getDeviceList()}).catch(function(e){console.error(e)})}).catch(function(){})},showChannelList:function(e){this.$router.push("/channelList/"+e.deviceId+"/0")},showDevicePosition:function(e){this.$router.push("/map?deviceId="+e.deviceId)},refDevice:function(e){var t=this;console.log("刷新对应设备:"+e.deviceId);var a=this;this.$axios({method:"get",url:"/api/device/query/devices/"+e.deviceId+"/sync"}).then(function(i){console.log("刷新设备结果:"+s()(i)),0!==i.data.code?a.$message({showClose:!0,message:i.data.msg,type:"error"}):t.$refs.syncChannelProgress.openDialog(e.deviceId),a.initData()}).catch(function(e){console.error(e),a.$message({showClose:!0,message:e,type:"error"})})},getTooltipContent:function(){var e=ne()(ie.a.mark(function e(t){var a;return ie.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a="",e.next=3,this.$axios({method:"get",async:!1,url:"/api/device/query/"+t+"/sync_status/"}).then(function(e){0==e.data.code&&(a=null!==e.data.data.errorMsg?e.data.data.errorMsg:null!==e.data.msg?e.data.msg:"同步中...["+e.data.data.current+"/"+e.data.data.total+"]")});case 3:return e.abrupt("return",a);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),transportChange:function(e){console.log("修改传输方式为 "+e.streamMode+":"+e.deviceId+" ");this.$axios({method:"post",url:"/api/device/query/transport/"+e.deviceId+"/"+e.streamMode}).then(function(e){}).catch(function(e){})},edit:function(e){var t=this;this.$refs.deviceEdit.openDialog(e,function(){t.$refs.deviceEdit.close(),t.$message({showClose:!0,message:"设备修改成功,通道字符集将在下次更新生效",type:"success"}),setTimeout(t.getDeviceList,200)})},add:function(){var e=this;this.$refs.deviceEdit.openDialog(null,function(){e.$refs.deviceEdit.close(),e.$message({showClose:!0,message:"添加成功",type:"success"}),setTimeout(e.getDeviceList,200)})}}},si={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"app"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-title"},[e._v("气象设备列表")]),e._v(" "),a("div",{staticClass:"page-header-btn"},[a("el-button",{staticStyle:{"margin-right":"1rem"},attrs:{icon:"el-icon-plus",size:"mini",type:"primary"},on:{click:e.add}},[e._v("添加设备\n ")]),e._v(" "),a("el-button",{attrs:{loading:e.getDeviceListLoading,circle:"",icon:"el-icon-refresh-right",size:"mini"},on:{click:function(t){return e.getDeviceList()}}})],1)]),e._v(" "),a("el-table",{staticStyle:{width:"100%","font-size":"12px"},attrs:{data:e.deviceList,height:e.winHeight,"header-row-class-name":"table-header"}},[a("el-table-column",{attrs:{label:"名称","min-width":"160",prop:"name"}}),e._v(" "),a("el-table-column",{attrs:{label:"设备编号","min-width":"200",prop:"deviceId"}}),e._v(" "),a("el-table-column",{attrs:{label:"地址","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.hostAddress?a("el-tag",{attrs:{size:"medium"}},[e._v(e._s(t.row.hostAddress))]):e._e(),e._v(" "),t.row.hostAddress?e._e():a("el-tag",{attrs:{size:"medium"}},[e._v("未知")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"厂家","min-width":"120",prop:"manufacturer"}}),e._v(" "),a("el-table-column",{attrs:{label:"信令传输模式","min-width":"120",prop:"transport"}}),e._v(" "),a("el-table-column",{attrs:{label:"流传输模式","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"请选择",size:"mini"},on:{change:function(a){return e.transportChange(t.row)}},model:{value:t.row.streamMode,callback:function(a){e.$set(t.row,"streamMode",a)},expression:"scope.row.streamMode"}},[a("el-option",{key:"UDP",attrs:{label:"UDP",value:"UDP"}}),e._v(" "),a("el-option",{key:"TCP-ACTIVE",attrs:{label:"TCP主动模式",value:"TCP-ACTIVE"}}),e._v(" "),a("el-option",{key:"TCP-PASSIVE",attrs:{label:"TCP被动模式",value:"TCP-PASSIVE"}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"name-wrapper",attrs:{slot:"reference"},slot:"reference"},[t.row.onLine?a("el-tag",{attrs:{size:"medium"}},[e._v("在线")]):e._e(),e._v(" "),t.row.onLine?e._e():a("el-tag",{attrs:{size:"medium",type:"info"}},[e._v("离线")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"最近心跳","min-width":"160",prop:"keepaliveTime"}}),e._v(" "),a("el-table-column",{attrs:{label:"最近注册","min-width":"160",prop:"registerTime"}}),e._v(" "),a("el-table-column",{attrs:{fixed:"right",label:"操作","min-width":"450"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{icon:"el-icon-refresh",size:"medium",type:"text",disabled:0==t.row.online},on:{click:function(a){return e.refDevice(t.row)},mouseover:function(a){return e.getTooltipContent(t.row.deviceId)}}},[e._v("刷新\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{icon:"el-icon-location",size:"medium",type:"text"},on:{click:function(a){return e.showDevicePosition(t.row)}}},[e._v("定位\n ")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{attrs:{icon:"el-icon-edit",size:"medium",type:"text"},on:{click:function(a){return e.edit(t.row)}}},[e._v("编辑")]),e._v(" "),a("el-divider",{attrs:{direction:"vertical"}}),e._v(" "),a("el-button",{staticStyle:{color:"#f56c6c"},attrs:{icon:"el-icon-delete",size:"medium",type:"text"},on:{click:function(a){return e.deleteDevice(t.row)}}},[e._v("删除\n ")])]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],total:e.total,layout:"total, sizes, prev, pager, next"},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}}),e._v(" "),a("deviceEdit",{ref:"deviceEdit"}),e._v(" "),a("syncChannelProgress",{ref:"syncChannelProgress"})],1)},staticRenderFns:[]};var li=a("owSs")(ri,si,!1,function(e){a("OkF4")},null,null).exports,ci={name:"app",components:{uiHeader:I},data:function(){return{search:"",startTime:"",endTime:"",deviceId:"",alarmInfoList:[],chooseAlarm:null,mediaServerList:[],updateLooper:0,winHeight:window.innerHeight,currentPage:1,count:15,total:0,loading:!1,mediaServer:new pe,clickRefreshFlag:!1}},computed:{},mounted:function(){this.initData()},methods:{initData:function(){this.getAlarmInfoList()},deleteAlarmInfotest:function(e){console.log(e)},currentChange:function(e){this.currentPage=e,this.getRecordList()},handleSizeChange:function(e){this.count=e,this.getRecordList()},handleAlarmInfo:function(e){var t=this;this.$axios({method:"put",url:"/api/alarm/handleAlarmInfo",params:{id:e.id}}).then(function(e){0===e.data.code&&t.$nextTick(function(){t.getAlarmInfoList()})}).catch(function(e){console.log(e)})},showAlarmPosition:function(e){this.$router.push("/map?deviceId="+e.deviceId)},getAlarmInfoList:function(){var e=this;this.$axios({method:"get",url:"/api/alarm/all",params:{alarmType:this.alarmType,alarmMethod:this.alarmMethod,query:this.search,startTime:this.startTime,endTime:this.endTime,page:this.currentPage,count:this.count}}).then(function(t){0===t.data.code&&(e.total=t.data.data.total,e.alarmInfoList=t.data.data.list,e.clickRefreshFlag=!0),e.loading=!1}).catch(function(t){console.log(t),e.loading=!1})},clickRefresh:function(){this.clickRefreshFlag&&(this.$message({showClose:!0,message:"报警信息已更新",type:"success",duration:600}),this.clickRefreshFlag=!1)},getMediaServerList:function(){var e=this;e.mediaServer.getOnlineMediaServerList(function(t){e.mediaServerList=t.data})},deleteAlarmInfo:function(e){var t=this;this.$axios({method:"delete",url:"/api/alarm/delete",params:{id:e.id}}).then(function(e){var a=this;0===e.data.code&&(this.$nextTick(function(){a.getAlarmInfoList()}),t.$message({message:"删除成功",type:"success"}))}).catch(function(e){t.$message({message:"删除失败:"+e.message,type:"error"})})},formatTime:function(e){var t=parseInt(e/3600/1e3),a=parseInt((e-3600*t*1e3)/60/1e3),i=Math.ceil((e-3600*t*1e3-60*a*1e3)/1e3);return i<0&&(i=0),(t>0?t+"小时":"")+(a>0?a+"分":"")+(i>0?i+"秒":"")},formatTimeStamp:function(e){return T.a.unix(e/1e3).format("yyyy-MM-DD HH:mm:ss")}}},di={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%"},attrs:{id:"app"}},[a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-header-btn"},[e._v("\n 搜索:\n "),a("el-input",{staticStyle:{"margin-right":"1rem",width:"auto"},attrs:{clearable:"",placeholder:"关键字","prefix-icon":"el-icon-search",size:"mini"},on:{input:e.getAlarmInfoList},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),e._v("\n 开始时间:\n "),a("el-date-picker",{attrs:{placeholder:"选择日期时间",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss"},on:{change:e.getAlarmInfoList},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),e._v("\n 结束时间:\n "),a("el-date-picker",{attrs:{placeholder:"选择日期时间",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss"},on:{change:e.getAlarmInfoList},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}}),e._v(" "),a("el-button",{attrs:{loading:e.loading,circle:"",icon:"el-icon-refresh-right",size:"mini"},on:{click:function(){e.getAlarmInfoList(),e.clickRefresh()}}})],1)]),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.alarmInfoList,height:e.winHeight-50}},[a("el-table-column",{attrs:{type:"selection",width:"50"}}),e._v(" "),a("el-table-column",{attrs:{label:"设备名",prop:"deviceName",width:"120"}}),e._v(" "),a("el-table-column",{attrs:{label:"报警时间",prop:"alarmTime",width:"300"}}),e._v(" "),a("el-table-column",{attrs:{label:"报警方式",prop:"alarmMethod"}}),e._v(" "),a("el-table-column",{attrs:{label:"优先级",prop:"alarmPriority"}}),e._v(" "),a("el-table-column",{attrs:{label:"报警类型",prop:"alarmType"}}),e._v(" "),a("el-table-column",{attrs:{label:"描述",prop:"alarmDescription"}}),e._v(" "),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{icon:"el-icon-location",size:"medium",type:"text"},on:{click:function(a){return e.showAlarmPosition(t.row)}}},[e._v("定位\n ")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-check",size:"medium",type:"text"},on:{click:function(a){return e.handleAlarmInfo(t.row)}}},[e._v("已读\n ")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-delete",size:"medium",type:"text"},on:{click:function(a){return e.deleteAlarmInfo(t.row)}}},[e._v("删除\n ")])]}}])})],1),e._v(" "),a("el-pagination",{staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-size":e.count,"page-sizes":[15,25,35,50],total:e.total,layout:"total, sizes, prev, pager, next"},on:{"size-change":e.handleSizeChange,"current-change":e.currentChange}})],1)},staticRenderFns:[]};var ui=a("owSs")(ci,di,!1,function(e){a("Uv67")},null,null).exports,mi={name:"settings",components:{MediaServerManger:Ta}},hi={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticStyle:{width:"100%"}},[t("h4",[this._v("节点设置")]),this._v(" "),t("MediaServerManger")],1)},staticRenderFns:[]};var pi=a("owSs")(mi,hi,!1,function(e){a("knvG")},"data-v-ce12e3bc",null).exports,fi=b.a.prototype.push;b.a.prototype.push=function(e){return fi.call(this,e).catch(function(e){return e})},n.default.use(b.a);var gi=new b.a({mode:"hash",routes:[{path:"/",name:"home",component:$,redirect:"/map",children:[{path:"/console",component:te},{path:"/alarmInfo",component:ui},{path:"/live",component:Oa},{path:"/setting",component:pi},{path:"/deviceList",component:xe},{path:"/weatherList",component:li},{path:"/pushVideoList",component:ct},{path:"/streamProxyList",component:pt},{path:"/channelList/:deviceId/:parentChannelId/",name:"channelList",component:Ke},{path:"/gbRecordDetail/:deviceId/:channelId/",name:"gbRecordDetail",component:Ze},{path:"/parentPlatformList/:count/:page",name:"parentPlatformList",component:ua},{path:"/map/:deviceId/:parentChannelId/:count/:page",component:Bt},{path:"/cloudRecord",name:"cloudRecord",component:va},{path:"/cloudRecordDetail/:app/:stream",name:"cloudRecordDetail",component:Ia},{path:"/cloudRecordDetail/:mediaServerId/:app/:stream",component:Ia},{path:"/mediaServerManger",name:"mediaServerManger",component:Ta},{path:"/setting/web",name:"web",component:Ra},{path:"/setting/sip",name:"sip",component:Ma},{path:"/setting/media",name:"media",component:Na},{path:"/map",name:"map",component:Bt},{path:"/userManager",name:"userManager",component:Xa},{path:"/userApiKeyManager/:userId",name:"userApiKeyManager",component:ni}]},{path:"/login",name:"登录",component:qt},{path:"/test",name:"deviceTree",component:Oe},{path:"/play/wasm/:url",name:"wasmPlayer",component:ze},{path:"/play/rtc/:url",name:"rtcPlayer",component:Pe}]}),vi=a("3Byg"),bi=a.n(vi),yi=a("rYiX"),_i=a.n(yi),wi=a("OwJH"),Si=a.n(wi),xi=a("I1lk"),Ci=a.n(xi),ki=a("oV9E"),Ii=a("+1lV");n.default.config.productionTip=!1,Ci.a.get(function(e){var t=e.map(function(e,t){return 0===t?e.value.replace(/\bNetType\/\w+\b/,""):e.value}),a=window.location.port,i=Ci.a.x64hash128(t.join(a),31);n.default.prototype.$browserId=i,console.log("浏览器 ID: "+i)}),n.default.use(Si.a),n.default.use(v.a),n.default.use(bi.a),n.default.use(ki.a),n.default.prototype.$notify=g.Notification,n.default.prototype.$axios=he.a,n.default.use(Ii.a),n.default.use(_i.a),he.a.defaults.baseURL=window.baseUrl?window.baseUrl:"",he.a.defaults.withCredentials=!0,he.a.interceptors.response.use(function(e){var t=e.headers["access-token"];return t&&m(t),e},function(e){return 401===e.response.status&&(console.log("Received 401 Response"),gi.push("/login")),o.a.reject(e)}),he.a.interceptors.request.use(function(e){return null!=d()&&"/api/user/login"!==e.url&&(e.headers["access-token"]=""+d()),e},function(e){return o.a.reject(e)}),n.default.prototype.$axios=he.a,n.default.prototype.$cookies.config(1800),new n.default({router:gi,render:function(e){return e(f)}}).$mount("#app")},"Of+7":function(e,t){},OkF4:function(e,t){},Rhwv:function(e,t,a){"use strict";var i=a("GZPq"),o=a.n(i),n=a("OksV"),r=a("YqsA"),s={name:r.e,data:function(){return{CLASS_MENU:r.a,CLASS_MENU_ITEM:r.b,CLASS_MENU_ITEM_CLICKABLE:r.c,CLASS_MENU_ITEM_UNCLICKABLE:r.d,activeSubmenu:{index:null,instance:null},items:[],position:{x:0,y:0,width:0,height:0},style:{left:0,top:0,zIndex:2,minWidth:150},customClass:null,visible:!1,hasIcon:!1,openTrend:r.g}},mounted:function(){var e=this;this.visible=!0;var t=!0,a=!1,i=void 0;try{for(var n,s=o()(this.items);!(t=(n=s.next()).done);t=!0){if(n.value.icon){this.hasIcon=!0;break}}}catch(e){a=!0,i=e}finally{try{!t&&s.return&&s.return()}finally{if(a)throw i}}this.$nextTick(function(){var t=document.documentElement.clientWidth,a=document.documentElement.clientHeight,i=e.$refs.menu,o=i.offsetWidth,n=i.offsetHeight;(e.openTrend===r.f?e.leftOpen:e.rightOpen)(t,a,o),e.style.top=e.position.y,e.position.y+n>a&&(0===e.position.height?e.style.top=e.position.y/a>.5?e.position.y-n:e.position.y:e.style.top=a-n)})},methods:{leftOpen:function(e,t,a){this.style.left=this.position.x-a,this.openTrend=r.f,this.style.left<0&&(this.openTrend=r.g,0===this.position.width?this.style.left=0:this.style.left=this.position.x+this.position.width)},rightOpen:function(e,t,a){this.style.left=this.position.x+this.position.width,this.openTrend=r.g,this.style.left+a>e&&(this.openTrend=r.f,0===this.position.width?this.style.left=e-a:this.style.left=this.position.x-a)},enterItem:function(e,t,a){if(this.visible){if(this.activeSubmenu.instance){if(this.activeSubmenu.index===a)return;this.activeSubmenu.instance.close(),this.activeSubmenu.instance=null,this.activeSubmenu.index=null}if(t.children){var i=e.target.getBoundingClientRect(),o=n.default.component(r.e);this.activeSubmenu.index=a,this.activeSubmenu.instance=new o,this.activeSubmenu.instance.items=t.children,this.activeSubmenu.instance.openTrend=this.openTrend,this.activeSubmenu.instance.position={x:i.x+r.h,y:i.y+r.i,width:i.width-2*r.h,height:i.height-2*r.i},this.activeSubmenu.instance.style.minWidth="number"==typeof t.minWidth?t.minWidth:this.style.minWidth,this.activeSubmenu.instance.style.zIndex=this.style.zIndex,this.activeSubmenu.instance.customClass="string"==typeof t.customClass?t.customClass:this.customClass,this.activeSubmenu.instance.$mount(),document.body.appendChild(this.activeSubmenu.instance.$el)}}},itemClick:function(e){if(this.visible)return!e||e.disabled||e.hidden||"function"!=typeof e.onClick?void 0:e.onClick()},close:function(){var e=this;this.visible=!1,this.activeSubmenu.instance&&this.activeSubmenu.instance.close(),this.$nextTick(function(){e.$destroy()})}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("transition",{attrs:{name:"contextmenu-submenu-fade"}},[e.visible?a("div",{ref:"menu",class:[e.CLASS_MENU,"menu",e.customClass],style:{left:e.style.left+"px",top:e.style.top+"px",minWidth:e.style.minWidth+"px",zIndex:e.style.zIndex},on:{contextmenu:function(e){return e.preventDefault()}}},[a("div",{staticClass:"menu_body"},[e._l(e.items,function(t,i){return[t.hidden?e._e():[t.disabled?a("div",{key:i+"_disabled",class:[e.CLASS_MENU_ITEM,e.CLASS_MENU_ITEM_UNCLICKABLE,"menu_item","menu_item__disabled",t.divided?"menu_item__divided":null]},[e.hasIcon?a("div",{staticClass:"menu_item_icon"},[t.icon?a("i",{class:t.icon}):e._e()]):e._e(),e._v(" "),a("span",{staticClass:"menu_item_label"},[e._v(e._s(t.label))]),e._v(" "),a("div",{staticClass:"menu_item_expand_icon"})]):t.children?a("div",{key:i+"_children",class:[e.CLASS_MENU_ITEM,e.CLASS_MENU_ITEM_UNCLICKABLE,"menu_item","menu_item__available",e.activeSubmenu.index===i?"menu_item_expand":null,t.divided?"menu_item__divided":null],on:{mouseenter:function(a){return e.enterItem(a,t,i)}}},[e.hasIcon?a("div",{staticClass:"menu_item_icon"},[t.icon?a("i",{class:t.icon}):e._e()]):e._e(),e._v(" "),a("span",{staticClass:"menu_item_label"},[e._v(e._s(t.label))]),e._v(" "),a("div",{staticClass:"menu_item_expand_icon"},[e._v("▶")])]):a("div",{key:i,class:[e.CLASS_MENU_ITEM,e.CLASS_MENU_ITEM_CLICKABLE,"menu_item","menu_item__available",t.divided?"menu_item__divided":null],on:{mouseenter:function(a){return e.enterItem(a,t,i)},click:function(a){return e.itemClick(t)}}},[e.hasIcon?a("div",{staticClass:"menu_item_icon"},[t.icon?a("i",{class:t.icon}):e._e()]):e._e(),e._v(" "),a("span",{staticClass:"menu_item_label"},[e._v(e._s(t.label))]),e._v(" "),a("div",{staticClass:"menu_item_expand_icon"})])]]})],2)]):e._e()])},staticRenderFns:[]};var c=a("owSs")(s,l,!1,function(e){a("4X5j"),a("1zX3")},"data-v-b6fbb2e4",null);t.a=c.exports},TEdE:function(e,t){e.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},TcMi:function(e,t){},Thg6:function(e,t){e.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},UdsP:function(e,t){},Uv67:function(e,t){},WHnb:function(e,t){},Wndm:function(e,t){},Wq5U:function(e,t){e.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},XEAn:function(e,t){},"YB+f":function(e,t){},bkQN:function(e,t){},gB5u:function(e,t,a){var i={"./af":"5avY","./af.js":"5avY","./ar":"SMiU","./ar-dz":"oAK8","./ar-dz.js":"oAK8","./ar-kw":"19BC","./ar-kw.js":"19BC","./ar-ly":"+rk1","./ar-ly.js":"+rk1","./ar-ma":"HFRA","./ar-ma.js":"HFRA","./ar-ps":"6w2b","./ar-ps.js":"6w2b","./ar-sa":"twH4","./ar-sa.js":"twH4","./ar-tn":"7RmC","./ar-tn.js":"7RmC","./ar.js":"SMiU","./az":"+cen","./az.js":"+cen","./be":"irCn","./be.js":"irCn","./bg":"UMQ4","./bg.js":"UMQ4","./bm":"8IzH","./bm.js":"8IzH","./bn":"/xc7","./bn-bd":"E8aH","./bn-bd.js":"E8aH","./bn.js":"/xc7","./bo":"4Jgs","./bo.js":"4Jgs","./br":"QReW","./br.js":"QReW","./bs":"6UaD","./bs.js":"6UaD","./ca":"wBfm","./ca.js":"wBfm","./cs":"9p8l","./cs.js":"9p8l","./cv":"NSMj","./cv.js":"NSMj","./cy":"nrA/","./cy.js":"nrA/","./da":"GI75","./da.js":"GI75","./de":"Stb/","./de-at":"GUeX","./de-at.js":"GUeX","./de-ch":"YXIn","./de-ch.js":"YXIn","./de.js":"Stb/","./dv":"VV46","./dv.js":"VV46","./el":"1ve7","./el.js":"1ve7","./en-au":"tdjm","./en-au.js":"tdjm","./en-ca":"1FjO","./en-ca.js":"1FjO","./en-gb":"wW15","./en-gb.js":"wW15","./en-ie":"115l","./en-ie.js":"115l","./en-il":"9GSL","./en-il.js":"9GSL","./en-in":"wiXv","./en-in.js":"wiXv","./en-nz":"T23c","./en-nz.js":"T23c","./en-sg":"zcWf","./en-sg.js":"zcWf","./eo":"UF/I","./eo.js":"UF/I","./es":"m8fN","./es-do":"FnP5","./es-do.js":"FnP5","./es-mx":"IrCA","./es-mx.js":"IrCA","./es-us":"ZAC5","./es-us.js":"ZAC5","./es.js":"m8fN","./et":"32E9","./et.js":"32E9","./eu":"vCYw","./eu.js":"vCYw","./fa":"khKV","./fa.js":"khKV","./fi":"Sd7h","./fi.js":"Sd7h","./fil":"xsKX","./fil.js":"xsKX","./fo":"PS+S","./fo.js":"PS+S","./fr":"Gp7j","./fr-ca":"WlH6","./fr-ca.js":"WlH6","./fr-ch":"voHA","./fr-ch.js":"voHA","./fr.js":"Gp7j","./fy":"iLxI","./fy.js":"iLxI","./ga":"61mh","./ga.js":"61mh","./gd":"y3WW","./gd.js":"y3WW","./gl":"2VxV","./gl.js":"2VxV","./gom-deva":"xYSR","./gom-deva.js":"xYSR","./gom-latn":"AoWa","./gom-latn.js":"AoWa","./gu":"kA9G","./gu.js":"kA9G","./he":"PInU","./he.js":"PInU","./hi":"rOqE","./hi.js":"rOqE","./hr":"NjJx","./hr.js":"NjJx","./hu":"NHOC","./hu.js":"NHOC","./hy-am":"oRWn","./hy-am.js":"oRWn","./id":"HuyN","./id.js":"HuyN","./is":"Pw9i","./is.js":"Pw9i","./it":"Oj/r","./it-ch":"T09/","./it-ch.js":"T09/","./it.js":"Oj/r","./ja":"J3T6","./ja.js":"J3T6","./jv":"nnLX","./jv.js":"nnLX","./ka":"myBm","./ka.js":"myBm","./kk":"E1G8","./kk.js":"E1G8","./km":"H8nc","./km.js":"H8nc","./kn":"ASr8","./kn.js":"ASr8","./ko":"RO4c","./ko.js":"RO4c","./ku":"cpjX","./ku-kmr":"etmT","./ku-kmr.js":"etmT","./ku.js":"cpjX","./ky":"CgmG","./ky.js":"CgmG","./lb":"nOF2","./lb.js":"nOF2","./lo":"o1Qs","./lo.js":"o1Qs","./lt":"Z7eB","./lt.js":"Z7eB","./lv":"I5al","./lv.js":"I5al","./me":"FHxj","./me.js":"FHxj","./mi":"zsiX","./mi.js":"zsiX","./mk":"7CKV","./mk.js":"7CKV","./ml":"I0Ww","./ml.js":"I0Ww","./mn":"Mcqs","./mn.js":"Mcqs","./mr":"Sntw","./mr.js":"Sntw","./ms":"t5Pr","./ms-my":"xkp5","./ms-my.js":"xkp5","./ms.js":"t5Pr","./mt":"vp7f","./mt.js":"vp7f","./my":"7TNY","./my.js":"7TNY","./nb":"POOm","./nb.js":"POOm","./ne":"Jd6a","./ne.js":"Jd6a","./nl":"gvGZ","./nl-be":"1R6n","./nl-be.js":"1R6n","./nl.js":"gvGZ","./nn":"XBKO","./nn.js":"XBKO","./oc-lnc":"PKv5","./oc-lnc.js":"PKv5","./pa-in":"6iM2","./pa-in.js":"6iM2","./pl":"LQKJ","./pl.js":"LQKJ","./pt":"H/4n","./pt-br":"UVdV","./pt-br.js":"UVdV","./pt.js":"H/4n","./ro":"tJGo","./ro.js":"tJGo","./ru":"nf9m","./ru.js":"nf9m","./sd":"KpTw","./sd.js":"KpTw","./se":"U/5u","./se.js":"U/5u","./si":"t1pu","./si.js":"t1pu","./sk":"99s1","./sk.js":"99s1","./sl":"fglG","./sl.js":"fglG","./sq":"grry","./sq.js":"grry","./sr":"2JpF","./sr-cyrl":"06AJ","./sr-cyrl.js":"06AJ","./sr.js":"2JpF","./ss":"Zme0","./ss.js":"Zme0","./sv":"kWyI","./sv.js":"kWyI","./sw":"TqTr","./sw.js":"TqTr","./ta":"OmLD","./ta.js":"OmLD","./te":"dZQ4","./te.js":"dZQ4","./tet":"+TwJ","./tet.js":"+TwJ","./tg":"vFdj","./tg.js":"vFdj","./th":"MZVu","./th.js":"MZVu","./tk":"/GEv","./tk.js":"/GEv","./tl-ph":"UgkV","./tl-ph.js":"UgkV","./tlh":"gEoP","./tlh.js":"gEoP","./tr":"SYZ5","./tr.js":"SYZ5","./tzl":"x3De","./tzl.js":"x3De","./tzm":"Gv6c","./tzm-latn":"lY6i","./tzm-latn.js":"lY6i","./tzm.js":"Gv6c","./ug-cn":"Tpnt","./ug-cn.js":"Tpnt","./uk":"Hb5Q","./uk.js":"Hb5Q","./ur":"oQEl","./ur.js":"oQEl","./uz":"i5g2","./uz-latn":"X9rS","./uz-latn.js":"X9rS","./uz.js":"i5g2","./vi":"YULW","./vi.js":"YULW","./x-pseudo":"ZwWt","./x-pseudo.js":"ZwWt","./yo":"irsO","./yo.js":"irsO","./zh-cn":"WYjQ","./zh-cn.js":"WYjQ","./zh-hk":"6VH+","./zh-hk.js":"6VH+","./zh-mo":"Sy76","./zh-mo.js":"Sy76","./zh-tw":"9db4","./zh-tw.js":"9db4"};function o(e){return a(n(e))}function n(e){var t=i[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}o.keys=function(){return Object.keys(i)},o.resolve=n,e.exports=o,o.id="gB5u"},hwMg:function(e,t){},jLwy:function(e,t){},"k0+9":function(e,t){},kfsN:function(e,t){},kiYe:function(e,t){},knvG:function(e,t){},lZPw:function(e,t){},ltAp:function(e,t){},nB9G:function(e,t){},neli:function(e,t){},oOUD:function(e,t){},oSjI:function(e,t){},qG22:function(e,t){},qOAA:function(e,t){},qXmQ:function(e,t){},rJg5:function(e,t){},tPA5:function(e,t){},vAxO:function(e,t){},wLVp:function(e,t){},xEBp:function(e,t){},xJdS:function(e,t){},xcg5:function(e,t){},ygWC:function(e,t){e.exports={name:"elliptic",version:"6.5.7",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},__npminstall_done:!0,_from:"elliptic@6.5.7",_resolved:"https://registry.npmmirror.com/elliptic/-/elliptic-6.5.7.tgz"}},yw8S:function(e,t){},zme4:function(e,t){}},["NHnr"]);
  2. //# sourceMappingURL=app.ca95fa7abcffdf14beef.js.map