--添加解析execl插件,活动告警部分功能
This commit is contained in:
@@ -27,6 +27,8 @@ type UserInfo = {
|
||||
email: string;
|
||||
/**用户性别 */
|
||||
sex: string | undefined;
|
||||
/**个人化设置 */
|
||||
profile: Record<string, any>;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -56,6 +58,7 @@ const useUserStore = defineStore('user', {
|
||||
phonenumber: '',
|
||||
email: '',
|
||||
sex: undefined,
|
||||
profile: {},
|
||||
}),
|
||||
getters: {
|
||||
/**
|
||||
@@ -129,6 +132,19 @@ const useUserStore = defineStore('user', {
|
||||
this.phonenumber = user.phone;
|
||||
this.email = user.email;
|
||||
this.sex = user.gender;
|
||||
// this.profile = JSON.parse(user.profile);
|
||||
try {
|
||||
this.profile = JSON.parse(user.profile);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.profile = {
|
||||
critical: '#FF5722',
|
||||
major: '#FFB800',
|
||||
minor: '#393D49',
|
||||
warning: '#009688',
|
||||
event: '#1E9FFF',
|
||||
};
|
||||
}
|
||||
|
||||
// 验证返回的roles是否是一个非空数组
|
||||
if (Array.isArray(roles) && roles.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user