2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
var f=(c,a,o)=>new Promise((p,r)=>{var n=t=>{try{i(o.next(t))}catch(e){r(e)}},u=t=>{try{i(o.throw(t))}catch(e){r(e)}},i=t=>t.done?p(t.value):Promise.resolve(t.value).then(n,u);i((o=o.apply(c,a)).next())});import{u as F,B as k}from"./useTable.cd55d157.js";import{T as w}from"./BasicForm.75df0d2e.js";import{a as x,aG as y,o as _,h,n as s,z as l,B,k as m,l as D,cN as b,eJ as R,eK as T}from"./index.32c07267.js";import{u as S}from"./index.f87b1573.js";import{_ as E,c as N,s as v}from"./RoleDrawer.5d677a40.js";import"./index.7fa3a616.js";import"./Checkbox.2f1eed1e.js";import"./index.551d44e4.js";import"./useForm.47ba83ac.js";import"./index.66ec2a67.js";import"./index.e25185b6.js";import"./index.2cc1c28f.js";import"./useSize.461a5969.js";import"./eagerComputed.79a5dacc.js";import"./useWindowSizeFn.4882e42a.js";import"./useContentViewHeight.ef6a5b55.js";import"./ArrowLeftOutlined.97358e47.js";import"./transButton.63fab756.js";import"./index.f7d9f1b6.js";import"./index.0a07f7b1.js";import"./index.5c899175.js";import"./dayjs.min.1a2f02d8.js";import"./index.c4f04bdf.js";import"./dateUtil.3435ac89.js";import"./_baseMerge.2dd153da.js";import"./_isIterateeCall.d4916932.js";import"./_baseEach.27604e9d.js";import"./get.3e9b8a69.js";import"./index.d51279de.js";import"./FullscreenOutlined.ed8a6514.js";import"./index.0f130bbc.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.4c6ffbb8.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.5f6def4f.js";import"./scrollTo.afde63de.js";import"./index.542a4e14.js";import"./index.596e1e64.js";import"./index.0a16179d.js";import"./_baseIteratee.67f8f2a9.js";import"./index.c9aabb5b.js";import"./useRefs.23253e0b.js";import"./download.b7e5a7a4.js";import"./index.6ab28e80.js";import"./index.7337ce8e.js";import"./uniqBy.0c96aa5b.js";import"./index.1b438852.js";const V={key:0,class:"flex items-center justify-center"},St=x({__name:"index",setup(c){const[a,{openDrawer:o}]=S(),[p,{reload:r}]=F({title:"\u89D2\u8272\u5217\u8868",api:T,columns:N,formConfig:{labelWidth:120,schemas:v},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),n=()=>{b.success("\u64CD\u4F5C\u6210\u529F"),r()},u=()=>{o(!0,{isUpdate:!1})},i=e=>{o(!0,{id:e.id,isUpdate:!0})},t=e=>f(this,null,function*(){yield R(e.id),b.success("\u5220\u9664\u6210\u529F"),r()});return(e,A)=>{const C=y("a-button");return _(),h("div",null,[s(m(k),{onRegister:m(p)},{toolbar:l(()=>[s(C,{type:"primary",onClick:u},{default:l(()=>[B(" \u65B0\u589E\u89D2\u8272 ")]),_:1})]),bodyCell:l(({column:g,record:d})=>[g.key==="action"?(_(),h("div",V,[s(m(w),{actions:[{label:"\u7F16\u8F91",onClick:i.bind(null,d)},{label:"\u5220\u9664",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:t.bind(null,d)}}]},null,8,["actions"])])):D("",!0)]),_:1},8,["onRegister"]),s(E,{onRegister:m(a),onSuccess:n},null,8,["onRegister"])])}}});export{St as default};
|