lcny-vue3-antd-admin/dist/assets/JK.2596d606.js

2 lines
4.4 KiB
JavaScript

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