2 lines
3.8 KiB
JavaScript
2 lines
3.8 KiB
JavaScript
var E=Object.defineProperty;var w=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var F=(o,e,t)=>e in o?E(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,y=(o,e)=>{for(var t in e||(e={}))R.call(e,t)&&F(o,t,e[t]);if(w)for(var t of w(e))S.call(e,t)&&F(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((l,s)=>{var d=r=>{try{a(t.next(r))}catch(n){s(n)}},p=r=>{try{a(t.throw(r))}catch(n){s(n)}},a=r=>r.done?l(r.value):Promise.resolve(r.value).then(d,p);a((t=t.apply(o,e)).next())});import{u as M,B as N}from"./useTable.0c2c6d52.js";import{T as U}from"./useForm.7f0ae6dc.js";import{a as A,aA as V,bN as j,o as h,h as D,p as c,x as b,w as $,j as I,y as K,k as m,l as W,cs as C,fT as q,fU as z}from"./index.edc0759d.js";import{u as G}from"./index.a0f5fb0c.js";import{b as H}from"./index.2b67a644.js";import J from"./AccountDrawer.94fd25f8.js";import L from"./passwordModel.18fece72.js";import{c as O,s as P}from"./account.data.26197cb6.js";import"./index.259be51b.js";import"./Checkbox.21426845.js";import"./index.d81cdb5e.js";import"./index.14c1dc69.js";import"./index.18485147.js";import"./index.06eb6349.js";import"./useSize.1a6ae380.js";import"./eagerComputed.5106fd59.js";import"./onMountedOrActivated.45dfe467.js";import"./useWindowSizeFn.8be10011.js";import"./useContentViewHeight.0b992366.js";import"./ArrowLeftOutlined.727536a9.js";import"./transButton.0f38a3d6.js";import"./index.adbf4a0d.js";import"./index.debcb6b3.js";import"./index.111c4059.js";import"./index.ad97f9f1.js";import"./dateUtil.9d098b41.js";import"./_baseMerge.1131d091.js";import"./_isIterateeCall.31ed91a4.js";import"./_baseEach.8bca3c51.js";import"./get.9ede912b.js";import"./index.abbd0c37.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.8d3634d3.js";import"./FullscreenOutlined.219f2fe1.js";import"./index.18f69ddd.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.9c736fd9.js";import"./scrollTo.477b98df.js";import"./index.ac2947d4.js";import"./index.231a60da.js";import"./index.a048a7b7.js";import"./_baseIteratee.4b889e9a.js";import"./index.d03a2449.js";import"./useRefs.9a2b8e46.js";import"./download.8be5a7d1.js";import"./index.935fa161.js";import"./uniqBy.004e8f3d.js";import"./index.0b95b2ab.js";const Q={key:0,class:"flex items-center justify-center"},Jt=A({__name:"index",setup(o){const[e,{openModal:t}]=H(),[l,{openDrawer:s}]=G(),[d,{reload:p}]=M({title:"\u8D26\u53F7\u5217\u8868",api:i=>f(this,null,function*(){const{data:g,meta:u}=yield z(y({},i));return{items:g,total:u==null?void 0:u.total}}),rowKey:"id",columns:O,formConfig:{labelWidth:120,schemas:P},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),a=()=>{C.success("\u64CD\u4F5C\u6210\u529F"),p()},r=()=>{s(!0,{id:!1})},n=i=>{s(!0,{id:i.id,isUpdate:!0})},k=i=>f(this,null,function*(){yield q(i.id),C.success("\u5220\u9664\u6210\u529F"),p()}),x=i=>{t(!0,{id:i.id})},B=()=>{C.success("\u64CD\u4F5C\u6210\u529F")};return(i,g)=>{const u=V("a-button"),T=j("auth");return h(),D("div",null,[c(m(N),{onRegister:m(d)},{toolbar:b(()=>[$((h(),I(u,{type:"primary",onClick:r},{default:b(()=>[K(" \u65B0\u589E\u8D26\u53F7 ")]),_:1})),[[T,"endpoint.admin_users.create"]])]),bodyCell:b(({column:v,record:_})=>[v.key==="action"?(h(),D("div",Q,[c(m(U),{actions:[{label:"\u7F16\u8F91",onClick:n.bind(null,_),auth:"endpoint.admin_users.edit"},{label:"\u4FEE\u6539\u5BC6\u7801",onClick:x.bind(null,_),auth:"endpoint.admin_users.edit_password"},{label:"\u5220\u9664",auth:"endpoint.admin_users.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:k.bind(null,_)}}]},null,8,["actions"])])):W("",!0)]),_:1},8,["onRegister"]),c(J,{onRegister:m(l),onSuccess:a},null,8,["onRegister"]),c(L,{onRegister:m(e),onSuccess:B},null,8,["onRegister"])])}}});export{Jt as default};
|