| 12 |
- import{d as h,b7 as c,b6 as S,b0 as k,Z as D,a1 as E,n as r,a0 as a,T as e,a2 as F,aC as T,b4 as x,b9 as R,aG as L,aQ as d,a5 as p,a6 as m,ba as $,bC as B}from"./index-a8341fa1.js";import{u as z}from"./index-7b240cde.js";import"./dayjs-919e6097.js";import{_ as H}from"./scroll-tip.vue_vue_type_script_setup_true_lang-d66c47a8.js";import{q as I,g as M,d as V}from"./schema-20900b78.js";import{d as q,p as A,u as y}from"./pullOnStart-9eaa98c6.js";import{u as K}from"./usePlay-b0788e52.js";import"./stream-type-63b6e1e6.js";import"./index-cb44e888.js";import"./index-a35c88a6.js";import"./index-d1462287.js";import"./jb4-7b5b6ba3.js";import"./canvas-b3f2b616.js";import"./index-04d608f8.js";import"./gb28181-0e98f3aa.js";import"./index-5352c15f.js";import"./index-44447dae.js";const N=h({name:"StreamProxy"}),ut=h({...N,setup(U){const{t:l}=T();c.renderer.add("DeviceStatus",{renderDefault(t,u){const{row:o}=u;return q(o.status)}}),c.renderer.add("PullOnStart",{renderDefault(t,u){const{row:o}=u;return A(o.pullOnStart)}});const{pause:i,resume:n}=S(s),g=()=>{y({updateList:s,pause:i,resume:n})},{FormilyForm:_}=k({schema:I(g,l("routes.pullProxy.添加拉流代理"))}),w={toggleRowExpand:({expanded:t})=>{t?i():n()}},f=z(),P=t=>{f.tableRef.reloadData(t||[])};function s(){return M().then(t=>{P(t)}).catch(t=>{console.error(`stream-proxy-getList-error: ${t}`)})}s();const b=t=>{$.confirm({title:l("routes.streamPush.提示"),content:l("routes.pullProxy.确定要删除吗"),onOk:()=>{V(t).then(s)}})},v=t=>{y({updateList:s,pause:i,resume:n,row:t})},O={maxHeight:"100%",rowConfig:{keyField:"ID",useKey:!0},columnConfig:{useKey:!0},columns:[{field:"name",get title(){return l("routes.pullProxy.名称")},showOverflow:"tooltip",width:"200px",fixed:"left",type:"html"},{field:"streamPath",get title(){return l("routes.pullProxy.流标识")},showOverflow:"tooltip",width:"200px",fixed:"left",type:"html"},{field:"pullURL",get title(){return l("routes.pullProxy.源地址")},showOverflow:"tooltip",minWidth:"250px",type:"html"},{field:"type",get title(){return l("routes.pullProxy.类型")},showOverflow:"tooltip",width:"80px",fixed:"left",type:"html"},{field:"status",get title(){return l("routes.pullProxy.状态")},showOverflow:"tooltip",width:"80px",fixed:"left",cellRender:{name:"DeviceStatus"}},{field:"rtt",title:"RTT",showOverflow:"tooltip",width:"60px",fixed:"left"},{field:"pullOnStart",get title(){return l("routes.pullProxy.拉流模式")},showOverflow:"tooltip",width:"120px",cellRender:{name:"PullOnStart"}},{field:"createTime",get title(){return l("routes.pullProxy.创建时间")},width:"200px",formatter:({cellValue:t})=>B.toDateString(new Date(t),"yyyy-MM-dd HH:mm:ss")},{field:"operate",get title(){return l("routes.pullProxy.操作")},width:"180px",fixed:"right",align:"center",slots:{default:"operate"}}],data:[]};return(t,u)=>(D(),E(F,null,[r(e(x),{bordered:!1,bodyStyle:{padding:"10px",marginBottom:"8px"}},{default:a(()=>[r(e(_))]),_:1}),r(e(x),{bordered:!1,bodyStyle:{padding:"10px",height:"calc(100% - 50px)"},style:{height:"calc(100% - 100px)"}},{default:a(()=>[r(e(H),{windowWidth:1716}),r(e(R),{uid:e(f).uid,gridOptions:O,gridEvent:w},{operate:a(({row:o})=>[r(e(L),null,{default:a(()=>[r(e(d),{size:"small",type:"link",disabled:![1,2].includes(o.status),onClick:()=>(e(K)({path:o.streamPath},{onClose:e(n)}),e(i)())},{default:a(()=>[p(m(e(l)("routes.pullProxy.播放")),1)]),_:2},1032,["disabled","onClick"]),r(e(d),{size:"small",type:"link",onClick:C=>v(o)},{default:a(()=>[p(m(e(l)("routes.pullProxy.编辑")),1)]),_:2},1032,["onClick"]),r(e(d),{size:"small",type:"link",onClick:C=>b(o)},{default:a(()=>[p(m(e(l)("routes.pullProxy.删除")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),_:1},8,["uid"])]),_:1})],64))}});export{ut as default};
- //# sourceMappingURL=pull-9d434c6f.js.map
|