| 12 |
- import{d as h,b6 as c,b5 as k,a$ as C,Z as D,a1 as E,n as l,a0 as a,T as e,a2 as F,aC as T,b3 as x,b8 as R,aP as d,a5 as p,a6 as m,b9 as $,bp as L}from"./index-8a67e3df.js";import{u as B}from"./index-c6560d80.js";import"./dayjs-919e6097.js";import{_ as z}from"./scroll-tip.vue_vue_type_script_setup_true_lang-ad39136f.js";import{q as H,g as I,d as M}from"./schema-2e778db4.js";import{d as V,p as q,u as y}from"./pullOnStart-de2f464a.js";import{u as A}from"./usePlay-e0a28163.js";import{_ as K}from"./index-66456a53.js";import"./stream-type-63b6e1e6.js";import"./index-6c00bb26.js";import"./index-82d2c624.js";import"./index-1e695827.js";import"./jb4-5138f1a1.js";import"./canvas-2aaf4e1d.js";import"./index-6a257713.js";import"./gb28181-a8ace5d9.js";import"./index-4c0c9569.js";import"./index-a5661619.js";const N=h({name:"StreamProxy"}),dt=h({...N,setup(U){const{t:r}=T();c.renderer.add("DeviceStatus",{renderDefault(t,u){const{row:o}=u;return V(o.status)}}),c.renderer.add("PullOnStart",{renderDefault(t,u){const{row:o}=u;return q(o.pullOnStart)}});const{pause:i,resume:n}=k(s),g=()=>{y({updateList:s,pause:i,resume:n})},{FormilyForm:_}=C({schema:H(g,r("routes.pullProxy.添加拉流代理"))}),w={toggleRowExpand:({expanded:t})=>{t?i():n()}},f=B(),P=t=>{f.tableRef.reloadData(t||[])};function s(){return I().then(t=>{P(t)}).catch(t=>{console.error(`stream-proxy-getList-error: ${t}`)})}s();const b=t=>{$.confirm({title:r("routes.streamPush.提示"),content:r("routes.pullProxy.确定要删除吗"),onOk:()=>{M(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 r("routes.pullProxy.名称")},showOverflow:"tooltip",width:"200px",fixed:"left",type:"html"},{field:"streamPath",get title(){return r("routes.pullProxy.流标识")},showOverflow:"tooltip",width:"200px",fixed:"left",type:"html"},{field:"pullURL",get title(){return r("routes.pullProxy.源地址")},showOverflow:"tooltip",minWidth:"250px",type:"html"},{field:"type",get title(){return r("routes.pullProxy.类型")},showOverflow:"tooltip",width:"80px",fixed:"left",type:"html"},{field:"status",get title(){return r("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 r("routes.pullProxy.拉流模式")},showOverflow:"tooltip",width:"120px",cellRender:{name:"PullOnStart"}},{field:"createTime",get title(){return r("routes.pullProxy.创建时间")},width:"200px",formatter:({cellValue:t})=>L.toDateString(new Date(t),"yyyy-MM-dd HH:mm:ss")},{field:"operate",get title(){return r("routes.pullProxy.操作")},width:"180px",fixed:"right",align:"center",slots:{default:"operate"}}],data:[]};return(t,u)=>(D(),E(F,null,[l(e(x),{bordered:!1,bodyStyle:{padding:"10px",marginBottom:"8px"}},{default:a(()=>[l(e(_))]),_:1}),l(e(x),{bordered:!1,bodyStyle:{padding:"10px",height:"calc(100% - 50px)"},style:{height:"calc(100% - 100px)"}},{default:a(()=>[l(e(z),{windowWidth:1716}),l(e(R),{uid:e(f).uid,gridOptions:O,gridEvent:w},{operate:a(({row:o})=>[l(e(K),null,{default:a(()=>[l(e(d),{size:"small",type:"link",disabled:![1,2].includes(o.status),onClick:()=>(e(A)({path:o.streamPath},{onClose:e(n)}),e(i)())},{default:a(()=>[p(m(e(r)("routes.pullProxy.播放")),1)]),_:2},1032,["disabled","onClick"]),l(e(d),{size:"small",type:"link",onClick:S=>v(o)},{default:a(()=>[p(m(e(r)("routes.pullProxy.编辑")),1)]),_:2},1032,["onClick"]),l(e(d),{size:"small",type:"link",onClick:S=>b(o)},{default:a(()=>[p(m(e(r)("routes.pullProxy.删除")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),_:1},8,["uid"])]),_:1})],64))}});export{dt as default};
- //# sourceMappingURL=pull-28df1ebc.js.map
|