2 lines
2.9 KiB
JavaScript
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.d247a518.js";import{T as F}from"./BasicForm.f50d73d0.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,fi as B,fj as S}from"./index.ad009468.js";import{u as E}from"./index.ba19cb60.js";import{_ as v,c as A,s as N}from"./RoleDrawer.a2c38cd0.js";import"./index.e39dcccf.js";import"./Checkbox.a16bc955.js";import"./index.9ef5d102.js";import"./useForm.2d6f92da.js";import"./index.0c60d8d9.js";import"./index.8f126181.js";import"./index.a5f0d1ae.js";import"./useSize.3ad5e302.js";import"./eagerComputed.f1a9af85.js";import"./onMountedOrActivated.aef7b056.js";import"./useWindowSizeFn.c90c1c91.js";import"./useContentViewHeight.a0ff2005.js";import"./ArrowLeftOutlined.b1aff722.js";import"./transButton.0bdedc17.js";import"./index.16bb29f0.js";import"./index.ab1c33d1.js";import"./index.5060296c.js";import"./index.cefb918a.js";import"./index.3000374c.js";import"./index.14cedd74.js";import"./_baseIteratee.b4cad15f.js";import"./get.05f4c739.js";import"./index.3182a79f.js";import"./index.ae1101e4.js";import"./index.26624975.js";import"./dateUtil.41077b93.js";import"./uniqBy.635e9184.js";import"./index.36ed5e4d.js";import"./FullscreenOutlined.8f75ac85.js";import"./_baseMerge.96b73baf.js";import"./_isIterateeCall.f4571551.js";import"./_baseEach.a903b5b5.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.9e375052.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.ed449411.js";import"./scrollTo.40d354e4.js";import"./index.f9db1087.js";import"./useRefs.27a91ee2.js";import"./download.5cb0d41c.js";import"./index.06ba5855.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};
|