pull-0b3d2504.js 3.0 KB

1
  1. import{d as h,X as S,a6 as C,f as o,Z as r,u as e,E as d,F as P}from"./vue-bbe2430e.js";import{aa as D,aV as m,aW as b,aG as E,U as p,M as F}from"./radical-08b8d2dc.js";import{V as f,k as L,x as R}from"./index-0d0030ad.js";import{u as V}from"./index-6b55885f.js";import{q as $,g as B,d as M}from"./schema-038c1f9c.js";import{d as T,p as z,u as c}from"./pullOnStart-fbcd7417.js";import{u as H}from"./global-473141e7.js";import{u as U}from"./usePlay-a2a08947.js";import"./index-edc50925.js";import"./jb4-ws-flv-6f245285.js";import"./gb28181-745bb8c1.js";const W=h({name:"StreamProxy"}),tt=h({...W,setup(q){f.renderer.add("DeviceStatus",{renderDefault(t,l){const{row:a}=l;return T(a.status)}}),f.renderer.add("PullOnStart",{renderDefault(t,l){const{row:a}=l;return z(a.pullOnStart)}});const{pause:s,resume:n}=H(i),x=()=>{c({updateList:i,pause:s,resume:n})},{FormilyForm:y}=D({schema:$(x,"添加拉流代理")}),w={toggleRowExpand:({expanded:t})=>{t?s():n()}},u=V(),g=t=>{u.tableRef.reloadData(t||[])};function i(){return B().then(t=>{g(t)}).catch(t=>{console.error(`stream-proxy-getList-error: ${t}`)})}i();const _=t=>{F.confirm({title:"提示",content:"确定要删除吗?",onOk:()=>{M(t).then(i)}})},k=t=>{c({updateList:i,pause:s,resume:n,row:t})},v={maxHeight:"100%",rowConfig:{keyField:"ID",useKey:!0},columnConfig:{useKey:!0},columns:[{field:"name",title:"名称",showOverflow:"tooltip",width:"200px",fixed:"left",type:"html"},{field:"streamPath",title:"流标识",showOverflow:"tooltip",width:"200px",fixed:"left",type:"html"},{field:"pullURL",title:"源地址",showOverflow:"tooltip",minWidth:"250px",type:"html"},{field:"type",title:"类型",showOverflow:"tooltip",width:"80px",fixed:"left",type:"html"},{field:"status",title:"状态",showOverflow:"tooltip",width:"80px",fixed:"left",cellRender:{name:"DeviceStatus"}},{field:"pullOnStart",title:"拉流模式",showOverflow:"tooltip",width:"120px",cellRender:{name:"PullOnStart"}},{field:"createTime",title:"创建时间",width:"200px",formatter:({cellValue:t})=>R.toDateString(new Date(t),"yyyy-MM-dd HH:mm:ss")},{field:"operate",title:"操作",width:"180px",fixed:"right",align:"center",slots:{default:"operate"}}],data:[]};return(t,l)=>(S(),C(P,null,[o(e(m),{bordered:!1,bodyStyle:{padding:"10px",marginBottom:"8px"}},{default:r(()=>[o(e(y))]),_:1}),o(e(m),{bordered:!1,bodyStyle:{padding:"10px",height:"calc(100% - 50px)"},style:{height:"calc(100% - 100px)"}},{default:r(()=>[o(e(b),{windowWidth:1716}),o(e(L),{uid:e(u).uid,gridOptions:v,gridEvent:w},{operate:r(({row:a})=>[o(e(E),null,{default:r(()=>[o(e(p),{size:"small",type:"link",onClick:()=>(e(U)({path:a.streamPath},{onClose:e(n)}),e(s)())},{default:r(()=>l[0]||(l[0]=[d(" 播放 ")])),_:2},1032,["onClick"]),o(e(p),{size:"small",type:"link",onClick:O=>k(a)},{default:r(()=>l[1]||(l[1]=[d(" 编辑 ")])),_:2},1032,["onClick"]),o(e(p),{size:"small",type:"link",onClick:O=>_(a)},{default:r(()=>l[2]||(l[2]=[d(" 删除 ")])),_:2},1032,["onClick"])]),_:2},1024)]),_:1},8,["uid"])]),_:1})],64))}});export{tt as default};