1 |
- var u=(e,p,i)=>new Promise((m,d)=>{var f=n=>{try{o(i.next(n))}catch(l){d(l)}},h=n=>{try{o(i.throw(n))}catch(l){d(l)}},o=n=>n.done?m(n.value):Promise.resolve(n.value).then(f,h);o((i=i.apply(e,p)).next())});import{i as I}from"./index-BafL01UE.js";import{B as M,u as v}from"./useTable-B21ZSRGf.js";import{T as L}from"./index-CreXae4i.js";import{ao as A,v as O,_ as P}from"./entry/index-CcR3XhtN-1721963535400.js";import W from"./RankTree-wuuSWYGv.js";import{u as $}from"./index-Dqidnd8s.js";import{M as E,g as F,c as N,s as V,d as T}from"./MemberDrawer-DPt9jYrF.js";import{P as U}from"./index-Bpk7LkZZ.js";import{bl as j,bm as G,M as H}from"./antd-c1uHJHtu.js";import{l as q}from"./token-lxN8F8HG.js";import{d as z,f as D,r as J,k as s,a7 as a,_ as y,a8 as k,a9 as r,G as S,a1 as B,ab as R}from"./vue-YAQxJ0SI.js";import"./ExclamationCircleOutlined-zuBeZsMm.js";import"./useForm-is4aOu_w.js";import"./index-SFOPTrfU.js";import"./tree-DPeXdKHt.js";import"./copyTextToClipboard-B66dlzI3.js";import"./index-CRJT002a.js";import"./index-D0dQHoLY.js";import"./index-D9thwvDd.js";import"./index-D8KFrDWL.js";import"./index-Bcn8BOBC.js";import"./useWindowSizeFn-D6dCWzyH.js";import"./plugin-BtkwVqDc.js";import"./onMountedOrActivated-9LbCg5GM.js";import"./sortable.esm-CnNXHMH-.js";import"./useSortable-X3pPIR41.js";import"./memberRank-Cyb3Bzkj.js";import"./index-B4AW9tXf.js";import"./cloudFile-DDs4_6zs.js";import"./useContentViewHeight-WqgjfXjv.js";const K=z({name:"MemberManagement",components:{BasicTable:M,MemberDrawer:E,TableAction:L,Button:A,PageWrapper:U,Row:j,Col:G,RankTree:W},setup(){const{t:e}=O.useI18n(),p=D(),i=J({}),m=D(!1),[d,{openDrawer:f}]=$(),[h,{reload:o}]=v({title:e("sys.member.memberList"),api:F,columns:N,formConfig:{labelWidth:120,schemas:V},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!1,clickToRowSelect:!1,actionColumn:{width:30,title:e("common.action"),dataIndex:"action",fixed:void 0},rowKey:"id",rowSelection:{type:"checkbox",onChange:(t,c)=>{p.value=t,m.value=t.length>0}}});function n(){f(!0,{isUpdate:!1})}function l(t){f(!0,{record:t,isUpdate:!0})}function b(t){return u(this,null,function*(){(yield T({ids:[t.id]})).code===0&&(yield o())})}function g(){return u(this,null,function*(){H.confirm({title:e("common.deleteConfirm"),icon:s(I.ExclamationCircleOutlined),onOk(){return u(this,null,function*(){(yield T({ids:p.value})).code===0&&(m.value=!1,yield o())})},onCancel(){}})})}function w(t){return u(this,null,function*(){(yield q(t.id)).code===0&&(yield o())})}function C(){return u(this,null,function*(){yield o()})}function _(t){i.rankId=t,o()}return{t:e,registerTable:h,registerDrawer:d,handleCreate:n,handleEdit:l,handleDelete:b,handleSuccess:C,handleBatchDelete:g,handleSelect:_,handleLogout:w,showDeleteButton:m,searchInfo:i}}});function Q(e,p,i,m,d,f){const h=a("RankTree"),o=a("Col"),n=a("Button"),l=a("a-button"),b=a("TableAction"),g=a("BasicTable"),w=a("Row"),C=a("MemberDrawer"),_=a("PageWrapper");return y(),k(_,{dense:"",contentFullHeight:""},{default:r(()=>[s(w,null,{default:r(()=>[s(o,{span:5},{default:r(()=>[s(h,{onSelect:e.handleSelect},null,8,["onSelect"])]),_:1}),s(o,{span:19},{default:r(()=>[s(g,{onRegister:e.registerTable,searchInfo:e.searchInfo},{tableTitle:r(()=>[e.showDeleteButton?(y(),k(n,{key:0,type:"primary",danger:"",preIcon:"ant-design:delete-outlined",onClick:e.handleBatchDelete},{default:r(()=>[S(B(e.t("common.delete")),1)]),_:1},8,["onClick"])):R("",!0)]),toolbar:r(()=>[s(l,{type:"primary",onClick:e.handleCreate},{default:r(()=>[S(B(e.t("sys.member.addMember")),1)]),_:1},8,["onClick"])]),bodyCell:r(({column:t,record:c})=>[t.key==="action"?(y(),k(b,{key:0,actions:[{icon:"clarity:note-edit-line",onClick:e.handleEdit.bind(null,c)},{icon:"bx:log-out-circle",color:"error",tooltip:e.t("sys.user.forceLoggingOut"),popConfirm:{title:e.t("sys.user.forceLoggingOut")+"?",placement:"left",confirm:e.handleLogout.bind(null,c)}},{icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:e.t("common.deleteConfirm"),placement:"left",confirm:e.handleDelete.bind(null,c)}}]},null,8,["actions"])):R("",!0)]),_:1},8,["onRegister","searchInfo"])]),_:1})]),_:1}),s(C,{onRegister:e.registerDrawer,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])]),_:1})}const Re=P(K,[["render",Q]]);export{Re as default};
|