lcny-vue3-antd-admin/dist/assets/index.a7099569.js

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.80d5b8a7.js";import{u as O,B as P}from"./useTable.47f1515f.js";import{T as W}from"./useForm.c0be8dd2.js";import{u as G}from"./index.981c2363.js";import{T as H,c as J,s as L}from"./TownDrawer.2af7b8a1.js";import"./index.2eef3e03.js";import"./Checkbox.ecb61dd2.js";import"./index.f86fd20a.js";import"./index.b81c4f99.js";import"./index.9ed9a1ce.js";import"./index.72a1ec09.js";import"./useSize.18c36d63.js";import"./eagerComputed.2afcc68e.js";import"./onMountedOrActivated.9a4e7728.js";import"./useWindowSizeFn.dff138d1.js";import"./useContentViewHeight.1aa83691.js";import"./ArrowLeftOutlined.244b6f1a.js";import"./transButton.dd91eda9.js";import"./index.94cdeb5c.js";import"./index.d3965a8a.js";import"./index.936bcd03.js";import"./index.a1361fe8.js";import"./dateUtil.334acb5f.js";import"./_baseMerge.d787d49c.js";import"./_isIterateeCall.e28bc4c3.js";import"./_baseEach.db363ee6.js";import"./get.9ecf4090.js";import"./index.7365439b.js";import"./FullscreenOutlined.abcb6c9a.js";import"./index.a2f39e1a.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.d76b2479.js";import"./index.d9c8bfa0.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.14988d42.js";import"./scrollTo.baf7def3.js";import"./index.d15bc2a6.js";import"./index.e3f23f17.js";import"./index.bfcaa235.js";import"./_baseIteratee.02af8ef8.js";import"./index.a94422d1.js";import"./useRefs.7ceb8caa.js";import"./download.2742eb39.js";import"./index.e3e998e3.js";import"./uniqBy.ea1eebc1.js";import"./index.27983812.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};