mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-11-10 12:43:37 +08:00
perf: 系统管理
This commit is contained in:
@@ -30,7 +30,7 @@ const {
|
||||
submitEditUser
|
||||
} = useUser(tableRef, treeRef);
|
||||
|
||||
const user = reactive(userInfo.value.user);
|
||||
const user = reactive(userInfo.value);
|
||||
defineOptions({
|
||||
name: "UserInfo"
|
||||
});
|
||||
@@ -51,9 +51,9 @@ defineOptions({
|
||||
<el-avatar
|
||||
:size="80"
|
||||
src="https://empty"
|
||||
@click="handleUpload(userInfo.user)"
|
||||
@click="handleUpload(userInfo)"
|
||||
>
|
||||
<img :src="'/avatar/' + userInfo.user.avatarName" />
|
||||
<img :src="'/avatar/' + userInfo.avatarName" />
|
||||
</el-avatar>
|
||||
</div>
|
||||
|
||||
@@ -62,28 +62,28 @@ defineOptions({
|
||||
<div style="height: 100%">
|
||||
<IconifyIconOffline class="check-zh" :icon="SignIn" />
|
||||
登录账号
|
||||
<div class="user-right">{{ userInfo.user.username }}</div>
|
||||
<div class="user-right">{{ userInfo.username }}</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<IconifyIconOffline class="check-zh" :icon="Check" />
|
||||
用户昵称
|
||||
<div class="user-right">{{ userInfo.user.nickName }}</div>
|
||||
<div class="user-right">{{ userInfo.nickName }}</div>
|
||||
</li>
|
||||
<li>
|
||||
<IconifyIconOffline class="check-zh" :icon="NodeTree" />
|
||||
所属部门
|
||||
<div class="user-right">{{ userInfo.user.dept.name }}</div>
|
||||
<div class="user-right">{{ userInfo.dept.name }}</div>
|
||||
</li>
|
||||
<li>
|
||||
<IconifyIconOffline class="check-zh" :icon="Phone" />
|
||||
手机号码
|
||||
<div class="user-right">{{ userInfo.user.phone }}</div>
|
||||
<div class="user-right">{{ userInfo.phone }}</div>
|
||||
</li>
|
||||
<li>
|
||||
<IconifyIconOffline class="check-zh" :icon="Mail" />
|
||||
用户邮箱
|
||||
<div class="user-right">{{ userInfo.user.email }}</div>
|
||||
<div class="user-right">{{ userInfo.email }}</div>
|
||||
</li>
|
||||
<li>
|
||||
<IconifyIconOffline class="check-zh" :icon="Secure" />
|
||||
@@ -135,7 +135,7 @@ defineOptions({
|
||||
clearable
|
||||
style="width: 35%"
|
||||
/>
|
||||
<span style=" margin-left: 10px;color: #e6a23c"
|
||||
<span style="margin-left: 10px; color: #e6a23c"
|
||||
>⚠️用户昵称不作为登录使用</span
|
||||
>
|
||||
</el-form-item>
|
||||
@@ -164,7 +164,7 @@ defineOptions({
|
||||
]"
|
||||
>
|
||||
<el-input v-model="user.phone" clearable style="width: 35%" />
|
||||
<span style=" margin-left: 10px;color: #e6a23c"
|
||||
<span style="margin-left: 10px; color: #e6a23c"
|
||||
>⚠️手机号码不能重复</span
|
||||
>
|
||||
</el-form-item>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { baseUrlAvatar } from "@/api/utils";
|
||||
import { zxcvbn } from "@zxcvbn-ts/core";
|
||||
import { isAllEmpty, isNull, isEmail } from "@pureadmin/utils";
|
||||
import { addDialog } from "@/components/ReDialog";
|
||||
import Cookies from "js-cookie";
|
||||
import { storageLocal } from "@pureadmin/utils";
|
||||
import * as User from "@/api/system/user";
|
||||
import {
|
||||
ElForm,
|
||||
@@ -55,7 +55,7 @@ export function useUser(tableRef: Ref, treeRef: Ref) {
|
||||
});
|
||||
/** 用户信息 */
|
||||
const userInfo = computed(() => {
|
||||
return JSON.parse(Cookies.get("userInfo"));
|
||||
return storageLocal().getItem("user-info").user;
|
||||
});
|
||||
/** 获取邮箱验证码 */
|
||||
const getEmailCode = email => {
|
||||
|
||||
Reference in New Issue
Block a user