import{d as P,u as K,p as r,o as Y,i as g,a as $,z as L,m as n,k as s,e as a,K as I,L as N,v as y}from"./index-deffec86.js";import{I as U}from"./IndexPagePro-904e4e7b.js";import{_ as q}from"./index.vue_vue_type_script_setup_true_name_ProTable_lang-de39478e.js";import{_ as H}from"./index.vue_vue_type_script_setup_true_name_SearchForm_lang-692eb4fd.js";import{T as O}from"./index-0e777de8.js";import{u as W}from"./useTable-823c55eb.js";import{u as j}from"./useHandleData-9c720574.js";import{c as E,d as G}from"./syncManage-7078ee2e.js";import{g as J}from"./common-8a6acaa7.js";import{u as Q}from"./useMatchActivity-eaf6c5c6.js";import"./sortable.esm-441d9e5f.js";import"./tagManage-2aab0a1e.js";const ue=P({__name:"record",setup(X){const h=K(),b=r(!0),C=r(null),k=r(null),c=r([]),u=r([]),p=r(""),v=r([{label:"\u65F6\u95F4\u7B5B\u9009",prop:"time",search:{el:"date-picker",props:{type:"daterange",format:"YYYY/MM/DD",valueFormat:"x"},placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4"}}]),w=r([{type:"index",label:"\u5E8F\u53F7",width:70,fixed:"left"},{prop:"operator_time",label:"\u64CD\u4F5C\u65F6\u95F4"},{prop:"sync_type_str",label:"\u540C\u6B65\u7C7B\u578B"},{prop:"sync_count",label:"\u603B\u8BA1"},{prop:"success_count",label:"\u6210\u529F"},{prop:"fail_count",label:"\u5931\u8D25"},{prop:"operation",label:"\u64CD\u4F5C",fixed:"right",width:300}]),x=e=>(e.time&&(e.start_time=e.time[0]/1e3,e.end_time=e.time[1]/1e3,e.start_date=e.time[0]/1e3,e.end_date=e.time[1]/1e3),e),{dataCallBack:z}=Q([]),{tableData:S,pageable:i,baseParam:T,searchParam:m,handleSizeChange:D,handleCurrentChange:R,getTableList:d,search:f,reset:F}=W(E,{},z,x),M=e=>{m.value.company_area_id=e,f()},V=async()=>{var l;let e=await J({});c.value=e.data;let t=(l=e==null?void 0:e.data[0])==null?void 0:l.company_area_id;u.value=[t],p.value=String(t)},_=async(e,t)=>{switch(t){case 1:h.push({name:"systemManageSyncManageDetail",query:{record_id:e.record_id}});break;case 2:await j(G,{record_id:e.record_id},"\u518D\u6B21\u63A8\u9001");break}d()};return Y(async()=>{await V(),T.value.company_area_id=p.value,await d()}),(e,t)=>{const l=g("el-button"),A=g("el-pagination");return $(),L(U,{filterWidth:280},{treeCard:n(()=>[s(O,{ref_key:"TreeFilterRef",ref:k,title:"\u533A\u57DF",data:a(c),defaultValue:a(p),expandKeys:a(u),onChange:M},null,8,["data","defaultValue","expandKeys"])]),searchForm:n(()=>[I(s(H,{"search-param":a(m),columns:a(v),search:a(f),reset:a(F)},null,8,["search-param","columns","search","reset"]),[[N,a(b)]])]),pagination:n(()=>[s(A,{"current-page":a(i).page,"onUpdate:currentPage":t[0]||(t[0]=o=>a(i).page=o),"page-size":a(i).size,"onUpdate:pageSize":t[1]||(t[1]=o=>a(i).size=o),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:a(i).count,onSizeChange:a(D),onCurrentChange:a(R)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),default:n(()=>[s(q,{ref_key:"proTableRef",ref:C,columns:a(w),data:a(S)},{operation:n(o=>[s(l,{type:"primary",link:"",onClick:B=>_(o.row,1)},{default:n(()=>t[2]||(t[2]=[y("\u67E5\u770B")])),_:2},1032,["onClick"]),s(l,{type:"primary",disabled:o.row.fail_count==0,link:"",onClick:B=>_(o.row,2)},{default:n(()=>t[3]||(t[3]=[y(" \u518D\u6B21\u63A8\u9001 ")])),_:2},1032,["disabled","onClick"])]),_:1},8,["columns","data"])]),_:1})}}});export{ue as default};
