lcny-vue3-antd-admin/dist/assets/index.56cd9d06.js

2 lines
4.1 KiB
JavaScript

var M=Object.defineProperty;var g=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var w=(o,e,t)=>e in o?M(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,y=(o,e)=>{for(var t in e||(e={}))V.call(e,t)&&w(o,t,e[t]);if(g)for(var t of g(e))A.call(e,t)&&w(o,t,e[t]);return o};var c=(o,e,t)=>new Promise((h,a)=>{var b=r=>{try{u(t.next(r))}catch(m){a(m)}},n=r=>{try{u(t.throw(r))}catch(m){a(m)}},u=r=>r.done?h(r.value):Promise.resolve(r.value).then(b,n);u((t=t.apply(o,e)).next())});import{u as N,B as j}from"./useTable.d91cff10.js";import{T as D}from"./useForm.08d18522.js";import{a as $,aE as I,bP as K,o as d,h as E,p as _,B as C,y as P,j as k,D as W,k as s,l as B,cu as f,fT as q,fU as z,fV as G}from"./index.3d706c2f.js";import{u as H}from"./index.eed5a1ea.js";import{b as J}from"./index.9743dd3f.js";import L from"./AccountDrawer.62ef4be6.js";import O from"./passwordModel.6c512019.js";import{c as Q,s as X}from"./account.data.6c157ed3.js";import"./index.aa6d5608.js";import"./Checkbox.3d97ba68.js";import"./index.f679901a.js";import"./index.27ab06e9.js";import"./index.4eeaaf05.js";import"./index.6f027bd2.js";import"./useSize.987f82a3.js";import"./eagerComputed.9f32a124.js";import"./onMountedOrActivated.8d8cbe15.js";import"./useWindowSizeFn.0a521a42.js";import"./useContentViewHeight.a0cf6391.js";import"./ArrowLeftOutlined.0d3617a3.js";import"./transButton.3400bb64.js";import"./index.6209abfe.js";import"./index.3ec1000d.js";import"./index.eacf4a72.js";import"./index.75431f42.js";import"./dateUtil.bf80b888.js";import"./_baseMerge.68590a12.js";import"./_isIterateeCall.365ba3a4.js";import"./_baseEach.97e4005b.js";import"./get.335010bc.js";import"./index.0cea5cd4.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.9f849b32.js";import"./FullscreenOutlined.43f2524a.js";import"./index.ded3b6b5.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.ae1b806f.js";import"./scrollTo.0ee71853.js";import"./index.83d41c97.js";import"./index.21499d5b.js";import"./index.c4ede28d.js";import"./_baseIteratee.1aab2acb.js";import"./index.642c84b5.js";import"./useRefs.002d291f.js";import"./download.75f6f090.js";import"./index.77a5cd56.js";import"./uniqBy.492cb1c2.js";import"./index.059feea2.js";import"./md5.f1a8c3f7.js";const Y={key:0,class:"flex items-center justify-center"},Ot=$({__name:"index",setup(o){const[e,{openModal:t}]=J(),[h,{openDrawer:a}]=H(),[b,{reload:n}]=N({title:"\u8D26\u53F7\u5217\u8868",api:i=>c(this,null,function*(){const{data:F,meta:p}=yield G(y({},i));return{items:F,total:p==null?void 0:p.total}}),rowKey:"id",columns:Q,formConfig:{labelWidth:120,schemas:X},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),u=()=>{f.success("\u64CD\u4F5C\u6210\u529F"),n()},r=()=>{a(!0,{id:!1})},m=i=>{a(!0,{id:i.id,isUpdate:!0})},R=i=>c(this,null,function*(){yield q(i.id),f.success("\u5220\u9664\u6210\u529F"),n()}),T=i=>{t(!0,{id:i.id})},v=()=>{f.success("\u64CD\u4F5C\u6210\u529F")},x=i=>c(this,null,function*(){yield z(i.id),f.success("\u89E3\u5C01\u6210\u529F"),n()});return(i,F)=>{const p=I("a-button"),S=K("auth");return d(),E("div",null,[_(s(j),{onRegister:s(b)},{toolbar:C(()=>[P((d(),k(p,{type:"primary",onClick:r},{default:C(()=>[W(" \u65B0\u589E\u8D26\u53F7 ")]),_:1})),[[S,"endpoint.admin_users.create"]])]),bodyCell:C(({column:U,record:l})=>[U.key==="action"?(d(),E("div",Y,[_(s(D),{actions:[{label:"\u7F16\u8F91",onClick:m.bind(null,l),auth:"endpoint.admin_users.edit"},{label:"\u4FEE\u6539\u5BC6\u7801",onClick:T.bind(null,l),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:R.bind(null,l)}}]},null,8,["actions"]),l.banned_at?(d(),k(s(D),{key:0,actions:[{label:"\u89E3\u5C01",auth:"endpoint.admin_users.unban",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u89E3\u5C01\u8D26\u53F7",placement:"topRight",confirm:x.bind(null,l)}}]},null,8,["actions"])):B("",!0)])):B("",!0)]),_:1},8,["onRegister"]),_(L,{onRegister:s(h),onSuccess:u},null,8,["onRegister"]),_(O,{onRegister:s(e),onSuccess:v},null,8,["onRegister"])])}}});export{Ot as default};