1 |
- var p=(e,u,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,u)).next())});import{i as I}from"./index-Ci2v5RRf.js";import{B as M,u as v}from"./useTable-CaBV0A9D.js";import{T as L}from"./index-BPgn07DB.js";import{ao as A,v as O,_ as P}from"./entry/index-CP6zkLsN-1726190694502.js";import W from"./RankTree-B6dO8Xei.js";import{u as $}from"./index-Bh1SitHa.js";import{M as E,g as F,c as N,s as V,d as T}from"./MemberDrawer-CG2-JAbN.js";import{P as U}from"./index-DG9kSxBw.js";import{bl as j,bm as G,M as H}from"./antd-Bp5u6ujY.js";import{l as q}from"./token-BahAjfSm.js";import{d as z,f as D,r as J,k as s,a6 as a,_ as y,a7 as k,a8 as r,G as S,a2 as B,a0 as R}from"./vue-CmlY4eyV.js";import"./ExclamationCircleOutlined-BR1Enpph.js";import"./useForm-DYTnyn58.js";import"./index-D5QnXKgB.js";import"./tree-Cz4SXb17.js";import"./copyTextToClipboard-o-L2h2rZ.js";import"./index-BAxfTGAN.js";import"./index-caYAhZot.js";import"./index-Ci1vkPDT.js";import"./index-B_Pz7KLI.js";import"./index-5JuY20kX.js";import"./useWindowSizeFn-c2oM7mG1.js";import"./plugin-BdCvh_fX.js";import"./uuid-BUBnBT7J.js";import"./onMountedOrActivated-C4hclMrd.js";import"./sortable.esm-CnNXHMH-.js";import"./useSortable-Dv9W1z21.js";import"./memberRank-4T_scAS4.js";import"./index-ownmt4lJ.js";import"./cloudFile-CVUE8zPI.js";import"./useContentViewHeight-DQ1krU9_.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(),u=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)=>{u.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 p(this,null,function*(){(yield T({ids:[t.id]})).code===0&&(yield o())})}function g(){return p(this,null,function*(){H.confirm({title:e("common.deleteConfirm"),icon:s(I.ExclamationCircleOutlined),onOk(){return p(this,null,function*(){(yield T({ids:u.value})).code===0&&(m.value=!1,yield o())})},onCancel(){}})})}function w(t){return p(this,null,function*(){(yield q(t.id)).code===0&&(yield o())})}function C(){return p(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,u,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 Ie=P(K,[["render",Q]]);export{Ie as default};
|