Commit 641b7895 authored by 陈娇's avatar 陈娇

隐藏首页,默认显示页面改为 设备中心/网关管理

parent c2f6ccc7
...@@ -35,7 +35,7 @@ export class LoginComponent implements OnInit { ...@@ -35,7 +35,7 @@ export class LoginComponent implements OnInit {
if (data.constructor === Object) { if (data.constructor === Object) {
if (data.code === 1) { if (data.code === 1) {
window.sessionStorage.setItem('_AMap_AMap.MapInner', data.message); window.sessionStorage.setItem('_AMap_AMap.MapInner', data.message);
this.router.navigate(['app/home']); this.router.navigate(['app/deviceCenter/gatewayMgr']);
this.getCurUser(); this.getCurUser();
} else { } else {
this.message.error(data.message); this.message.error(data.message);
......
<div class="menuPart"> <div class="menuPart">
<div class="menuFirst" *ngFor="let item of dataArr"> <div class="menuFirst" *ngFor="let item of dataArr">
<ng-container *ngIf="item.isDisplay">
<div class="first-floor textStyle1 whenHover" [title]="item.name | translate" *ngIf="(item.child && item.child.length > 0) || item.type" (click)="selectFirstFloor(item)" [ngClass]="{'isSelectedFirst': isSelected[0] === item.name, 'isSelectedSecond': isSelected[0] === item.name && item.type === 1}"> <div class="first-floor textStyle1 whenHover" [title]="item.name | translate" *ngIf="(item.child && item.child.length > 0) || item.type" (click)="selectFirstFloor(item)" [ngClass]="{'isSelectedFirst': isSelected[0] === item.name, 'isSelectedSecond': isSelected[0] === item.name && item.type === 1}">
<i [class]="item.icon" [ngClass]="{'iconLeft': !isCollapsed,'iconLeftCos': isCollapsed}"></i> <i [class]="item.icon" [ngClass]="{'iconLeft': !isCollapsed,'iconLeftCos': isCollapsed}"></i>
<span *ngIf="!isCollapsed">{{item.name | translate}}</span> <span *ngIf="!isCollapsed">{{item.name | translate}}</span>
...@@ -19,5 +20,6 @@ ...@@ -19,5 +20,6 @@
</div> </div>
</div> </div>
</div> </div>
</ng-container>
</div> </div>
</div> </div>
...@@ -27,23 +27,37 @@ export class LeftmenuComponent implements OnInit, OnDestroy { ...@@ -27,23 +27,37 @@ export class LeftmenuComponent implements OnInit, OnDestroy {
name: 'home', name: 'home',
icon: 'io i-shouye', icon: 'io i-shouye',
type: 1, type: 1,
child: [] child: [],
isDisplay: false
}, { }, {
name: 'deviceCenter', name: 'deviceCenter',
icon: 'io i-shebei', icon: 'io i-shebei',
type: 0, type: 0,
child: [{name: 'gatewayMgr'}, {name: 'sensorMgr'}, {name: 'moduleMgr'}, child: [
{name: 'topicModuleMgr'}] {name: 'gatewayMgr',isDisplay: true},
{name: 'sensorMgr',isDisplay: true},
{name: 'moduleMgr',isDisplay: true},
{name: 'topicModuleMgr',isDisplay: true}
]
}, { }, {
name: 'systemMgr', name: 'systemMgr',
icon: 'io i-shezhi', icon: 'io i-shezhi',
type: 0, type: 0,
child: [{name: 'influxdbMgr'}, {name: 'userCenter'}, {name: 'customCenter'}, {name: 'partMgr'}, {name: 'areaMgr'}, {name: 'logMgr'}] child: [
{name: 'influxdbMgr',isDisplay: true},
{name: 'userCenter',isDisplay: true},
{name: 'customCenter',isDisplay: true},
{name: 'partMgr',isDisplay: true},
{name: 'areaMgr',isDisplay: true},
{name: 'logMgr',isDisplay: true}]
}, { }, {
name: 'dataCenter', name: 'dataCenter',
icon: 'io i-ico_data', icon: 'io i-ico_data',
type: 0, type: 0,
child: [{name: 'currentData'}, {name: 'dataSum'}, {name: 'historyData'}] child: [
{name: 'currentData',isDisplay: true},
{name: 'dataSum',isDisplay: true},
{name: 'historyData',isDisplay: true}]
}]; }];
isOpen = {monitoring: false, deviceManage: false, pileManage: false, moduleCenter: false, systemSet: false}; isOpen = {monitoring: false, deviceManage: false, pileManage: false, moduleCenter: false, systemSet: false};
isSelected = ['', '']; isSelected = ['', ''];
......
...@@ -89,7 +89,7 @@ export class PermissionService { ...@@ -89,7 +89,7 @@ export class PermissionService {
const funcCheckJson = JSON.stringify(this.functions); const funcCheckJson = JSON.stringify(this.functions);
window.sessionStorage.setItem(encodeURIComponent('_AMap_AMap.InterEnterKey'), this.transform(funcCheckJson)); window.sessionStorage.setItem(encodeURIComponent('_AMap_AMap.InterEnterKey'), this.transform(funcCheckJson));
if (permissionCheckJson.indexOf('home') && type === 'login') { if (permissionCheckJson.indexOf('home') && type === 'login') {
this.router.navigate(['app/home']); this.router.navigate(['app/deviceCenter/gatewayMgr']);
} else { } else {
this.router.navigate(['extra/login']); this.router.navigate(['extra/login']);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment