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

2 lines
3.6 KiB
JavaScript

var D=Object.defineProperty,k=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var v=(r,e,t)=>e in r?D(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)&&v(r,t,e[t]);if(g)for(var t of g(e))Y.call(e,t)&&v(r,t,e[t]);return r},d=(r,e)=>k(r,T(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 A,bP as N,o as f,h as w,p as h,B as y,y as j,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.ed5deffd.js";import{u as P,B as W}from"./useTable.0fe7b343.js";import{T as z}from"./useForm.501f3f59.js";import{u as G}from"./index.a73969f1.js";import{B as H,c as J,s as L}from"./BaseDrawer.fc501670.js";import"./index.57e79dcc.js";import"./Checkbox.0ade27c0.js";import"./index.dfe580e1.js";import"./index.271eb465.js";import"./index.0292c9d3.js";import"./index.78c12dec.js";import"./useSize.f4cf68f5.js";import"./eagerComputed.890ab31a.js";import"./onMountedOrActivated.9d9d02f7.js";import"./useWindowSizeFn.a262cec0.js";import"./useContentViewHeight.b8e37cbd.js";import"./ArrowLeftOutlined.9abfd432.js";import"./transButton.f4575a26.js";import"./index.d726974a.js";import"./index.8d83801a.js";import"./index.cf1b1f15.js";import"./index.afc21ce4.js";import"./dateUtil.91a9b59f.js";import"./_baseMerge.9fac86cf.js";import"./_isIterateeCall.779fe698.js";import"./_baseEach.aed94d5c.js";import"./get.b38b45ae.js";import"./index.5b432cd4.js";import"./FullscreenOutlined.a18420c1.js";import"./index.cca952d1.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.a1f78ebd.js";import"./index.af1b13fa.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.51b9ef19.js";import"./scrollTo.707f46cf.js";import"./index.3b4e2932.js";import"./index.09a74575.js";import"./index.f6ae7164.js";import"./_baseIteratee.7c3a5712.js";import"./index.272fae53.js";import"./useRefs.045d664d.js";import"./download.b80ee91a.js";import"./index.c3b59272.js";import"./uniqBy.6fa12436.js";import"./index.141e5e7b.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:b,meta:p}=yield O(d(l({},o),{type:1}));return{items:b,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,b)=>{const p=A("a-button"),B=N("auth");return f(),w("div",null,[h(n(W),{title:"\u57FA\u5730\u603B\u4EA7\u91CF",onRegister:n(m)},{toolbar:y(()=>[j((f(),I(p,{type:"primary",onClick:c},{default:y(()=>[V(" \u65B0\u589E ")]),_:1})),[[B,"endpoint.crops_output.create"]])]),bodyCell:y(({column:F,record:C})=>[F.key==="action"?(f(),w("div",M,[h(n(z),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,C),auth:"endpoint.crops_output.edit"},{label:"\u5220\u9664",auth:"endpoint.crops_output.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,C)}}]},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-10f726b8"]]);export{zt as default};