2 lines
3.5 KiB
JavaScript
2 lines
3.5 KiB
JavaScript
var B=Object.defineProperty,S=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var w=(r,e,t)=>e in r?B(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,d=(r,e)=>{for(var t in e||(e={}))D.call(e,t)&&w(r,t,e[t]);if(y)for(var t of y(e))T.call(e,t)&&w(r,t,e[t]);return r},C=(r,e)=>S(r,k(e));var _=(r,e,t)=>new Promise((u,a)=>{var l=i=>{try{s(t.next(i))}catch(o){a(o)}},c=i=>{try{s(t.throw(i))}catch(o){a(o)}},s=i=>i.done?u(i.value):Promise.resolve(i.value).then(l,c);s((t=t.apply(r,e)).next())});import{d as R}from"./dayjs.min.cf2171ab.js";import{u as E,B as Y}from"./useTable.dd65ac9a.js";import{T as A}from"./BasicForm.a6a69c7e.js";import{L as N,a as V,aG as j,o as g,h as F,n as p,z as f,B as I,k as n,l as U,cs as x,eR as z,eS as G}from"./index.10d06543.js";import{u as K}from"./index.f4cd53d5.js";import{F as L,c as W,s as q}from"./FlowsDrawer.412db610.js";import"./index.6605206d.js";import"./Checkbox.955ea262.js";import"./index.cb13c93f.js";import"./useForm.7d736709.js";import"./index.13b18db1.js";import"./index.13125b09.js";import"./index.d0d33ff5.js";import"./useSize.d9326d8e.js";import"./eagerComputed.7fba5e3b.js";import"./useWindowSizeFn.a9703094.js";import"./useContentViewHeight.1f792a27.js";import"./ArrowLeftOutlined.804f6521.js";import"./transButton.7319b884.js";import"./index.e30a4152.js";import"./index.1dd41060.js";import"./index.b2ec9148.js";import"./index.3d06ecbb.js";import"./dateUtil.d25fd49f.js";import"./_baseMerge.62581eda.js";import"./_isIterateeCall.314814b5.js";import"./_baseEach.e644a8bc.js";import"./get.bd6d3db4.js";import"./index.0e3cf717.js";import"./FullscreenOutlined.bc4a08a6.js";import"./index.a5e82843.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.9008bb6f.js";import"./fromPairs.84aabb58.js";import"./index.4af0e149.js";import"./CaretUpOutlined.0b02bfc1.js";import"./scrollTo.f9c80981.js";import"./index.12c353be.js";import"./index.9df737e3.js";import"./index.5ba3a90f.js";import"./_baseIteratee.ce67176e.js";import"./index.fd538503.js";import"./useRefs.335cb825.js";import"./download.51a64bb1.js";import"./index.2ce8ed60.js";import"./index.f5075019.js";import"./uniqBy.eed4f041.js";import"./index.92c669b8.js";const H={key:0,class:"flex items-center justify-center"},J=V({__name:"index",setup(r){const[e,{openDrawer:t}]=K(),[u,{reload:a}]=E({title:"\u7A3B\u867E\u6D41\u5411 - \u5217\u8868",api:o=>_(this,null,function*(){o.year&&(o.year=R(o.year).format("YYYY"));const{data:h,meta:m}=yield G(d({},o));return{items:h,total:m==null?void 0:m.total}}),rowKey:"id",columns:W,formConfig:{labelWidth:120,schemas:q},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),l=()=>{x.success("\u64CD\u4F5C\u6210\u529F"),a()},c=()=>{t(!0,{isUpdate:!1})},s=o=>{t(!0,C(d({},o),{isUpdate:!0}))},i=o=>_(this,null,function*(){yield z(o.id),x.success("\u5220\u9664\u6210\u529F"),a()});return(o,h)=>{const m=j("a-button");return g(),F("div",null,[p(n(Y),{onRegister:n(u)},{toolbar:f(()=>[p(m,{type:"primary",onClick:c},{default:f(()=>[I(" \u65B0\u589E ")]),_:1})]),bodyCell:f(({column:v,record:b})=>[v.key==="action"?(g(),F("div",H,[p(n(A),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,b)},{label:"\u5220\u9664",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,b)}}]},null,8,["actions"])])):U("",!0)]),_:1},8,["onRegister"]),p(L,{onRegister:n(e),onSuccess:l},null,8,["onRegister"])])}}});var Lt=N(J,[["__scopeId","data-v-28d7abce"]]);export{Lt as default};
|