FastBee/docker/data/nginx/vue/static/js/chunk-6195e173.8832fd25.js
2025-07-07 09:21:15 +08:00

1 line
15 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6195e173","chunk-f5d1c7e6","chunk-688a2787","chunk-195168e1"],{"1aac":function(e,t,i){},2562:function(e,t,i){},"2a53":function(e,t,i){},5169:function(e,t,i){"use strict";i("bdbe")},"81d1":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"scene-list-scada"},[e.isScada?i("div",{staticClass:"scada",style:{height:e.contentHeight+"px"}},[i(e.scadaComp,{ref:"sceneScada",tag:"component",attrs:{fullScreemTip:!1,isContextmenu:!1}})],1):i("div",[i("el-empty",{attrs:{description:e.$t("scene.scada.433893-0")}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:scada:design"],expression:"['scene:model:scada:design']"}],attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.handleGoToScada()}}},[e._v(e._s(e.$t("scene.scada.433893-2")))])],1)],1)])},a=[],s=i("5530"),o=(i("14d9"),{name:"SceneListScada",props:{guid:{type:String,default:""}},watch:{guid:function(e,t){e?(this.getScadaComp(e),this.isScada=!0):this.isScada=!1}},data:function(){return{isScada:!0,scadaComp:null,contentHeight:window.innerHeight}},methods:{getScadaComp:function(e){this.$router.push({query:Object(s["a"])(Object(s["a"])({},this.$route.query),{},{guid:e,type:2})})},handleGoToScada:function(){this.$router.push({path:"/scada/center/scene",query:{sceneModelId:this.$route.query.sceneModelId}})}}}),c=o,r=(i("f1bf"),i("2877")),l=Object(r["a"])(c,n,a,!1,null,"69f1a468",null);t["default"]=l.exports},8227:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"scenario-list-video"},[i("el-row",{staticStyle:{"margin-left":"-10px","margin-right":"-10px","margin-top":"-10px"}},e._l(e.sipList,(function(t,n){return i("el-col",{key:n,staticStyle:{"padding-left":"10px","padding-right":"10px","padding-top":"15px"},attrs:{id:"sceneVideoCol",span:8}},[i("div",{staticClass:"video"},[i("player",{ref:"player_"+n,refInFor:!0,attrs:{playerinfo:{playtype:"play",deviceId:t.deviceSipId,channelId:t.channelId}}}),1===t.status?i("span",{staticClass:"status",staticStyle:{color:"#ffba00"}},[e._v(e._s(e.$t("home.notActive")))]):e._e(),2===t.status?i("span",{staticClass:"status",staticStyle:{color:"#ff4949"}},[e._v(e._s(e.$t("home.disabled")))]):e._e(),4===t.status?i("span",{staticClass:"status",staticStyle:{color:"#909399"}},[e._v(e._s(e.$t("home.offline")))]):e._e(),3===t.status?i("i",{staticClass:"el-icon-caret-right btn",on:{click:function(i){return e.handlePlay(i,t,n)}}}):e._e()],1)])})),1),0===e.total?i("el-empty",{attrs:{description:e.$t("scene.scada.433893-1")}}):e._e(),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.pageNum,limit:e.pageSize,pageSizes:[9,18,27,36]},on:{"update:page":function(t){e.pageNum=t},"update:limit":function(t){e.pageSize=t},pagination:e.getSipList}})],1)},a=[],s=i("5530"),o=(i("fb6a"),i("d3b7"),i("159b"),i("2f62")),c=i("97d6"),r=i("e2de"),l={name:"ScenarioListVideo",components:{player:c["default"]},props:{sipRelationVOList:{type:Array,default:function(){return[]}}},watch:{sidebarStatus:function(){this.calculatePlayerHeight()},sipRelationVOList:{handler:function(e,t){e&&0!==e.length&&(this.total=e.length,this.tempSipList=this.sipRelationVOList)},deep:!0}},computed:Object(s["a"])(Object(s["a"])({},Object(o["c"])({sidebarStatus:function(e){return e.app.sidebar.opened}})),{},{sipList:function(){var e=(this.pageNum-1)*this.pageSize,t=e+this.pageSize;return this.sipRelationVOList.slice(e,t)}}),data:function(){return{pageNum:1,pageSize:9,total:0,tempSipList:[]}},mounted:function(){this.calculatePlayerHeight(),window.addEventListener("resize",this.calculatePlayerHeight,!0),this.tempSipList=this.sipRelationVOList,this.total=this.sipRelationVOList.length},methods:{calculatePlayerHeight:function(){var e=this;setTimeout((function(){e.sipList&&e.sipList.forEach((function(t,i){var n=e.$refs["player_".concat(i)][0].$refs.container,a=document.getElementById("sceneVideoCol").offsetWidth;n.style.width=a?a-10+"px":"300px",n.style.height="230px"}))}),100)},getSipList:function(e){this.pageNum=e.page,this.pageSize=e.limit},handlePlay:function(e,t,i){var n=this;Object(r["k"])(t.deviceSipId,t.channelId).then((function(t){200===t.code&&(n.$refs["player_".concat(i)][0].isInit||n.$refs["player_".concat(i)][0].init(),n.tempSipList[i].streamId=t.data.streamId,n.tempSipList[i].playurl=t.data.playurl,n.$refs["player_".concat(i)][0].play(t.data.playurl),e.target.style.visibility="hidden")}))},handleClose:function(){if(this.sipList&&0!==this.sipList.length){var e=this;this.sipList.forEach((function(t,i){e.tempSipList[i].streamId&&Object(r["c"])(t.deviceSipId,t.channelId,e.tempSipList[i].streamId).then((function(e){})),e.$refs["player_".concat(i)][0]&&e.$refs["player_".concat(i)][0].close()}))}}},destroyed:function(){this.handleClose()}},u=l,d=(i("e8da"),i("2877")),p=Object(d["a"])(u,n,a,!1,null,"0182774f",null);t["default"]=p.exports},"97d6":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"root"},[i("div",{staticClass:"container-shell"},[i("div",{ref:"container",attrs:{id:"container"}})])])},a=[],s=i("c7eb"),o=i("1da1"),c=(i("a9e3"),i("ac1f"),i("00b4"),i("f5a7")),r={},l={name:"player",props:{playerinfo:{type:Object,default:null}},mounted:function(){console.log(this._uid)},watch:{playerinfo:function(e,t){console.log("playerinfo 发生变化"),this.playinfo=e,this.playinfo&&""!==this.playinfo.playtype&&(this.playtype=this.playinfo.playtype)}},jessibuca:null,data:function(){return{isPlaybackPause:!1,useWebGPU:!1,isInit:!1,playinfo:{},playtype:"play",operateBtns:{fullscreen:!0,zoom:!0,play:!0,audio:!0}}},beforeDestroy:function(){},created:function(){this.playinfo=this.playerinfo,this.playinfo&&""!==this.playinfo.playtype&&(this.playtype=this.playinfo.playtype),this.init()},methods:{init:function(){var e=this,t="gpu"in navigator;t?(console.log("支持webGPU"),this.useWebGPU=!0):(console.log("暂不支持webGPU降级到webgl渲染"),this.useWebGPU=!1);var i=this.isMobile()||this.isPad();i&&window.VConsole&&new window.VConsole,this.$nextTick((function(){e.initplayer()}))},initplayer:function(){this.isPlaybackPause=!1,this.initconf(),r[this._uid]=new window.JessibucaPro({container:this.$refs.container,decoder:"/js/jessibuca-pro/decoder-pro.js",videoBuffer:Number(.2),isResize:!1,useWCS:!1,useMSE:!1,useSIMD:!0,wcsUseVideoRender:!1,loadingText:"加载中",debug:!1,debugLevel:"debug",showBandwidth:!0,showPlaybackOperate:!0,operateBtns:this.operateBtns,forceNoOffscreen:!0,isNotMute:!0,showPerformance:!1,playbackForwardMaxRateDecodeIFrame:4,useWebGPU:this.useWebGPU});var e=r[this._uid];this.initcallback(e),this.isInit=!0},initconf:function(){"play"===this.playtype?this.operateBtns.ptz=!0:this.operateBtns.ptz=!1},initcallback:function(e){var t=this;e.on("error",(function(e){console.log("jessibuca error"),console.log(e)})),e.on("playFailedAndPaused",(function(e,t,i){console.log("playFailedAndPaused",e,i)})),e.on("visibilityChange",(function(e){!0===e?console.log("visibilityChange true"):console.log("visibilityChange false")})),e.on("pause",(function(e){console.log("pause success!"),console.log(e)})),e.on("play",(function(e){console.log("play!"),console.log(e)})),e.on("loading",(function(e){console.log("loading success!"),console.log(e)})),e.on("stats",(function(e){console.log("stats is",e)})),e.on("timeout",(function(e){console.log("timeout:",e)})),e.on("playbackPreRateChange",(function(t){e.forward(t)}));var i=0,n=0;e.on("timeUpdate",(function(e){n=parseInt(e/6e4),i!==n&&i++})),e.on(JessibucaPro.EVENTS.ptz,(function(e){console.log("ptz arrow",e),t.handlePtz(e)})),e.on("crashLog",(function(e){console.log("crashLog is",e)}))},registercallback:function(e,t){r[this._uid]&&r[this._uid].on(e,t)},isMobile:function(){return/iphone|ipad|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())},isPad:function(){return/ipad|android(?!.*mobile)|tablet|kindle|silk/i.test(window.navigator.userAgent.toLowerCase())},play:function(e){r[this._uid]&&r[this._uid].play(e)},pause:function(){r[this._uid]&&r[this._uid].pause()},replay:function(e){var t=this;r[this._uid]?r[this._uid].destroy().then((function(){t.initplayer(),t.play(e)})):(this.initplayer(),this.play(e))},handlePtz:function(e){var t=0,i=0;"left"===e?t=2:"right"===e?t=1:"up"===e?i=1:"down"===e&&(i=2);var n={leftRight:t,upDown:i,moveSpeed:125};this.playinfo&&""!==this.playinfo.playtype&&Object(c["c"])(this.playinfo.deviceId,this.playinfo.channelId,n).then(function(){var e=Object(o["a"])(Object(s["a"])().mark((function e(t){return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},playback:function(e,t){r[this._uid]&&(r[this._uid].playback(e,{playList:t,fps:25,showControl:!0,isUseFpsRender:!0,isCacheBeforeDecodeForFpsRender:!1,supportWheel:!0}),this.isPlaybackPause=!1)},playbackPause:function(){r[this._uid]&&(r[this._uid].playbackPause(),this.isPlaybackPause=!0)},replayback:function(e,t){var i=this;r[this._uid]?r[this._uid].destroy().then((function(){i.initplayer(),i.playback(e,t)})):(this.initplayer(),this.playback(e,t))},setPlaybackStartTime:function(e){r[this._uid]&&r[this._uid].setPlaybackStartTime(e)},destroy:function(){var e=this;r[this._uid]&&r[this._uid].destroy().then((function(){e.initplayer()}))},close:function(){r[this._uid]&&r[this._uid].close()}}},u=l,d=(i("5169"),i("2877")),p=Object(d["a"])(u,n,a,!1,null,"5072a715",null);t["default"]=p.exports},"9cac":function(e,t,i){"use strict";i("2562")},bdbe:function(e,t,i){},cf60:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"scene-list-detail"},[i("el-tabs",{on:{"tab-click":e.handleTabClick},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[i("el-tab-pane",{attrs:{label:e.$t("scene.detail.index.209809-0"),name:"overview"}},[i("scene-overview",{attrs:{sceneModels:e.sceneModels}})],1),1==e.isShowScada?i("el-tab-pane",{attrs:{label:e.$t("scene.detail.index.209809-1"),name:"scada"}},[i("span",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:model:scada:run"],expression:"['scene:model:scada:run']"}],attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("scene.detail.index.209809-1")))]),i("scene-scada",{ref:"scada",attrs:{guid:e.sceneModels.guid}})],1):e._e(),i("el-tab-pane",{attrs:{label:e.$t("scene.detail.index.209809-2"),name:"video"}},[i("span",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["scene:SipRelation:list"],expression:"['scene:SipRelation:list']"}],attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("scene.detail.index.209809-2")))]),i("scene-video",{ref:"video",attrs:{sipRelationVOList:e.sceneModels.sipRelationVOList}})],1)],1)],1)},a=[],s=i("2909"),o=(i("99af"),i("caad"),i("14d9"),i("b0c0"),i("d3b7"),i("2532"),i("159b"),i("7a7d")),c=i("65f4"),r=i("81d1"),l=i("8227"),u=i("83d6"),d={name:"sceneListDetail",components:{sceneOverview:c["default"],sceneScada:r["default"],sceneVideo:l["default"]},data:function(){return{activeTab:"overview",isShowScada:u["a"].isShowScada,sceneModels:{sceneModelDeviceVOList:[],deviceInfo:{}}}},mounted:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.$modal.loading(this.$t("scene.detail.index.209809-3"));var t=this.$route.query.sceneModelId;Object(o["k"])(t).then((function(t){200===t.code&&(e.sceneModels=t.data,e.sceneModels.sceneModelDeviceVOList=[{id:"-1",name:e.$t("scene.detail.index.209809-4")}].concat(Object(s["a"])(t.data.sceneModelDeviceVOList)),e.mqttSubscribe(e.sceneModels.sceneModelDeviceVOList)),e.$modal.closeLoading()}))},handleTabClick:function(e,t){if("video"===e.name?this.$refs.video.calculatePlayerHeight():this.$refs.video&&this.$refs.video.handleClose(),"scada"!==e.name){var i=this.$refs.scada||{};if(i&&i.$refs&&i.$refs.sceneScada){var n=i.$refs.sceneScada;n.$refs&&n.$refs.spirit&&n.$refs.spirit.forEach((function(e){e.$vnode.tag.includes("ViewInlineVideo")&&e.handleCloseJessibuca()}))}}},mqttSubscribe:function(e){for(var t=[],i=1;i<e.length;i++)if(1===e[i].variableType){var n="/"+e[i].productId+"/"+e[i].serialNumber+"/status/post",a="/"+e[i].productId+"/"+e[i].serialNumber+"/monitor/post",s="/"+e[i].productId+"/"+e[i].serialNumber+"/ws/service";t.push(n),t.push(a),t.push(s)}else{var o="/"+e[i].sceneModelId+"/"+e[i].id+"/scene/report";t.push(o)}this.$mqttTool.subscribe(t)},mqttUnSubscribe:function(e){for(var t=[],i=1;i<e.length;i++)if(1===e[i].variableType){var n="/"+e[i].productId+"/"+e[i].serialNumber+"/status/post",a="/"+e[i].productId+"/"+e[i].serialNumber+"/monitor/post",s="/"+e[i].productId+"/"+e[i].serialNumber+"/ws/service";t.push(n),t.push(a),t.push(s)}else{var o="/"+e[i].sceneModelId+"/"+e[i].id+"/scene/report";t.push(o)}this.$mqttTool.unsubscribe(t)}},destroyed:function(){this.mqttUnSubscribe(this.sceneModels.sceneModelDeviceVOList)}},p=d,h=(i("9cac"),i("2877")),f=Object(h["a"])(p,n,a,!1,null,"67a612ed",null);t["default"]=f.exports},e2de:function(e,t,i){"use strict";i.d(t,"g",(function(){return a})),i.d(t,"e",(function(){return s})),i.d(t,"a",(function(){return o})),i.d(t,"d",(function(){return c})),i.d(t,"k",(function(){return r})),i.d(t,"h",(function(){return l})),i.d(t,"c",(function(){return u})),i.d(t,"i",(function(){return d})),i.d(t,"b",(function(){return p})),i.d(t,"f",(function(){return h})),i.d(t,"j",(function(){return f})),i.d(t,"l",(function(){return b}));var n=i("b775");function a(e){return Object(n["a"])({url:"/sip/channel/list",method:"get",params:e})}function s(e){return Object(n["a"])({url:"/sip/channel/"+e,method:"get"})}function o(e,t){return Object(n["a"])({url:"/sip/channel/"+e,method:"post",data:t})}function c(e){return Object(n["a"])({url:"/sip/channel/"+e,method:"delete"})}function r(e,t){return Object(n["a"])({url:"/sip/player/play/"+e+"/"+t,method:"get"})}function l(e,t,i){return Object(n["a"])({url:"/sip/player/playback/"+e+"/"+t,method:"get",params:i})}function u(e,t,i){return Object(n["a"])({url:"/sip/player/closeStream/"+e+"/"+t+"/"+i,method:"get"})}function d(e,t,i,a){return Object(n["a"])({url:"/sip/player/playbackSeek/"+e+"/"+t+"/"+i,method:"get",params:a})}function p(e){return Object(n["a"])({url:"/iot/relation/addOrUp",method:"post",data:e})}function h(e,t){return Object(n["a"])({url:"/sip/talk/getPushUrl/"+e+"/"+t,method:"get"})}function f(e,t){return Object(n["a"])({url:"/sip/talk/broadcast/"+e+"/"+t,method:"get"})}function b(e,t){return Object(n["a"])({url:"/sip/talk/broadcast/stop/"+e+"/"+t,method:"get"})}},e8da:function(e,t,i){"use strict";i("1aac")},f1bf:function(e,t,i){"use strict";i("2a53")},f5a7:function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"a",(function(){return s})),i.d(t,"c",(function(){return o}));var n=i("b775");function a(e){return Object(n["a"])({url:"/sip/device/listchannel/"+e,method:"get"})}function s(e){return Object(n["a"])({url:"/sip/device/sipid/"+e,method:"delete"})}function o(e,t,i){return Object(n["a"])({url:"/sip/ptz/direction/"+e+"/"+t,method:"post",data:i})}}}]);