lcny-vue3-antd-admin/dist/assets/index.befcfc2b.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.e5b3e294.js";import{T as I}from"./useForm.71c98491.js";import{a as K,aA as L,bN as W,o as n,h as f,p as g,x as u,w as $,j as B,y as x,k as p,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.c16a1301.js";import{u as P}from"./index.8ac6d448.js";import{_ as Q,c as X,s as Y}from"./BaseDrawer.69c07c0b.js";import"./index.92a6fef6.js";import"./Checkbox.19f261fb.js";import"./index.c07793d2.js";import"./index.5d2d203b.js";import"./index.fc7b9049.js";import"./index.dc273ac3.js";import"./useSize.86cd70e0.js";import"./eagerComputed.b56370ca.js";import"./onMountedOrActivated.e0439402.js";import"./useWindowSizeFn.beb27cf1.js";import"./useContentViewHeight.5502677f.js";import"./ArrowLeftOutlined.0a98e564.js";import"./transButton.5703733c.js";import"./index.9c1ccbc7.js";import"./index.1b301362.js";import"./index.a324496f.js";import"./index.f33e5e28.js";import"./dateUtil.c2eee3c9.js";import"./_baseMerge.73a74ff3.js";import"./_isIterateeCall.b082250b.js";import"./_baseEach.0f583040.js";import"./get.2f41a2b4.js";import"./index.6243b668.js";import"./FullscreenOutlined.61f9247f.js";import"./index.f5cb4f1b.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.7950a17c.js";import"./index.01aeb5ae.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.072934ff.js";import"./scrollTo.42f6c488.js";import"./index.381e5ada.js";import"./index.6e14d0d0.js";import"./index.fcb3cdb2.js";import"./_baseIteratee.fdca6440.js";import"./index.f05b8b05.js";import"./useRefs.1ed3fc36.js";import"./download.abd26844.js";import"./index.9edabfdd.js";import"./uniqBy.168328e2.js";import"./index.83ca4adb.js";import"./other.520d41c8.js";import"./map.9b0542b5.js";import"./lodash.408f90fc.js";import"./defaultsDeep.3895867d.js";const Z={key:0,class:"flex items-center justify-center"},Xt=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:m}=yield O(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=()=>{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 m=L("a-button"),v=W("auth");return n(),f("div",null,[g(p(G),{onRegister:p(c)},{toolbar:u(()=>[$((n(),B(m,{type:"primary",onClick:d},{default:u(()=>[x(" \u65B0\u589E\u57FA\u5730 ")]),_:1})),[[v,"endpoint.agricultural_basic.create"]])]),bodyCell:u(({column:C,record:_})=>[C.key==="action"?(n(),f("div",Z,[g(p(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"?(n(!0),f(q,{key:1},z(_.crops,(A,S)=>(n(),B(p(H),{class:"mx-2px",key:S,type:"link"},{default:u(()=>[x(J(A.name),1)]),_:2},1024))),128)):D("",!0)]),_:1},8,["onRegister"]),g(Q,{onRegister:p(e),onSuccess:l},null,8,["onRegister"])])}}});export{Xt as default};