ソースを参照

修改大屏权限限制

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())