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-XZKTTfG1.js";import{u as U}from"./index-KOQNKxnC.js";import{r as q}from"./user.data-DNJy-IxE.js";import{o as z,q as A,r as F}from"./user.api-DAu0nuTv.js";import{a8 as G,u as J}from"./index-CLZzJyTP.js";import{Q as L}from"./componentMap-DpsJvoqz.js";import P from"./BasicTable-DUJWN3yz.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./antd-vue-vendor-CahNzUUa.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-DvqyyN77.js";import"./useWindowSizeFn-D9PllI8g.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./validator-Dx9kcZ5e.js";import"./renderUtils-BgFeePLc.js";import"./index-C7yPiS0L.js";import"./useFormItem-IOFWTdED.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JAddInput-B36c3B5x.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./depart.api-DHG2p2Yd.js";import"./JImageUpload-BFwNYdm5.js";import"./JDictSelectTag-CfF54ALX.js";import"./JSelectDept-CaEHrQp6.js";import"./JPopup-BvqhHpPl.js";import"./JEllipsis-C_gT_vEQ.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./index-ByX9XNkE.js";import"./useForm-Dx3lJ3DG.js";import"./JAreaLinkage-M9TGy8nY.js";import"./JCodeEditor-CR57XeIe.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CWOTSpxK.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};
