Commit c072493a authored by 陈娇's avatar 陈娇 Committed by 胥静

页面优化

parent 59100f9e
Pipeline #3039 passed with stage
in 0 seconds
......@@ -7,17 +7,23 @@
<i class="io iconRight" [ngClass]="{'i-xia': !isOpen[item.name] && !item.type && !isCollapsed,'i-shang': isOpen[item.name] && !item.type && !isCollapsed, 'i-you': isCollapsed && !item.type}"></i>
</div>
<div *ngIf="isOpen[item.name] && !isCollapsed" class="menuSecond whenHover">
<div class="second-floor whenHover textStyle2" [title]="one.name | translate" *ngFor="let one of item.child"
<ng-container *ngFor="let one of item.child">
<div class="second-floor whenHover textStyle2" *ngIf="one.isDisplay" [title]="one.name | translate"
(click)="selectSecondFloor(item.name, one.name)"
[ngClass]="{'isSelectedSecond': isSelected[0] === item.name && isSelected[1] === one.name}">{{one.name | translate}}
</div>
[ngClass]="{'isSelectedSecond': isSelected[0] === item.name && isSelected[1] === one.name}">
{{one.name | translate}}
</div>
</ng-container>
</div>
<div *ngIf="isCollapsed && item.child.length > 0" class="menuSecondCos" [ngClass]="{'isCos': isCollapsed}">
<div class="handleTheLeft">
<div class="second-floor-cos whenHover textStyle2" *ngFor="let one of item.child"
(click)="selectSecondFloor(item.name, one.name)"
[ngClass]="{'isSelectedSecond': isSelected[0] === item.name && isSelected[1] === one.name}">{{one.name | translate}}
</div>
<ng-container *ngFor="let one of item.child">
<div class="second-floor-cos whenHover textStyle2" *ngIf="one.isDisplay"
(click)="selectSecondFloor(item.name, one.name)"
[ngClass]="{'isSelectedSecond': isSelected[0] === item.name && isSelected[1] === one.name}">
{{one.name | translate}}
</div>
</ng-container>
</div>
</div>
</ng-container>
......
......@@ -33,31 +33,34 @@ export class LeftmenuComponent implements OnInit, OnDestroy {
name: 'deviceCenter',
icon: 'io i-shebei',
type: 0,
isDisplay: true,
child: [
{name: 'gatewayMgr',isDisplay: true},
{name: 'sensorMgr',isDisplay: true},
{name: 'moduleMgr',isDisplay: true},
{name: 'topicModuleMgr',isDisplay: true}
{name: 'gatewayMgr',isDisplay: true,},
{name: 'sensorMgr',isDisplay: true,},
{name: 'moduleMgr',isDisplay: true,},
{name: 'topicModuleMgr',isDisplay: true,}
]
}, {
name: 'systemMgr',
icon: 'io i-shezhi',
type: 0,
isDisplay: true,
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: 'influxdbMgr',isDisplay: true,},
{name: 'userCenter',isDisplay: true,},
{name: 'customCenter',isDisplay: true,},
{name: 'partMgr',isDisplay: true,},
{name: 'areaMgr',isDisplay: false,},
{name: 'logMgr',isDisplay: true,}]
}, {
name: 'dataCenter',
icon: 'io i-ico_data',
type: 0,
isDisplay: false,
child: [
{name: 'currentData',isDisplay: true},
{name: 'dataSum',isDisplay: true},
{name: 'historyData',isDisplay: true}]
{name: 'currentData',isDisplay: true,},
{name: 'dataSum',isDisplay: true,},
{name: 'historyData',isDisplay: true,}]
}];
isOpen = {monitoring: false, deviceManage: false, pileManage: false, moduleCenter: false, systemSet: false};
isSelected = ['', ''];
......
......@@ -52,7 +52,7 @@
optL="a" optV="b"></app-search-select>
<app-search-select isMust="true" inModal="true" [label]="'dataType' | translate" [(value)]="req.dataType"
[data]="[{a: 'json', b: 0}, {a: 'bin', b: 1}]" optL="a" optV="b"></app-search-select>
<app-search-select *ngIf="!isUpdate" isMust="true" inModal="true" [label]="'probesModel' | translate" [(value)]="req.probesModelNo"
<app-search-select *ngIf="!isUpdate" inModal="true" [label]="'probesModel' | translate" [(value)]="req.probesModelNo"
[data]="probesModels" optL="probesModelName" optV="probesModelNo"></app-search-select>
<app-search-item inModal="true" [label]="'dataInterval' | translate" [(value)]="req.dataInterval"></app-search-item>
<!--<app-search-item isMust="true" inModal="true" [label]="'frequency' | translate" [(value)]="req.frequency"></app-search-item>-->
......
......@@ -102,7 +102,7 @@ export class TopicModuleMgrComponent implements OnInit {
this.req = {};
this.isAddConV = true;
this.try = {
trans: {newTopicModelName: 'moduleName'},
trans: {topicModelName:'topicModelName',prefixName:'front',},
field: ['topicModelName', 'prefixName']};
}
......@@ -111,8 +111,8 @@ export class TopicModuleMgrComponent implements OnInit {
this.req = {...one};
this.isAddConV = true;
this.try = {
trans: {newTopicModelName: 'moduleName', front: 'prefixName'},
field: ['topicModelNo', 'topicModelName', 'prefixName']};
trans: {topicModelName:'topicModelName',prefixName:'front',},
field: ['topicModelName', 'prefixName']};
}
cancel(v) {
......@@ -121,17 +121,23 @@ export class TopicModuleMgrComponent implements OnInit {
save(v) {
this.isLoading = true;
// console.log(this[v],!this.ck.formCheck(this[v], this.try),"(((((")
if (!this.ck.formCheck(this[v], this.try)) {
this.isLoading = false;
return;
}
if (this.isUpdate && this.isAddConV) {
this.api.topicModel.updateTopic([this.req, this.next]);
this.isLoading = false;
} else if (!this.isUpdate && this.isAddConV) {
this.req.addTopicModelForInfoVos = [];
this.api.topicModel.addTopicModel([this.req, this.next]);
this.isLoading = false;
} else if (this.isSaveOther) {
this.api.topicModel.saveAsTopicModel([this.req2, this.next]);
this.isLoading = false;
}else{
this.isLoading = false;
}
}
......
......@@ -88,7 +88,7 @@ export class PermissionService {
window.sessionStorage.setItem(encodeURIComponent('_AMap_AMap.OuterEnterKey'), this.transform(permissionCheckJson));
const funcCheckJson = JSON.stringify(this.functions);
window.sessionStorage.setItem(encodeURIComponent('_AMap_AMap.InterEnterKey'), this.transform(funcCheckJson));
if (permissionCheckJson.indexOf('home') && type === 'login') {
if (permissionCheckJson.indexOf('gatewayMgr') && type === 'login') {
this.router.navigate(['app/deviceCenter/gatewayMgr']);
} else {
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