sysConfig-a404ff6d.js 3.7 KB

1
  1. var I=Object.defineProperty;var g=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var h=(t,o,e)=>o in t?I(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,y=(t,o)=>{for(var e in o||(o={}))R.call(o,e)&&h(t,e,o[e]);if(g)for(var e of g(o))x.call(o,e)&&h(t,e,o[e]);return t};var c=(t,o,e)=>new Promise((d,r)=>{var m=s=>{try{l(e.next(s))}catch(p){r(p)}},n=s=>{try{l(e.throw(s))}catch(p){r(p)}},l=s=>s.done?d(s.value):Promise.resolve(s.value).then(m,n);l((e=e.apply(t,o)).next())});import{u as S,_ as U}from"./useForm-b1e549d3.js";import"./FormItem.vue_vue_type_script_lang-aa52e9e4.js";import{Q as q,at as k,_ as D}from"./index.js";import{a as F}from"./filters-a9f4cd40.js";import{s as G,a as L,b as O}from"./sysSettingApi-83ec86d7.js";import{f as V}from"./download-7fff4f5c.js";import{aG as E,B as v}from"./antd-f204cf77.js";import{d as M,o as N,f as T,q as j,Y as f,Z as A,l as b,a7 as u,u as i,_ as w,n as P,a6 as B,E as C}from"./vue-b33f04cb.js";import"./index-c733fbf6.js";import"./useWindowSizeFn-e2b93e2a.js";import"./useFormItem-1a9613e7.js";import"./uuid-31b8b5a4.js";import"./useSortable-764357db.js";import"./index-2f799b33.js";import"./copyTextToClipboard-2136d900.js";import"./index-2f695166.js";import"./index-fe06ec6c.js";import"./TextEditor-6383dadf.js";import"./onMountedOrActivated-3a1cee4e.js";const Q=[{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:"请输入系统默认密码"},rules:[{min:6}],colProps:{span:8}},{label:"验证码开关",field:"captchaOpen",required:!0,component:"RadioGroup",componentProps:{options:F}},{label:"系统描述",field:"defaultDescription",component:"InputTextArea",componentProps:{placeholder:"请输入系统描述"},colProps:{span:24}}],W=["src"],Y=M({__name:"sysConfig",setup(t){const{hasPermission:o}=q();N(()=>c(this,null,function*(){const a=yield G();n.value=a.logo,yield r(y({},a))}));const{createMessage:e}=k(),[d,{setFieldsValue:r,validate:m}]=S({layout:"vertical",labelWidth:"100%",baseColProps:{span:8},rowProps:{gutter:16},schemas:Q,showActionButtonGroup:!1,disabled:!o("sys:config:edit"),actionColOptions:{span:4}}),n=T(null);function l(){return c(this,null,function*(){const a=yield m();n.value&&(a.logo=n.value),yield L(a),e.success("修改成功")})}function s(){return c(this,null,function*(){const a=yield O();yield r(a)})}function p(a){return c(this,null,function*(){return n.value=yield V(a),!1})}return(a,Z)=>{const _=j("auth");return f(),A("div",null,[b(i(U),{onRegister:i(d),layout:"vertical"},{logo:u(()=>[b(i(E),{name:"file",showUploadList:!1,beforeUpload:p,accept:".jpg,.jpeg,.gif,.png,.webp",disabled:!i(o)("sys:config:edit"),class:"custor-pointer"},{default:u(()=>[w("img",{src:n.value,class:"img-avatar"},null,8,W)]),_:1},8,["disabled"])]),_:1},8,["onRegister"]),w("div",null,[P((f(),B(i(v),{onClick:s,class:"mr-4"},{default:u(()=>[C("重置")]),_:1})),[[_,["sys:config:edit"]]]),P((f(),B(i(v),{type:"primary",onClick:l},{default:u(()=>[C("保存")]),_:1})),[[_,["sys:config:edit"]]])])])}}});const fe=D(Y,[["__scopeId","data-v-f6ab2c0f"]]);export{fe as default};