...
|
...
|
@@ -19,6 +19,14 @@ global.common = { |
|
|
return roleStr.split(",");
|
|
|
}
|
|
|
return [];
|
|
|
},
|
|
|
isAdminManager : function (){
|
|
|
let userName = global.common.getUserName();
|
|
|
let roles = global.common.getUserRole();
|
|
|
if (roles && userName) {
|
|
|
return userName == 'admin' || userName == 'root' || roles.includes('ADMIN');
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
};
|
...
|
...
|
@@ -319,20 +327,6 @@ global.getBase64 = (file) => { |
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 判断是否是管理员角色
|
|
|
* <p>
|
|
|
* 作者: Wang
|
|
|
* 时间:2021/12/13 14:31
|
|
|
*/
|
|
|
global.isAdminRole = () => {
|
|
|
let roles = sessionStorage.getItem('roles');
|
|
|
if (roles && roles.indexOf('ADMIN') != -1) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
global.getAlarmLevel = (level) => {
|
|
|
let params = {
|
|
|
"3": {name: '严重告警', color: '#D81E06'},
|
...
|
...
|
|