lcny-vue3-antd-admin/dist/assets/JK1.88dcffbc.js

2 lines
4.5 KiB
JavaScript

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