1 |
- var c=(e,l,o)=>new Promise((u,s)=>{var p=t=>{try{r(o.next(t))}catch(i){s(i)}},a=t=>{try{r(o.throw(t))}catch(i){s(i)}},r=t=>t.done?u(t.value):Promise.resolve(t.value).then(p,a);r((o=o.apply(e,l)).next())});import{i as D}from"./index-BQgPd3bX.js";import{B as T,u as M}from"./useTable-B6PunZL5.js";import{T as S}from"./index-BIj58_Cj.js";import{ao as v,v as I,_ as $}from"./entry/index-DJx93RYF-1731481145019.js";import{u as E}from"./index-CzIUqxsa.js";import{M as A,c as N,s as V}from"./MemberRankDrawer-BV4SASas.js";import{g as F,d as C}from"./memberRank-DUXX3RzQ.js";import{M as L}from"./antd-CBeLo_oO.js";import{d as O,f as g,k as f,a9 as m,_ as k,$ as U,a7 as d,a6 as y,G as R,a2 as _,a0 as B}from"./vue-B5pbXMv7.js";import"./ExclamationCircleOutlined-Ca0mYuiu.js";import"./useForm-pwHPrILC.js";import"./index-D_SNX-7K.js";import"./tree-BtJaOqz0.js";import"./copyTextToClipboard-Dngb1Nn3.js";import"./index-BDsRYE32.js";import"./index-wDJjh9Os.js";import"./index-BzfGKMh3.js";import"./index-DkGmfgEA.js";import"./index-Cuu0w1HY.js";import"./useWindowSizeFn-BxA6-zLj.js";import"./plugin-C2XGVjF6.js";import"./uuid-BUBnBT7J.js";import"./onMountedOrActivated-C3HH8-CK.js";import"./sortable.esm-BEDva30o.js";import"./useSortable-lvT7rWOs.js";const j=O({name:"MemberRankManagement",components:{BasicTable:T,MemberRankDrawer:A,TableAction:S,Button:v},setup(){const{t:e}=I.useI18n(),l=g(),o=g(!1),[u,{openDrawer:s}]=E(),[p,{reload:a}]=M({title:e("sys.memberRank.memberRankList"),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:(n,w)=>{l.value=n,o.value=n.length>0}}});function r(){s(!0,{isUpdate:!1})}function t(n){s(!0,{record:n,isUpdate:!0})}function i(n){return c(this,null,function*(){(yield C({ids:[n.id]})).code===0&&(yield a())})}function b(){return c(this,null,function*(){L.confirm({title:e("common.deleteConfirm"),icon:f(D.ExclamationCircleOutlined),onOk(){return c(this,null,function*(){(yield C({ids:l.value})).code===0&&(o.value=!1,yield a())})},onCancel(){}})})}function h(){return c(this,null,function*(){yield a()})}return{t:e,registerTable:p,registerDrawer:u,handleCreate:r,handleEdit:t,handleDelete:i,handleSuccess:h,handleBatchDelete:b,showDeleteButton:o}}});function G(e,l,o,u,s,p){const a=m("Button"),r=m("a-button"),t=m("TableAction"),i=m("BasicTable"),b=m("MemberRankDrawer");return k(),U("div",null,[f(i,{onRegister:e.registerTable},{tableTitle:d(()=>[e.showDeleteButton?(k(),y(a,{key:0,type:"primary",danger:"",preIcon:"ant-design:delete-outlined",onClick:e.handleBatchDelete},{default:d(()=>[R(_(e.t("common.delete")),1)]),_:1},8,["onClick"])):B("",!0)]),toolbar:d(()=>[f(r,{type:"primary",onClick:e.handleCreate},{default:d(()=>[R(_(e.t("sys.memberRank.addMemberRank")),1)]),_:1},8,["onClick"])]),bodyCell:d(({column:h,record:n})=>[h.key==="action"?(k(),y(t,{key:0,actions:[{icon:"clarity:note-edit-line",onClick:e.handleEdit.bind(null,n)},{icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:e.t("common.deleteConfirm"),placement:"left",confirm:e.handleDelete.bind(null,n)}}]},null,8,["actions"])):B("",!0)]),_:1},8,["onRegister"]),f(b,{onRegister:e.registerDrawer,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])])}const fe=$(j,[["render",G]]);export{fe as default};
|