Commit d050f344 authored by wangqinghua's avatar wangqinghua

workService

parent 88afc623
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {SERVER_API_URL} from '../app.constants';
import {Observable} from 'rxjs/Rx';
import {CommonService} from '../shared/common/common.service';
@Injectable() @Injectable()
export class AnalysisService { export class AnalysisService {
constructor() { } constructor(private http: HttpClient,private commonSer:CommonService) {
}
//按事件分类导出报表
exportByType(data): Observable<any>{
return this.http.get(SERVER_API_URL + '/syseventCount/export/type?'+this.commonSer.toQuery(data) );
}
//按事件处理人导出报表
exportByuser(data): Observable<any>{
return this.http.get(SERVER_API_URL + '/syseventCount/export/user?'+this.commonSer.toQuery(data));
}
//按事件解决状态导出报表
exportByStatus(data): Observable<any>{
return this.http.get(SERVER_API_URL + '/syseventCount/export/status?'+this.commonSer.toQuery(data));
}
//按事件分类统计
eventByType(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/syseventCount/type' ,data);
}
//按解决状态统计
operateStatus(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/syseventCount/operateStatus' ,data);
}
//按处理人统计
operateUser(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/syseventCount/operateUser' ,data);
}
//可用性统计
findFailureRate(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/findFailureRate' ,data);
}
//告警总数top10
waringCountTop(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/waringCountTop' ,data);
}
//告警总数趋势
waringTrend(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/waringTrend' ,data);
}
//常发问题TOP10
commonProblemTop(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/commonProblemTop' ,data);
}
//查询异常设备名
findHostNameByStatisticalReport(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/findHostNameByStatisticalReport' ,data);
}
//查询所有主机的警告数和高危报警数
findWarningByAll(params): Observable<any>{
return this.http.get(SERVER_API_URL + '/statistics/findWarningByAll/' + params);
}
//查询报警主机 和报警数量 以及最高报警级别
findHostWarningCount(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/findHostWarningCount' , data);
}
//统计报告
statisticalReport(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/statistics/statisticalReport' , data);
}
} }
<!--处理人统计-->
<nz-spin [nzSpinning]="isLoading">
<div echarts [options]="chartOption" style="height: 400px;width: 100%"></div>
</nz-spin>
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'">
<nz-tab nzTitle="接收流量排行">
<nz-table #nzTable [nzData]="inList" [nzLoading]="inLoading" [nzFrontPagination]="false" [nzTotal]="inTotalNum" [nzPageIndex]="inPageNum" [nzPageSize]="inPageCount" (nzPageIndexChange)="inChnagePage($event)">
<thead>
<tr>
<th nzWidth="20%">监测点名称</th>
<th>最大值</th>
<th>最小值</th>
<th>平均值</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let item of inList">
<tr (click)="getEcharts(item.itemid)">
<td>{{item.itemName}}</td>
<td>{{item.max | toUtil}}</td>
<td>{{item.min | toUtil}}</td>
<td>{{item.avg | toUtil}}</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
<nz-tab nzTitle="发送流量排行">
<nz-table #nzTable [nzData]="outList" [nzLoading]="outLoading" [nzFrontPagination]="false" [nzTotal]="outTotalNum" [nzPageIndex]="outPageNum" [nzPageSize]="outPageCount" (nzPageIndexChange)="outChnagePage($event)">
<thead>
<tr>
<th nzWidth="20%">监测点名称</th>
<th>最大值</th>
<th>最小值</th>
<th>平均值</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let data of outList">
<tr class="cursor" (click)="getEcharts(data.itemid)">
<td>{{data.itemName}}</td>
<td>{{data.max | toUtil}}</td>
<td>{{data.min | toUtil}}</td>
<td>{{data.avg | toUtil}}</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
import { Component, OnInit } from '@angular/core';
import {DatePipe} from '@angular/common';
import {AnalysisService} from '../../analysis.service';
import {OverAllService} from '../../../overAll/overAll.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'smart-analysis-deal',
templateUrl: './analysis-deal.component.html',
styles: []
})
export class AnalysisDealComponent implements OnInit {
startTime;
endTime;
timeType;
obj = {
startTime: '',
endTime: ''
};
constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe,
private overAllSer: OverAllService,) {
}
ngOnInit() {
const today = new Date().getTime();
this.obj.startTime = this.datePipe.transform(today, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(today, 'yyyy-MM-dd') + ' 23:59:59';
this.getEcharts();
}
//获取图表
getEcharts() {
this.analysisSer.operateUser(this.obj).subscribe(
(res) => {
}
);
}
//时间改变
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.startTime, 'yyyy-MM-dd HH:mm:ss');
this.obj.endTime = this.datePipe.transform(this.endTime, 'yyyy-MM-dd HH:mm:ss');
}
this.getEcharts();
}
}
<!--事件分类统计-->
<nz-spin [nzSpinning]="isLoading">
<div echarts [options]="chartOption" style="height: 400px;width: 100%"></div>
</nz-spin>
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'">
<nz-tab nzTitle="接收流量排行">
<nz-table #nzTable [nzData]="inList" [nzLoading]="inLoading" [nzFrontPagination]="false" [nzTotal]="inTotalNum" [nzPageIndex]="inPageNum" [nzPageSize]="inPageCount" (nzPageIndexChange)="inChnagePage($event)">
<thead>
<tr>
<th nzWidth="20%">监测点名称</th>
<th>最大值</th>
<th>最小值</th>
<th>平均值</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let item of inList">
<tr (click)="getEcharts(item.itemid)">
<td>{{item.itemName}}</td>
<td>{{item.max | toUtil}}</td>
<td>{{item.min | toUtil}}</td>
<td>{{item.avg | toUtil}}</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
<nz-tab nzTitle="发送流量排行">
<nz-table #nzTable [nzData]="outList" [nzLoading]="outLoading" [nzFrontPagination]="false" [nzTotal]="outTotalNum" [nzPageIndex]="outPageNum" [nzPageSize]="outPageCount" (nzPageIndexChange)="outChnagePage($event)">
<thead>
<tr>
<th nzWidth="20%">监测点名称</th>
<th>最大值</th>
<th>最小值</th>
<th>平均值</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let data of outList">
<tr class="cursor" (click)="getEcharts(data.itemid)">
<td>{{data.itemName}}</td>
<td>{{data.max | toUtil}}</td>
<td>{{data.min | toUtil}}</td>
<td>{{data.avg | toUtil}}</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import {DatePipe} from '@angular/common';
import {AnalysisService} from '../../analysis.service';
import {OverAllService} from '../../../overAll/overAll.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'smart-analysis-event',
templateUrl: './analysis-event.component.html',
styles: []
})
export class AnalysisEventComponent implements OnInit {
startTime;
endTime;
timeType;
obj = {
startTime: '',
endTime: ''
};
constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe,
private overAllSer: OverAllService,) {
}
ngOnInit() {
const today = new Date().getTime();
this.obj.startTime = this.datePipe.transform(today, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(today, 'yyyy-MM-dd') + ' 23:59:59';
this.getEcharts();
}
//获取图表
getEcharts() {
this.analysisSer.eventByType(this.obj).subscribe(
(res) => {
}
);
}
//时间改变
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.startTime, 'yyyy-MM-dd HH:mm:ss');
this.obj.endTime = this.datePipe.transform(this.endTime, 'yyyy-MM-dd HH:mm:ss');
}
this.getEcharts();
}
}
<!--解决状态统计-->
<nz-spin [nzSpinning]="isLoading">
<div echarts [options]="chartOption" style="height: 400px;width: 100%"></div>
</nz-spin>
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'">
<nz-tab nzTitle="接收流量排行">
<nz-table #nzTable [nzData]="inList" [nzLoading]="inLoading" [nzFrontPagination]="false" [nzTotal]="inTotalNum" [nzPageIndex]="inPageNum" [nzPageSize]="inPageCount" (nzPageIndexChange)="inChnagePage($event)">
<thead>
<tr>
<th nzWidth="20%">监测点名称</th>
<th>最大值</th>
<th>最小值</th>
<th>平均值</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let item of inList">
<tr (click)="getEcharts(item.itemid)">
<td>{{item.itemName}}</td>
<td>{{item.max | toUtil}}</td>
<td>{{item.min | toUtil}}</td>
<td>{{item.avg | toUtil}}</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
<nz-tab nzTitle="发送流量排行">
<nz-table #nzTable [nzData]="outList" [nzLoading]="outLoading" [nzFrontPagination]="false" [nzTotal]="outTotalNum" [nzPageIndex]="outPageNum" [nzPageSize]="outPageCount" (nzPageIndexChange)="outChnagePage($event)">
<thead>
<tr>
<th nzWidth="20%">监测点名称</th>
<th>最大值</th>
<th>最小值</th>
<th>平均值</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let data of outList">
<tr class="cursor" (click)="getEcharts(data.itemid)">
<td>{{data.itemName}}</td>
<td>{{data.max | toUtil}}</td>
<td>{{data.min | toUtil}}</td>
<td>{{data.avg | toUtil}}</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import {DatePipe} from '@angular/common';
import {AnalysisService} from '../../analysis.service';
import {OverAllService} from '../../../overAll/overAll.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'smart-analysis-status',
templateUrl: './analysis-status.component.html',
styles: []
})
export class AnalysisStatusComponent implements OnInit {
startTime;
endTime;
timeType;
obj = {
startTime: '',
endTime: ''
};
constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe,
private overAllSer: OverAllService,) {
}
ngOnInit() {
const today = new Date().getTime();
this.obj.startTime = this.datePipe.transform(today, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(today, 'yyyy-MM-dd') + ' 23:59:59';
this.getEcharts();
}
//获取图表
getEcharts() {
this.analysisSer.operateStatus(this.obj).subscribe(
(res) => {
}
);
}
//时间改变
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.startTime, 'yyyy-MM-dd HH:mm:ss');
this.obj.endTime = this.datePipe.transform(this.endTime, 'yyyy-MM-dd HH:mm:ss');
}
this.getEcharts();
}
}
<p> <!--运维工作统计-->
operation-work works! <div nz-row class="breadcrumbs">
</p> <div nz-col nzSpan="16">
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>统计分析</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
运维工作统计
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<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-arrows-alt"></i></button>
</div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="3">
<nz-select style="width: 100%;" nzPlaceHolder="选择分组" [(ngModel)]="type">
<nz-option nzLabel="解决状态" nzValue="1"></nz-option>
<nz-option nzLabel="事件分类统计" nzValue="2"></nz-option>
<nz-option nzLabel="处理人统计" nzValue="3"></nz-option>
</nz-select>
</div>
</div>
<!--解决状态-->
<ng-container *ngIf="type == '2'">
<smart-analysis-status></smart-analysis-status>
</ng-container>
<!--事件分类统计-->
<ng-container *ngIf="type == '1'">
<smart-analysis-event></smart-analysis-event>
</ng-container>
<!--处理人统计-->
<ng-container *ngIf="type == '3'">
<smart-analysis-deal></smart-analysis-deal>
</ng-container>
...@@ -7,6 +7,7 @@ import { Component, OnInit } from '@angular/core'; ...@@ -7,6 +7,7 @@ import { Component, OnInit } from '@angular/core';
}) })
export class OperationWorkComponent implements OnInit { export class OperationWorkComponent implements OnInit {
type = "1";
constructor() { } constructor() { }
ngOnInit() { ngOnInit() {
......
<!--资源告警统计-->
<p> <p>
resource-alarm works! resource-alarm works!
</p> </p>
<p> <!--资源可用性统计-->
resource-usabil works! <div nz-row class="breadcrumbs">
</p> <div nz-col nzSpan="16">
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>统计分析</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
资源可用性统计
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<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-arrows-alt"></i></button>
</div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="3">
<nz-select style="width: 100%;" nzPlaceHolder="选择分组" [(ngModel)]="obj.groupid" (ngModelChange)="getList()">
<ng-container *ngFor="let item of groupList">
<nz-option nzLabel="{{item.name}}" nzValue="{{item.groupid}}"></nz-option>
</ng-container>
</nz-select>
</div>
<div nz-col nzSpan="3">
<nz-select style="width: 100%;" nzPlaceHolder="选择主机资源" [(ngModel)]="obj.hostid" (ngModelChange)="getListIO()">
<ng-container *ngFor="let item of hostList;">
<nz-option nzLabel="{{item.name}}" nzValue="{{item.hostid}}"></nz-option>
</ng-container>
</nz-select>
</div>
<div nz-col nzSpan="7">
<nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()" [nzButtonStyle]="'solid'">
<label nz-radio-button nzValue="1">今天</label>
<label nz-radio-button nzValue="2">昨天</label>
<label nz-radio-button nzValue="3">三天</label>
<label nz-radio-button nzValue="4">一周</label>
<label nz-radio-button nzValue="5">自定义</label>
</nz-radio-group>
</div>
<div nz-col nzSpan="8" *ngIf="timeType == '5'">
<nz-date-picker
nzShowTime
[(ngModel)]="startTime"
nzPlaceHolder="开始时间"
></nz-date-picker>
<nz-date-picker
nzShowTime
nzFormat="yyyy-MM-dd HH:mm:ss"
[(ngModel)]="endTime"
nzPlaceHolder="结束时间"
></nz-date-picker>
</div>
</div>
<nz-spin [nzSpinning]="isLoading">
<div echarts [options]="chartOption" style="height: 400px;width: 100%"></div>
</nz-spin>
import { Component, OnInit } from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {AnalysisService} from '../analysis.service';
import {NzMessageService} from 'ng-zorro-antd';
import {DatePipe} from '@angular/common';
import {OverAllService} from '../../overAll/overAll.service';
@Component({ @Component({
selector: 'smart-resource-usabil', selector: 'smart-resource-usabil',
...@@ -7,9 +11,97 @@ import { Component, OnInit } from '@angular/core'; ...@@ -7,9 +11,97 @@ import { Component, OnInit } from '@angular/core';
}) })
export class ResourceUsabilComponent implements OnInit { export class ResourceUsabilComponent implements OnInit {
constructor() { } startTime;
endTime;
timeType;
obj = {
type: '',
groupid: '',
startTime: '',
endTime: ''
}
;
groupid;
groupList;
constructor(private analysisSer: AnalysisService, private message: NzMessageService, private datePipe: DatePipe,
private overAllSer: OverAllService,) {
}
ngOnInit() { ngOnInit() {
const today = new Date().getTime();
this.obj.startTime = this.datePipe.transform(today, 'yyyy-MM-dd') + ' 00:00:00';
this.obj.endTime = this.datePipe.transform(today, 'yyyy-MM-dd') + ' 23:59:59';
this.getGroup();
}
//获取分组
getGroup() {
this.overAllSer.getgroups({}).subscribe(
(res) => {
if (res.errCode == 10000) {
this.groupList = res.data;
this.obj.groupid = this.groupList[0].groupid + '';
this.getEcharts();
}
}
);
}
//获取图表
getEcharts() {
this.obj.type = 'top';
this.analysisSer.findFailureRate(this.obj).subscribe(
(res) => {
}
);
}
//时间改变
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.startTime, 'yyyy-MM-dd HH:mm:ss');
this.obj.endTime = this.datePipe.transform(this.endTime, 'yyyy-MM-dd HH:mm:ss');
}
this.getEcharts();
} }
} }
...@@ -87,6 +87,9 @@ import {HandleEventComponent} from './work/work-handle/handle-event/handle-event ...@@ -87,6 +87,9 @@ import {HandleEventComponent} from './work/work-handle/handle-event/handle-event
import {EventComponent} from './work/work-handle/Event/event.component'; import {EventComponent} from './work/work-handle/Event/event.component';
import {TransforComponent} from './work/modal/transfor/transfor.component'; import {TransforComponent} from './work/modal/transfor/transfor.component';
import {LinkInventoryComponent} from './work/modal/link-inventory/link-inventory.component'; import {LinkInventoryComponent} from './work/modal/link-inventory/link-inventory.component';
import {AnalysisDealComponent} from './analysis/operation-work/analysis-deal/analysis-deal.component';
import {AnalysisEventComponent} from './analysis/operation-work/analysis-event/analysis-event.component';
import {AnalysisStatusComponent} from './analysis/operation-work/analysis-status/analysis-status.component';
@NgModule({ @NgModule({
imports: [ imports: [
...@@ -174,7 +177,10 @@ import {LinkInventoryComponent} from './work/modal/link-inventory/link-inventory ...@@ -174,7 +177,10 @@ import {LinkInventoryComponent} from './work/modal/link-inventory/link-inventory
HandleEventComponent, HandleEventComponent,
EventComponent, EventComponent,
TransforComponent, TransforComponent,
LinkInventoryComponent LinkInventoryComponent,
AnalysisDealComponent,
AnalysisEventComponent,
AnalysisStatusComponent
], ],
providers:[ providers:[
OverAllService, OverAllService,
......
...@@ -27,6 +27,9 @@ import {ChildAssetsComponent} from './work/asset-part/child-assets/child-assets. ...@@ -27,6 +27,9 @@ import {ChildAssetsComponent} from './work/asset-part/child-assets/child-assets.
import {AssetsDetailComponent} from './work/asset-part/assets-detail/assets-detail.component'; import {AssetsDetailComponent} from './work/asset-part/assets-detail/assets-detail.component';
import {HandleDetailComponent} from './work/work-handle/handle-detail/handle-detail.component'; import {HandleDetailComponent} from './work/work-handle/handle-detail/handle-detail.component';
import {HandleEventComponent} from './work/work-handle/handle-event/handle-event.component'; import {HandleEventComponent} from './work/work-handle/handle-event/handle-event.component';
import {ResourceUsabilComponent} from './analysis/resource-usabil/resource-usabil.component';
import {OperationWorkComponent} from './analysis/operation-work/operation-work.component';
import {ResourceAlarmComponent} from './analysis/resource-alarm/resource-alarm.component';
export const route: Routes = [ export const route: Routes = [
{path: '', component: JhiMainComponent,canActivate:[LoginGuard]}, {path: '', component: JhiMainComponent,canActivate:[LoginGuard]},
...@@ -35,7 +38,7 @@ export const route: Routes = [ ...@@ -35,7 +38,7 @@ export const route: Routes = [
children: [ children: [
{path: 'login', component: JhiLoginModalComponent}, {path: 'login', component: JhiLoginModalComponent},
{ {
path: 'main', component: JhiMainComponent,canActivate:[LoginGuard], path: 'main', component: JhiMainComponent,canActivate:[LoginGuard],data: { breadcrumb: '首页' },
children: [ children: [
{path: 'basic', component: BasicComponent}, {path: 'basic', component: BasicComponent},
{path: 'basic-detail', component: BasicDetailComponent}, {path: 'basic-detail', component: BasicDetailComponent},
...@@ -61,6 +64,9 @@ export const route: Routes = [ ...@@ -61,6 +64,9 @@ export const route: Routes = [
{path: 'assetsDetail', component: AssetsDetailComponent}, {path: 'assetsDetail', component: AssetsDetailComponent},
{path: 'handleDetail', component: HandleDetailComponent}, {path: 'handleDetail', component: HandleDetailComponent},
{path: 'handleEvent', component: HandleEventComponent}, {path: 'handleEvent', component: HandleEventComponent},
{path: 'resourceUsabil', component: ResourceUsabilComponent,data: { breadcrumb: '资源可用性统计' },},
{path: 'operationWork', component: OperationWorkComponent,data: { breadcrumb: '运维工作' },},
{path: 'resourceAlarm', component: ResourceAlarmComponent,data: { breadcrumb: '资源告警统计' },},
] ]
}, },
] ]
......
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