Commit ddfcadf7 authored by wangqinghua's avatar wangqinghua

update

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