2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
var F=Object.defineProperty,T=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var g=(r,e,t)=>e in r?F(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,l=(r,e)=>{for(var t in e||(e={}))E.call(e,t)&&g(r,t,e[t]);if(w)for(var t of w(e))Y.call(e,t)&&g(r,t,e[t]);return r},d=(r,e)=>T(r,k(e));var _=(r,e,t)=>new Promise((m,a)=>{var u=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?m(i.value):Promise.resolve(i.value).then(u,c);s((t=t.apply(r,e)).next())});import{q as R,a as S,aE as N,bP as j,o as f,h as v,p as h,B as y,y as A,j as I,D as V,k as n,l as U,cu as x,eN as q,cI as K,eO as O}from"./index.7ce6f084.js";import{u as P,B as W}from"./useTable.19412597.js";import{T as z}from"./useForm.52bdb676.js";import{u as G}from"./index.606622af.js";import{T as H,c as J,s as L}from"./TownDrawer.b65aac67.js";import"./index.d0463034.js";import"./Checkbox.919d90c9.js";import"./index.7bf57d3d.js";import"./index.4b360d76.js";import"./index.c022e2f1.js";import"./index.728ac976.js";import"./useSize.3e94ed3b.js";import"./eagerComputed.8bc93e87.js";import"./onMountedOrActivated.e95960e7.js";import"./useWindowSizeFn.a9c5a9d2.js";import"./useContentViewHeight.14f3b8a3.js";import"./ArrowLeftOutlined.555c92d9.js";import"./transButton.1346368d.js";import"./index.74fc6a3b.js";import"./index.c0e22c2e.js";import"./index.3162fbb8.js";import"./index.4faf0917.js";import"./dateUtil.f1ed9768.js";import"./_baseMerge.4c44d7c8.js";import"./_isIterateeCall.ae4e69f8.js";import"./_baseEach.00efc838.js";import"./get.48d5698a.js";import"./index.da8259db.js";import"./FullscreenOutlined.b4a77bb5.js";import"./index.1189f0a9.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.c6cd253d.js";import"./index.e8879cf8.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.40c2df91.js";import"./scrollTo.f7855aeb.js";import"./index.2b1561f6.js";import"./index.87a6b6a5.js";import"./index.25b6d4b1.js";import"./_baseIteratee.d0ff3125.js";import"./index.499b05d5.js";import"./useRefs.fe2d123f.js";import"./download.db52fd9f.js";import"./index.7ee42cfb.js";import"./uniqBy.ce0a005a.js";import"./index.e93106b5.js";const M={key:0,class:"flex items-center justify-center"},Q=S({__name:"index",setup(r){const[e,{openDrawer:t}]=G(),[m,{reload:a}]=P({api:o=>_(this,null,function*(){o.year&&(o.year=K(o.year).format("YYYY"));const{data:C,meta:p}=yield O(d(l({},o),{type:2}));return{items:C,total:p==null?void 0:p.total}}),rowKey:"id",columns:J,formConfig:{labelWidth:120,schemas:L},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),u=()=>{x.success("\u64CD\u4F5C\u6210\u529F"),a()},c=()=>{t(!0,{isUpdate:!1})},s=o=>{t(!0,d(l({},o),{isUpdate:!0}))},i=o=>_(this,null,function*(){yield q(o.id),x.success("\u5220\u9664\u6210\u529F"),a()});return(o,C)=>{const p=N("a-button"),B=j("auth");return f(),v("div",null,[h(n(W),{title:"\u57CE\u9547\u603B\u4EA7\u91CF",onRegister:n(m)},{toolbar:y(()=>[A((f(),I(p,{type:"primary",onClick:c},{default:y(()=>[V(" \u65B0\u589E ")]),_:1})),[[B,"endpoint.town_crops_output.create"]])]),bodyCell:y(({column:D,record:b})=>[D.key==="action"?(f(),v("div",M,[h(n(z),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,b),auth:"endpoint.town_crops_output.edit"},{label:"\u5220\u9664",auth:"endpoint.town_crops_output.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,b)}}]},null,8,["actions"])])):U("",!0)]),_:1},8,["onRegister"]),h(H,{onRegister:n(e),onSuccess:u},null,8,["onRegister"])])}}});var zt=R(Q,[["__scopeId","data-v-743fac10"]]);export{zt as default};
|