Commit f5cf0161 authored by wangqinghua's avatar wangqinghua

bug update

parent 8cf4aa9f
......@@ -34,7 +34,7 @@
<nz-select style="width: 100%;" nzPlaceHolder="选择分组" nzShowSearch nzAllowClear [(ngModel)]="obj.itemKey"
(ngModelChange)="getEcharts()">
<ng-container *ngFor="let item of checkList;">
<nz-option [nzLabel]="item.name" [nzValue]="item.name"></nz-option>
<nz-option [nzLabel]="item.name" [nzValue]="item.key"></nz-option>
</ng-container>
</nz-select>
</div>
......
......@@ -121,7 +121,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
this.overAllSer.findCheckByType(data).subscribe(
(res) => {
this.checkList = res.data.data;
this.obj.itemKey = this.checkList[0].name;
this.obj.itemKey = this.checkList[0].key;
this.getEcharts();
}
);
......@@ -151,7 +151,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
this.data.history = false;
this.inEchartData = res.data.map(e => {
const a = {
clock: this.datePipe.transform(e.clock * 1000, 'yyyy-MM-dd HH:mm'),
clock: this.datePipe.transform(e.clock * 1000, 'yyyy/MM/dd HH:mm'),
avg: e.avg
};
console.log(a)
......@@ -268,8 +268,8 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
//搜索
search() {
if (this.timeType == '99') {
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.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.getEcharts();
}
......
......@@ -200,47 +200,47 @@ export class CommonService implements OnInit {
switch (timeType) {
case'0': { //最近一小时
day1 = nowDate - 1 * 60 * 60 * 1000;
obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd HH:mm:ss');
obj.endTime = this.datePipe.transform(nowDate, 'yyyy-MM-dd HH:mm:ss');
obj.startTime = this.datePipe.transform(day1, 'yyyy/MM/dd HH:mm:ss');
obj.endTime = this.datePipe.transform(nowDate, 'yyyy/MM/dd HH:mm:ss');
break;
}
case'1': { //今天
obj.startTime = this.datePipe.transform(nowDate, 'yyyy-MM-dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(nowDate, 'yyyy-MM-dd') + ' 23:59:59';
obj.startTime = this.datePipe.transform(nowDate, 'yyyy/MM/dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(nowDate, 'yyyy/MM/dd') + ' 23:59:59';
break;
}
case'2': { //昨天
day1 = nowDate - 1 * 24 * 60 * 60 * 1000;
obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 23:59:59';
obj.startTime = this.datePipe.transform(day1, 'yyyy/MM/dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day1, 'yyyy/MM/dd') + ' 23:59:59';
break;
}
case'3': { //最近三天
day1 = nowDate - 3 * 24 * 60 * 60 * 1000;
day2 = nowDate;
obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day2, 'yyyy-MM-dd') + ' 23:59:59';
obj.startTime = this.datePipe.transform(day1, 'yyyy/MM/dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day2, 'yyyy/MM/dd') + ' 23:59:59';
break;
}
case'4': { //最近一周
day1 = nowDate - 7 * 24 * 60 * 60 * 1000;
day2 = nowDate;
obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day2, 'yyyy-MM-dd') + ' 23:59:59';
obj.startTime = this.datePipe.transform(day1, 'yyyy/MM/dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day2, 'yyyy/MM/dd') + ' 23:59:59';
break;
}
case'5': { //最近一个月
day1 = nowDate - 30 * 24 * 60 * 60 * 1000;
day2 = nowDate;
obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day2, 'yyyy-MM-dd') + ' 23:59:59';
obj.startTime = this.datePipe.transform(day1, 'yyyy/MM/dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day2, 'yyyy/MM/dd') + ' 23:59:59';
break;
}
case'6': { //最近一年
day1 = nowDate - 365 * 24 * 60 * 60 * 1000;
day2 = nowDate;
obj.startTime = this.datePipe.transform(day1, 'yyyy-MM-dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day2, 'yyyy-MM-dd') + ' 23:59:59';
obj.startTime = this.datePipe.transform(day1, 'yyyy/MM/dd') + ' 00:00:00';
obj.endTime = this.datePipe.transform(day2, 'yyyy/MM/dd') + ' 23:59:59';
break;
}
case'7': {
......
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