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.2ba75b20.js";import{u as K,B as P}from"./useTable.6df659e1.js";import{T as W}from"./useForm.0b567ced.js";import{u as G}from"./index.eceda1dc.js";import{M as H,c as J,s as L}from"./MaterielsDrawer.8e2cff54.js";import"./index.cae0df36.js";import"./Checkbox.74809cb7.js";import"./index.b9cb77a4.js";import"./index.b21fb568.js";import"./index.1c8f07cc.js";import"./index.e44e605e.js";import"./useSize.e4f04587.js";import"./eagerComputed.af7428de.js";import"./onMountedOrActivated.dd83c977.js";import"./useWindowSizeFn.82dcdf74.js";import"./useContentViewHeight.c7fbc61a.js";import"./ArrowLeftOutlined.c67ad991.js";import"./transButton.6c38f12b.js";import"./index.a35ad62d.js";import"./index.a68fc977.js";import"./index.ce25e275.js";import"./index.3d58d82f.js";import"./dateUtil.b0bffe5d.js";import"./_baseMerge.9a6b1fc9.js";import"./_isIterateeCall.206319ea.js";import"./_baseEach.749d0580.js";import"./get.f89a3030.js";import"./index.efcaf39d.js";import"./FullscreenOutlined.7342633f.js";import"./index.8cad6346.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.86c18aa7.js";import"./index.e86a49b8.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.649969a7.js";import"./scrollTo.8461c37f.js";import"./index.ec9b731d.js";import"./index.3c52863a.js";import"./index.fad229ef.js";import"./_baseIteratee.a541afd2.js";import"./index.6161a9a9.js";import"./useRefs.d2ef520a.js";import"./download.c4430ad0.js";import"./index.72afb9f7.js";import"./uniqBy.d68fdb3a.js";import"./index.b40b7369.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};
|