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.96e740c6.js";import{u as O,B as P}from"./useTable.918bafcc.js";import{T as W}from"./useForm.c4fee4ef.js";import{u as G}from"./index.92355b32.js";import{T as H,c as J,s as L}from"./TownDrawer.50c2198f.js";import"./index.5483f2ce.js";import"./Checkbox.93eb545c.js";import"./index.3cbf0ea9.js";import"./index.886478d5.js";import"./index.5ddc4451.js";import"./index.a18b2097.js";import"./useSize.8d3cdcbe.js";import"./eagerComputed.be242bd5.js";import"./onMountedOrActivated.c13d4314.js";import"./useWindowSizeFn.90138703.js";import"./useContentViewHeight.d128193e.js";import"./ArrowLeftOutlined.2ed7c2a1.js";import"./transButton.435c8dc5.js";import"./index.57f33d2a.js";import"./index.ba1abc61.js";import"./index.89ed2e6e.js";import"./index.281a0015.js";import"./dateUtil.5d81bac3.js";import"./_baseMerge.d6160398.js";import"./_isIterateeCall.da405eb1.js";import"./_baseEach.ccc4a2cf.js";import"./get.f812c6f0.js";import"./index.e11b4492.js";import"./FullscreenOutlined.6f7d8842.js";import"./index.55c7cf53.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.c6cde412.js";import"./index.2c15bbd7.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.45589da1.js";import"./scrollTo.8f764404.js";import"./index.84fac896.js";import"./index.2571c4e4.js";import"./index.ca3cd773.js";import"./_baseIteratee.c057c387.js";import"./index.a5169cd8.js";import"./useRefs.096b7468.js";import"./download.8f679bee.js";import"./index.e63b89d0.js";import"./uniqBy.743d7474.js";import"./index.2bed69b0.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};
|