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

2 lines
3.8 KiB
JavaScript

var R=Object.defineProperty,A=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var w=(o,e,t)=>e in o?R(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,h=(o,e)=>{for(var t in e||(e={}))V.call(e,t)&&w(o,t,e[t]);if(k)for(var t of k(e))j.call(e,t)&&w(o,t,e[t]);return o},C=(o,e)=>A(o,N(e));var f=(o,e,t)=>new Promise((c,s)=>{var l=i=>{try{a(t.next(i))}catch(r){s(r)}},d=i=>{try{a(t.throw(i))}catch(r){s(r)}},a=i=>i.done?c(i.value):Promise.resolve(i.value).then(l,d);a((t=t.apply(o,e)).next())});import{u as U,B as G}from"./useTable.026852a6.js";import{T as H}from"./useForm.a968f057.js";import{a as I,aE as K,bP as L,o as n,h as y,p as b,B as u,y as P,j as x,D as B,k as m,l as D,F as W,aH as $,C as q,t as z,cu as v,eG as J,eC as M}from"./index.86b2d1e9.js";import{u as O}from"./index.25a048e6.js";import{_ as Q,c as X,s as Y}from"./BaseDrawer.ec2ee283.js";import"./index.23195f95.js";import"./Checkbox.6ab0d1fd.js";import"./index.5f4d6fe6.js";import"./index.6d67b5d8.js";import"./index.a2eca1e4.js";import"./index.c102fc28.js";import"./useSize.9a16d4a6.js";import"./eagerComputed.1592ed29.js";import"./onMountedOrActivated.059f2156.js";import"./useWindowSizeFn.fd2146e4.js";import"./useContentViewHeight.e8bc7717.js";import"./ArrowLeftOutlined.b8fef731.js";import"./transButton.48eb62d7.js";import"./index.f927b28d.js";import"./index.962a1c87.js";import"./index.52b14746.js";import"./index.fcd6b821.js";import"./dateUtil.2d9585bb.js";import"./_baseMerge.5bcc3c8a.js";import"./_isIterateeCall.cb763393.js";import"./_baseEach.3fb74165.js";import"./get.043901f5.js";import"./index.c095e435.js";import"./FullscreenOutlined.a3d881df.js";import"./index.bc2491f6.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.f4e1dec6.js";import"./index.cd4c46eb.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.2a7efe44.js";import"./scrollTo.3dc4d2f0.js";import"./index.cad08aa5.js";import"./index.e9fce6d7.js";import"./index.27c0f67b.js";import"./_baseIteratee.a56bccd7.js";import"./index.015371fe.js";import"./useRefs.abe2f885.js";import"./download.cca4d1ff.js";import"./index.2d9cc828.js";import"./uniqBy.f4394049.js";import"./index.f18363a4.js";import"./MinusCircleOutlined.febe6324.js";import"./PlusOutlined.b785ee59.js";const Z={key:0,class:"flex items-center justify-center"},Ot=I({__name:"index",setup(o){const[e,{openDrawer:t}]=O(),[c,{reload:s}]=U({title:"\u57FA\u5730\u519C\u4F5C\u7269\u5217\u8868",api:r=>f(this,null,function*(){const{data:g,meta:p}=yield M(C(h({type:"all"},r),{crop_type:1}));return{items:g,total:p==null?void 0:p.total}}),rowKey:"id",columns:X,formConfig:{labelWidth:120,schemas:Y},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),l=()=>{v.success("\u64CD\u4F5C\u6210\u529F"),s()},d=()=>{t(!0,{isUpdate:!1})},a=r=>{t(!0,C(h({},r),{isUpdate:!0}))},i=r=>f(this,null,function*(){yield J(r.id),v.success("\u5220\u9664\u6210\u529F"),s()});return(r,g)=>{const p=K("a-button"),T=L("auth");return n(),y("div",null,[b(m(G),{onRegister:m(c)},{toolbar:u(()=>[P((n(),x(p,{type:"primary",onClick:d},{default:u(()=>[B(" \u65B0\u589E\u519C\u4F5C\u7269 ")]),_:1})),[[T,"endpoint.crops.create"]])]),bodyCell:u(({column:F,record:_})=>[F.key==="action"?(n(),y("div",Z,[b(m(H),{actions:[{label:"\u7F16\u8F91",onClick:a.bind(null,_),auth:"endpoint.crops.edit"},{label:"\u5220\u9664",auth:"endpoint.crops.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,_)}}]},null,8,["actions"])])):D("",!0),F.key==="crops"?(n(!0),y(W,{key:1},$(_.crops,(S,E)=>(n(),x(m(q),{class:"mx-2px",key:E,type:"link"},{default:u(()=>[B(z(S.name),1)]),_:2},1024))),128)):D("",!0)]),_:1},8,["onRegister"]),b(Q,{onRegister:m(e),onSuccess:l},null,8,["onRegister"])])}}});export{Ot as default};