Commit 327d3283 authored by wangqinghua's avatar wangqinghua

update

parent aa2dc27f
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</nz-breadcrumb> </nz-breadcrumb>
</div> </div>
<div nz-col nzSpan="8" class="text-right"> <div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button> <button (click)="search()" nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-sync"></i></button> <button nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button> <button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
</div> </div>
...@@ -33,33 +33,33 @@ ...@@ -33,33 +33,33 @@
</ng-container> </ng-container>
</nz-select> </nz-select>
</div> </div>
<!--<div nz-col nzSpan="7">--> <div nz-col nzSpan="7">
<!--<nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()"--> <nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()"
<!--[nzButtonStyle]="'solid'">--> [nzButtonStyle]="'solid'">
<!--<label nz-radio-button nzValue="1">今天</label>--> <label nz-radio-button nzValue="1">今天</label>
<!--<label nz-radio-button nzValue="2">昨天</label>--> <label nz-radio-button nzValue="2">昨天</label>
<!--<label nz-radio-button nzValue="3">三天</label>--> <label nz-radio-button nzValue="3">三天</label>
<!--<label nz-radio-button nzValue="4">一周</label>--> <label nz-radio-button nzValue="4">一周</label>
<!--<label nz-radio-button nzValue="5">自定义</label>--> <label nz-radio-button nzValue="5">自定义</label>
<!--</nz-radio-group>--> </nz-radio-group>
<!--</div>--> </div>
<!--<div nz-col nzSpan="8" *ngIf="timeType == '5'">--> <div nz-col nzSpan="8" *ngIf="timeType == '5'">
<!--<nz-date-picker--> <nz-date-picker
<!--nzShowTime--> nzShowTime
<!--[(ngModel)]="obj.time_from"--> [(ngModel)]="timeBegin"
<!--nzPlaceHolder="开始时间"--> nzPlaceHolder="开始时间"
<!--&gt;</nz-date-picker>--> ></nz-date-picker>
<!--<nz-date-picker--> <nz-date-picker
<!--nzShowTime--> nzShowTime
<!--nzFormat="yyyy-MM-dd HH:mm:ss"--> nzFormat="yyyy-MM-dd HH:mm:ss"
<!--[(ngModel)]="obj.time_till"--> [(ngModel)]="timeEnd"
<!--nzPlaceHolder="结束时间"--> nzPlaceHolder="结束时间"
<!--&gt;</nz-date-picker>--> ></nz-date-picker>
<!--</div>--> </div>
</div> </div>
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'"> <nz-tabset [nzTabPosition]="'top'" [nzType]="'card'">
<nz-tab nzTitle="接收流量排行"> <nz-tab nzTitle="接收流量排行">
<nz-table #nzTable [nzData]="inList" [nzFrontPagination]="false" [nzTotal]="inTotalNum" [nzPageIndex]="inPageNum" [nzPageSize]="inPageCount" (nzPageIndexChange)="getInList()"> <nz-table #nzTable [nzData]="inList" [nzLoading]="" [nzFrontPagination]="false" [nzTotal]="inTotalNum" [nzPageIndex]="inPageNum" [nzPageSize]="inPageCount" (nzPageIndexChange)="getInList()">
<thead> <thead>
<tr> <tr>
<th nzWidth="20%">监测点名称</th> <th nzWidth="20%">监测点名称</th>
......
...@@ -27,22 +27,28 @@ export class FlowTrendComponent implements OnInit { ...@@ -27,22 +27,28 @@ export class FlowTrendComponent implements OnInit {
inPageNum = 1; inPageNum = 1;
inPageCount = pageSize; inPageCount = pageSize;
inTotalNum; inTotalNum;
inLoading;
//out //out
outList = []; outList = [];
outPageNum = 1; outPageNum = 1;
outPageCount = pageSize; outPageCount = pageSize;
outTotalNum; outTotalNum;
outLoading;
timeType = "1";
timeBegin;
timeEnd;
constructor(private topologySer: TopologyService, private overAllSer: OverAllService, constructor(private topologySer: TopologyService, private overAllSer: OverAllService,
private message: NzMessageService,private dataPipe:DatePipe) { private message: NzMessageService,private datePipe:DatePipe) {
} }
ngOnInit() { ngOnInit() {
this.getGroup(); this.getGroup();
const today = new Date().getTime(); const today = new Date().getTime();
this.obj.startTime = this.dataPipe.transform(today,"yyyy-MM-dd") + " 00:00:00"; this.obj.startTime = this.datePipe.transform(today,"yyyy-MM-dd") + " 00:00:00";
this.obj.endTime = this.dataPipe.transform(today,"yyyy-MM-dd") + " 23:59:59"; this.obj.endTime = this.datePipe.transform(today,"yyyy-MM-dd") + " 23:59:59";
} }
//获取分组 //获取分组
...@@ -88,6 +94,7 @@ export class FlowTrendComponent implements OnInit { ...@@ -88,6 +94,7 @@ export class FlowTrendComponent implements OnInit {
//获取流量 //获取流量
getList(e) { getList(e) {
this.obj.hostid = null;
this.onchange(e); this.onchange(e);
this.getInList(); this.getInList();
this.getOutList(); this.getOutList();
...@@ -100,10 +107,11 @@ export class FlowTrendComponent implements OnInit { ...@@ -100,10 +107,11 @@ export class FlowTrendComponent implements OnInit {
//进口流量 //进口流量
getInList() { getInList() {
this.inLoading = true;
const data = { const data = {
type: 'in', type: 'in',
pageNum: '1', pageNum: this.inPageNum,
pageCount: '10', pageCount: this.inPageCount,
hostid: this.obj.hostid, hostid: this.obj.hostid,
startTime: this.obj.startTime, startTime: this.obj.startTime,
endTime: this.obj.endTime, endTime: this.obj.endTime,
...@@ -116,16 +124,18 @@ export class FlowTrendComponent implements OnInit { ...@@ -116,16 +124,18 @@ export class FlowTrendComponent implements OnInit {
} else { } else {
this.message.warning(res.errMsg); this.message.warning(res.errMsg);
} }
this.inLoading = false;
} }
); );
} }
//出口流量 //出口流量
getOutList() { getOutList() {
this.outLoading = true;
const data = { const data = {
type: 'out', type: 'out',
pageNum: '1', pageNum: this.outPageNum,
pageCount: '10', pageCount: this.outPageCount,
hostid: this.obj.hostid, hostid: this.obj.hostid,
startTime: this.obj.startTime, startTime: this.obj.startTime,
endTime: this.obj.endTime, endTime: this.obj.endTime,
...@@ -138,8 +148,55 @@ export class FlowTrendComponent implements OnInit { ...@@ -138,8 +148,55 @@ export class FlowTrendComponent implements OnInit {
} else { } else {
this.message.warning(res.errMsg); this.message.warning(res.errMsg);
} }
this.outLoading = false;
} }
); );
} }
//时间改变
changeType(){
const nowDate = new Date().getTime();
let day1,day2;
switch (this.timeType){
case'1':{
this.obj.startTime = this.datePipe.transform(nowDate,'yyyy-MM-dd') +' 00:00:00';
this.obj.endTime = this.datePipe.transform(nowDate,'yyyy-MM-dd') +' 23:59:59';
break;
}
case'2':{
day1 = nowDate - 1*24*60*60*1000;
this.obj.startTime = this.datePipe.transform(day1,'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day1,'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'3':{
day1 = nowDate - 3*24*60*60*1000;
day2 = nowDate - 1*24*60*60*1000;
this.obj.startTime = this.datePipe.transform(day1,'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day2,'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'4':{
day1 = nowDate - 7*24*60*60*1000;
day2 = nowDate - 1*24*60*60*1000;
this.obj.startTime = this.datePipe.transform(day1,'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(day2,'yyyy-MM-dd') + ' 23:59:59';
break;
}
case'5':{
break;
}
}
}
//搜索
search(){
if(this.timeType == '5'){
this.obj.startTime = this.datePipe.transform(this.timeBegin,'yyyy-MM-dd HH:mm:ss');
this.obj.endTime = this.datePipe.transform(this.timeEnd,'yyyy-MM-dd HH:mm:ss');
}
this.getInList();
this.getOutList();
}
} }
...@@ -327,23 +327,6 @@ ...@@ -327,23 +327,6 @@
<form id="link-form" class="layui-form" action=""> <form id="link-form" class="layui-form" action="">
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">线类型</label>
<div class="layui-input-block">
<select name="textPosition">
<option value="0"></option>
<option value="1">———</option>
<option value="2">· · · ·</option>
<option value="dashedPattern">- - - -</option>
</select>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">线宽</label>
<div class="layui-input-block">
<input type="text" name="lineWidth" required autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">名称</label> <label class="layui-form-label">名称</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" name="lineName" required autocomplete="off" class="layui-input"> <input type="text" name="lineName" required autocomplete="off" class="layui-input">
...@@ -351,23 +334,11 @@ ...@@ -351,23 +334,11 @@
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">x1</label> <div class="layui-inline">
<div class="layui-input-inline" style="width: 60px;"> <label class="layui-form-label">线条颜色</label>
<input type="text" name="x1" placeholder="X" autocomplete="off" class="layui-input"> <div class="layui-input-block">
</div> <input type="color" name="lineColor" required autocomplete="off" class="layui-input">
<label class="layui-form-label">y1</label>
<div class="layui-input-inline" style="width: 60px;">
<input type="text" name="y1" placeholder="Y" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">x2</label>
<div class="layui-input-inline" style="width: 60px;">
<input type="text" name="x2" placeholder="X" autocomplete="off" class="layui-input">
</div> </div>
<label class="layui-form-label">y2</label>
<div class="layui-input-inline" style="width: 60px;">
<input type="text" name="y2" placeholder="Y" autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
</form> </form>
......
...@@ -167,6 +167,8 @@ export class NeTopologyComponent implements OnInit, AfterViewInit { ...@@ -167,6 +167,8 @@ export class NeTopologyComponent implements OnInit, AfterViewInit {
); );
} }
//查询监控点状态
//删除拓扑图 //删除拓扑图
deleteTopo() { deleteTopo() {
if(!this.topoId){ if(!this.topoId){
......
...@@ -83,4 +83,9 @@ export class TopologyService { ...@@ -83,4 +83,9 @@ export class TopologyService {
findTrend(data): Observable<any> { findTrend(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/trend/findTrend',data); return this.http.post(SERVER_API_URL + '/trend/findTrend',data);
} }
//根据元素ID集合查询监测点状态
findElementStatus(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/sysmapJson/findElementStatus',data);
}
} }
...@@ -63,9 +63,9 @@ ...@@ -63,9 +63,9 @@
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus($event)"></td> <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus($event)"></td>
<td>{{data.key1}}</td> <td>{{data.name}}</td>
<td>{{data.key2}}</td> <td>{{data.loginName}}</td>
<td>{{data.key3}}</td> <td>{{data.mobile}}</td>
<td>{{data.key4}}</td> <td>{{data.key4}}</td>
<td class="handle"> <td class="handle">
<span>查看</span> <span>查看</span>
......
...@@ -32,7 +32,7 @@ export class SystemService { ...@@ -32,7 +32,7 @@ export class SystemService {
//用户列表 //用户列表
user(data): Observable<any>{ user(data): Observable<any>{
return this.http.get(SERVER_API_URL + '/user?' + this.toTree.toQuery(data)); return this.http.post(SERVER_API_URL + '/user/findUsers',data);
} }
//新增用户 //新增用户
......
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