| 1 |
- var I=Object.defineProperty;var g=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var h=(a,o,e)=>o in a?I(a,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[o]=e,y=(a,o)=>{for(var e in o||(o={}))R.call(o,e)&&h(a,e,o[e]);if(g)for(var e of g(o))U.call(o,e)&&h(a,e,o[e]);return a};var c=(a,o,e)=>new Promise((u,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?u(s.value):Promise.resolve(s.value).then(m,n);l((e=e.apply(a,o)).next())});import{u as x,_ as S}from"./useForm-c7f42ee0.js";import"./FormItem.vue_vue_type_script_lang-39d09a3e.js";import{U as q,au 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-6bdb84a9.js";import{f as V}from"./download-2ecc6b15.js";import{aG as E,B as v}from"./antd-f259b82a.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 d,u as i,_ as w,n as P,a6 as B,E as C}from"./vue-aed314e3.js";import"./index-4f5bc708.js";import"./useWindowSizeFn-6e9d633b.js";import"./useFormItem-421691fe.js";import"./uuid-31b8b5a4.js";import"./useSortable-7d2b6665.js";import"./index-7fe9c1e2.js";import"./copyTextToClipboard-328ee3b1.js";import"./index-6811a03f.js";import"./index-a4e1ec38.js";import"./TextEditor-4892fcd0.js";import"./onMountedOrActivated-d9097634.js";const W=[{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}}],Y=["src"],Z=M({__name:"sysConfig",setup(a){const{hasPermission:o}=q();N(()=>c(this,null,function*(){const t=yield G();n.value=t.logo,yield r(y({},t))}));const{createMessage:e}=k(),[u,{setFieldsValue:r,validate:m}]=x({layout:"vertical",labelWidth:"100%",baseColProps:{span:8},rowProps:{gutter:16},schemas:W,showActionButtonGroup:!1,disabled:!o("sys:config:edit"),actionColOptions:{span:4}}),n=T(null);function l(){return c(this,null,function*(){const t=yield m();console.log("abc",t),n.value&&(t.logo=n.value),yield L(t),e.success("修改成功")})}function s(){return c(this,null,function*(){const t=yield O();yield r(t)})}function p(t){return c(this,null,function*(){return n.value=yield V(t),!1})}return(t,$)=>{const _=j("auth");return f(),A("div",null,[b(i(S),{onRegister:i(u),layout:"vertical"},{logo:d(()=>[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:d(()=>[w("img",{src:n.value,class:"img-avatar"},null,8,Y)]),_:1},8,["disabled"])]),_:1},8,["onRegister"]),w("div",null,[P((f(),B(i(v),{onClick:s,class:"mr-4"},{default:d(()=>[C("重置")]),_:1})),[[_,["sys:config:edit"]]]),P((f(),B(i(v),{type:"primary",onClick:l},{default:d(()=>[C("保存")]),_:1})),[[_,["sys:config:edit"]]])])])}}});const fe=D(Z,[["__scopeId","data-v-69d64dee"]]);export{fe as default};
|