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-CF_FJn6P.js";import{u as U}from"./index-BN5Ac_IG.js";import{r as q}from"./user.data-BmeJpriz.js";import{o as z,q as A,r as F}from"./user.api-BUwWVSBN.js";import{a8 as G,u as J}from"./index-CYriLmQo.js";import{Q as L}from"./componentMap-7D1QIeNI.js";import P from"./BasicTable-DAfCfXmD.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-CxQILSKV.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./validator-0TDlyteC.js";import"./renderUtils-CGtepdOw.js";import"./index-BTSd5ebC.js";import"./useFormItem-CWa0w7fA.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JAddInput-CXT54-j9.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./depart.api-C9T5xfw6.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./JSelectDept-DorRVguN.js";import"./JPopup-KP1kIsae.js";import"./JEllipsis-287cEHxd.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./index-BkgeZpOO.js";import"./useForm-8o5KRzWo.js";import"./JAreaLinkage-DFTeDmm8.js";import"./JCodeEditor-_KZ8XnNK.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-XK54XB3r.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};
