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

2 lines
3.8 KiB
JavaScript

var R=Object.defineProperty,E=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var k=(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)&&k(r,t,e[t]);if(F)for(var t of F(e))j.call(e,t)&&k(r,t,e[t]);return r},w=(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 z}from"./useTable.918bafcc.js";import{T as G}from"./useForm.c4fee4ef.js";import{a as I,aC as K,bP as L,o as n,h as f,p as g,y as p,w as P,j as B,z as x,k as u,l as v,F as W,aF as $,B as q,t as H,cu as D,ct as J,cv as M}from"./index.96e740c6.js";import{u as O}from"./index.92355b32.js";import{_ as Q,c as X,s as Y}from"./BaseDrawer.b0eb2ee2.js";import"./index.5483f2ce.js";import"./Checkbox.93eb545c.js";import"./index.3cbf0ea9.js";import"./index.886478d5.js";import"./index.5ddc4451.js";import"./index.a18b2097.js";import"./useSize.8d3cdcbe.js";import"./eagerComputed.be242bd5.js";import"./onMountedOrActivated.c13d4314.js";import"./useWindowSizeFn.90138703.js";import"./useContentViewHeight.d128193e.js";import"./ArrowLeftOutlined.2ed7c2a1.js";import"./transButton.435c8dc5.js";import"./index.57f33d2a.js";import"./index.ba1abc61.js";import"./index.89ed2e6e.js";import"./index.281a0015.js";import"./dateUtil.5d81bac3.js";import"./_baseMerge.d6160398.js";import"./_isIterateeCall.da405eb1.js";import"./_baseEach.ccc4a2cf.js";import"./get.f812c6f0.js";import"./index.e11b4492.js";import"./FullscreenOutlined.6f7d8842.js";import"./index.55c7cf53.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.c6cde412.js";import"./index.2c15bbd7.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.45589da1.js";import"./scrollTo.8f764404.js";import"./index.84fac896.js";import"./index.2571c4e4.js";import"./index.ca3cd773.js";import"./_baseIteratee.c057c387.js";import"./index.a5169cd8.js";import"./useRefs.096b7468.js";import"./download.8f679bee.js";import"./index.e63b89d0.js";import"./uniqBy.743d7474.js";import"./index.2bed69b0.js";import"./other.64e6b55b.js";import"./map.9bdb4461.js";import"./lodash.6a782d3b.js";import"./defaultsDeep.947b0fcb.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=()=>{D.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),D.success("\u5220\u9664\u6210\u529F"),a()});return(o,y)=>{const m=K("a-button"),T=L("auth");return n(),f("div",null,[g(u(z),{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(G),{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"])])):v("",!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(H(S.name),1)]),_:2},1024))),128)):v("",!0)]),_:1},8,["onRegister"]),g(Q,{onRegister:u(e),onSuccess:l},null,8,["onRegister"])])}}});export{Xt as default};