var _=(C,c,a)=>new Promise((d,t)=>{var u=o=>{try{m(a.next(o))}catch(l){t(l)}},f=o=>{try{m(a.throw(o))}catch(l){t(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-D2AmS0aU.js";import{u as U}from"./index-LwlFn7Y4.js";import{r as q}from"./user.data-D5VRrih7.js";import{o as z,q as A,r as F}from"./user.api-BLHI3_6c.js";import{a8 as G,u as J}from"./index-B_2CoVdl.js";import{Q as L}from"./componentMap-CzCGDP7x.js";import P from"./BasicTable-Clbg3fHx.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./validator-jM63P_3m.js";import"./renderUtils-Cbe4E0PZ.js";import"./index-CkL00Q0a.js";import"./useFormItem-CWa0w7fA.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./index-ARbUvvsq.js";import"./useForm-CcjrODHR.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.js";import"./injectionKey-DPVn4AgL.js";const Xe=O({__name:"UserRecycleBinModal",emits:["success","register"],setup(C,{emit:c}){const{createConfirm:a}=J(),d=c,t=j([]),[u]=G(()=>{t.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:t,onChange:l};function l(e){t.value=e}function k(e){return _(this,null,function*(){yield A({userIds:e.id},m),d("success")})}function x(){k({id:v(r(t)).join(",")})}function R(e){return _(this,null,function*(){yield F({userIds:e.id},m)})}function T(){a({iconType:"warning",title:"删除",content:"确定要永久删除吗？删除后将不可恢复！",onOk:()=>R({id:v(r(t)).join(",")}),onCancel(){}})}function I(e){return[{label:"取回",icon:"ant-design:redo-outlined",popConfirm:{title:"是否确认还原",confirm:k.bind(null,e)}},{label:"彻底删除",icon:"ant-design:scissor-outlined",popConfirm:{title:"是否确认删除",confirm:R.bind(null,e)}}]}return(e,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(e.$attrs,{onRegister:r(u),title:"用户回收站",showOkBtn:!1,width:"1000px",destroyOnClose:""}),{default:i(()=>[n(r(P),{onRegister:r(f),rowSelection:o},{tableTitle:i(()=>[t.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{Xe as default};
