2 lines
3.5 KiB
JavaScript
2 lines
3.5 KiB
JavaScript
var v=Object.defineProperty,k=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var g=(r,e,t)=>e in r?v(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,d=(r,e)=>{for(var t in e||(e={}))D.call(e,t)&&g(r,t,e[t]);if(C)for(var t of C(e))Y.call(e,t)&&g(r,t,e[t]);return r},_=(r,e)=>k(r,T(e));var f=(r,e,t)=>new Promise((u,a)=>{var l=i=>{try{s(t.next(i))}catch(o){a(o)}},c=i=>{try{s(t.throw(i))}catch(o){a(o)}},s=i=>i.done?u(i.value):Promise.resolve(i.value).then(l,c);s((t=t.apply(r,e)).next())});import{J as A,a as E,aA as R,o as x,h as w,p,x as y,y as S,k as n,l as N,cs as F,eG as V,e3 as j,eH as I}from"./index.69b97d48.js";import{u as U,B as G}from"./useTable.af34662f.js";import{T as H}from"./BasicForm.aa356267.js";import{u as J}from"./index.d6e69beb.js";import{B as K,c as W,s as q}from"./BaseDrawer.108fdd64.js";import"./index.6282cde6.js";import"./Checkbox.377b791d.js";import"./index.bba82925.js";import"./useForm.8e7b6198.js";import"./index.5fd11396.js";import"./index.4a75e77d.js";import"./index.c53c45d7.js";import"./useSize.0410cade.js";import"./eagerComputed.ca030e9e.js";import"./onMountedOrActivated.aed7dd05.js";import"./useWindowSizeFn.86fdf84f.js";import"./useContentViewHeight.1b8d662b.js";import"./ArrowLeftOutlined.5ac2afd7.js";import"./transButton.1b0c7882.js";import"./index.cf477439.js";import"./index.eaa7ab11.js";import"./index.a63dfe1d.js";import"./index.afeae3d8.js";import"./dateUtil.1e514191.js";import"./_baseMerge.1ed003c1.js";import"./_isIterateeCall.981fc751.js";import"./_baseEach.6745beb9.js";import"./get.f522e2f0.js";import"./index.986e29b1.js";import"./FullscreenOutlined.26d80412.js";import"./index.f537578d.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.7780c88c.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.28c67b21.js";import"./scrollTo.795b9e5a.js";import"./index.32dd3528.js";import"./index.59f037b0.js";import"./index.bc0d9a88.js";import"./_baseIteratee.b53df749.js";import"./index.f8b59092.js";import"./useRefs.f6eb3bea.js";import"./download.720fcfe8.js";import"./index.5ff7e024.js";import"./uniqBy.b6831ee2.js";import"./index.a235cd69.js";const z={key:0,class:"flex items-center justify-center"},L=E({__name:"index",setup(r){const[e,{openDrawer:t}]=J(),[u,{reload:a}]=U({api:o=>f(this,null,function*(){o.year&&(o.year=j(o.year).format("YYYY"));const{data:b,meta:m}=yield I(_(d({},o),{type:1}));return{items:b,total:m==null?void 0:m.total}}),rowKey:"id",columns:W,formConfig:{labelWidth:120,schemas:q},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),l=()=>{F.success("\u64CD\u4F5C\u6210\u529F"),a()},c=()=>{t(!0,{isUpdate:!1})},s=o=>{t(!0,_(d({},o),{isUpdate:!0}))},i=o=>f(this,null,function*(){yield V(o.id),F.success("\u5220\u9664\u6210\u529F"),a()});return(o,b)=>{const m=R("a-button");return x(),w("div",null,[p(n(G),{title:"\u57FA\u5730\u603B\u4EA7\u91CF",onRegister:n(u)},{toolbar:y(()=>[p(m,{type:"primary",onClick:c},{default:y(()=>[S(" \u65B0\u589E ")]),_:1})]),bodyCell:y(({column:B,record:h})=>[B.key==="action"?(x(),w("div",z,[p(n(H),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,h)},{label:"\u5220\u9664",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,h)}}]},null,8,["actions"])])):N("",!0)]),_:1},8,["onRegister"]),p(K,{onRegister:n(e),onSuccess:l},null,8,["onRegister"])])}}});var Ht=A(L,[["__scopeId","data-v-76efb9a6"]]);export{Ht as default};
|