lcny-vue3-antd-admin/dist/assets/index.2100d03a.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.7ea9c316.js";import{T as G}from"./useForm.6d8c74d3.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.2d67f695.js";import{u as O}from"./index.b7dccfea.js";import{_ as Q,c as X,s as Y}from"./BaseDrawer.ed959872.js";import"./index.be50a083.js";import"./Checkbox.7aeabef3.js";import"./index.ed73334e.js";import"./index.449f3f45.js";import"./index.71a40077.js";import"./index.f0b1b4f3.js";import"./useSize.afbbf7a8.js";import"./eagerComputed.a263e8bc.js";import"./onMountedOrActivated.84711fd1.js";import"./useWindowSizeFn.a1de7260.js";import"./useContentViewHeight.d3685a6c.js";import"./ArrowLeftOutlined.89c958a1.js";import"./transButton.caaf42fd.js";import"./index.052c8775.js";import"./index.a6c30269.js";import"./index.96fc7f2a.js";import"./index.067e7536.js";import"./dateUtil.411279a6.js";import"./_baseMerge.5dafd402.js";import"./_isIterateeCall.296204c7.js";import"./_baseEach.ffda1513.js";import"./get.fedb4b7c.js";import"./index.668f43cb.js";import"./FullscreenOutlined.944e5604.js";import"./index.46989e11.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.4a02ad1f.js";import"./index.9f588f5b.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.77bac509.js";import"./scrollTo.26a09e8a.js";import"./index.5147a12e.js";import"./index.60bd948f.js";import"./index.47269ecc.js";import"./_baseIteratee.35e8d02a.js";import"./index.47e70fdb.js";import"./useRefs.593a31cc.js";import"./download.d8a7eb76.js";import"./index.de5f8d2c.js";import"./uniqBy.34ebbb75.js";import"./index.d41d4fb4.js";import"./other.8ef9de92.js";import"./map.6d2b0c87.js";import"./lodash.8a8d1f80.js";import"./defaultsDeep.2b694633.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};