niucloud-admin/niucloud/public/admin/assets/personal-0024269c.js
2023-05-31 11:51:07 +08:00

2 lines
5.1 KiB
JavaScript

import"./base-962c0c23.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as E}from"./index-62d981e4.js";import{t as r}from"./index-e8f72538.js";import{C as g}from"./index-f1b9f75f.js";/* empty css */import{a as x,E as U}from"./index-61c777fa.js";import{E as I}from"./index-93f2c618.js";import{E as P}from"./index-69523418.js";import{E as C}from"./index-bba9e58c.js";import{v as N}from"./directive-c0c3e9a3.js";import{E as F}from"./index-00212650.js";import{d as k,M as B,r as f,L as H,e as R,q as t,p as s,f as _,b as q,u as o,x as w,v as D}from"./runtime-core.esm-bundler-dc7a07d7.js";import{_ as L}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-5c91979e.js";import"./el-overlay-60700377.js";import"./event-ff03ec12.js";import"./index-5d86eb33.js";import"./focus-trap-b8b5a003.js";import"./attachment-3d4e1dc9.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-58212670.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-d57cc47d.js";import"./index-e898882b.js";import"./index-8bcaafa6.js";import"./sys-93dce9bb.js";import"./storage-abe718b1.js";import"./index-50a00d09.js";import"./index-7a123a20.js";import"./index-a9dd5cf5.js";import"./index-2d71fdea.js";import"./index-9f244af6.js";import"./index-df51d91a.js";import"./isEqual-c7d5e6d9.js";import"./_Uint8Array-6ff3cafa.js";import"./flatten-d5d1dc97.js";import"./index-100b1469.js";import"./index-b933df38.js";import"./index-4f5c40a5.js";import"./strings-4868a118.js";import"./common-6291c908.js";import"./common-2cf17469.js";import"./vue-router-79053937.js";import"./el-radio-bfd4b1ad.js";import"./el-avatar-3bb47ce2.js";import"./_initCloneObject-28e6bdaa.js";function M(u){return g.get("auth/get")}function S(u){return g.put("auth/edit",u,{showSuccessMessage:!0})}const T={class:"main-container attachment-container"},$={class:"form-tip"},j={class:"fixed-footer-wrap"},z={class:"fixed-footer"},A=k({__name:"personal",setup(u){let e=B({head_img:"",real_name:"",original_password:"",password:"",password_copy:"",username:""});const c=f(),p=f(!0);(()=>{p.value=!0,M().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 b=d=>{p.value||!d||d.validate(a=>{if(a){let m="";if(e.password&&!e.original_password&&(m=r("originalPasswordHint")),e.password&&e.original_password&&!e.password_copy&&(m=r("newPasswordHint")),e.password&&e.original_password&&e.password_copy&&e.password!=e.password_copy&&(m=r("doubleCipherHint")),m){F({type:"error",message:m});return}p.value=!0,S(e).then(i=>{p.value=!1}).catch(i=>{p.value=!1})}else return console.log("error submit!"),!1})};return(d,a)=>{const m=E,i=x,n=I,h=U,v=P,V=C,y=N;return H((q(),R("div",T,[t(v,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[t(h,{model:o(e),"label-width":"90px",ref_key:"formRef",ref:c,rules:d.formRules,class:"page-form"},{default:s(()=>[t(i,{label:o(r)("headImg")},{default:s(()=>[t(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"]),t(i,{label:o(r)("userName")},{default:s(()=>[t(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"]),t(i,{label:o(r)("realName")},{default:s(()=>[t(n,{modelValue:o(e).real_name,"onUpdate:modelValue":a[2]||(a[2]=l=>o(e).real_name=l),placeholder:o(r)("realNamePlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(i,{label:o(r)("originalPassword")},{default:s(()=>[t(n,{modelValue:o(e).original_password,"onUpdate:modelValue":a[3]||(a[3]=l=>o(e).original_password=l),type:"password",placeholder:o(r)("originalPasswordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(i,{label:o(r)("password")},{default:s(()=>[t(n,{modelValue:o(e).password,"onUpdate:modelValue":a[4]||(a[4]=l=>o(e).password=l),type:"password",placeholder:o(r)("passwordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"]),_("div",$,w(o(r)("passwordTip")),1)]),_:1},8,["label"]),t(i,{label:o(r)("passwordCopy")},{default:s(()=>[t(n,{modelValue:o(e).password_copy,"onUpdate:modelValue":a[5]||(a[5]=l=>o(e).password_copy=l),type:"password",placeholder:o(r)("passwordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1}),_("div",j,[_("div",z,[t(V,{type:"primary",onClick:a[6]||(a[6]=l=>b(c.value))},{default:s(()=>[D(w(o(r)("save")),1)]),_:1})])])])),[[y,p.value]])}}});const We=L(A,[["__scopeId","data-v-bcba639b"]]);export{We as default};