lcny-vue3-antd-admin/dist/assets/JK.c4fcf0ef.js

2 lines
4.1 KiB
JavaScript

var q=Object.defineProperty,U=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var E=(t,e,s)=>e in t?q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,k=(t,e)=>{for(var s in e||(e={}))Z.call(e,s)&&E(t,s,e[s]);if(A)for(var s of A(e))G.call(e,s)&&E(t,s,e[s]);return t},T=(t,e)=>U(t,Y(e));var V=(t,e,s)=>new Promise((i,m)=>{var B=a=>{try{c(s.next(a))}catch(r){m(r)}},v=a=>{try{c(s.throw(a))}catch(r){m(r)}},c=a=>a.done?i(a.value):Promise.resolve(a.value).then(B,v);c((s=s.apply(t,e)).next())});import{a as H,cY as P,cZ as Q,b7 as N,s as W,r as x,f as C,bp as X,af as ee,bc as te,J as se,aA as f,o as l,j as S,x as h,i as d,h as p,t as J,p as y,F as L,aD as $,l as O,n as R}from"./index.74b8dbdb.js";import{p as ne,b as ae,q as oe}from"./other.5cabe99a.js";import re from"./Box.e22320ff.js";import le from"./VideoFlv.0cc75a23.js";import"./flv.680fd659.js";import"./LinkModal.f17d450f.js";import"./model-close-icon.706a0490.js";var z="/assets/v01.fb45fe6a.png",ie="/assets/v02.5305abb9.png",ce="/assets/v03.03878ed0.png";const ue=H({components:{Box:re,Dropdown:P,DownOutlined:Q,Menu:N,MenuItem:N.Item,VideoFlv:le},props:["baseId"],setup(t){t.baseId;const e=W({tabList:x([]),currentTab:x(""),list:x([])}),s=x(null),i=x(null),m=C(()=>e.list.slice(1,4)),B=C(()=>e.list.slice(0,1)),v=C(()=>{var n,b;return(b=(n=e.tabList.find(g=>g.id==e.currentTab))==null?void 0:n.name)!=null?b:""});function c({key:n}){e.currentTab!=n&&(e.currentTab=n,r())}function a(){return V(this,null,function*(){const n=yield ne({device_type:1});e.tabList=n,n.length&&(e.currentTab=n[0].id),r()})}function r(){return V(this,null,function*(){var D;const{ip:n,port:b,change_time:g}=yield ae(),w=yield oe({base_id:(D=t.baseId)!=null?D:e.currentTab,type:1,status:1,is_recommend:1});i.value=null,e.list=w.splice(0,4).map((M,F)=>{const{rtsp_url:K}=M.extends,j=K;return T(k({},M),{img:F==0?z:F==1?ie:F==2?ce:z,url:`ws://${n}:${b}/rtsp?url=${window.btoa(j)}`})}),e.list.length>0&&(i.value=e.list[0]),_.value||I(g)})}let u=null;function I(n){u&&clearInterval(u),n!=0&&(u=setInterval(()=>{const g=e.tabList.findIndex(D=>D.id==e.currentTab)+1,w=e.tabList[g%e.tabList.length];c(k({key:w.id},w))},1e3*n))}function o(n){i.value.url!=n.url&&(i.value=n)}const _=C(()=>!!t.baseId);return X(()=>{_.value?r():a()}),ee(()=>{u&&clearInterval(u)}),T(k({isBase:_,listBig:B,listSmall:m,onChangeVideo:o,currentVido:i},te(e)),{chartRef:s,currentTabValue:v,onMenuClick:c})}}),de={class:"h-full flex flex-col"},pe={key:0,class:"py-10px relative"},fe={class:"text-center bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-14px font-bold"},me={key:0,class:"absolute right-18px top-1/2 transform -translate-y-1/2"},ve={class:"cursor-pointer"},_e=d("span",{class:"text-white text-12px"},"\u66F4\u591A",-1),be={class:"flex-1"},ge={class:"grid grid-cols-3 gap-x-6px pt-10px"};function xe(t,e,s,i,m,B){const v=f("DownOutlined"),c=f("menu-item"),a=f("Menu"),r=f("Dropdown"),u=f("VideoFlv"),I=f("Box");return l(),S(I,{title:"\u76D1\u63A7"},{default:h(()=>[d("div",de,[t.isBase?O("",!0):(l(),p("div",pe,[d("div",fe,J(t.currentTabValue),1),t.tabList.length>1?(l(),p("div",me,[y(r,{overlayClassName:"dropdownClass",placement:"bottomRight",trigger:"click",style:{height:"300px"}},{overlay:h(()=>[y(a,{onClick:t.onMenuClick},{default:h(()=>[(l(!0),p(L,null,$(t.tabList,o=>(l(),S(c,{key:o.id},{default:h(()=>[d("div",null,J(o.name),1)]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:h(()=>[d("div",ve,[_e,y(v,{style:{fontSize:"12px",color:"#FFF"}})])]),_:1})])):O("",!0)])),d("div",{class:R(["flex-1 px-11px flex flex-col py-10px box-content",{"pt-0":!t.isBase}])},[d("div",be,[(l(!0),p(L,null,$(t.listBig,(o,_)=>(l(),p("div",{class:R(["h-full",{"h-140px":t.isBase}]),key:_},[y(u,{class:"cursor-pointer",url:o.url,name:o.base_name},null,8,["url","name"])],2))),128))]),d("div",ge,[(l(!0),p(L,null,$(t.listSmall,o=>(l(),p("div",{class:"h-66px",key:o.id},[y(u,{class:"cursor-pointer",url:o.url,name:o.base_name,screen:!0},null,8,["url","name"])]))),128))])],2)])]),_:1})}var Fe=se(ue,[["render",xe]]);export{Fe as default};