1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a19c418c","chunk-662afafa"],{"0767":function(t,e,n){},"0eb6":function(t,e,n){"use strict";var i=n("23e7"),a=n("7c37"),r=n("d066"),o=n("d039"),c=n("7c73"),s=n("5c6c"),l=n("9bf2").f,d=n("cb2d"),u=n("edd0"),f=n("1a2d"),p=n("19aa"),h=n("825a"),v=n("aa1f"),m=n("e391"),g=n("cf98"),b=n("0d26"),y=n("69f3"),E=n("83ab"),_=n("c430"),O="DOMException",I="DATA_CLONE_ERR",R=r("Error"),S=r(O)||function(){try{var t=r("MessageChannel")||a("worker_threads").MessageChannel;(new t).port1.postMessage(new WeakMap)}catch(e){if(e.name==I&&25==e.code)return e.constructor}}(),D=S&&S.prototype,w=R.prototype,k=y.set,x=y.getterFor(O),j="stack"in R(O),N=function(t){return f(g,t)&&g[t].m?g[t].c:0},C=function(){p(this,T);var t=arguments.length,e=m(t<1?void 0:arguments[0]),n=m(t<2?void 0:arguments[1],"Error"),i=N(n);if(k(this,{type:O,name:n,message:e,code:i}),E||(this.name=n,this.message=e,this.code=i),j){var a=R(e);a.name=O,l(this,"stack",s(1,b(a.stack,1)))}},T=C.prototype=c(w),A=function(t){return{enumerable:!0,configurable:!0,get:t}},M=function(t){return A((function(){return x(this)[t]}))};E&&(u(T,"code",M("code")),u(T,"message",M("message")),u(T,"name",M("name"))),l(T,"constructor",s(1,C));var U=o((function(){return!(new S instanceof R)})),L=U||o((function(){return w.toString!==v||"2: 1"!==String(new S(1,2))})),P=U||o((function(){return 25!==new S(1,"DataCloneError").code})),z=U||25!==S[I]||25!==D[I],$=_?L||P||z:U;i({global:!0,constructor:!0,forced:$},{DOMException:$?C:S});var q=r(O),H=q.prototype;for(var B in L&&(_||S===q)&&d(H,"toString",v),P&&E&&S===q&&u(H,"code",A((function(){return N(h(this).name)}))),g)if(f(g,B)){var V=g[B],F=V.s,J=s(6,V.c);f(q,F)||l(q,F,J),f(H,F)||l(H,F,J)}},"584f":function(t,e,n){"use strict";n.d(e,"l",(function(){return a})),n.d(e,"q",(function(){return r})),n.d(e,"m",(function(){return o})),n.d(e,"n",(function(){return c})),n.d(e,"k",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"c",(function(){return d})),n.d(e,"g",(function(){return u})),n.d(e,"i",(function(){return f})),n.d(e,"d",(function(){return p})),n.d(e,"r",(function(){return h})),n.d(e,"o",(function(){return v})),n.d(e,"p",(function(){return m})),n.d(e,"h",(function(){return g})),n.d(e,"a",(function(){return b})),n.d(e,"s",(function(){return y})),n.d(e,"b",(function(){return E})),n.d(e,"e",(function(){return _})),n.d(e,"j",(function(){return O}));var i=n("b775");function a(t){return Object(i["a"])({url:"/iot/device/list",method:"get",params:t})}function r(t){return Object(i["a"])({url:"/iot/device/unAuthlist",method:"get",params:t})}function o(t){return Object(i["a"])({url:"/iot/device/listByGroup",method:"get",params:t})}function c(t){return Object(i["a"])({url:"/iot/device/shortList",method:"get",params:t})}function s(){return Object(i["a"])({url:"/iot/device/all",method:"get"})}function l(t){return Object(i["a"])({url:"/iot/device/"+t,method:"get"})}function d(t){return Object(i["a"])({url:"/iot/device/synchronization/"+t,method:"get"})}function u(t){return Object(i["a"])({url:"/iot/device/getDeviceBySerialNumber/"+t,method:"get"})}function f(){return Object(i["a"])({url:"/iot/device/statistic",method:"get"})}function p(t,e){return Object(i["a"])({url:"/iot/device/assignment?deptId="+t+"&deviceIds="+e,method:"post"})}function h(t){return Object(i["a"])({url:"/iot/device/recovery?deviceIds="+t,method:"post"})}function v(){return Object(i["a"])({url:"",method:"get"})}function m(){return Object(i["a"])({url:"",method:"get"})}function g(t){return Object(i["a"])({url:"/iot/device/runningStatus",method:"get",params:t})}function b(t){return Object(i["a"])({url:"/iot/device",method:"post",data:t})}function y(t){return Object(i["a"])({url:"/iot/device",method:"put",data:t})}function E(t){return Object(i["a"])({url:"/iot/device/"+t,method:"delete"})}function _(t){return Object(i["a"])({url:"/iot/device/generator",method:"get",params:t})}function O(t){return Object(i["a"])({url:"/iot/device/getMqttConnectData",method:"get",params:t})}},"58ce":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{width:"100%",height:"100%","background-color":"#ffffff",overflow:"auto"},attrs:{id:"DeviceTree"}},[n("div",{staticStyle:{"line-height":"3vh","margin-bottom":"10px","font-size":"17px"}},[t._v("设备列表")]),n("el-tree",{ref:"tree",staticStyle:{"min-width":"100%",display:"inline-block !important"},attrs:{props:t.defaultProps,"current-node-key":t.selectchannelId,"default-expanded-keys":t.expandIds,"highlight-current":!0,load:t.loadNode,lazy:"","node-key":"id"},on:{"node-click":t.handleNodeClick},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.node;e.data;return n("span",{staticClass:"custom-tree-node",staticStyle:{width:"100%"}},[0===i.data.type&&i.data.online?n("span",{staticClass:"device-online iconfont icon-jiedianleizhukongzhongxin2",attrs:{title:"在线设备"}}):t._e(),0!==i.data.type||i.data.online?t._e():n("span",{staticClass:"device-offline iconfont icon-jiedianleizhukongzhongxin2",attrs:{title:"离线设备"}}),3===i.data.type&&i.data.online?n("span",{staticClass:"device-online iconfont icon-shebeileijiankongdian",attrs:{title:"在线通道"}}):t._e(),3!==i.data.type||i.data.online?t._e():n("span",{staticClass:"device-offline iconfont icon-shebeileijiankongdian",attrs:{title:"离线通道"}}),4===i.data.type&&i.data.online?n("span",{staticClass:"device-online iconfont icon-shebeileiqiuji",attrs:{title:"在线通道-球机"}}):t._e(),4!==i.data.type||i.data.online?t._e():n("span",{staticClass:"device-offline iconfont icon-shebeileiqiuji",attrs:{title:"离线通道-球机"}}),5===i.data.type&&i.data.online?n("span",{staticClass:"device-online iconfont icon-shebeileibanqiu",attrs:{title:"在线通道-半球"}}):t._e(),5!==i.data.type||i.data.online?t._e():n("span",{staticClass:"device-offline iconfont icon-shebeileibanqiu",attrs:{title:"离线通道-半球"}}),6===i.data.type&&i.data.online?n("span",{staticClass:"device-online iconfont icon-shebeileiqiangjitongdao",attrs:{title:"在线通道-枪机"}}):t._e(),6!==i.data.type||i.data.online?t._e():n("span",{staticClass:"device-offline iconfont icon-shebeileiqiangjitongdao",attrs:{title:"离线通道-枪机"}}),i.data.online?n("span",{staticClass:"device-online",staticStyle:{"padding-left":"1px"}},[t._v(t._s(i.label))]):t._e(),i.data.online?t._e():n("span",{staticClass:"device-offline",staticStyle:{"padding-left":"1px"}},[t._v(t._s(i.label))])])}}])})],1)},a=[],r=(n("99af"),n("14d9"),n("b0c0"),n("f5a7")),o=n("584f"),c={name:"DeviceTree",data:function(){return{total:0,channelList:[],DeviceData:[],expandIds:[],selectData:{},selectchannelId:"",defaultProps:{children:"children",label:"name",isLeaf:"isLeaf"},queryParams:{pageNum:1,pageSize:100,status:3,deviceType:3}}},props:["onlyCatalog","clickEvent"],mounted:function(){this.selectchannelId="",this.expandIds=["0"]},methods:{handleNodeClick:function(t,e,n){if(this.selectData=e.data,this.selectchannelId=e.data.value,0!==e.level){var i=this.$refs.tree.getNode(t.userData.channelSipId);"function"==typeof this.clickEvent&&e.level>1&&this.clickEvent(i.data.userData)}},loadNode:function(t,e){var n=this;if(0===t.level)Object(o["n"])(this.queryParams).then((function(t){var n=t.rows;if(n.length>0){for(var i=[],a=0;a<n.length;a++){var r={name:n[a].deviceName,isLeaf:!1,id:n[a].serialNumber,type:0,online:3===n[a].status,userData:n[a]};i.push(r)}e(i)}else e([])}));else{var i=[];Object(r["b"])(t.data.userData.serialNumber).then((function(t){null!=t.data?(i=i.concat(t.data),n.channelDataHandler(i,e)):e([])}))}},channelDataHandler:function(t,e){if(t.length>0){for(var n=[],i=0;i<t.length;i++){var a=t[i],r=a.id.substring(10,13);console.log("channelType: "+r);var o=3;if(a.id.length<=10)o=2;else if(a.id.length>14){var c=a.id.substring(10,13);"111"!==c&&"112"!==c&&"118"!==c&&"131"!==c&&"132"!==c?o=-1:1===a.basicData.ptztype?o=4:2===a.basicData.ptztype?o=5:3!==a.basicData.ptztype&&4!==a.basicData.ptztype||(o=6)}else(a.basicData.subCount>0||1===a.basicData.parental)&&(o=2);var s={name:a.name||a.id,isLeaf:!0,id:a.id,deviceId:a.deviceId,type:o,online:2===a.status,userData:a.basicData};"111"!==r&&"112"!==r&&"118"!==r&&"131"!==r&&"132"!==r||n.push(s)}e(n)}else e([])},reset:function(){this.$forceUpdate()}},destroyed:function(){}},s=c,l=(n("8ed9"),n("2877")),d=Object(l["a"])(s,i,a,!1,null,null,null);e["default"]=d.exports},"71d6":function(t,e,n){},"7c37":function(t,e,n){var i=n("605d");t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(e){}}},"81b2":function(t,e,n){var i=n("23e7"),a=n("d066"),r=n("e330"),o=n("d039"),c=n("577e"),s=n("1a2d"),l=n("d6d6"),d=n("b917").ctoi,u=/[^\d+/a-z]/i,f=/[\t\n\f\r ]+/g,p=/[=]+$/,h=a("atob"),v=String.fromCharCode,m=r("".charAt),g=r("".replace),b=r(u.exec),y=o((function(){return""!==h(" ")})),E=!o((function(){h("a")})),_=!y&&!E&&!o((function(){h()})),O=!y&&!E&&1!==h.length;i({global:!0,enumerable:!0,forced:y||E||_||O},{atob:function(t){if(l(arguments.length,1),_||O)return h(t);var e,n,i=g(c(t),f,""),r="",o=0,y=0;if(i.length%4==0&&(i=g(i,p,"")),i.length%4==1||b(u,i))throw new(a("DOMException"))("The string is not correctly encoded","InvalidCharacterError");while(e=m(i,o++))s(d,e)&&(n=y%4?64*n+d[e]:d[e],y++%4&&(r+=v(255&n>>(-2*y&6))));return r}})},"8bd4":function(t,e,n){var i=n("d066"),a=n("d44e"),r="DOMException";a(i(r),r)},"8ed9":function(t,e,n){"use strict";n("0767")},aa1f:function(t,e,n){"use strict";var i=n("83ab"),a=n("d039"),r=n("825a"),o=n("7c73"),c=n("e391"),s=Error.prototype.toString,l=a((function(){if(i){var t=o(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==s.call(t))return!0}return"2: 1"!==s.call({message:1,name:2})||"Error"!==s.call({})}));t.exports=l?function(){var t=r(this),e=c(t.name,"Error"),n=c(t.message);return e?n?e+": "+n:e:n}:s},adbd:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{padding:"6px"}},[n("el-card",{staticStyle:{width:"100vw",height:"91vh"},attrs:{id:"devicePosition","body-style":{padding:"0px"}}},[n("el-container",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{height:"91vh"},attrs:{"element-loading-text":"拼命加载中"}},[n("el-aside",{staticStyle:{"background-color":"#ffffff"},attrs:{width:"250px"}},[n("DeviceTree",{attrs:{clickEvent:t.clickEvent}})],1),n("el-main",{staticStyle:{padding:"0"}},[n("div",{staticStyle:{"text-align":"left","font-size":"17px","line-height":"5vh","margin-bottom":"10px"},attrs:{height:"5vh"}},[t._v(" 分屏: "),n("el-button",{class:{active:1==t.spilt},staticStyle:{"margin-left":"10px"},attrs:{type:"success",plain:"",icon:"el-icon-full-screen",size:"mini"},on:{click:function(e){t.spilt=1}}},[t._v("单屏 ")]),n("el-button",{class:{active:4==t.spilt},staticStyle:{"margin-left":"10px"},attrs:{type:"info",icon:"el-icon-menu",plain:"",size:"mini"},on:{click:function(e){t.spilt=4}}},[t._v("四屏")]),n("el-button",{class:{active:9==t.spilt},staticStyle:{"margin-left":"10px"},attrs:{type:"warning",plain:"",icon:"el-icon-s-grid",size:"mini"},on:{click:function(e){t.spilt=9}}},[t._v("九屏")])],1),n("div",{staticStyle:{height:"85vh",display:"flex","flex-wrap":"wrap"}},t._l(t.spilt,(function(e){return n("div",{key:e,staticClass:"play-box",class:{redborder:t.playerIdx==e-1},style:t.liveStyle,on:{click:function(n){t.playerIdx=e-1}}},[t.videoUrl[e-1]?n("player",{ref:"player",refInFor:!0,staticClass:"player-wrap",attrs:{videoUrl:t.videoUrl[e-1],fluent:"",autoplay:""},on:{screenshot:t.shot,destroy:t.destroy}}):n("div",{staticStyle:{color:"#ffffff","font-size":"30px","font-weight":"bold"}},[t._v(t._s(e))])],1)})),0)])],1)],1)],1)},a=[],r=(n("ace4"),n("e9c4"),n("b64b"),n("d3b7"),n("3ca3"),n("5cc6"),n("907a"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("986a"),n("1d02"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),n("1b3b"),n("3d71"),n("c6e3"),n("81b2"),n("ddb0"),n("0eb6"),n("b7ef"),n("8bd4"),n("2b3d"),n("bf19"),n("9861"),n("3b3a")),o=n("58ce"),c=n("e2de"),s={name:"SplitView",components:{player:r["default"],DeviceTree:o["default"]},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 t=this,e={width:"81%",height:"99%"};switch(this.spilt){case 4:e={width:"40%",height:"49%"};break;case 9:e={width:"27%",height:"32%"};break}return this.$nextTick((function(){for(var e=0;e<t.spilt;e++){var n=t.$refs.player;n&&n[e]&&n[e].updatePlayerDomSize()}})),e}},watch:{spilt:function(t){var e=this;console.log("切换画幅;"+t);for(var n=this,i=function(t){if(!n.$refs["player"+t])return 1;e.$nextTick((function(){n.$refs["player"+t]instanceof Array?n.$refs["player"+t][0].resize():n.$refs["player"+t].resize()}))},a=1;a<=t;a++)i(a);window.localStorage.setItem("split",t)},"$route.fullPath":"checkPlayByParam"},destroyed:function(){clearTimeout(this.updateLooper)},methods:{destroy:function(t){console.log(t),this.clear(t.substring(t.length-1))},clickEvent:function(t){t.channelSipId&&this.sendDevicePush(t)},sendDevicePush:function(t){var e=this;this.save(t);var n=t.deviceSipId,i=t.channelSipId;console.log("通知设备推流1:"+n+" : "+i);var a=this.playerIdx,r=this;this.loading=!0,Object(c["h"])(n,i).then((function(n){console.log("开始播放:"+e.deviceId+" : "+e.channelId),console.log("流媒体信息:"+n.data);var i=n.data;console.log("playurl:"+i.playurl),t.playUrl=i.playurl,t.streamId=i.streamId,r.setPlayUrl(t.playUrl,a)})).finally((function(){r.loading=!1}))},setPlayUrl:function(t,e){this.$set(this.videoUrl,e,t);var n=this;setTimeout((function(){window.localStorage.setItem("videoUrl",JSON.stringify(n.videoUrl))}),100)},checkPlayByParam:function(){var t=this.$route.query,e=t.deviceId,n=t.channelId;e&&n&&this.sendDevicePush({deviceId:e,channelId:n})},shot:function(t){var e=function(t){for(var e=t.split(";base64,"),n=e[0].split(":")[1],i=window.atob(e[1]),a=i.length,r=new Uint8Array(a),o=0;o<a;++o)r[o]=i.charCodeAt(o);return new Blob([r],{type:n})},n=document.createElement("a"),i=e(t),a=document.createEvent("HTMLEvents");a.initEvent("click",!0,!0),n.download="截图",n.href=URL.createObjectURL(i),n.click()},save:function(t){var e=window.localStorage.getItem("playData")||"[]",n=JSON.parse(e);n[this.playerIdx]=t,window.localStorage.setItem("playData",JSON.stringify(n))},clear:function(t){var e=window.localStorage.getItem("playData")||"[]",n=JSON.parse(e);n[t-1]=null,console.log(n),window.localStorage.setItem("playData",JSON.stringify(n))}}},l=s,d=(n("b1f7"),n("2877")),u=Object(d["a"])(l,i,a,!1,null,null,null);e["default"]=u.exports},b1f7:function(t,e,n){"use strict";n("71d6")},b7ef:function(t,e,n){"use strict";var i=n("23e7"),a=n("da84"),r=n("d066"),o=n("5c6c"),c=n("9bf2").f,s=n("1a2d"),l=n("19aa"),d=n("7156"),u=n("e391"),f=n("cf98"),p=n("0d26"),h=n("83ab"),v=n("c430"),m="DOMException",g=r("Error"),b=r(m),y=function(){l(this,E);var t=arguments.length,e=u(t<1?void 0:arguments[0]),n=u(t<2?void 0:arguments[1],"Error"),i=new b(e,n),a=g(e);return a.name=m,c(i,"stack",o(1,p(a.stack,1))),d(i,this,y),i},E=y.prototype=b.prototype,_="stack"in g(m),O="stack"in new b(1,2),I=b&&h&&Object.getOwnPropertyDescriptor(a,m),R=!!I&&!(I.writable&&I.configurable),S=_&&!R&&!O;i({global:!0,constructor:!0,forced:v||S},{DOMException:S?y:b});var D=r(m),w=D.prototype;if(w.constructor!==D)for(var k in v||c(w,"constructor",o(1,D)),f)if(s(f,k)){var x=f[k],j=x.s;s(D,j)||c(D,j,o(6,x.c))}},b917:function(t,e){for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={},a=0;a<66;a++)i[n.charAt(a)]=a;t.exports={itoc:n,ctoi:i}},cf98:function(t,e){t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},e2de:function(t,e,n){"use strict";n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return c})),n.d(e,"h",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"g",(function(){return u}));var i=n("b775");function a(t){return Object(i["a"])({url:"/sip/channel/list",method:"get",params:t})}function r(t){return Object(i["a"])({url:"/sip/channel/"+t,method:"get"})}function o(t,e){return Object(i["a"])({url:"/sip/channel/"+t,method:"post",data:e})}function c(t){return Object(i["a"])({url:"/sip/channel/"+t,method:"delete"})}function s(t,e){return Object(i["a"])({url:"/sip/player/play/"+t+"/"+e,method:"get"})}function l(t,e,n){return Object(i["a"])({url:"/sip/player/playback/"+t+"/"+e,method:"get",params:n})}function d(t,e){return Object(i["a"])({url:"/sip/player/closeStream/"+t+"/"+e,method:"get"})}function u(t,e,n,a){return Object(i["a"])({url:"/sip/player/playbackSeek/"+t+"/"+e+"/"+n,method:"get",params:a})}},f5a7:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o}));var i=n("b775");function a(t){return Object(i["a"])({url:"/sip/device/listchannel/"+t,method:"get"})}function r(t){return Object(i["a"])({url:"/sip/device/sipid/"+t,method:"delete"})}function o(t,e,n){return Object(i["a"])({url:"/sip/ptz/direction/"+t+"/"+e,method:"post",data:n})}}}]); |