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.2cdbaad0.js";import{u as O,B as P}from"./useTable.cbbe2c64.js";import{T as W}from"./useForm.ba32b870.js";import{u as G}from"./index.127e760e.js";import{T as H,c as J,s as L}from"./TownDrawer.a1263c12.js";import"./index.d6da02c1.js";import"./Checkbox.c3dcd23d.js";import"./index.0c5172a8.js";import"./index.052834a1.js";import"./index.6b7db3f0.js";import"./index.374ddcfd.js";import"./useSize.6a81371f.js";import"./eagerComputed.dd374092.js";import"./onMountedOrActivated.ceffb9a2.js";import"./useWindowSizeFn.37c64509.js";import"./useContentViewHeight.9010a11c.js";import"./ArrowLeftOutlined.496f293c.js";import"./transButton.3783c419.js";import"./index.9c81af9f.js";import"./index.d71f2929.js";import"./index.a66be64e.js";import"./index.c83e6254.js";import"./dateUtil.667ca424.js";import"./_baseMerge.e853c408.js";import"./_isIterateeCall.7a3f7b16.js";import"./_baseEach.0a08a0a3.js";import"./get.7d647d75.js";import"./index.38a7c073.js";import"./FullscreenOutlined.2399646b.js";import"./index.d52f5601.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.bb7075a0.js";import"./index.0648ffce.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.b3eee854.js";import"./scrollTo.8be90725.js";import"./index.bbbf1aa7.js";import"./index.df6501fa.js";import"./index.a8e4332c.js";import"./_baseIteratee.08cafe90.js";import"./index.12083f86.js";import"./useRefs.e6353c4f.js";import"./download.7790a0b6.js";import"./index.91807f4e.js";import"./uniqBy.725fa3fa.js";import"./index.eadffb1c.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};
|