var y=Object.defineProperty;var _=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=(a,o,e)=>o in a?y(a,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[o]=e,h=(a,o)=>{for(var e in o||(o={}))v.call(o,e)&&g(a,e,o[e]);if(_)for(var e of _(o))w.call(o,e)&&g(a,e,o[e]);return a};var r=(a,o,e)=>new Promise((p,i)=>{var n=s=>{try{l(e.next(s))}catch(t){i(t)}},d=s=>{try{l(e.throw(s))}catch(t){i(t)}},l=s=>s.done?p(s.value):Promise.resolve(s.value).then(n,d);l((e=e.apply(a,o)).next())});import{u as P,B as C}from"./useForm-c19ef35c.js";import{d as B,aa as I,fF as R,r as x,k as S,o as U,m as q,g as c,y as u,f as m,dq as F,af as k,v as b,fG as G,fH as L,bz as O,j as V}from"./index-610a1d46.js";import{a as j}from"./filters-8277ebe9.js";import{f as D}from"./download-a90dd227.js";import"./index-985aa6f5.js";import"./useWindowSizeFn-1829b247.js";import"./index-b6d11df2.js";import"./index-72381a11.js";import"./index-4ed0dc84.js";import"./uuid-98bbe2a6.js";import"./XTUpload.vue_vue_type_style_index_0_scoped_61a00cd1_lang-bad913d6.js";import"./index-981858ed.js";import"./uniqBy-2b2a500d.js";const M=[{label:"系统LOGO",field:"logo",component:"Input",slot:"logo",colProps:{span:24}},{label:"系统名称",field:"name",required:!0,component:"Input",componentProps:{placeholder:"请输入系统名称"}},{label:"系统版本",field:"version",required:!0,component:"Input",componentProps:{placeholder:"请输入系统版本"}},{label:"版权信息",field:"copyRight",required:!0,component:"Input",componentProps:{placeholder:"请输入版权信息"}},{label:"版权链接URL",field:"copyRightUrl",component:"Input",componentProps:{placeholder:"请输入版权链接URL"}},{label:"系统默认密码",field:"defaultPsw",required:!0,component:"Input",componentProps:{placeholder:"请输入系统默认密码"},colProps:{span:8}},{label:"验证码开关",field:"captchaOpen",required:!0,component:"RadioGroup",componentProps:{options:j}},{label:"系统描述",field:"defaultDescription",component:"InputTextArea",componentProps:{placeholder:"请输入系统描述"},colProps:{span:24}}],N=["src"],T=B({__name:"sysConfig",setup(a){I(()=>r(this,null,function*(){const t=yield R();n.value=t.logo,yield p(h({},t))}));const{createMessage:o}=O(),[e,{setFieldsValue:p,validate:i}]=P({labelWidth:120,schemas:M,showActionButtonGroup:!1,actionColOptions:{span:23},baseColProps:{span:8},wrapperCol:{span:23}}),n=x(null);function d(){return r(this,null,function*(){const t=yield i();n.value&&(t.logo=n.value),yield G(t),o.success("修改成功")})}function l(){return r(this,null,function*(){const t=yield L();yield p(t)})}function s(t){return r(this,null,function*(){return n.value=yield D(t),!1})}return(t,A)=>{const f=S("a-button");return U(),q("div",null,[c(m(C),{onRegister:m(e),layout:"vertical"},{logo:u(()=>[c(m(F),{name:"file",showUploadList:!1,beforeUpload:s,accept:".jpg,.jpeg,.gif,.png,.webp"},{default:u(()=>[k("img",{src:n.value,class:"img-avatar"},null,8,N)]),_:1})]),_:1},8,["onRegister"]),c(f,{onClick:l},{default:u(()=>[b("重置")]),_:1}),c(f,{type:"primary",onClick:d},{default:u(()=>[b("保存")]),_:1})])}}});const ae=V(T,[["__scopeId","data-v-4637024b"]]);export{ae as default};