Commit ddfcadf7 authored by wangqinghua's avatar wangqinghua

update

parent 7f3c3588
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<button (click)="showAlarmModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增告警推送</button> <button (click)="showAlarmModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增告警推送</button>
</div> </div>
</div> </div>
<nz-table #nzTable [nzData]="setList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> <nz-table #nzTable [nzData]="setList" [nzLoading]="isLoading" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)">
<thead> <thead>
<tr> <tr>
<th>名称</th> <th>名称</th>
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
{{data.name}} {{data.name}}
</td> </td>
<td> <td>
<span *ngIf="data.status == 1">禁用</span> <span class="color-red" *ngIf="data.status == 1">禁用</span>
<span *ngIf="data.status == 0">启用</span> <span class="color-green" *ngIf="data.status == 0">启用</span>
</td> </td>
<td> <td>
{{data.sendInfos | toRepeat}} {{data.sendInfos | toRepeat}}
......
...@@ -16,6 +16,7 @@ export class AlarmSetComponent implements OnInit { ...@@ -16,6 +16,7 @@ export class AlarmSetComponent implements OnInit {
setList = []; setList = [];
alertGroupId; alertGroupId;
groupList = []; groupList = [];
isLoading = false;
pageNum; pageNum;
pageCount = pageSize; pageCount = pageSize;
...@@ -31,6 +32,7 @@ export class AlarmSetComponent implements OnInit { ...@@ -31,6 +32,7 @@ export class AlarmSetComponent implements OnInit {
//获取推送设置列表 //获取推送设置列表
getList() { getList() {
this.isLoading = true;
const data = { const data = {
eventPage: this.pageNum, eventPage: this.pageNum,
pageRecords: this.pageCount, pageRecords: this.pageCount,
...@@ -42,6 +44,7 @@ export class AlarmSetComponent implements OnInit { ...@@ -42,6 +44,7 @@ export class AlarmSetComponent implements OnInit {
this.setList = res.data.data; this.setList = res.data.data;
this.totalNum = res.data.totalNum; this.totalNum = res.data.totalNum;
} }
this.isLoading = false;
} }
); );
} }
......
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
</a> </a>
<ul nz-menu> <ul nz-menu>
<li (click)="showPasswordModal()" nz-menu-item>修改密码</li> <li (click)="showPasswordModal()" nz-menu-item>修改密码</li>
<li (click)="showSeparationModal()" nz-menu-item>三员分立</li> <ng-container *ngIf="roleType == 3">
<li (click)="showSeparationModal()" nz-menu-item>三员分立</li>
</ng-container>
<li nz-menu-item (click)="logout()" >退出</li> <li nz-menu-item (click)="logout()" >退出</li>
</ul> </ul>
</nz-dropdown> </nz-dropdown>
......
...@@ -11,6 +11,7 @@ import {SeparationComponent} from '../../system/modal/separation/separation.comp ...@@ -11,6 +11,7 @@ import {SeparationComponent} from '../../system/modal/separation/separation.comp
import {BasicEditComponent} from '../../modal/basic-edit/basic-edit.component'; import {BasicEditComponent} from '../../modal/basic-edit/basic-edit.component';
import {CreateGroupComponent} from '../../modal/create-group/create-group.component'; import {CreateGroupComponent} from '../../modal/create-group/create-group.component';
import {ModifyPasswordComponent} from '../../modal/modify-password/modify-password.component'; import {ModifyPasswordComponent} from '../../modal/modify-password/modify-password.component';
import {SystemService} from '../../system/system.service';
@Component({ @Component({
selector: 'jhi-navbar', selector: 'jhi-navbar',
...@@ -34,6 +35,7 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{ ...@@ -34,6 +35,7 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
modalRef: NgbModalRef; modalRef: NgbModalRef;
version: string; version: string;
token: boolean; token: boolean;
roleType;
isBool = false; isBool = false;
user = { user = {
...@@ -44,7 +46,8 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{ ...@@ -44,7 +46,8 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
private principal: Principal, private principal: Principal,
private profileService: ProfileService, private profileService: ProfileService,
private router: Router, private router: Router,
private $localStorage:LocalStorageService private $localStorage:LocalStorageService,
private systemSer:SystemService,
) { ) {
this.version = VERSION ? 'v' + VERSION : ''; this.version = VERSION ? 'v' + VERSION : '';
this.isNavbarCollapsed = true; this.isNavbarCollapsed = true;
...@@ -58,6 +61,18 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{ ...@@ -58,6 +61,18 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
// }); // });
} }
/**
* 获取当前登录人角色
* 1.系统管理员 2.安全管理员 3。二者都有
*/
getCurrentRole(){
this.systemSer.checkRole().subscribe(
(res)=>{
this.roleType = res.data;
}
)
}
ngAfterViewChecked(){ ngAfterViewChecked(){
} }
......
...@@ -63,21 +63,23 @@ ...@@ -63,21 +63,23 @@
<div class="container"> <div class="container">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-md12"> <div class="layui-col-md12">
<div #topologyBody id="topology-body" class="topology-context"> <nz-spin [nzSpinning]="isLoading">
<!-- 鼠标悬浮显示节点信息 --> <div #topologyBody id="topology-body" class="topology-context">
<div class="node-infobox" style="display: none;"> <!-- 鼠标悬浮显示节点信息 -->
<span>节点名称:<label name="node_name"></label></span> <div class="node-infobox" style="display: none;">
<span>当前时间:<label name="current_time"></label></span> <span>节点名称:<label name="node_name"></label></span>
<span>当前时间:<label name="current_time"></label></span>
</div>
<canvas class="topology-context" id="topology-canvas" #topologyCanvas style="height: 580px;">
您的浏览器不支持HTML5!
</canvas>
<div class="checkList">
<p *ngFor="let item of checkJson;let i = index;">
<span [style.fontSize]="item.fontSize +'px'">{{item.name}}</span><i (click)="deleteCheck(i)" class="minus anticon anticon-minus-circle-o"></i>
</p>
</div>
</div> </div>
<canvas class="topology-context" id="topology-canvas" #topologyCanvas style="height: 580px;"> </nz-spin>
您的浏览器不支持HTML5!
</canvas>
<div class="checkList">
<p *ngFor="let item of checkJson;let i = index;">
<span [style.fontSize]="item.fontSize +'px'">{{item.name}}</span><i (click)="deleteCheck(i)" class="minus anticon anticon-minus-circle-o"></i>
</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -86,12 +86,13 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -86,12 +86,13 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
dataSet; dataSet;
isVisible = false; isVisible = false;
image; image;
isLoading = false;
topoId; topoId;
name; name;
refreshRete; refreshRete;
options; options;
lineType; //线条类型 lineType = "1"; //线条类型
checkJson = []; checkJson = [];
fileList: UploadFile[] = []; fileList: UploadFile[] = [];
...@@ -275,6 +276,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -275,6 +276,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
//查询单个 //查询单个
getDetail(id) { getDetail(id) {
this.isLoading = true;
this.topologySer.findItem(id).subscribe( this.topologySer.findItem(id).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
...@@ -282,7 +284,6 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -282,7 +284,6 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
let json = JSON.parse(res.data.json); let json = JSON.parse(res.data.json);
if(json.topology){ if(json.topology){
this.viewTopology(JSON.parse(json.topology)); this.viewTopology(JSON.parse(json.topology));
// this.smartJtopo.loadTopologyByJson(JSON.parse(json.topology), 'img/backimg.png');
this.checkJson = json.check; this.checkJson = json.check;
}else{ }else{
editor.utils.clearTopology(); editor.utils.clearTopology();
...@@ -372,6 +373,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -372,6 +373,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
}else{ //无流量监控 }else{ //无流量监控
editor.loadTopologyByJson(topologyJson, 'img/backimg.png'); editor.loadTopologyByJson(topologyJson, 'img/backimg.png');
} }
this.isLoading = false;
} }
//查询监控点状态 //查询监控点状态
......
<nz-modal [nzWidth]="780" [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"> <nz-modal [nzWidth]="780" [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<form [formGroup]="validateForm" nz-form> <form [formGroup]="validateForm" nz-form>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">用户</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">用户登录</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="name" id="userName"> <input nz-input formControlName="name" id="userName">
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">用户名为6到16个字符!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">用户登录名为6到16个字符!</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</div> </div>
<nz-table #nzTable [nzData]="planList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" <nz-table #nzTable [nzData]="planList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum"
[nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)" [nzLoading]="isLoading">
<thead> <thead>
<tr> <tr>
<th>计划名称</th> <th>计划名称</th>
......
...@@ -19,6 +19,8 @@ export class InspectPlanComponent implements OnInit { ...@@ -19,6 +19,8 @@ export class InspectPlanComponent implements OnInit {
planTypeList; planTypeList;
timeBegin; timeBegin;
timeEnd; timeEnd;
isLoading = false;
pageCount = pageSize; pageCount = pageSize;
pageNum = 1; pageNum = 1;
totalNum; totalNum;
...@@ -55,6 +57,7 @@ export class InspectPlanComponent implements OnInit { ...@@ -55,6 +57,7 @@ export class InspectPlanComponent implements OnInit {
} }
getList() { getList() {
this.isLoading = true;
const obj = { const obj = {
pageNum: this.pageNum, pageNum: this.pageNum,
pageCount: this.pageCount, pageCount: this.pageCount,
...@@ -70,6 +73,7 @@ export class InspectPlanComponent implements OnInit { ...@@ -70,6 +73,7 @@ export class InspectPlanComponent implements OnInit {
} else { } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
this.isLoading = false;
} }
); );
} }
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<button (click)="selectPerson1()" nz-button><span>选择</span></button> <button (click)="selectPerson1()" nz-button><span>选择</span></button>
<ng-container *ngFor="let item1 of participantsList;let i = index;"> <ng-container *ngFor="let item1 of participantsList;let i = index;">
<span>{{item1.username}}</span><span (click)="delete1(i)">X</span> <span>{{item1.username}}</span><span class="cursor main-color" style="margin: 0px 10px 0px 5px;" (click)="delete1(i)">X</span>
</ng-container> </ng-container>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
......
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