1 |
- var l=(a,r,o)=>new Promise((n,s)=>{var i=t=>{try{e(o.next(t))}catch(c){s(c)}},d=t=>{try{e(o.throw(t))}catch(c){s(c)}},e=t=>t.done?n(t.value):Promise.resolve(t.value).then(i,d);e((o=o.apply(a,r)).next())});import{d as m,r as u,ai as y,S as f,o as _,a6 as k,_ as g,$ as h,k as x,a8 as C,a1 as I}from"./vue-CmlY4eyV.js";import{P as R,_ as T}from"./entry/index-CP6zkLsN-1726190694502.js";import{v}from"./sopTask-DE5jY3C-.js";import{aX as S,aw as $}from"./antd-Bp5u6ujY.js";const w=m({name:"PerformTasks",components:{"a-table":S,"a-pagination":$},setup(){const a=u([]),r=y(),o=f(),n=u({spinning:!0}),s=u([{title:"序号",dataIndex:"index",key:"index"},{title:"来源类型",dataIndex:"sourceType",key:"sourceType",customRender:({record:e})=>e.sourceType==3?"阶段":"节点"},{title:"SOP任务节点",dataIndex:"name",key:"name"},{title:"总数",dataIndex:"totalCount",key:"totalCount"},{title:"成功数",dataIndex:"successCount",key:"successCount"},{title:"失败数",dataIndex:"failureCount",key:"failureCount"},{title:"成功率",dataIndex:"successRate",key:"successRate",customRender:({text:e})=>`${e}%`},{title:"操作",key:"action",slots:{customRender:"action"}}]),i=u({total:0,pageSize:1/0,current:1,showTotal:e=>`共 ${e} 条`});return _(()=>l(this,null,function*(){const e=r.query.task_id;try{let t=yield v({id:Number(e)});t&&Array.isArray(t.data)&&(t.data.forEach((c,p)=>{c.index=p+1}),a.splice(0,a.length,...t.data),i.total=t.data.length)}catch(t){}finally{n.spinning=!1}})),{data:a,columns:s,pagination:i,viewRecord:e=>{o.push({path:R.SEND_TASKS,query:{sourceId:e.sourceId,sourceType:e.sourceType}})},loading:n}}}),b={class:"container"},B=["onClick"];function P(a,r,o,n,s,i){const d=k("a-table");return g(),h("div",b,[x(d,{columns:a.columns,loading:a.loading.spinning,dataSource:a.data,pagination:!1,class:"table-style"},{action:C(({record:e})=>[I("a",{onClick:t=>a.viewRecord(e)},"发送记录",8,B)]),_:1},8,["columns","loading","dataSource"])])}const V=T(w,[["render",P],["__scopeId","data-v-512572e4"]]);export{V as default};
|