lcny-vue3-antd-admin/dist/assets/index.80ae1889.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.d7d95924.js";import{T as F}from"./useForm.7f47c3a9.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,fp as B,fq as S}from"./index.2204edf1.js";import{u as E}from"./index.3a47aa60.js";import{_ as v,c as A,s as N}from"./RoleDrawer.d93aba04.js";import"./index.8e033930.js";import"./Checkbox.65aa5211.js";import"./index.010d97d6.js";import"./index.e3ecf39c.js";import"./index.e67e7efd.js";import"./index.a7ebccc3.js";import"./useSize.5b7d9c3a.js";import"./eagerComputed.428cd5f6.js";import"./onMountedOrActivated.565160fc.js";import"./useWindowSizeFn.dd294542.js";import"./useContentViewHeight.52f61b53.js";import"./ArrowLeftOutlined.44f9fe5d.js";import"./transButton.9bc6663d.js";import"./index.73f69c66.js";import"./index.bd9a614b.js";import"./index.5bbf5dd6.js";import"./index.2aea14b8.js";import"./dateUtil.71cff877.js";import"./_baseMerge.82311f98.js";import"./_isIterateeCall.0a4f215d.js";import"./_baseEach.e8a7c808.js";import"./get.7018f1ae.js";import"./index.1dd4d8d5.js";import"./FullscreenOutlined.faa70f3a.js";import"./index.5284d2f7.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.8c9611c1.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.7084ddc0.js";import"./scrollTo.bf62ba54.js";import"./index.86cc149d.js";import"./index.86a59536.js";import"./index.82373553.js";import"./_baseIteratee.24591ca5.js";import"./index.9ae3e3ce.js";import"./useRefs.cb81c36a.js";import"./download.fa6fda50.js";import"./index.dfe55cba.js";import"./uniqBy.d774a4fc.js";import"./index.0cdc2420.js";const V={key:0,class:"flex items-center justify-center"},Tt=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{Tt as default};