lcny-vue3-antd-admin/dist/assets/index.a9b60502.js

2 lines
2.9 KiB
JavaScript

var c=(f,n,o)=>new Promise((p,r)=>{var u=e=>{try{i(o.next(e))}catch(t){r(t)}},l=e=>{try{i(o.throw(e))}catch(t){r(t)}},i=e=>e.done?p(e.value):Promise.resolve(e.value).then(u,l);i((o=o.apply(f,n)).next())});import{u as w,B as x}from"./useTable.60a88677.js";import{T as F}from"./useForm.630b749e.js";import{a as k,aA as D,o as h,h as b,p as a,x as d,y as R,k as m,l as T,cs as C,fr as B,fs as S}from"./index.b530fdc3.js";import{u as E}from"./index.29d0148d.js";import{_ as v,c as A,s as N}from"./RoleDrawer.3cdefbf0.js";import"./index.67d355c7.js";import"./Checkbox.13649ac2.js";import"./index.4421a570.js";import"./index.c0c30ba8.js";import"./index.38d01982.js";import"./index.6c8a9d28.js";import"./useSize.cee6d260.js";import"./eagerComputed.f22c6213.js";import"./onMountedOrActivated.5e0102d0.js";import"./useWindowSizeFn.38104900.js";import"./useContentViewHeight.e537c2b5.js";import"./ArrowLeftOutlined.01a81fa3.js";import"./transButton.8753c22f.js";import"./index.e03f54b2.js";import"./index.482cfbfb.js";import"./index.cf169111.js";import"./index.3a8be715.js";import"./dateUtil.801957c6.js";import"./_baseMerge.53cbe761.js";import"./_isIterateeCall.3cb6ac47.js";import"./_baseEach.1f8254b1.js";import"./get.0c9daf63.js";import"./index.5c20b82c.js";import"./FullscreenOutlined.f9815d3b.js";import"./index.aa932d06.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.21e16709.js";import"./index.66d57774.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.2bfd4a7a.js";import"./scrollTo.c016bdbb.js";import"./index.ed4a5cb7.js";import"./index.c527f406.js";import"./index.3e11f795.js";import"./_baseIteratee.c7261219.js";import"./index.38a226a7.js";import"./useRefs.dab7f0a9.js";import"./download.acd38398.js";import"./index.6135f7b4.js";import"./uniqBy.ee2b8035.js";import"./index.3cdad741.js";const V={key:0,class:"flex items-center justify-center"},Bt=k({__name:"index",setup(f){const[n,{openDrawer:o}]=E(),[p,{reload:r}]=w({title:"\u89D2\u8272\u5217\u8868",api:()=>c(this,null,function*(){const{data:t,meta:s}=yield S({});return{items:t,total:s==null?void 0:s.total}}),columns:A,formConfig:{labelWidth:120,schemas:N},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),u=()=>{C.success("\u64CD\u4F5C\u6210\u529F"),r()},l=()=>{o(!0,{isUpdate:!1})},i=t=>{o(!0,{id:t.id,isUpdate:!0})},e=t=>c(this,null,function*(){yield B(t.id),C.success("\u5220\u9664\u6210\u529F"),r()});return(t,s)=>{const g=D("a-button");return h(),b("div",null,[a(m(x),{onRegister:m(p)},{toolbar:d(()=>[a(g,{type:"primary",onClick:l},{default:d(()=>[R(" \u65B0\u589E\u89D2\u8272 ")]),_:1})]),bodyCell:d(({column:y,record:_})=>[y.key==="action"?(h(),b("div",V,[a(m(F),{actions:[{label:"\u7F16\u8F91",onClick:i.bind(null,_)},{label:"\u5220\u9664",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:e.bind(null,_)}}]},null,8,["actions"])])):T("",!0)]),_:1},8,["onRegister"]),a(v,{onRegister:m(n),onSuccess:u},null,8,["onRegister"])])}}});export{Bt as default};