2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
var k=Object.defineProperty,B=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var g=(r,e,t)=>e in r?k(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)=>B(r,D(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,aC as N,bP as j,o as f,h as v,p as h,y,w as A,j as I,z as V,k as n,l as U,cu as x,eN as q,cI as z,eO as K}from"./index.917e09be.js";import{u as O,B as P}from"./useTable.607aabb4.js";import{T as W}from"./useForm.3f017e88.js";import{u as G}from"./index.4a1d92cc.js";import{T as H,c as J,s as L}from"./TownDrawer.6d64516b.js";import"./index.5be7e163.js";import"./Checkbox.efd6fa10.js";import"./index.f20d42f8.js";import"./index.66e7067c.js";import"./index.eac8707a.js";import"./index.09d0f024.js";import"./useSize.ae66893b.js";import"./eagerComputed.cb619276.js";import"./onMountedOrActivated.aeb9e3ce.js";import"./useWindowSizeFn.5b43183e.js";import"./useContentViewHeight.9c115d57.js";import"./ArrowLeftOutlined.74d2ead8.js";import"./transButton.c8153f04.js";import"./index.9f244a53.js";import"./index.bc340234.js";import"./index.63cd6341.js";import"./index.89ad66e5.js";import"./dateUtil.8cd1c4e1.js";import"./_baseMerge.1ac0bca4.js";import"./_isIterateeCall.6f89ef89.js";import"./_baseEach.0018bc9f.js";import"./get.ead855cb.js";import"./index.5dafa27d.js";import"./FullscreenOutlined.1ce4a094.js";import"./index.0aebd4a3.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.ecdf7fba.js";import"./index.61ed2f18.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.67773c81.js";import"./scrollTo.ce9d4e8b.js";import"./index.5fa0414f.js";import"./index.9f8cf24d.js";import"./index.1a7f8b21.js";import"./_baseIteratee.3357ca3a.js";import"./index.e3796c97.js";import"./useRefs.22686956.js";import"./download.12eee130.js";import"./index.e509513a.js";import"./uniqBy.23d4cbd7.js";import"./index.6e12223c.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}]=O({api:o=>_(this,null,function*(){o.year&&(o.year=z(o.year).format("YYYY"));const{data:C,meta:p}=yield K(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"),F=j("auth");return f(),v("div",null,[h(n(P),{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})),[[F,"endpoint.town_crops_output.create"]])]),bodyCell:y(({column:T,record:b})=>[T.key==="action"?(f(),v("div",M,[h(n(W),{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 Wt=R(Q,[["__scopeId","data-v-743fac10"]]);export{Wt as default};
|