feat:user
This commit is contained in:
parent
f107247807
commit
7031aa7e6d
@ -3,7 +3,7 @@
|
|||||||
* @Author: zenghua.wang
|
* @Author: zenghua.wang
|
||||||
* @Date: 2023-06-20 14:29:45
|
* @Date: 2023-06-20 14:29:45
|
||||||
* @LastEditors: zenghua.wang
|
* @LastEditors: zenghua.wang
|
||||||
* @LastEditTime: 2025-02-18 09:48:18
|
* @LastEditTime: 2025-04-10 11:15:23
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown class="layout-avatar">
|
<el-dropdown class="layout-avatar">
|
||||||
@ -16,7 +16,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item :command="0"> 当前角色:{{ userInfo.nickName }} </el-dropdown-item>
|
<el-dropdown-item> 用户姓名:{{ userInfo.nickName }} </el-dropdown-item>
|
||||||
|
<el-dropdown-item> 用户角色:{{ roles }} </el-dropdown-item>
|
||||||
|
<el-dropdown-item> 部门组织:{{ userInfo?.dept?.deptName }} </el-dropdown-item>
|
||||||
<el-dropdown-item :command="5" divided @click="logOut">
|
<el-dropdown-item :command="5" divided @click="logOut">
|
||||||
<el-icon><SwitchButton /></el-icon>退出登录
|
<el-icon><SwitchButton /></el-icon>退出登录
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@ -42,6 +44,10 @@ const PermissionStore = usePermissionStore();
|
|||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userInfo = computed(() => UserStore.getUserInfo());
|
const userInfo = computed(() => UserStore.getUserInfo());
|
||||||
|
const roles = computed(() => {
|
||||||
|
const arr = userInfo.value.roles.map((item) => item.roleName);
|
||||||
|
return arr.join(' | ');
|
||||||
|
});
|
||||||
|
|
||||||
const logOut = async () => {
|
const logOut = async () => {
|
||||||
ElMessageBox.confirm('您是否确认退出登录?', '温馨提示', {
|
ElMessageBox.confirm('您是否确认退出登录?', '温馨提示', {
|
||||||
|
@ -32,6 +32,11 @@
|
|||||||
@row-update="rowUpdate"
|
@row-update="rowUpdate"
|
||||||
@row-del="rowDel"
|
@row-del="rowDel"
|
||||||
>
|
>
|
||||||
|
<template #menu-left>
|
||||||
|
<el-button type="warning" icon="upload" @click="rowImport">导入</el-button>
|
||||||
|
<el-button type="success" icon="download" @click="rowExport">导出</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #status="{ row }">
|
<template #status="{ row }">
|
||||||
<el-tag v-if="row.status == 0" type="success">启用</el-tag>
|
<el-tag v-if="row.status == 0" type="success">启用</el-tag>
|
||||||
<el-tag v-if="row.status == 1" type="danger">禁用</el-tag>
|
<el-tag v-if="row.status == 1" type="danger">禁用</el-tag>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @Author: zenghua.wang
|
* @Author: zenghua.wang
|
||||||
* @Date: 2023-06-20 14:29:45
|
* @Date: 2023-06-20 14:29:45
|
||||||
* @LastEditors: zenghua.wang
|
* @LastEditors: zenghua.wang
|
||||||
* @LastEditTime: 2025-02-18 09:48:18
|
* @LastEditTime: 2025-04-10 11:15:23
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown class="layout-avatar">
|
<el-dropdown class="layout-avatar">
|
||||||
@ -16,7 +16,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item :command="0"> 当前角色:{{ userInfo.nickName }} </el-dropdown-item>
|
<el-dropdown-item> 用户姓名:{{ userInfo.nickName }} </el-dropdown-item>
|
||||||
|
<el-dropdown-item> 用户角色:{{ roles }} </el-dropdown-item>
|
||||||
|
<el-dropdown-item> 部门组织:{{ userInfo?.dept?.deptName }} </el-dropdown-item>
|
||||||
<el-dropdown-item :command="5" divided @click="logOut">
|
<el-dropdown-item :command="5" divided @click="logOut">
|
||||||
<el-icon><SwitchButton /></el-icon>退出登录
|
<el-icon><SwitchButton /></el-icon>退出登录
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
@ -42,6 +44,10 @@ const PermissionStore = usePermissionStore();
|
|||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userInfo = computed(() => UserStore.getUserInfo());
|
const userInfo = computed(() => UserStore.getUserInfo());
|
||||||
|
const roles = computed(() => {
|
||||||
|
const arr = userInfo.value.roles.map((item) => item.roleName);
|
||||||
|
return arr.join(' | ');
|
||||||
|
});
|
||||||
|
|
||||||
const logOut = async () => {
|
const logOut = async () => {
|
||||||
ElMessageBox.confirm('您是否确认退出登录?', '温馨提示', {
|
ElMessageBox.confirm('您是否确认退出登录?', '温馨提示', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user