mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-19 09:48:11 +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,n as I,F as r,E as s,q as _,m as P,u as o,L as w,K as N}from"./base-d2ce4248.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as C}from"./index-4b7c0a63.js";import{t}from"./index-578c83eb.js";import{D as g}from"./index-057b5f2c.js";/* empty css */import{a as F,E as k}from"./index-f579a83b.js";import{E as B}from"./index-9997ff5d.js";import{E as D}from"./index-32160c2f.js";import{E as H}from"./index-953c712f.js";import{v as R}from"./directive-3f066692.js";import{E as q}from"./index-af4b4ec9.js";import{_ as L}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-f7de127f.js";import"./el-overlay-7451f13b.js";import"./event-f83e96f5.js";import"./index-28969730.js";import"./focus-trap-b41dd321.js";import"./attachment-84ee7a05.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-58212670.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-3118dac6.js";import"./index-3ff0840c.js";import"./index-758a5fe7.js";import"./storage-e62e496d.js";import"./index-faa3f8c5.js";import"./index-92c8bc76.js";import"./index-5e746953.js";import"./index-3ae544fb.js";import"./index-e41f0205.js";import"./index-13c7facf.js";import"./isEqual-51ec1a47.js";import"./_Uint8Array-6ca580e8.js";import"./flatten-2fc24abf.js";import"./index-aaab07eb.js";import"./index-83fe4dc1.js";import"./index-0ba64799.js";import"./strings-986fee93.js";import"./common-dd6d00bb.js";import"./common-2cf17469.js";import"./vue-router-d3dc2686.js";import"./el-radio-b620ac73.js";import"./el-avatar-4397f45a.js";import"./_initCloneObject-5fe9c070.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((P(),I("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-d73af766"]]);export{Oe as default};
|