2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
var A=Object.defineProperty,R=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var C=(o,e,t)=>e in o?A(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,f=(o,e)=>{for(var t in e||(e={}))N.call(e,t)&&C(o,t,e[t]);if(g)for(var t of g(e))v.call(e,t)&&C(o,t,e[t]);return o},k=(o,e)=>R(o,E(e));var h=(o,e,t)=>new Promise((c,s)=>{var l=i=>{try{a(t.next(i))}catch(r){s(r)}},d=i=>{try{a(t.throw(i))}catch(r){s(r)}},a=i=>i.done?c(i.value):Promise.resolve(i.value).then(l,d);a((t=t.apply(o,e)).next())});import{u as V,B as j}from"./useTable.eef218a3.js";import{T as G}from"./BasicForm.82bac281.js";import{a as U,aG as z,o as p,h as b,n,z as u,B as F,k as m,l as B,F as I,aJ as J,j as K,C as L,t as M,cN as w,cM as O,cO as W}from"./index.c32990f8.js";import{u as $}from"./index.fd979a7c.js";import{_ as q,c as H,s as P}from"./BaseDrawer.0f58f402.js";import"./index.3edadc16.js";import"./Checkbox.9f8bb87f.js";import"./index.3d7638b8.js";import"./useForm.8ed2c601.js";import"./index.ef49fbf2.js";import"./index.18793a5c.js";import"./index.b82f04cc.js";import"./useSize.4791f091.js";import"./eagerComputed.4b10fdb6.js";import"./useWindowSizeFn.aeae38b8.js";import"./useContentViewHeight.9f7d31eb.js";import"./ArrowLeftOutlined.261ec900.js";import"./transButton.c32900a3.js";import"./index.31b8a276.js";import"./index.d9bc5098.js";import"./index.e1b76525.js";import"./dayjs.min.78a88238.js";import"./index.89a648c8.js";import"./dateUtil.27296437.js";import"./_baseMerge.ff01c7f9.js";import"./_isIterateeCall.5827c37a.js";import"./_baseEach.8e1e703f.js";import"./get.0f83bcc9.js";import"./index.61ed12bd.js";import"./FullscreenOutlined.c00357d2.js";import"./index.b9cb2689.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.322588a1.js";import"./fromPairs.84aabb58.js";import"./index.a3dce25b.js";import"./index.8f815cab.js";import"./index.7581729a.js";import"./_baseIteratee.b53edf8d.js";import"./CaretUpOutlined.d2204286.js";import"./scrollTo.bf8c3d6f.js";import"./index.c4eaa479.js";import"./index.1733ef64.js";import"./index.f86b5268.js";import"./useRefs.e81244b6.js";import"./download.22e12e21.js";import"./index.f660a0af.js";import"./index.bed474f7.js";import"./uniqBy.ac8c5ce3.js";import"./index.1a868190.js";import"./map.7a857175.js";import"./lodash.5757b941.js";const Q={class:"pt-20px"},X={key:0,class:"flex items-center justify-center"},Qt=U({__name:"index",setup(o){const[e,{openDrawer:t}]=$(),[c,{reload:s}]=V({title:"\u57FA\u5730\u5217\u8868",api:r=>h(this,null,function*(){return yield W(f({type:1},r))}),rowKey:"id",columns:H,formConfig:{labelWidth:120,schemas:P},useSearchForm:!1,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),l=()=>{w.success("\u64CD\u4F5C\u6210\u529F"),s()},d=()=>{t(!0,{isUpdate:!1})},a=r=>{t(!0,k(f({},r),{isUpdate:!0}))},i=r=>h(this,null,function*(){yield O(r.id),w.success("\u5220\u9664\u6210\u529F"),s()});return(r,x)=>{const T=z("a-button");return p(),b("div",Q,[n(m(j),{onRegister:m(c)},{toolbar:u(()=>[n(T,{type:"primary",onClick:d},{default:u(()=>[F(" \u65B0\u589E\u57FA\u5730 ")]),_:1})]),bodyCell:u(({column:y,record:_})=>[y.key==="action"?(p(),b("div",X,[n(m(G),{actions:[{label:"\u7F16\u8F91",onClick:a.bind(null,_)},{label:"\u5220\u9664",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,_)}}]},null,8,["actions"])])):B("",!0),y.key==="crops"?(p(!0),b(I,{key:1},J(_.crops,(D,S)=>(p(),K(m(L),{class:"mx-2px",key:S,type:"link"},{default:u(()=>[F(M(D.name),1)]),_:2},1024))),128)):B("",!0)]),_:1},8,["onRegister"]),n(q,{onRegister:m(e),onSuccess:l},null,8,["onRegister"])])}}});export{Qt as default};
|