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

2 lines
3.4 KiB
JavaScript

var L=Object.defineProperty,$=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var C=(e,o,n)=>o in e?L(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,g=(e,o)=>{for(var n in o||(o={}))A.call(o,n)&&C(e,n,o[n]);if(k)for(var n of k(o))N.call(o,n)&&C(e,n,o[n]);return e},x=(e,o)=>$(e,E(o));var y=(e,o,n)=>new Promise((_,p)=>{var b=t=>{try{r(n.next(t))}catch(s){p(s)}},c=t=>{try{r(n.throw(t))}catch(s){p(s)}},r=t=>t.done?_(t.value):Promise.resolve(t.value).then(b,c);r((n=n.apply(e,o)).next())});import{a as J,cK as O,cJ as R,b8 as D,w as z,v as m,f as I,bq as K,bd as S,L as j,aG as d,o as l,j as w,z as f,i as a,t as V,h as v,n as h,F,aJ as B,l as T,bm as q}from"./index.c32990f8.js";import{o as G,b as H}from"./other.dd0bab57.js";import P from"./Box.1ab62710.js";import Q from"./VideoFlv.2ba55ea0.js";import"./LinkModal.6ef8c5ad.js";import"./model-close-icon.706a0490.js";const U=J({components:{Box:P,Dropdown:O,DownOutlined:R,Menu:D,MenuItem:D.Item,VideoFlv:Q},setup(){const e=z({tabList:m([]),currentTab:m(""),list:m([])}),o=m(null),n=m(null),_=I(()=>{var t,s;return(s=(t=e.tabList.find(u=>u.id==e.currentTab))==null?void 0:t.name)!=null?s:""});function p({key:t}){e.currentTab!=t&&(e.currentTab=t,c())}function b(){return y(this,null,function*(){const t=yield G({device_type:1});e.tabList=t,t.length&&(e.currentTab=t[0].id),c()})}function c(){return y(this,null,function*(){const t=yield H({base:e.currentTab,type:1,status:1});e.list=t.map(s=>{const u="rtsp://admin:admin12345@183.222.79.115:9007/cam/realmonitor?channel=1&subtype=0";return x(g({},s),{url:`ws://127.0.0.1:8100/rtsp?url=${window.btoa(u)}`})}),e.list.length>0&&(n.value=e.list[0])})}function r(t){n.value=t}return K(()=>{b()}),x(g({onChangeVideo:r,currentVido:n},S(e)),{chartRef:o,currentTabValue:_,onMenuClick:p})}}),W={class:"h-full flex flex-col"},X={class:"py-10px relative"},Y={class:"text-center bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-14px font-bold"},Z={key:0,class:"absolute right-18px top-1/2 transform -translate-y-1/2"},ee={class:"cursor-pointer"},te=a("span",{class:"text-white text-12px"},"\u66F4\u591A",-1),ne={class:"flex-1 px-11px flex flex-col"},oe={class:"flex-1"},se={class:"grid grid-cols-3 gap-x-6px my-10px"};function ae(e,o,n,_,p,b){const c=d("DownOutlined"),r=d("menu-item"),t=d("Menu"),s=d("Dropdown"),u=d("VideoFlv"),M=d("Box");return l(),w(M,{title:"\u76D1\u63A7"},{default:f(()=>[a("div",W,[a("div",X,[a("div",Y,V(e.currentTabValue),1),e.tabList.length>1?(l(),v("div",Z,[h(s,{overlayClassName:"dropdownClass",placement:"bottomRight",trigger:"click",style:{height:"300px"}},{overlay:f(()=>[h(t,{onClick:e.onMenuClick},{default:f(()=>[(l(!0),v(F,null,B(e.tabList,i=>(l(),w(r,{key:i.key},{default:f(()=>[a("div",null,V(i.value),1)]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:f(()=>[a("div",ee,[te,h(c,{style:{fontSize:"12px",color:"#FFF"}})])]),_:1})])):T("",!0)]),a("div",ne,[a("div",oe,[e.currentVido?(l(),w(u,{key:0,url:e.currentVido.url,name:e.currentVido.base_name},null,8,["url","name"])):T("",!0)]),a("div",se,[(l(!0),v(F,null,B(e.list,i=>(l(),v("div",{class:"h-66px",key:i.id},[h(u,{url:i.url,name:i.base_name,screen:!1,onClick:q(re=>e.onChangeVideo(i),["prevent","stop"])},null,8,["url","name","onClick"])]))),128))])])])]),_:1})}var fe=j(U,[["render",ae]]);export{fe as default};