ERP-admin/build/admin/assets/setting.e20c4bf3.js

2 lines
5.0 KiB
JavaScript
Raw Normal View History

2024-05-15 09:12:16 +08:00
import{_ as D}from"./index.16a62782.js";import{D as v,C as b,F as h,T as U,w as y}from"./element-plus.9990c39e.js";import{M as k}from"./picker.be4d3224.js";import{a as I,f as a,B as x}from"./index.9424646f.js";import{d as f,r as M,Z as _,o as S,c as N,U as u,L as t,u as e,a as d,R}from"./@vue.18505fe0.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.ef95d8c0.js";import"./axios.77245e3c.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.1fdb40b8.js";import"./index.f4f18b5a.js";import"./index.vue_vue_type_script_setup_true_lang.3de7c996.js";import"./index.08bd2556.js";import"./usePaging.6a6670f9.js";import"./vuedraggable.11c6ad82.js";import"./vue.09510228.js";import"./sortablejs.b9072078.js";import"./lodash.be6e4bb5.js";import"./vue-router.886c5f5a.js";import"./pinia.a969beab.js";import"./css-color-function.6061d63f.js";import"./color.1580a89c.js";import"./clone.4ed29f58.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.b29ee5e2.js";import"./vue-clipboard3.15c43b43.js";import"./clipboard.4a3580c9.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const q={class:"user-setting"},T={class:"w-80"},L={class:"w-80"},P={class:"w-80"},Z={class:"w-80"},j={class:"w-80"},z=f({name:"userSetting"}),Mo=f({...z,setup(G){const n=M(),i=I(),o=_({avatar:"",account:"",name:"",password_old:"",password:"",password_confirm:""}),c=_({avatar:[{required:!0,message:"\u5934\u50CF\u4E0D\u80FD\u4E3A\u7A7A",trigger:["change"]}],name:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0",trigger:["blur"]}]}),F=async()=>{const m=i.userInfo;for(const r in o)o[r]=m[r]},w=async()=>{if(o.password_old||o.password||o.password_confirm){if(!o.password_old)return a.msgError("\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801");if(!o.password)return a.msgError("\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801");if(!o.password_confirm)return a.msgError("\u8BF7\u8F93\u5165\u786E\u5B9A\u5BC6\u7801");if(o.password_confirm!=o.password)return a.msgError("\u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u4E00\u6837")}if(o.password_old&&o.password&&o.password_confirm){if(o.password_old.length<6||o.password_old.length>32)return a.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4");if(o.password.length<6||o.password.length>32)return a.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4");if(o.password_confirm.length<6||o.password_confirm.length>32)return a.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4")}await x(o),i.getUserInfo()},E=async()=>{var m;await((m=n.value)==null?void 0:m.validate()),w()};return F(),(m,r)=>{const B=k,l=v,p=b,C=h,g=U,V=y,A=D;return S(),N("div",q,[u(g,{class:"!border-none",shadow:"never"},{default:t(()=>[u(C,{ref_key:"formRef",ref:n,class:"ls-form",model:e(o),rules:e(c),"label-width":"100px"},{default:t(()=>[u(l,{label:"\u5934\u50CF\uFF1A",prop:"avatar"},{default:t(()=>[u(B,{modelValue:e(o).avatar,"onUpdate:modelValue":r[0]||(r[0]=s=>e(o).avatar=s),limit:1},null,8,["modelValue"])]),_:1}),u(l,{label:"\u8D26\u53F7\uFF1A",prop:"account"},{default:t(()=>[d("div",T,[u(p,{modelValue:e(o).account,"onUpdate:modelValue":r[1]||(r[1]=s=>e(o).account=s),disabled:""},null,8,["modelValue"])])]),_:1}),u(l,{label:"\u540D\u79F0\uFF1A",prop:"name"},{default:t(()=>[d("div",L,[u(p,{modelValue:e(o).name,"onUpdate:modelValue":r[2]||(r[2]=s=>e(o).name=s),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])])]),_:1}),u(l,{label:"\u5F53\u524D\u5BC6\u7801\uFF1A",prop:"password_old"},{default:t(()=>[d("div",P,[u(p,{modelValue:e(o).password_old,"onUpdate:modelValue":r[3]||(r[3]=s=>e(o).password_old=s),modelModifiers:{trim:!0},placeholder:"\u4FEE\u6539\u5BC6\u7801\u65F6\u5FC5\u586B, \u4E0D\u4FEE\u6539\u5BC6\u7801\u65F6\u75