var T=Object.defineProperty,v=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;var c=(e,a,t)=>a in e?T(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,l=(e,a)=>{for(var t in a||(a={}))m.call(a,t)&&c(e,t,a[t]);if(d)for(var t of d(a))u.call(a,t)&&c(e,t,a[t]);return e},p=(e,a)=>v(e,D(a));var f=(e,a)=>{var t={};for(var o in e)m.call(e,o)&&a.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&d)for(var o of d(e))a.indexOf(o)<0&&u.call(e,o)&&(t[o]=e[o]);return t};import{n as r}from"./index.js";const n="/v1/system/constant",V=e=>r.post({url:`${n}/`,data:e}),$=(e,a=!1)=>r.put({url:`${n}/`,data:e,params:{updateAllFields:a}}),A=e=>r.delete({url:`${n}/${e}`}),B=e=>r.get({url:`${n}/search`,params:e}),y=e=>r.get({url:`${n}/${e}`}),s={xs:{span:24},sm:{span:24},lg:{span:8}},F={span:24},i={model:"Constant",viewInPage:!1,properties:[{field:"id",label:"ID系统自动生成",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"ID系统自动生成"},colProps:s,component:"InputNumber",rules:[{required:!0,message:"请输入ID系统自动生成！"}]},table:{}},{field:"code",label:"编码",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"编码"},colProps:s,component:"Input",rules:[{required:!0,message:"请输入编码！"}]},table:{}},{field:"name",label:"名称",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"名称"},colProps:s,component:"Input",rules:[{required:!0,message:"请输入名称！"}]},table:{}},{field:"description",label:"描述",defaultValue:void 0,form:{componentProps:{allowClear:!1,placeholder:"描述"},component:"InputTextArea",colProps:{span:24},rules:[{required:!0,message:"请输入描述！"}]},table:{}},{field:"createTime",label:"CreateTime",defaultValue:void 0,form:{colProps:s,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入CreateTime！"}]},table:{}},{field:"updateTime",label:"UpdateTime",defaultValue:void 0,form:{colProps:s,componentProps:{allowClear:!1,placeholder:["开始时间","结束时间"],format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD",showTime:!1},component:"RangePicker",rules:[{required:!0,message:"请输入UpdateTime！"}]},table:{}}]},M=["code","name"],Y=["code","name","description"],h=["code","name","description","createTime","updateTime"],w=["code","name","description","createTime","updateTime"],g=new Map(M.map((e,a)=>[e,a])),k=i.properties.filter(e=>M.includes(e.field)).map(o=>{var{field:e,label:a,form:P}=o,t=f(P,[]);return p(l({field:e,label:a,defaultValue:void 0},t),{required:!1,rules:[{required:!1}]})}).sort((e,a)=>{const t=g.get(e.field),o=g.get(a.field);return t-o}),x=new Map(Y.map((e,a)=>[e,a])),R=i.properties.filter(e=>Y.includes(e.field)).map(({field:e,label:a,defaultValue:t,form:o})=>p(l({field:e,label:a,defaultValue:t},o),{colProps:F})).sort((e,a)=>{const t=x.get(e.field),o=x.get(a.field);return t-o}),I=new Map(h.map((e,a)=>[e,a])),S=i.properties.filter(e=>h.includes(e.field)).map(({field:e,label:a,table:t})=>l({dataIndex:e,title:a},t)).sort((e,a)=>{const t=I.get(e.dataIndex),o=I.get(a.dataIndex);return t-o}),b=new Map(w.map((e,a)=>[e,a])),U=i.properties.filter(e=>w.includes(e.field)).map(({field:e,label:a,table:t})=>l({dataIndex:e,title:a},t)).sort((e,a)=>{const t=b.get(e.dataIndex),o=b.get(a.dataIndex);return t-o});export{k as a,V as b,S as c,U as d,R as f,y as g,A as r,B as s,$ as u};
