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

2 lines
3.8 KiB
JavaScript

var R=Object.defineProperty,E=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var w=(r,e,t)=>e in r?R(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)&&w(r,t,e[t]);if(k)for(var t of k(e))j.call(e,t)&&w(r,t,e[t]);return r},F=(r,e)=>E(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.22bbcf24.js";import{T as I}from"./useForm.72cd401a.js";import{a as K,aA as L,bN as W,o as m,h as f,p as g,x as p,w as $,j as B,y as x,k as u,l as D,F as q,aD as z,B as H,t as J,cs as T,cr as M,ct as O}from"./index.274e5454.js";import{u as P}from"./index.a2bdeefc.js";import{_ as Q,c as X,s as Y}from"./BaseDrawer.ab64dbae.js";import"./index.ecd202df.js";import"./Checkbox.11bf000c.js";import"./index.e36b7018.js";import"./index.e2ffcf8b.js";import"./index.53b7d507.js";import"./index.df961c65.js";import"./useSize.c651af42.js";import"./eagerComputed.896d76a1.js";import"./onMountedOrActivated.ebb3a506.js";import"./useWindowSizeFn.230f0c50.js";import"./useContentViewHeight.a108f773.js";import"./ArrowLeftOutlined.8b37bab4.js";import"./transButton.0dcd9f98.js";import"./index.c1767668.js";import"./index.c831ad0e.js";import"./index.a54a3dd7.js";import"./index.c9d021f8.js";import"./dateUtil.2125cb5d.js";import"./_baseMerge.4cc5fe84.js";import"./_isIterateeCall.897d3d75.js";import"./_baseEach.06d2f87d.js";import"./get.3c8de76a.js";import"./index.eeda8590.js";import"./FullscreenOutlined.d7b3a88b.js";import"./index.53d7dca1.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.bc39673e.js";import"./index.76bed561.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.f665e805.js";import"./scrollTo.1cb93694.js";import"./index.4a1ec22b.js";import"./index.750daedc.js";import"./index.ec8343a5.js";import"./_baseIteratee.92b56d3b.js";import"./index.96f35920.js";import"./useRefs.da7d9fe4.js";import"./download.6b0ca9f8.js";import"./index.6a40c558.js";import"./uniqBy.44b48fd0.js";import"./index.642d4f14.js";import"./other.2f03f1c6.js";import"./map.b2cd68a4.js";import"./lodash.bd74125c.js";const Z={key:0,class:"flex items-center justify-center"},Qt=K({__name:"index",setup(r){const[e,{openDrawer:t}]=P(),[c,{reload:a}]=U({title:"\u57FA\u5730\u5217\u8868",api:o=>b(this,null,function*(){const{data:y,meta:n}=yield O(h({type:1},o));return{items:y,total:n==null?void 0:n.total}}),rowKey:"id",columns:X,formConfig:{labelWidth:120,schemas:Y},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),l=()=>{T.success("\u64CD\u4F5C\u6210\u529F"),a()},d=()=>{t(!0,{isUpdate:!1})},s=o=>{t(!0,F(h({},o),{isUpdate:!0}))},i=o=>b(this,null,function*(){yield M(o.id),T.success("\u5220\u9664\u6210\u529F"),a()});return(o,y)=>{const n=L("a-button"),v=W("auth");return m(),f("div",null,[g(u(G),{onRegister:u(c)},{toolbar:p(()=>[$((m(),B(n,{type:"primary",onClick:d},{default:p(()=>[x(" \u65B0\u589E\u57FA\u5730 ")]),_:1})),[[v,"endpoint.agricultural_basic.create"]])]),bodyCell:p(({column:C,record:_})=>[C.key==="action"?(m(),f("div",Z,[g(u(I),{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"?(m(!0),f(q,{key:1},z(_.crops,(A,S)=>(m(),B(u(H),{class:"mx-2px",key:S,type:"link"},{default:p(()=>[x(J(A.name),1)]),_:2},1024))),128)):D("",!0)]),_:1},8,["onRegister"]),g(Q,{onRegister:u(e),onSuccess:l},null,8,["onRegister"])])}}});export{Qt as default};