lichao пре 3 година
родитељ
комит
74b3cbc3ca
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/views/index.vue

+ 2 - 1
src/views/index.vue

@@ -1684,7 +1684,8 @@ export default {
     },
     smartScreen(){
       currentLogin().then(res=>{
-        if (res.data.userName === 'admin'){
+        const role = res.data.roles.some(item => item.roleKey == 'admin' || item.roleKey == 'IDC')
+        if (role){
           this.getConfigKey("large.screen").then((response) => {
             if (response.msg) {
               window.open( 'http://119.3.74.195:9527/view/'+ response.msg +'?Authorization=' + getToken())