2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
var Y=Object.defineProperty,G=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var R=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var A=(e,t,o)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,S=(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)=>G(e,H(t));var I=(e,t,o)=>new Promise((_,i)=>{var g=s=>{try{c(o.next(s))}catch(u){i(u)}},b=s=>{try{c(o.throw(s))}catch(u){i(u)}},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,b9 as U,v as oe,s as p,f as L,br as ne,ah as se,be as ie,q as le,al as ae,fm as re,aC as m,o as a,j as k,y as v,i as r,h as B,t as q,l as M,p as C,F as ce,aF as ue,n as z}from"./index.2cdbaad0.js";import{f as de,s as pe}from"./other.581e80b4.js";import me from"./Box.814c1299.js";import fe from"./VideoFlv.89a68d57.js";import{v as J,a as ve,b as ge}from"./v03.26c01bf5.js";import be from"./LinkModal.759d4bce.js";import"./index.5897d526.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 u(){return I(this,null,function*(){var E;const{ip:n,port:D}=yield de(),w=yield pe({base_id:(E=e.baseId)!=null?E:t.currentTab,type:1,status:1,is_recommend:e.baseId?null:1});t.list=[],i.value=null;const l=w,O=[];for(let f=0;f<l.length;f++){const N=l[f],K=ae(N),{supplier:F,extends:y,sn:j}=K,{rtsp_url:P}=y,X=P;let T=`ws://${n}:${D}/rtsp?url=${window.btoa(X)}`;if((F==null?void 0:F.id)=="device-supplier-biang")try{T=yield h({username:y.username,password:y.password,equipmentCode:j,channelNo:y.passage})}catch(De){}O.push(Object.assign({},$(S({},N),{img:f==0?J:f==1?ve:f==2?ge:J,url:T})))}t.list=O,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:l}=yield re.get("https://yun.bigdata5s.com/api/open-api/open/getSeedingLive",{params:n});l.code==200?D(l.data):w(l)}catch(l){w(l)}}))}function V(n){i.value.url!=n.url&&(i.value=n)}function x(n){g.value=n,o.value=!0}const d=L(()=>!!e.baseId);return ne(()=>{d.value&&u()}),se(()=>{}),$(S({isBase:d,listBig:c,listSmall:b,onChangeVideo:V,currentVido:i,currentModelVideo:g},ie(t)),{chartRef:_,onMenuClick:s,visibleModal:o,onScreenClick:x})}}),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"},ke={key:1,class:"absolute right-18px top-1/2 transform -translate-y-1/2"},Be={class:"cursor-pointer"},Me=r("span",{class:"text-white text-12px"},"\u66F4\u591A",-1),Ce={class:"flex-1"},Ve={class:"w-full"};function xe(e,t,o,_,i,g){const b=m("DownOutlined"),c=m("menu-item"),s=m("Menu"),u=m("Dropdown"),h=m("VideoFlv"),V=m("LinkModal"),x=m("Box");return a(),k(x,{title:"\u76D1\u63A7"},{default:v(()=>[r("div",he,[r("div",we,[e.listBig?(a(),B("div",ye,q(e.listBig.monitoring_point),1)):M("",!0),e.listSmall.length>1?(a(),B("div",ke,[C(u,{overlayClassName:"dropdownClass",placement:"bottomRight",trigger:"click",style:{height:"300px"}},{overlay:v(()=>[C(s,{onClick:e.onMenuClick},{default:v(()=>[(a(!0),B(ce,null,ue(e.listSmall,d=>(a(),k(c,{key:d.id},{default:v(()=>[r("div",null,q(d.monitoring_point),1)]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:v(()=>[r("div",Be,[Me,C(b,{style:{fontSize:"12px",color:"#FFF"}})])]),_:1})])):M("",!0)]),r("div",{class:z(["flex-1 flex flex-col py-0px box-content",{"pt-0":!e.isBase}])},[r("div",Ce,[e.listBig?(a(),B("div",{key:0,class:z(["h-130px",{"!h-full":e.isBase}])},[(a(),k(h,{onOnScreen:e.onScreenClick,class:"cursor-pointer",url:e.listBig.url,key:e.listBig.url,name:e.listBig.monitoring_point},null,8,["onOnScreen","url","name"]))],2)):M("",!0)])],2)]),C(V,{visible:e.visibleModal,"onUpdate:visible":t[0]||(t[0]=d=>e.visibleModal=d),footer:null,title1:e.currentModelVideo&&e.currentModelVideo.name,width:1100},{content:v(()=>[r("div",Ve,[e.currentModelVideo.url?(a(),k(h,{key:0,url:e.currentModelVideo.url,screen:!1,name:e.currentModelVideo.name},null,8,["url","name"])):M("",!0)])]),_:1},8,["visible","title1"])]),_:1})}var Re=le(_e,[["render",xe]]);export{Re as default};
|