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

2 lines
3.8 KiB
JavaScript

var E=Object.defineProperty,R=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var F=(r,e,t)=>e in r?E(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,h=(r,e)=>{for(var t in e||(e={}))V.call(e,t)&&F(r,t,e[t]);if(k)for(var t of k(e))j.call(e,t)&&F(r,t,e[t]);return r},w=(r,e)=>R(r,N(e));var b=(r,e,t)=>new Promise((c,a)=>{var l=i=>{try{s(t.next(i))}catch(o){a(o)}},d=i=>{try{s(t.throw(i))}catch(o){a(o)}},s=i=>i.done?c(i.value):Promise.resolve(i.value).then(l,d);s((t=t.apply(r,e)).next())});import{u as U,B as G}from"./useTable.19412597.js";import{T as H}from"./useForm.52bdb676.js";import{a as I,aE as K,bP as L,o as n,h as f,p as g,B as p,y as P,j as B,D as x,k as u,l as D,F as W,aH as $,C as q,t as z,cu as v,ct as J,cv as M}from"./index.7ce6f084.js";import{u as O}from"./index.606622af.js";import{_ as Q,c as X,s as Y}from"./BaseDrawer.924d06c2.js";import"./index.d0463034.js";import"./Checkbox.919d90c9.js";import"./index.7bf57d3d.js";import"./index.4b360d76.js";import"./index.c022e2f1.js";import"./index.728ac976.js";import"./useSize.3e94ed3b.js";import"./eagerComputed.8bc93e87.js";import"./onMountedOrActivated.e95960e7.js";import"./useWindowSizeFn.a9c5a9d2.js";import"./useContentViewHeight.14f3b8a3.js";import"./ArrowLeftOutlined.555c92d9.js";import"./transButton.1346368d.js";import"./index.74fc6a3b.js";import"./index.c0e22c2e.js";import"./index.3162fbb8.js";import"./index.4faf0917.js";import"./dateUtil.f1ed9768.js";import"./_baseMerge.4c44d7c8.js";import"./_isIterateeCall.ae4e69f8.js";import"./_baseEach.00efc838.js";import"./get.48d5698a.js";import"./index.da8259db.js";import"./FullscreenOutlined.b4a77bb5.js";import"./index.1189f0a9.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.c6cd253d.js";import"./index.e8879cf8.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.40c2df91.js";import"./scrollTo.f7855aeb.js";import"./index.2b1561f6.js";import"./index.87a6b6a5.js";import"./index.25b6d4b1.js";import"./_baseIteratee.d0ff3125.js";import"./index.499b05d5.js";import"./useRefs.fe2d123f.js";import"./download.db52fd9f.js";import"./index.7ee42cfb.js";import"./uniqBy.ce0a005a.js";import"./index.e93106b5.js";import"./other.8236530f.js";import"./map.6476f653.js";import"./lodash.7147861b.js";import"./defaultsDeep.575d6106.js";const Z={key:0,class:"flex items-center justify-center"},Xt=I({__name:"index",setup(r){const[e,{openDrawer:t}]=O(),[c,{reload:a}]=U({title:"\u57FA\u5730\u5217\u8868",api:o=>b(this,null,function*(){const{data:y,meta:m}=yield M(h({type:1},o));return{items:y,total:m==null?void 0:m.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"),a()},d=()=>{t(!0,{isUpdate:!1})},s=o=>{t(!0,w(h({},o),{isUpdate:!0}))},i=o=>b(this,null,function*(){yield J(o.id),v.success("\u5220\u9664\u6210\u529F"),a()});return(o,y)=>{const m=K("a-button"),T=L("auth");return n(),f("div",null,[g(u(G),{onRegister:u(c)},{toolbar:p(()=>[P((n(),B(m,{type:"primary",onClick:d},{default:p(()=>[x(" \u65B0\u589E\u57FA\u5730 ")]),_:1})),[[T,"endpoint.agricultural_basic.create"]])]),bodyCell:p(({column:C,record:_})=>[C.key==="action"?(n(),f("div",Z,[g(u(H),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,_),auth:"endpoint.agricultural_basic.edit"},{label:"\u5220\u9664",auth:"endpoint.agricultural_basic.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,_)}}]},null,8,["actions"])])):D("",!0),C.key==="crops"?(n(!0),f(W,{key:1},$(_.crops,(S,A)=>(n(),B(u(q),{class:"mx-2px",key:A,type:"link"},{default:p(()=>[x(z(S.name),1)]),_:2},1024))),128)):D("",!0)]),_:1},8,["onRegister"]),g(Q,{onRegister:u(e),onSuccess:l},null,8,["onRegister"])])}}});export{Xt as default};