PageSourceSearch

https://chengzisoft.top/static/TranscodeDeadLetterManage-WqJEyB7U.js

js chengzisoft.top collected 2026-10-06 14:14:31 UTC 3,584 bytes, 1 lines download raw bytes

1import{n as w,E as _}from"./element-plus-2sRBskV4.js";import{_ as T,cL as D,cM as I}from"./index-Dp80kthl.js";import{P as x,R as d,a3 as a,Z as i,_ as z,Q as L,au as r,av as k,O as h,a1 as g,a2 as f}from"./vue-vendor-V29MIewp.js";const V={name:"TranscodeDeadLetterManage",data(){return{loading:!1,items:[],total:0,page:1,pageSize:20,status:"",requeuingId:null}},created(){this.reload()},methods:{async reload(){this.loading=!0;try{const e=await I({page:this.page,page_size:this.pageSize,status:this.status});this.items=e.data.items||[],this.total=e.data.total||0}catch{_.error("加载转码死信失败")}finally{this.loading=!1}},changePage(e){this.page=e,this.reload()},statusLabel(e){return e.requeued_at?"已重放":e.processed_at?"已处理":"待处理"},statusType(e){return e.requeued_at?"warning":e.processed_at?"info":"danger"},formatTime(e){return e?String(e).replace("T"," ").slice(0,19):"—"},async requeue(e){var t,p;try{await w.confirm(`确定将死信 #${e.id}(视频 ${e.video_id})重新入队吗?视频将回到处理中状态。`,"重新入队",{type:"warning"})}catch{return}this.requeuingId=e.id;try{await D(e.id),_.success("已重新入队"),await this.reload()}catch(u){_.error(((p=(t=u==null?void 0:u.response)==null?void 0:t.data)==null?void 0:p.msg)||"重新入队失败")}finally{this.requeuingId=null}}}},B={class:"tdl-manage"},M={class:"tdl-manage__head"},S={class:"tdl-manage__actions"};function E(e,t,p,u,l,o){const c=r("el-option"),b=r("el-select"),m=r("el-button"),s=r("el-table-column"),v=r("el-tag"),y=r("el-table"),q=r("el-pagination"),C=k("loading");return h(),x("div",B,[d("header",M,[t[2]||(t[2]=d("div",null,[d("h2",null,"转码死信"),d("p",null,"转码重试耗尽的任务会进入死信队列并记录于此;可按状态筛选并重新入队。")],-1)),d("div",S,[a(b,{modelValue:l.status,"onUpdate:modelValue":t[0]||(t[0]=n=>l.status=n),class:"tdl-manage__status",placeholder:"全部状态",onChange:o.reload},{default:i(()=>[a(c,{label:"全部",value:""}),a(c,{label:"待处理",value:"pending"}),a(c,{label:"已重放",value:"requeued"}),a(c,{label:"已处理",value:"processed"})]),_:1},8,["modelValue","onChange"]),a(m,{loading:l.loading,onClick:o.reload},{default:i(()=>[...t[1]||(t[1]=[g("刷新",-1)])]),_:1},8,["loading","onClick"])])]),z((h(),L(y,{data:l.items,border:"",stripe:""},{default:i(()=>[a(s,{prop:"id",label:"ID",width:"80"}),a(s,{prop:"video_id",label:"视频ID",width:"90"}),a(s,{prop:"reason",label:"失败原因","min-width":"220","show-overflow-tooltip":""}),a(s,{prop:"retry_count",label:"重试次数",width:"90"}),a(s,{label:"状态",width:"100"},{default:i(({row:n})=>[a(v,{type:o.statusType(n),size:"small"},{default:i(()=>[g(f(o.statusLabel(n)),1)]),_:2},1032,["type"])]),_:1}),a(s,{label:"创建时间",width:"170"},{default:i(({row:n})=>[g(f(o.formatTime(n.created_at)),1)]),_:1}),a(s,{prop:"requeued_count",label:"重放次数",width:"90"}),a(s,{label:"操作",width:"120",fixed:"right"},{default:i(({row:n})=>[a(m,{type:"primary",size:"small",loading:l.requeuingId===n.id,disabled:l.requeuingId!==null&&l.requeuingId!==n.id,onClick:N=>o.requeue(n)},{default:i(()=>[...t[3]||(t[3]=[g(" 重新入队 ",-1)])]),_:1},8,["loading","disabled","onClick"])]),_:1})]),_:1},8,["data"])),[[C,l.loading]]),a(q,{class:"tdl-manage__pager",layout:"total, prev, pager, next",total:l.total,"page-size":l.pageSize,"current-page":l.page,onCurrentChange:o.changePage},null,8,["total","page-size","current-page","onCurrentChange"])])}const Q=T(V,[["render",E],["__scopeId","data-v-8a598c8b"]]);export{Q as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.