2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
var X=Object.defineProperty,Y=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var R=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var A=(e,t,o)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,F=(e,t)=>{for(var o in t||(t={}))Q.call(t,o)&&A(e,o,t[o]);if(R)for(var o of R(t))W.call(t,o)&&A(e,o,t[o]);return e},$=(e,t)=>Y(e,G(t));var I=(e,t,o)=>new Promise((_,i)=>{var g=s=>{try{c(o.next(s))}catch(d){i(d)}},b=s=>{try{c(o.throw(s))}catch(d){i(d)}},c=s=>s.done?_(s.value):Promise.resolve(s.value).then(g,b);c((o=o.apply(e,t)).next())});import{a as Z,cX as ee,cY as te,ba as U,w as oe,v as p,f as L,x as ne,aj as se,bf as ie,q as ae,an as le,fm as re,aE as m,o as l,j as B,B as v,i as r,h as k,t as j,l as M,p as C,F as ce,aH as de,n as q}from"./index.203f4f59.js";import{f as ue,t as pe}from"./other.d43d2a78.js";import me from"./Box.ea9d0e0a.js";import fe from"./VideoFlv.2136e2ee.js";import{v as z,a as ve,b as ge}from"./v03.26c01bf5.js";import be from"./LinkModal.8ff3619b.js";import"./index.4b37ed3f.js";import"./model-close-icon.706a0490.js";const _e=Z({components:{Box:me,Dropdown:ee,DownOutlined:te,Menu:U,MenuItem:U.Item,VideoFlv:fe,LinkModal:be},props:["baseId"],setup(e){e.baseId;const t=oe({tabList:p([]),currentTab:p(""),list:p([])}),o=p(!1),_=p(null),i=p(null),g=p(null),b=L(()=>{var n;return(n=t.list)!=null?n:[]}),c=L(()=>t.list.find(n=>n.id==t.currentTab));function s({key:n}){t.currentTab=n}function d(){return I(this,null,function*(){var O;const{ip:n,port:D}=yield ue(),w=yield pe({base_id:(O=e.baseId)!=null?O:t.currentTab,type:1,status:1,is_recommend:e.baseId?null:1});t.list=[],i.value=null;const a=w,E=[];for(let f=0;f<a.length;f++){const N=a[f],J=le(N),{supplier:S,extends:y,sn:K}=J,{rtsp_url:H}=y,P=H;let T=`ws://${n}:${D}/rtsp?url=${window.btoa(P)}`;if((S==null?void 0:S.id)=="device-supplier-biang")try{T=yield h({username:y.username,password:y.password,equipmentCode:K,channelNo:y.passage})}catch(De){}E.push(Object.assign({},$(F({},N),{img:f==0?z:f==1?ve:f==2?ge:z,url:T})))}t.list=E,t.list.length>0&&(i.value=t.list[0],t.currentTab=t.list[0].id)})}function h(n){return new Promise((D,w)=>I(this,null,function*(){try{const{data:a}=yield re.get("https://yun.bigdata5s.com/api/open-api/open/getSeedingLive",{params:n});a.code==200?D(a.data):w(a)}catch(a){w(a)}}))}function x(n){i.value.url!=n.url&&(i.value=n)}function V(n){g.value=n,o.value=!0}const u=L(()=>!!e.baseId);return ne(()=>{u.value&&d()}),se(()=>{}),$(F({isBase:u,listBig:c,listSmall:b,onChangeVideo:x,currentVido:i,currentModelVideo:g},ie(t)),{chartRef:_,onMenuClick:s,visibleModal:o,onScreenClick:V})}}),he={class:"h-full flex flex-col"},we={class:"py-10px relative"},ye={key:0,class:"text-center bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-14px font-bold"},Be={key:1,class:"absolute right-18px top-1/2 transform -translate-y-1/2"},ke={class:"cursor-pointer"},Me=r("span",{class:"text-white text-12px"},"\u66F4\u591A",-1),Ce={class:"flex-1"},xe={class:"w-full"};function Ve(e,t,o,_,i,g){const b=m("DownOutlined"),c=m("menu-item"),s=m("Menu"),d=m("Dropdown"),h=m("VideoFlv"),x=m("LinkModal"),V=m("Box");return l(),B(V,{title:"\u76D1\u63A7"},{default:v(()=>[r("div",he,[r("div",we,[e.listBig?(l(),k("div",ye,j(e.listBig.monitoring_point),1)):M("",!0),e.listSmall.length>1?(l(),k("div",Be,[C(d,{overlayClassName:"dropdownClass",placement:"bottomRight",trigger:"click",style:{height:"300px"}},{overlay:v(()=>[C(s,{onClick:e.onMenuClick},{default:v(()=>[(l(!0),k(ce,null,de(e.listSmall,u=>(l(),B(c,{key:u.id},{default:v(()=>[r("div",null,j(u.monitoring_point),1)]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:v(()=>[r("div",ke,[Me,C(b,{style:{fontSize:"12px",color:"#FFF"}})])]),_:1})])):M("",!0)]),r("div",{class:q(["flex-1 flex flex-col py-0px box-content",{"pt-0":!e.isBase}])},[r("div",Ce,[e.listBig?(l(),k("div",{key:0,class:q(["h-130px",{"!h-full":e.isBase}])},[(l(),B(h,{onOnScreen:e.onScreenClick,class:"cursor-pointer",id:e.listBig.id,key:e.listBig.id,name:e.listBig.monitoring_point},null,8,["onOnScreen","id","name"]))],2)):M("",!0)])],2)]),C(x,{visible:e.visibleModal,"onUpdate:visible":t[0]||(t[0]=u=>e.visibleModal=u),footer:null,title1:e.currentModelVideo&&e.currentModelVideo.name,width:1100},{content:v(()=>[r("div",xe,[e.currentModelVideo.id?(l(),B(h,{key:0,id:e.currentModelVideo.id,screen:!1,name:e.currentModelVideo.name},null,8,["id","name"])):M("",!0)])]),_:1},8,["visible","title1"])]),_:1})}var Re=ae(_e,[["render",Ve]]);export{Re as default};
|