2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
var F=Object.defineProperty,k=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var g=(o,t,e)=>t in o?F(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))T.call(t,e)&&g(o,e,t[e]);if(C)for(var e of C(t))E.call(t,e)&&g(o,e,t[e]);return o},v=(o,t)=>k(o,S(t));var d=(o,t,e)=>new Promise((n,a)=>{var c=i=>{try{s(e.next(i))}catch(r){a(r)}},u=i=>{try{s(e.throw(i))}catch(r){a(r)}},s=i=>i.done?n(i.value):Promise.resolve(i.value).then(c,u);s((e=e.apply(o,t)).next())});import{q as P,a as R,aE as Y,bP as j,o as _,h as w,p as h,B as f,y as A,j as I,D as N,k as m,l as V,cu as x,eS as U,cI as q,eT as K}from"./index.1f7d25e9.js";import{u as W,B as z}from"./useTable.a44c6a23.js";import{T as G}from"./useForm.d5b43e2d.js";import{u as H}from"./index.187f904b.js";import{P as J,c as L,s as M}from"./PriceDrawer.4c9677fb.js";import"./index.d7098dbd.js";import"./Checkbox.36b5df89.js";import"./index.7275e559.js";import"./index.46b54a73.js";import"./index.95a5c9e5.js";import"./index.1c593919.js";import"./useSize.99a4f943.js";import"./eagerComputed.9246bd1b.js";import"./onMountedOrActivated.36e055c5.js";import"./useWindowSizeFn.793e718b.js";import"./useContentViewHeight.8d11d5bb.js";import"./ArrowLeftOutlined.8bba6732.js";import"./transButton.d6e0d56f.js";import"./index.04c37fba.js";import"./index.c1b07704.js";import"./index.f8460443.js";import"./index.868c43ec.js";import"./dateUtil.c30f15a5.js";import"./_baseMerge.8959575a.js";import"./_isIterateeCall.1c2e901f.js";import"./_baseEach.72947e09.js";import"./get.f554c0ea.js";import"./index.e980f1c4.js";import"./FullscreenOutlined.57336edf.js";import"./index.d73d7311.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.e38d7363.js";import"./index.bc7521b5.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.953abb63.js";import"./scrollTo.a6082086.js";import"./index.658a3a14.js";import"./index.241abd4a.js";import"./index.a5a5ac20.js";import"./_baseIteratee.9a6d11c8.js";import"./index.1c376dc3.js";import"./useRefs.533ff99f.js";import"./download.73fec536.js";import"./index.5eeaea1a.js";import"./uniqBy.a47dd7b5.js";import"./index.92775e2c.js";const O={key:0,class:"flex items-center justify-center"},Q=R({__name:"index",setup(o){const[t,{openDrawer:e}]=H(),[n,{reload:a}]=W({title:"\u7A3B\u867E\u4EF7\u683C - \u5217\u8868",api:r=>d(this,null,function*(){r.year&&(r.year=q(r.year).format("YYYY"));const{data:y,meta:p}=yield K(l({},r));return{items:y,total:p==null?void 0:p.total}}),rowKey:"id",columns:L,formConfig:{labelWidth:120,schemas:M},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),c=()=>{x.success("\u64CD\u4F5C\u6210\u529F"),a()},u=()=>{e(!0,{isUpdate:!1})},s=r=>{e(!0,v(l({},r),{isUpdate:!0}))},i=r=>d(this,null,function*(){yield U(r.id),x.success("\u5220\u9664\u6210\u529F"),a()});return(r,y)=>{const p=Y("a-button"),B=j("auth");return _(),w("div",null,[h(m(z),{onRegister:m(n)},{toolbar:f(()=>[A((_(),I(p,{type:"primary",onClick:u},{default:f(()=>[N(" \u65B0\u589E ")]),_:1})),[[B,"endpoint.rice_shrimp_prices.create"]])]),bodyCell:f(({column:D,record:b})=>[D.key==="action"?(_(),w("div",O,[h(m(G),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,b),auth:"endpoint.rice_shrimp_prices.edit"},{label:"\u5220\u9664",auth:"endpoint.rice_shrimp_prices.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,b)}}]},null,8,["actions"])])):V("",!0)]),_:1},8,["onRegister"]),h(J,{onRegister:m(t),onSuccess:c},null,8,["onRegister"])])}}});var Ge=P(Q,[["__scopeId","data-v-f7a9e10c"]]);export{Ge as default};
|