lcny-vue3-antd-admin/dist/assets/JK.362bbf84.js

2 lines
3.6 KiB
JavaScript

var E=Object.defineProperty,N=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var k=(t,o,s)=>o in t?E(t,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[o]=s,h=(t,o)=>{for(var s in o||(o={}))R.call(o,s)&&k(t,s,o[s]);if(V)for(var s of V(o))j.call(o,s)&&k(t,s,o[s]);return t},x=(t,o)=>N(t,O(o));var w=(t,o,s)=>new Promise((_,p)=>{var v=e=>{try{i(s.next(e))}catch(n){p(n)}},l=e=>{try{i(s.throw(e))}catch(n){p(n)}},i=e=>e.done?_(e.value):Promise.resolve(e.value).then(v,l);i((s=s.apply(t,o)).next())});import{a as I,cT as J,cU as S,b7 as F,s as q,r as m,f as z,bp as K,bc as U,J as G,aA as u,o as c,j as y,x as f,i as r,t as T,h as g,p as D,F as B,aD as $,l as M,bl as H}from"./index.fac4d62d.js";import{p as P,b as Q,q as W}from"./other.a2b2b28e.js";import X from"./Box.84738152.js";import Y from"./VideoFlv.103c214f.js";import"./flv.0bc5bf16.js";import"./LinkModal.c8005696.js";import"./model-close-icon.706a0490.js";var L="/assets/v01.fb45fe6a.png",Z="/assets/v02.5305abb9.png",tt="/assets/v03.03878ed0.png";const et=I({components:{Box:X,Dropdown:J,DownOutlined:S,Menu:F,MenuItem:F.Item,VideoFlv:Y},setup(){const t=q({tabList:m([]),currentTab:m(""),list:m([])}),o=m(null),s=m(null),_=z(()=>{var e,n;return(n=(e=t.tabList.find(d=>d.id==t.currentTab))==null?void 0:e.name)!=null?n:""});function p({key:e}){t.currentTab!=e&&(t.currentTab=e,l())}function v(){return w(this,null,function*(){const e=yield P({device_type:1});t.tabList=e,e.length&&(t.currentTab=e[0].id),l()})}function l(){return w(this,null,function*(){const{ip:e,port:n}=yield Q(),d=yield W({base:t.currentTab,type:1,status:1,is_recommend:1});t.list=d.splice(0,3).map((b,a)=>{const{rtsp_url:C}=b.extends,A=C;return x(h({},b),{img:a==0?L:a==1?Z:a==2?tt:L,url:`ws://${e}:${n}/rtsp?url=${window.btoa(A)}`})}),t.list.length>0&&(s.value=t.list[0])})}function i(e){s.value=e}return K(()=>{v()}),x(h({onChangeVideo:i,currentVido:s},U(t)),{chartRef:o,currentTabValue:_,onMenuClick:p})}}),st={class:"h-full flex flex-col"},ot={class:"py-10px relative"},nt={class:"text-center bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-14px font-bold"},at={key:0,class:"absolute right-18px top-1/2 transform -translate-y-1/2"},rt={class:"cursor-pointer"},it=r("span",{class:"text-white text-12px"},"\u66F4\u591A",-1),ct={class:"flex-1 px-11px flex flex-col"},lt={class:"flex-1"},ut={class:"grid grid-cols-3 gap-x-6px my-10px"},pt=["src","onClick"];function dt(t,o,s,_,p,v){const l=u("DownOutlined"),i=u("menu-item"),e=u("Menu"),n=u("Dropdown"),d=u("VideoFlv"),b=u("Box");return c(),y(b,{title:"\u76D1\u63A7"},{default:f(()=>[r("div",st,[r("div",ot,[r("div",nt,T(t.currentTabValue),1),t.tabList.length>1?(c(),g("div",at,[D(n,{overlayClassName:"dropdownClass",placement:"bottomRight",trigger:"click",style:{height:"300px"}},{overlay:f(()=>[D(e,{onClick:t.onMenuClick},{default:f(()=>[(c(!0),g(B,null,$(t.tabList,a=>(c(),y(i,{key:a.id},{default:f(()=>[r("div",null,T(a.name),1)]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:f(()=>[r("div",rt,[it,D(l,{style:{fontSize:"12px",color:"#FFF"}})])]),_:1})])):M("",!0)]),r("div",ct,[r("div",lt,[t.currentVido?(c(),y(d,{key:0,url:t.currentVido.url,name:t.currentVido.base_name},null,8,["url","name"])):M("",!0)]),r("div",ut,[(c(!0),g(B,null,$(t.list,a=>(c(),g("div",{class:"h-66px",key:a.id},[r("img",{src:a.img,class:"object-cover w-full h-full",alt:"",srcset:"",onClick:H(C=>t.onChangeVideo(a),["prevent","stop"])},null,8,pt)]))),128))])])])]),_:1})}var wt=G(et,[["render",dt]]);export{wt as default};