var storage = window.sessionStorage; //用户权限 storage.setItem('user',JSON.stringify(result['data']['permissions'])); var storage = window.sessionStorage; let _this = this; setTimeout(function (){ let _theme = theme; for(var i=0; i< JSON.parse(storage["user"]).length; i++){ if(JSON.parse(storage["user"]).indexOf('admin') !== -1){ _this.statusCards = _this.statusCardsByThemes[_theme.name]; }else{ _this.statusCards = _this.statusCardsByThemes[_theme.name].slice(1,2); } } }, 200);