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

页面优化

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