lcny-vue3-antd-admin/dist/assets/index.d011ed5d.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((_,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?_(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.8bfb918a.js";import{T as D}from"./useForm.72366620.js";import{a as $,aC as I,bP as K,o as d,h as E,p as f,x as C,w as P,j as k,y as W,k as s,l as B,cu as h,fT as q,fU as z,fV as G}from"./index.caefd1ac.js";import{u as H}from"./index.eec82b6c.js";import{b as J}from"./index.358e7c19.js";import L from"./AccountDrawer.27624f18.js";import O from"./passwordModel.b6d866f4.js";import{c as Q,s as X}from"./account.data.475b99d4.js";import"./index.62749bc9.js";import"./Checkbox.96a09ef1.js";import"./index.6f4e828b.js";import"./index.1c274344.js";import"./index.b8cde84f.js";import"./index.b47a82da.js";import"./useSize.de9063a9.js";import"./eagerComputed.550b9170.js";import"./onMountedOrActivated.f55f7cb1.js";import"./useWindowSizeFn.94f84601.js";import"./useContentViewHeight.48b9e1ed.js";import"./ArrowLeftOutlined.953e7c53.js";import"./transButton.e5176e05.js";import"./index.9cb1b4a3.js";import"./index.4c660ef0.js";import"./index.11569a26.js";import"./index.e2f73f4c.js";import"./dateUtil.5b2c030b.js";import"./_baseMerge.9e5a397a.js";import"./_isIterateeCall.b2126e63.js";import"./_baseEach.c97ad90b.js";import"./get.373dfd79.js";import"./index.adc41522.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.51e4046e.js";import"./FullscreenOutlined.93df46a8.js";import"./index.9445e0f3.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.e75bff24.js";import"./scrollTo.b81ed8fd.js";import"./index.f1bb3c7b.js";import"./index.eb967d29.js";import"./index.1159119f.js";import"./_baseIteratee.3eabc135.js";import"./index.66cc952c.js";import"./useRefs.32aa9173.js";import"./download.9e6c0445.js";import"./index.f24323fa.js";import"./uniqBy.d3cafc9d.js";import"./index.584ef0f9.js";import"./md5.92f4ba89.js";const Y={key:0,class:"flex items-center justify-center"},Ot=$({__name:"index",setup(o){const[e,{openModal:t}]=J(),[_,{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=()=>{h.success("\u64CD\u4F5C\u6210\u529F"),n()},r=()=>{a(!0,{id:!1})},m=i=>{a(!0,{id:i.id,isUpdate:!0})},x=i=>c(this,null,function*(){yield q(i.id),h.success("\u5220\u9664\u6210\u529F"),n()}),R=i=>{t(!0,{id:i.id})},T=()=>{h.success("\u64CD\u4F5C\u6210\u529F")},v=i=>c(this,null,function*(){yield z(i.id),h.success("\u89E3\u5C01\u6210\u529F"),n()});return(i,F)=>{const p=I("a-button"),S=K("auth");return d(),E("div",null,[f(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,[f(s(D),{actions:[{label:"\u7F16\u8F91",onClick:m.bind(null,l),auth:"endpoint.admin_users.edit"},{label:"\u4FEE\u6539\u5BC6\u7801",onClick:R.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:x.bind(null,l)}}]},null,8,["actions"]),l.banned_at?(d(),k(s(D),{key:0,actions:[{label:"\u89E3\u5C01",auth:"super",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u89E3\u5C01\u8D26\u53F7",placement:"topRight",confirm:v.bind(null,l)}}]},null,8,["actions"])):B("",!0)])):B("",!0)]),_:1},8,["onRegister"]),f(L,{onRegister:s(_),onSuccess:u},null,8,["onRegister"]),f(O,{onRegister:s(e),onSuccess:T},null,8,["onRegister"])])}}});export{Ot as default};