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-fae2b924.js";import{aa as b,aV as m,aW as D,aG as E,U as p,M as F}from"./radical-24ede98f.js";import{V as f,k as L,x as R}from"./index-bad227d6.js";import{u as V}from"./index-ac72395e.js";import{q as $,g as B,d as M}from"./schema-13fcd6d1.js";import{d as T,p as z,u as c}from"./pullOnStart-b9845728.js";import{u as H}from"./global-d3aa2cdf.js";import{u as U}from"./usePlay-a8635f7c.js";import"./index-b7a6e0fa.js";import"./jb4-5a340080.js";import"./canvas-14fb4930.js";import"./gb28181-e318e8a2.js";const W=h({name:"StreamProxy"}),et=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}=b({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(D),{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",disabled:![1,2].includes(a.status),onClick:()=>(e(U)({path:a.streamPath},{onClose:e(n)}),e(s)())},{default:r(()=>l[0]||(l[0]=[d(" 播放 ")])),_:2},1032,["disabled","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{et as default};
|