Commit a1bb99eb authored by wangqinghua's avatar wangqinghua

update

parent 9717f939
...@@ -95,4 +95,9 @@ export class AnalysisService { ...@@ -95,4 +95,9 @@ export class AnalysisService {
return this.http.post(SERVER_API_URL + '/statistics/statisticalReport/getImport' , data); return this.http.post(SERVER_API_URL + '/statistics/statisticalReport/getImport' , data);
} }
//导出 可用性
findFailureRateImport(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/findFailureRate/getImport' , data);
}
} }
...@@ -63,7 +63,8 @@ export class AnalysisDealComponent implements OnInit { ...@@ -63,7 +63,8 @@ export class AnalysisDealComponent implements OnInit {
trigger: 'axis', trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} },
formatter: "{b} : {c}个"
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
......
...@@ -63,7 +63,8 @@ export class AnalysisEventComponent implements OnInit { ...@@ -63,7 +63,8 @@ export class AnalysisEventComponent implements OnInit {
trigger: 'axis', trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} },
formatter: "{b} : {c}个"
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
......
...@@ -62,7 +62,8 @@ export class AnalysisStatusComponent implements OnInit { ...@@ -62,7 +62,8 @@ export class AnalysisStatusComponent implements OnInit {
trigger: 'axis', trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} },
formatter: "{b} : {c}个"
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
......
...@@ -125,7 +125,7 @@ export class ResourceAlarmComponent implements OnInit { ...@@ -125,7 +125,7 @@ export class ResourceAlarmComponent implements OnInit {
trigger: 'axis', trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效 axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
...@@ -192,7 +192,7 @@ export class ResourceAlarmComponent implements OnInit { ...@@ -192,7 +192,7 @@ export class ResourceAlarmComponent implements OnInit {
trigger: 'axis', trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} },
}, },
legend: { legend: {
data:['严重','告警'] data:['严重','告警']
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
</div> </div>
<div nz-row [nzGutter]="4" class="search-form"> <div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="3"> <div nz-col nzSpan="4">
<nz-select style="width: 100%;" nzPlaceHolder="选择分组" [(ngModel)]="obj.groupid"> <nz-select style="width: 100%;" nzPlaceHolder="选择分组" [(ngModel)]="obj.groupid">
<ng-container *ngFor="let item of groupList"> <ng-container *ngFor="let item of groupList">
<nz-option nzLabel="{{item.name}}" nzValue="{{item.groupid}}"></nz-option> <nz-option nzLabel="{{item.name}}" nzValue="{{item.groupid}}"></nz-option>
...@@ -36,11 +36,7 @@ ...@@ -36,11 +36,7 @@
<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" <div nz-col nzSpan="8">
>
<ng-container *ngIf="timeType == '5'"> <ng-container *ngIf="timeType == '5'">
<nz-date-picker <nz-date-picker
nzShowTime nzShowTime
...@@ -60,6 +56,11 @@ ...@@ -60,6 +56,11 @@
style="color: #6097b7"></i>搜索 style="color: #6097b7"></i>搜索
</button> </button>
</div> </div>
<div nz-col nzSpan="3">
<nz-spin [nzIndicator]="indicatorTemplate" nzTip='下载中...' [nzSpinning]="isDownload">
<button (click)="downLoadCommon()" nz-button nzType="default"><i class="anticon anticon-download"></i>下载</button>
</nz-spin>
</div>
</div> </div>
<nz-spin [nzSpinning]="isLoading"> <nz-spin [nzSpinning]="isLoading">
<div style="margin-top: 30px" nz-row nzGutter="4"> <div style="margin-top: 30px" nz-row nzGutter="4">
...@@ -85,3 +86,5 @@ ...@@ -85,3 +86,5 @@
</div> </div>
</div> </div>
</nz-spin> </nz-spin>
<ng-template #indicatorTemplate><i class="anticon anticon-spin anticon-loading" style="font-size: 24px;"></i></ng-template>
...@@ -3,6 +3,8 @@ import {AnalysisService} from '../analysis.service'; ...@@ -3,6 +3,8 @@ import {AnalysisService} from '../analysis.service';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {DatePipe} from '@angular/common'; import {DatePipe} from '@angular/common';
import {OverAllService} from '../../overAll/overAll.service'; import {OverAllService} from '../../overAll/overAll.service';
import {WorkService} from '../../work/work.service';
import {CommonService} from '../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-resource-usabil', selector: 'smart-resource-usabil',
...@@ -38,8 +40,10 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -38,8 +40,10 @@ export class ResourceUsabilComponent implements OnInit {
groupid; groupid;
groupList; groupList;
isDownload = false;
constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe, constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe,
private overAllSer: OverAllService,) { private overAllSer: OverAllService,private workSer:WorkService,private commonSer:CommonService) {
} }
ngOnInit() { ngOnInit() {
...@@ -97,7 +101,8 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -97,7 +101,8 @@ export class ResourceUsabilComponent implements OnInit {
trigger: 'axis', trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效 axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} },
formatter: "{b} : {c}%"
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
...@@ -158,7 +163,8 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -158,7 +163,8 @@ export class ResourceUsabilComponent implements OnInit {
trigger: 'axis', trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效 axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} },
formatter: "{b} : {c}%"
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
...@@ -232,4 +238,24 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -232,4 +238,24 @@ export class ResourceUsabilComponent implements OnInit {
this.getTopEcharts(); this.getTopEcharts();
} }
//导出 可用性
downLoadCommon(){
this.isDownload = true;
const data = {
groupid: this.obj.groupid,
startTime: this.obj.startTime,
endTime: this.obj.endTime,
};
this.analysisSer.findFailureRateImport(data).subscribe(
(res)=>{
this.workSer.downloadTemplate('failureRate',res.data).subscribe(
(data)=>{
this.isDownload = false;
this.commonSer.downloadFile('资源可用性统计',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