Commit 06fd5604 authored by wangqinghua's avatar wangqinghua

update

parent bf05fdca
...@@ -85,4 +85,14 @@ export class AnalysisService { ...@@ -85,4 +85,14 @@ export class AnalysisService {
return this.http.post(SERVER_API_URL + '/trigger/find' , data); return this.http.post(SERVER_API_URL + '/trigger/find' , data);
} }
//导出 常见问题top 10
commonProblemTopImport(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/commonProblemTop/getImport' , data);
}
//导出 统计报告
statisticalReportImport(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/statisticalReport/getImport' , data);
}
} }
...@@ -84,7 +84,16 @@ ...@@ -84,7 +84,16 @@
</div> </div>
</div> </div>
</nz-spin> </nz-spin>
<h3 style="margin-top: 20px">常见问题TOP10</h3> <div nz-row nzGutter="4" style="margin: 20px 0">
<div nz-col nzSpan="19">
<h3>常见问题TOP10</h3>
</div>
<div nz-col nzSpan="3" class="text-center">
<nz-spin [nzIndicator]="indicatorTemplate" nzTip='下载中...' [nzSpinning]="isDownload1">
<button (click)="downLoadCommon()" nz-button nzType="default"><i class="anticon anticon-download"></i>下载</button>
</nz-spin>
</div>
</div>
<nz-table #nzTable [nzData]="commonList"> <nz-table #nzTable [nzData]="commonList">
<thead> <thead>
<tr> <tr>
...@@ -107,7 +116,16 @@ ...@@ -107,7 +116,16 @@
</ng-container> </ng-container>
</tbody> </tbody>
</nz-table> </nz-table>
<h3 style="margin-top: 20px">统计报告</h3> <div nz-row nzGutter="4" style="margin: 20px 0">
<div nz-col nzSpan="19">
<h3>统计报告</h3>
</div>
<div nz-col nzSpan="3" class="text-center">
<nz-spin [nzIndicator]="indicatorTemplate" nzTip='下载中...' [nzSpinning]="isDownload2">
<button (click)="downLoadReport()" nz-button nzType="default"><i class="anticon anticon-download"></i>下载</button>
</nz-spin>
</div>
</div>
<nz-table #nzTable1 [nzData]="reportList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> <nz-table #nzTable1 [nzData]="reportList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)">
<thead> <thead>
<tr> <tr>
...@@ -132,6 +150,8 @@ ...@@ -132,6 +150,8 @@
</ng-container> </ng-container>
</tbody> </tbody>
</nz-table> </nz-table>
<ng-template #indicatorTemplate><i class="anticon anticon-spin anticon-loading" style="font-size: 24px;"></i>
</ng-template>
<nz-modal [(nzVisible)]="isVisiable" nzWidth="780" [nzTitle]="title" [nzFooter]="null" (nzOnCancel)="handleCancel()"> <nz-modal [(nzVisible)]="isVisiable" nzWidth="780" [nzTitle]="title" [nzFooter]="null" (nzOnCancel)="handleCancel()">
<nz-table #nzTable [nzData]="modalList" [nzFrontPagination]="true"> <nz-table #nzTable [nzData]="modalList" [nzFrontPagination]="true">
<thead> <thead>
......
...@@ -4,6 +4,8 @@ import {NzMessageService} from 'ng-zorro-antd'; ...@@ -4,6 +4,8 @@ import {NzMessageService} from 'ng-zorro-antd';
import {DatePipe} from '@angular/common'; import {DatePipe} from '@angular/common';
import {color, pageSize} from '../../app.constants'; import {color, pageSize} from '../../app.constants';
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-alarm', selector: 'smart-resource-alarm',
...@@ -51,8 +53,12 @@ export class ResourceAlarmComponent implements OnInit { ...@@ -51,8 +53,12 @@ export class ResourceAlarmComponent implements OnInit {
modalList = []; modalList = [];
constructor(private analysisSer: AnalysisService, private message: NzMessageService, //下载
private datePipe: DatePipe, private overAllSer: OverAllService) { isDownload1 = false;
isDownload2 = false;
constructor(private analysisSer: AnalysisService, private message: NzMessageService,private commonSer:CommonService,
private datePipe: DatePipe, private overAllSer: OverAllService,private workSer:WorkService) {
} }
ngOnInit() { ngOnInit() {
...@@ -369,4 +375,50 @@ export class ResourceAlarmComponent implements OnInit { ...@@ -369,4 +375,50 @@ export class ResourceAlarmComponent implements OnInit {
this.modalList = []; this.modalList = [];
this.isVisiable = false; this.isVisiable = false;
} }
//导出 常见问题top 10
downLoadCommon(){
this.isDownload1 = true;
const data = {
groupid: this.obj.groupid,
startTime: this.obj.startTime,
endTime: this.obj.endTime,
priorityName: this.obj.priorityName,
};
this.analysisSer.commonProblemTopImport(data).subscribe(
(res)=>{
this.workSer.downloadTemplate('commonProblemTop',res.data).subscribe(
(data)=>{
this.isDownload1 = false;
this.commonSer.downloadFile('常见问题top10',data)
}
)
}
)
}
// 导出 统计报告
downLoadReport(){
this.isDownload2 = true;
const data = {
pageCount: this.pageCount,
pageNum: this.pageNum,
obj: {
startTime: this.obj.startTime,
endTime: this.obj.endTime,
priorityName: this.obj.priorityName,
groupid: this.obj.groupid,
}
};
this.analysisSer.statisticalReportImport(data).subscribe(
(res)=>{
this.workSer.downloadTemplate('statisticalReport',res.data).subscribe(
(data)=>{
this.isDownload2 = false;
this.commonSer.downloadFile('统计报告',data)
}
)
}
)
}
} }
...@@ -16,5 +16,7 @@ export const color = { ...@@ -16,5 +16,7 @@ export const color = {
black:'#6064' black:'#6064'
}; };
//图片地址 //图片地址
export const imgUrl = "http://10.10.38.99:8282/file/icon/"; export const path = window.document.location.href.slice();
export const fileUrl = "http://10.10.38.99:8282/file/"; export const imgUrl = path + "/file/icon/";
// export const fileUrl = "http://10.10.38.99:8282/file/";
export const fileUrl = path + "/file/";
...@@ -45,7 +45,7 @@ import {AppMainModule} from './app.main.module'; ...@@ -45,7 +45,7 @@ import {AppMainModule} from './app.main.module';
CommonModule, CommonModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
RouterModule.forRoot(route, {useHash: true}) RouterModule.forRoot(route)
], ],
declarations: [ declarations: [
ErrorComponent, ErrorComponent,
......
...@@ -105,9 +105,9 @@ ...@@ -105,9 +105,9 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired nzFor="delay">数据更新间隔</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired nzFor="delay">数据更新间隔(秒)</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input id="delay" name="delay" type="text" placeholder="输入数据更新间隔" nz-input <input id="delay" name="delay" type="text" placeholder="输入数据更新间隔(秒)" nz-input
formControlName="delay"> formControlName="delay">
<nz-form-explain *ngIf="validateForm.get('delay').dirty && validateForm.get('delay').errors">请输入数据更新间隔!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('delay').dirty && validateForm.get('delay').errors">请输入数据更新间隔!</nz-form-explain>
</nz-form-control> </nz-form-control>
......
...@@ -75,9 +75,9 @@ ...@@ -75,9 +75,9 @@
</nz-form-item> </nz-form-item>
</ng-container> </ng-container>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired nzFor="delay">更新间隔</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired nzFor="delay">更新间隔(秒)</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input name="delay" type="text" placeholder="输入数据更新间隔" nz-input formControlName="delay"> <input name="delay" type="text" placeholder="输入数据更新间隔(秒)" nz-input formControlName="delay">
<nz-form-explain *ngIf="validateForm.get('delay').dirty && validateForm.get('delay').errors">请输入更新间隔!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('delay').dirty && validateForm.get('delay').errors">请输入更新间隔!</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
......
...@@ -94,9 +94,9 @@ ...@@ -94,9 +94,9 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired nzFor="delay">数据更新间隔</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired nzFor="delay">数据更新间隔(秒)</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input id="delay" name="delay" type="text" placeholder="输入数据更新间隔" nz-input <input id="delay" name="delay" type="text" placeholder="输入数据更新间隔(秒)" nz-input
formControlName="delay"> formControlName="delay">
<nz-form-explain *ngIf="validateForm.get('delay').dirty && validateForm.get('delay').errors"> <nz-form-explain *ngIf="validateForm.get('delay').dirty && validateForm.get('delay').errors">
请输入数据更新间隔! 请输入数据更新间隔!
......
<div class="background"> <div class="background">
<div class="login-center"> <div class="login-center">
<div class="login-logo"> <div class="login-logo">
<img src="../../../content/images/logo.png" alt="智能监控平台"> <img src="../../../content/images/logo-hongqiao.png" alt="运维管理系统">
</div> </div>
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()"> <form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item> <nz-form-item>
......
...@@ -17,9 +17,10 @@ var SysUtil = { ...@@ -17,9 +17,10 @@ var SysUtil = {
} }
} }
// url根路径 // url根路径
var rootPath = SysUtil.getRootPath(); // var rootPath = "http://10.10.38.99:8282";
var rootPath = window.document.location.href;
// var topoImgPath = 'javascript/jtopo/img/'; // var topoImgPath = 'javascript/jtopo/img/';
var topoImgPath = 'http://10.10.38.99:8282/file/icon/'; var topoImgPath = rootPath + '/file/icon/';
/* /*
* 生成uuid算法,碰撞率低于1/2^^122 * 生成uuid算法,碰撞率低于1/2^^122
......
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