2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
var B=Object.defineProperty,F=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var g=(o,e,t)=>e in o?B(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,l=(o,e)=>{for(var t in e||(e={}))R.call(e,t)&&g(o,t,e[t]);if(C)for(var t of C(e))S.call(e,t)&&g(o,t,e[t]);return o},v=(o,e)=>F(o,T(e));var d=(o,e,t)=>new Promise((p,a)=>{var u=i=>{try{s(t.next(i))}catch(r){a(r)}},c=i=>{try{s(t.throw(i))}catch(r){a(r)}},s=i=>i.done?p(i.value):Promise.resolve(i.value).then(u,c);s((t=t.apply(o,e)).next())});import{q as E,a as M,aC as Y,bP as j,o as _,h as w,p as f,y as h,w as I,j as N,z as V,k as n,l as A,cu as x,f7 as U,cI as q,f8 as z}from"./index.80d5b8a7.js";import{u as K,B as P}from"./useTable.47f1515f.js";import{T as W}from"./useForm.c0be8dd2.js";import{u as G}from"./index.981c2363.js";import{M as H,c as J,s as L}from"./MaterielsDrawer.20ddf65e.js";import"./index.2eef3e03.js";import"./Checkbox.ecb61dd2.js";import"./index.f86fd20a.js";import"./index.b81c4f99.js";import"./index.9ed9a1ce.js";import"./index.72a1ec09.js";import"./useSize.18c36d63.js";import"./eagerComputed.2afcc68e.js";import"./onMountedOrActivated.9a4e7728.js";import"./useWindowSizeFn.dff138d1.js";import"./useContentViewHeight.1aa83691.js";import"./ArrowLeftOutlined.244b6f1a.js";import"./transButton.dd91eda9.js";import"./index.94cdeb5c.js";import"./index.d3965a8a.js";import"./index.936bcd03.js";import"./index.a1361fe8.js";import"./dateUtil.334acb5f.js";import"./_baseMerge.d787d49c.js";import"./_isIterateeCall.e28bc4c3.js";import"./_baseEach.db363ee6.js";import"./get.9ecf4090.js";import"./index.7365439b.js";import"./FullscreenOutlined.abcb6c9a.js";import"./index.a2f39e1a.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.d76b2479.js";import"./index.d9c8bfa0.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.14988d42.js";import"./scrollTo.baf7def3.js";import"./index.d15bc2a6.js";import"./index.e3f23f17.js";import"./index.bfcaa235.js";import"./_baseIteratee.02af8ef8.js";import"./index.a94422d1.js";import"./useRefs.7ceb8caa.js";import"./download.2742eb39.js";import"./index.e3e998e3.js";import"./uniqBy.ea1eebc1.js";import"./index.27983812.js";const O={key:0,class:"flex items-center justify-center"},Q=M({__name:"index",setup(o){const[e,{openDrawer:t}]=G(),[p,{reload:a}]=K({title:"\u5927\u5B97\u7269\u8D44 - \u5217\u8868",api:r=>d(this,null,function*(){r.year&&(r.year=q(r.year).format("YYYY"));const{data:y,meta:m}=yield z(l({},r));return{items:y,total:m==null?void 0:m.total}}),rowKey:"id",columns:J,formConfig:{labelWidth:120,schemas:L},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),u=()=>{x.success("\u64CD\u4F5C\u6210\u529F"),a()},c=()=>{t(!0,{isUpdate:!1})},s=r=>{t(!0,v(l({},r),{isUpdate:!0}))},i=r=>d(this,null,function*(){yield U(r.id),x.success("\u5220\u9664\u6210\u529F"),a()});return(r,y)=>{const m=Y("a-button"),D=j("auth");return _(),w("div",null,[f(n(P),{onRegister:n(p)},{toolbar:h(()=>[I((_(),N(m,{type:"primary",onClick:c},{default:h(()=>[V(" \u65B0\u589E ")]),_:1})),[[D,"endpoint.materiels.create"]])]),bodyCell:h(({column:k,record:b})=>[k.key==="action"?(_(),w("div",O,[f(n(W),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,b),auth:"endpoint.materiels.edit"},{label:"\u5220\u9664",auth:"endpoint.materiels.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,b)}}]},null,8,["actions"])])):A("",!0)]),_:1},8,["onRegister"]),f(H,{onRegister:n(e),onSuccess:u},null,8,["onRegister"])])}}});var Wt=E(Q,[["__scopeId","data-v-122c0912"]]);export{Wt as default};
|