pull-fa64c838.js 3.7 KB

12
  1. import{d as h,b7 as c,b6 as k,b0 as C,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 $,bD as B}from"./index-1f7267da.js";import{u as z}from"./index-4ed641ec.js";import"./dayjs-919e6097.js";import{_ as H}from"./scroll-tip.vue_vue_type_script_setup_true_lang-0ce28faf.js";import{q as I,g as M,d as V}from"./schema-28bded7e.js";import{d as q,p as A,u as y}from"./pullOnStart-72682b8f.js";import{u as K}from"./usePlay-582ead8e.js";import"./stream-type-63b6e1e6.js";import"./index-6ec20f53.js";import"./index-2e39ef19.js";import"./index-0f7fd87e.js";import"./gb28181-59fe2452.js";import"./jb4-a2294d1a.js";import"./canvas-b3f2b616.js";import"./index-5292cc0d.js";import"./index-e1783866.js";import"./index-e3e66b29.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}=k(s),g=()=>{y({updateList:s,pause:i,resume:n})},{FormilyForm:_}=C({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:S=>v(o)},{default:a(()=>[p(m(e(l)("routes.pullProxy.编辑")),1)]),_:2},1032,["onClick"]),r(e(d),{size:"small",type:"link",onClick:S=>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};
  2. //# sourceMappingURL=pull-fa64c838.js.map