Merge remote-tracking branch 'origin/main' into practical-training

This commit is contained in:
TsMask
2024-06-19 12:04:40 +08:00
2 changed files with 5 additions and 0 deletions

View File

@@ -9,6 +9,8 @@ import { parseUrlPath } from '@/plugins/file-static-url';
/**用户信息类型 */
type UserInfo = {
/**用户ID */
userId: string;
/**登录账号 */
userName: string;
/**用户角色 字符串数组 */
@@ -31,6 +33,7 @@ type UserInfo = {
const useUserStore = defineStore('user', {
state: (): UserInfo => ({
userId: '',
userName: '',
roles: [],
permissions: [],
@@ -109,6 +112,7 @@ const useUserStore = defineStore('user', {
const res = await getInfo();
if (res.code === RESULT_CODE_SUCCESS && res.data) {
const { user, roles, permissions } = res.data;
this.userId = user.userId;
// 登录账号
this.userName = user.userName;
// 用户头像

View File

@@ -233,6 +233,7 @@ onMounted(() => {
<!-- 保存选择同步网元 -->
<ProModal
:drag="true"
:minHeight="0"
:keyboard="false"
:mask-closable="false"
:visible="state.visible"