import{r as N,ah as f,o as T,y as v,q as i,v as R,p,P as d,x as m,n as e,aj as D,s as z,ez as k,eA as V,S as w,l as C,bv as I}from"./index.8d733f79.js";const h={class:"dialog-footer"},E={__name:"failResult",setup(x,{expose:y}){const o=N(!1),t=f({factoryId:"",pageNo:1,pageSize:10}),g={1:"\u4FE1\u606F\u540C\u6B65\u5931\u8D25",2:"\u6570\u636E\u540C\u6B65\u5931\u8D25",3:"\u914D\u7F6E\u7ED3\u679C\u540C\u6B65\u5931\u8D25"},s=f({total:0,tableData:[],columns:[{prop:"busName",label:"name"},{prop:"syncType",label:"failType",formatter:a=>g[a.syncType]},{prop:"lastSyncTime",label:"lastSyncTime"},{prop:"retryCount",label:"syncRetryCount"},{prop:"failReason",label:"failReason"}]});function _(a){o.value=!0,t.factoryId=a.id,r()}async function r(){const a=await k(t);s.total=a.data.totalElements,s.tableData=a.data.content}function b(){V({factoryId:t.factoryId}).then(a=>{w.success(a.msg),u()})}function u(){o.value=!1}return y({showModal:_}),(a,l)=>{const c=C,S=I;return T(),v(S,{title:a.$t("failResult"),modelValue:e(o),"onUpdate:modelValue":l[2]||(l[2]=n=>z(o)?o.value=n:null),width:"800px","align-center":!0,class:"failResult"},{footer:i(()=>[R("div",h,[p(c,{onClick:u},{default:i(()=>[d(m(a.$t("cancel")),1)]),_:1}),p(c,{type:"primary",onClick:b},{default:i(()=>[d(m(a.$t("syncAgain")),1)]),_:1})])]),default:i(()=>[p(e(D),{tableWrapId:"failResult",style:{height:"100%"},columns:e(s).columns,tableData:e(s).tableData,total:e(s).total,pageNum:e(t).pageNo,"onUpdate:pageNum":l[0]||(l[0]=n=>e(t).pageNo=n),pageSize:e(t).pageSize,"onUpdate:pageSize":l[1]||(l[1]=n=>e(t).pageSize=n),onPagination:r},null,8,["columns","tableData","total","pageNum","pageSize"])]),_:1},8,["title","modelValue"])}}};export{E as default};
