var _=(C,c,a)=>new Promise((d,e)=>{var u=o=>{try{m(a.next(o))}catch(l){e(l)}},f=o=>{try{m(a.throw(o))}catch(l){e(l)}},m=o=>o.done?d(o.value):Promise.resolve(o.value).then(u,f);m((a=a.apply(C,c)).next())});import{d as O,f as j,U as p,a2 as y,ad as b,af as i,k as n,u as r,V as B,G as w,J as v,ag as D}from"./vue-vendor-CxLCUzY4.js";import{B as H}from"./index-zKZnG1QC.js";import{u as U}from"./index-gyz1IdHU.js";import{r as q}from"./user.data-CKKSq6sB.js";import{o as z,q as A,r as F}from"./user.api-CoaMxYm2.js";import{a8 as G,u as J}from"./index-Cy4uayzW.js";import{Q as L}from"./componentMap-0iK4HQBq.js";import P from"./BasicTable-CgafrQwz.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./antd-vue-vendor-CahNzUUa.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-Bdn0r8CG.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./validator-CyHCj96y.js";import"./renderUtils-BcsccCoe.js";import"./index-tDBMxW9-.js";import"./useFormItem-IOFWTdED.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JAddInput-DP4caUmw.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./depart.api-B8q8MC-j.js";import"./JImageUpload-C5OCTlCG.js";import"./JDictSelectTag-CalJXNVe.js";import"./JSelectDept-D-TUaHvK.js";import"./JPopup-CVHkQZFq.js";import"./JEllipsis-TuDc52fh.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.js";import"./index-BN26Feep.js";import"./useForm-DfoT2G6J.js";import"./JAreaLinkage-CTMEfTuh.js";import"./JCodeEditor-U9QIstNN.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CZdChTcP.js";import"./injectionKey-DPVn4AgL.js";const Yt=O({__name:"UserRecycleBinModal",emits:["success","register"],setup(C,{emit:c}){const{createConfirm:a}=J(),d=c,e=j([]),[u]=G(()=>{e.value=[]}),[f,{reload:m}]=U({api:z,columns:q,rowKey:"id",striped:!0,useSearchForm:!1,showTableSetting:!1,clickToRowSelect:!1,bordered:!0,showIndexColumn:!1,pagination:!0,tableSetting:{fullScreen:!0},canResize:!1,actionColumn:{width:150,title:"操作",dataIndex:"action",fixed:void 0}}),o={type:"checkbox",columnWidth:50,selectedRowKeys:e,onChange:l};function l(t){e.value=t}function k(t){return _(this,null,function*(){yield A({userIds:t.id},m),d("success")})}function x(){k({id:v(r(e)).join(",")})}function R(t){return _(this,null,function*(){yield F({userIds:t.id},m)})}function T(){a({iconType:"warning",title:"删除",content:"确定要永久删除吗？删除后将不可恢复！",onOk:()=>R({id:v(r(e)).join(",")}),onCancel(){}})}function I(t){return[{label:"取回",icon:"ant-design:redo-outlined",popConfirm:{title:"是否确认还原",confirm:k.bind(null,t)}},{label:"彻底删除",icon:"ant-design:scissor-outlined",popConfirm:{title:"是否确认删除",confirm:R.bind(null,t)}}]}return(t,s)=>{const g=p("Icon"),h=p("a-menu-item"),S=p("a-menu"),M=p("a-button"),K=p("a-dropdown");return y(),b(r(H),D(t.$attrs,{onRegister:r(u),title:"用户回收站",showOkBtn:!1,width:"1000px",destroyOnClose:""}),{default:i(()=>[n(r(P),{onRegister:r(f),rowSelection:o},{tableTitle:i(()=>[e.value.length>0?(y(),b(K,{key:0},{overlay:i(()=>[n(S,null,{default:i(()=>[n(h,{key:"1",onClick:T},{default:i(()=>[n(g,{icon:"ant-design:delete-outlined"}),s[0]||(s[0]=w(" 批量删除 "))]),_:1}),n(h,{key:"1",onClick:x},{default:i(()=>[n(g,{icon:"ant-design:redo-outlined"}),s[1]||(s[1]=w(" 批量还原 "))]),_:1})]),_:1})]),default:i(()=>[n(M,null,{default:i(()=>[s[2]||(s[2]=w("批量操作 ")),n(g,{icon:"ant-design:down-outlined"})]),_:1})]),_:1})):B("",!0)]),bodyCell:i(({column:V,record:N})=>[V.key==="action"?(y(),b(r(L),{key:0,actions:I(N)},null,8,["actions"])):B("",!0)]),_:1},8,["onRegister"])]),_:1},16,["onRegister"])}}});export{Yt as default};
