浏览代码

修改大屏权限限制

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(){
     smartScreen(){
       currentLogin().then(res=>{
       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) => {
           this.getConfigKey("large.screen").then((response) => {
             if (response.msg) {
             if (response.msg) {
               window.open( 'http://119.3.74.195:9527/view/'+ response.msg +'?Authorization=' + getToken())
               window.open( 'http://119.3.74.195:9527/view/'+ response.msg +'?Authorization=' + getToken())