mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-04 20:31:10 +00:00
2 lines
5.0 KiB
JavaScript
2 lines
5.0 KiB
JavaScript
import{g as E,a4 as U,r as f,a1 as x,m as I,n as P,F as r,E as s,q as _,u as o,L as w,K as N}from"./base-45eb5090.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as C}from"./index-1b934a92.js";import{t}from"./index-047041cb.js";import{D as g}from"./index-341914e3.js";/* empty css */import{a as F,E as k}from"./index-c4fd4c9d.js";import{E as B}from"./index-4ce9333e.js";import{E as D}from"./index-fc3020f4.js";import{E as H}from"./index-25c37860.js";import{v as R}from"./directive-9f485fe5.js";import{E as q}from"./index-e14c3b1d.js";import{_ as L}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-671f772c.js";import"./el-overlay-616d6124.js";import"./event-4977bef7.js";import"./index-cd1661d3.js";import"./focus-trap-318ae2e0.js";import"./attachment-15395c63.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-58212670.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-aef37b98.js";import"./index-e29fff14.js";import"./index-9670e877.js";import"./storage-4159d1ed.js";import"./index-0d830c44.js";import"./index-3be486d3.js";import"./index-a096e75b.js";import"./index-da8a1336.js";import"./index-719dad93.js";import"./index-c0090d79.js";import"./isEqual-f877b6c1.js";import"./_Uint8Array-e584e472.js";import"./flatten-0fc8b7eb.js";import"./index-e841b684.js";import"./index-cc9a73f0.js";import"./index-201145a4.js";import"./strings-2444fdb3.js";import"./common-af78c857.js";import"./common-2cf17469.js";import"./vue-router-fcbaaf02.js";import"./el-radio-2719e44c.js";import"./el-avatar-bc58ad46.js";import"./castArray-df7eff2c.js";import"./_initCloneObject-983ff8c8.js";function S(u){return g.get("auth/get")}function T(u){return g.put("auth/edit",u,{showSuccessMessage:!0})}const K={class:"main-container attachment-container"},M={class:"form-tip"},$={class:"fixed-footer-wrap"},j={class:"fixed-footer"},z=E({__name:"personal",setup(u){let e=U({head_img:"",real_name:"",original_password:"",password:"",password_copy:"",username:""});const c=f(),p=f(!0);(()=>{p.value=!0,S().then(d=>{p.value=!1;let a=d.data;e.head_img=a.head_img,e.real_name=a.real_name,e.original_password=a.original_password,e.password=a.password,e.password_copy=a.password,e.username=a.username}).catch(()=>{p.value=!1})})();const h=d=>{p.value||!d||d.validate(a=>{if(a){let m="";if(e.password&&!e.original_password&&(m=t("originalPasswordHint")),e.password&&e.original_password&&!e.password_copy&&(m=t("newPasswordHint")),e.password&&e.original_password&&e.password_copy&&e.password!=e.password_copy&&(m=t("doubleCipherHint")),m){q({type:"error",message:m});return}p.value=!0,T(e).then(i=>{p.value=!1}).catch(i=>{p.value=!1})}else return!1})};return(d,a)=>{const m=C,i=F,n=B,v=k,b=D,V=H,y=R;return x((I(),P("div",K,[r(b,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[r(v,{model:o(e),"label-width":"90px",ref_key:"formRef",ref:c,rules:d.formRules,class:"page-form"},{default:s(()=>[r(i,{label:o(t)("headImg")},{default:s(()=>[r(m,{modelValue:o(e).head_img,"onUpdate:modelValue":a[0]||(a[0]=l=>o(e).head_img=l),limit:1},null,8,["modelValue"])]),_:1},8,["label"]),r(i,{label:o(t)("userName")},{default:s(()=>[r(n,{modelValue:o(e).username,"onUpdate:modelValue":a[1]||(a[1]=l=>o(e).username=l),clearable:"",class:"input-width",readonly:!0},null,8,["modelValue"])]),_:1},8,["label"]),r(i,{label:o(t)("realName")},{default:s(()=>[r(n,{modelValue:o(e).real_name,"onUpdate:modelValue":a[2]||(a[2]=l=>o(e).real_name=l),placeholder:o(t)("realNamePlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(i,{label:o(t)("originalPassword")},{default:s(()=>[r(n,{modelValue:o(e).original_password,"onUpdate:modelValue":a[3]||(a[3]=l=>o(e).original_password=l),type:"password",placeholder:o(t)("originalPasswordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(i,{label:o(t)("password")},{default:s(()=>[r(n,{modelValue:o(e).password,"onUpdate:modelValue":a[4]||(a[4]=l=>o(e).password=l),type:"password",placeholder:o(t)("passwordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"]),_("div",M,w(o(t)("passwordTip")),1)]),_:1},8,["label"]),r(i,{label:o(t)("passwordCopy")},{default:s(()=>[r(n,{modelValue:o(e).password_copy,"onUpdate:modelValue":a[5]||(a[5]=l=>o(e).password_copy=l),type:"password",placeholder:o(t)("passwordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1}),_("div",$,[_("div",j,[r(V,{type:"primary",onClick:a[6]||(a[6]=l=>h(c.value))},{default:s(()=>[N(w(o(t)("save")),1)]),_:1})])])])),[[y,p.value]])}}});const Oe=L(z,[["__scopeId","data-v-e350add2"]]);export{Oe as default};
|