lcny-vue3-antd-admin/dist/assets/index.73c703a5.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.c83ad96f.js";import{T as H}from"./useForm.91200ff4.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.fe4a8f33.js";import{u as O}from"./index.fb9026e4.js";import{_ as Q,c as X,s as Y}from"./BaseDrawer.5bd565b5.js";import"./index.d5115c22.js";import"./Checkbox.e7a76727.js";import"./index.ba54dfdc.js";import"./index.da0efa36.js";import"./index.7149a9c2.js";import"./index.c65768ea.js";import"./useSize.698e0459.js";import"./eagerComputed.6cd9c590.js";import"./onMountedOrActivated.a9c5b13d.js";import"./useWindowSizeFn.f54b1eaa.js";import"./useContentViewHeight.4b680c2b.js";import"./ArrowLeftOutlined.5eb8b727.js";import"./transButton.10edb678.js";import"./index.f3c4f1f0.js";import"./index.a19b4fff.js";import"./index.26ce3e68.js";import"./index.a83792d6.js";import"./dateUtil.745bf349.js";import"./_baseMerge.ff56dae6.js";import"./_isIterateeCall.ece7fd31.js";import"./_baseEach.d3257b7c.js";import"./get.3dc7fc10.js";import"./index.2977da73.js";import"./FullscreenOutlined.637c676d.js";import"./index.0279ef27.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.837f44db.js";import"./index.1495ff0a.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.c49132c3.js";import"./scrollTo.c0800d71.js";import"./index.3f9a8575.js";import"./index.6c03f363.js";import"./index.3a3c0d77.js";import"./_baseIteratee.278425b3.js";import"./index.fb5e2d05.js";import"./useRefs.eb1da46f.js";import"./download.b0c50d65.js";import"./index.53dafb64.js";import"./uniqBy.aaa43b12.js";import"./index.45b3895e.js";import"./other.cfbc782b.js";import"./map.ae0020e2.js";import"./lodash.a1e9799d.js";import"./defaultsDeep.60f9001d.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};