Commit 4a988a1f authored by wangqinghua's avatar wangqinghua

2019.1.12

parent 5cca4a59
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
</nz-breadcrumb> </nz-breadcrumb>
</div> </div>
<div nz-col nzSpan="8" class="text-right"> <div nz-col nzSpan="8" class="text-right">
<button *ngIf="echartType == 'history'" (click)="changeEchartType('now')" nz-button nzType="default">实时数据</button>
<button *ngIf="echartType == 'now'" (click)="changeEchartType('history')" nz-button nzType="default">趋势数据</button>
<button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button> <button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<smart-full-screen></smart-full-screen> <smart-full-screen></smart-full-screen>
</div> </div>
...@@ -62,7 +64,12 @@ ...@@ -62,7 +64,12 @@
</div> </div>
</div> </div>
<nz-spin [nzSpinning]="isLoading"> <nz-spin [nzSpinning]="isLoading">
<div echarts [options]="chartOption" (chartInit)="onEchartInit($event)" style="height: 400px;width: 100%"></div> <ng-container *ngIf="echartType == 'now'">
<div echarts [options]="nowChartOption" (chartInit)="onEchartInit($event)" style="height: 400px;width: 100%"></div>
</ng-container>
<ng-container *ngIf="echartType == 'history'">
<div echarts [options]="chartOption"style="height: 400px;width: 100%"></div>
</ng-container>
</nz-spin> </nz-spin>
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'"> <nz-tabset [nzTabPosition]="'top'" [nzType]="'card'">
<nz-tab nzTitle="接收流量排行"> <nz-tab nzTitle="接收流量排行">
......
...@@ -39,6 +39,13 @@ ...@@ -39,6 +39,13 @@
<span (click)="addCheck()">添加监测点</span> <span (click)="addCheck()">添加监测点</span>
<span (click)="showAddImg()">添加图片</span> <span (click)="showAddImg()">添加图片</span>
<span onClick="editor.utils.deleteSelectedNodes()">移除</span> <span onClick="editor.utils.deleteSelectedNodes()">移除</span>
<nz-select style="width: 200px;" nzPlaceHolder="选择线条" [(ngModel)]="lineType" (ngModelChange)="changeLine($event)">
<nz-option nzLabel="直线" nzValue="1"></nz-option>
<nz-option nzLabel="折线(横向)" nzValue="2"></nz-option>
<nz-option nzLabel="折线(纵向)" nzValue="3"></nz-option>
<nz-option nzLabel="二次折线(横向)" nzValue="4"></nz-option>
<nz-option nzLabel="二次折线(纵向)" nzValue="5"></nz-option>
</nz-select>
<!-- 顶部工具栏 --> <!-- 顶部工具栏 -->
<div class="layui-nav layui-layout-right" style="color: #6097b7" > <div class="layui-nav layui-layout-right" style="color: #6097b7" >
...@@ -65,13 +72,6 @@ ...@@ -65,13 +72,6 @@
<canvas class="topology-context" id="topology-canvas" #topologyCanvas style="height: 580px;"> <canvas class="topology-context" id="topology-canvas" #topologyCanvas style="height: 580px;">
您的浏览器不支持HTML5! 您的浏览器不支持HTML5!
</canvas> </canvas>
<div class="lineList">
<p onclick="editor.lineType='line'">连线</p>
<p onclick="editor.lineType='foldLine';editor.config.linkDirection='horizontal';">折线(横向)</p>
<p onclick="editor.lineType='foldLine';editor.config.linkDirection='Vertical';">折线(纵向)</p>
<p onclick="editor.lineType='flexLine';editor.config.linkDirection='horizontal';">二次折线(横向)</p>
<p onclick="editor.lineType='flexLine';editor.config.linkDirection='Vertical';">二次折线(纵向)</p>
</div>
<div class="checkList"> <div class="checkList">
<p *ngFor="let item of checkJson;let i = index;"> <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> <span [style.fontSize]="item.fontSize +'px'">{{item.name}}</span><i (click)="deleteCheck(i)" class="minus anticon anticon-minus-circle-o"></i>
......
...@@ -91,6 +91,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -91,6 +91,7 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
name; name;
refreshRete; refreshRete;
options; options;
lineType; //线条类型
checkJson = []; checkJson = [];
fileList: UploadFile[] = []; fileList: UploadFile[] = [];
...@@ -143,6 +144,36 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe ...@@ -143,6 +144,36 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
localStorage.setItem("node",'false'); localStorage.setItem("node",'false');
} }
//选择线条类型
changeLine(e){
switch (e) {
case"1":{
editor.lineType='line';
break;
}
case"2":{
editor.lineType='foldLine';
editor.config.linkDirection='horizontal';
break;
}
case"3":{
editor.lineType='foldLine';
editor.config.linkDirection='Vertical';
break;
}
case"4":{
editor.lineType='flexLine';
editor.config.linkDirection='horizontal';
break;
}
case"5":{
editor.lineType='flexLine';
editor.config.linkDirection='Vertical';
break;
}
}
}
//一级分类 //一级分类
getTypeList(){ getTypeList(){
this.topologySer.findTreeWithWeb().subscribe( this.topologySer.findTreeWithWeb().subscribe(
......
...@@ -120,10 +120,6 @@ ...@@ -120,10 +120,6 @@
<td class="cursor"> <td class="cursor">
<span (click)="goTOInventory(item?.inventory?.id)">{{item?.inventory?.name}}</span> <span (click)="goTOInventory(item?.inventory?.id)">{{item?.inventory?.name}}</span>
</td> </td>
<!--<td class="round-tag tag-form" >-->
<!--<nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag>-->
<!--<nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag>-->
<!--</td>-->
<td class="default"> <td class="default">
<ng-container *ngIf="item.level"> <ng-container *ngIf="item.level">
<ng-container *ngIf="item.available == 0"> <ng-container *ngIf="item.available == 0">
...@@ -210,7 +206,7 @@ ...@@ -210,7 +206,7 @@
<ng-container *ngIf="item.level"> <ng-container *ngIf="item.level">
<td nzShowCheckbox [nzIndeterminate]="indeterminate" <td nzShowCheckbox [nzIndeterminate]="indeterminate"
(nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td> (nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td>
<td class="cursor" [nzIndentSize]="item.level*20"> <td class="cursor main-color" [nzIndentSize]="item.level*20">
<span (click)="goDetail(item)">{{item.name}}</span> <span (click)="goDetail(item)">{{item.name}}</span>
</td> </td>
</ng-container> </ng-container>
...@@ -230,8 +226,6 @@ ...@@ -230,8 +226,6 @@
<td class="cursor"> <td class="cursor">
<span (click)="goTOInventory(item?.inventory?.id)">{{item?.inventory?.name}}</span> <span (click)="goTOInventory(item?.inventory?.id)">{{item?.inventory?.name}}</span>
</td> </td>
<!--<nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag>-->
<!--<nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag>-->
<td class="default"> <td class="default">
<ng-container *ngIf="item.level"> <ng-container *ngIf="item.level">
<ng-container *ngIf="item.available == 0"> <ng-container *ngIf="item.available == 0">
...@@ -311,7 +305,7 @@ ...@@ -311,7 +305,7 @@
<tr> <tr>
<td nzShowCheckbox [nzIndeterminate]="indeterminate" (nzCheckedChange)="selectChecked($event,item)" <td nzShowCheckbox [nzIndeterminate]="indeterminate" (nzCheckedChange)="selectChecked($event,item)"
[(nzChecked)]="item.checked"></td> [(nzChecked)]="item.checked"></td>
<td class="cursor"> <td class="cursor main-color">
<span (click)="goDetail(item)">{{item.name}}</span> <span (click)="goDetail(item)">{{item.name}}</span>
</td> </td>
<td class="round-tag tag-form default"> <td class="round-tag tag-form default">
......
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