|
|
@ -5,6 +5,7 @@ import * as echarts from 'echarts'; |
|
|
|
import * as moment from 'moment'; |
|
|
|
import * as moment from 'moment'; |
|
|
|
import { NzModalService } from 'ng-zorro-antd/modal'; |
|
|
|
import { NzModalService } from 'ng-zorro-antd/modal'; |
|
|
|
import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; |
|
|
|
import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; |
|
|
|
|
|
|
|
import { NzMessageService } from 'ng-zorro-antd/message'; |
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-home-page', |
|
|
|
selector: 'app-home-page', |
|
|
|
templateUrl: './home-page.component.html', |
|
|
|
templateUrl: './home-page.component.html', |
|
|
@ -12,7 +13,7 @@ import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-d |
|
|
|
}) |
|
|
|
}) |
|
|
|
export class HomePageComponent implements OnInit { |
|
|
|
export class HomePageComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
constructor(private http: HttpClient, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { } |
|
|
|
constructor(private http: HttpClient, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } |
|
|
|
|
|
|
|
|
|
|
|
warningechartpie//预警饼图
|
|
|
|
warningechartpie//预警饼图
|
|
|
|
warningechartpieOption = { |
|
|
|
warningechartpieOption = { |
|
|
@ -75,7 +76,7 @@ export class HomePageComponent implements OnInit { |
|
|
|
textShadowColor: '#8df', |
|
|
|
textShadowColor: '#8df', |
|
|
|
textShadowBlur: 3, |
|
|
|
textShadowBlur: 3, |
|
|
|
color: '#fff', |
|
|
|
color: '#fff', |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
active: { |
|
|
|
active: { |
|
|
|
fontSize: 14, |
|
|
|
fontSize: 14, |
|
|
@ -272,10 +273,10 @@ export class HomePageComponent implements OnInit { |
|
|
|
violationType: { |
|
|
|
violationType: { |
|
|
|
violationTypeAgg: [] |
|
|
|
violationTypeAgg: [] |
|
|
|
}, |
|
|
|
}, |
|
|
|
dev:{ |
|
|
|
dev: { |
|
|
|
stationCount:'', |
|
|
|
stationCount: '', |
|
|
|
violationCount:'', |
|
|
|
violationCount: '', |
|
|
|
cameraCount:'' |
|
|
|
cameraCount: '' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
totalCount |
|
|
|
totalCount |
|
|
@ -641,36 +642,43 @@ export class HomePageComponent implements OnInit { |
|
|
|
isOpenModel: boolean = false |
|
|
|
isOpenModel: boolean = false |
|
|
|
|
|
|
|
|
|
|
|
look(item) { |
|
|
|
look(item) { |
|
|
|
this.isOpenModel = true |
|
|
|
console.log(item) |
|
|
|
let data = { |
|
|
|
if (item.notification.data.eventSystemName == '灭火器维护' || item.notification.data.eventSystemName == '证照预警') { |
|
|
|
violateImage: item.notification.data.violateImage, |
|
|
|
this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`); |
|
|
|
violateVideo: item.notification.data.violateVideo |
|
|
|
} else { |
|
|
|
|
|
|
|
this.isOpenModel = true |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
violateImage: item.notification.data.violateImage, |
|
|
|
|
|
|
|
violateVideo: item.notification.data.violateVideo |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const modal = this.modal.create({ |
|
|
|
|
|
|
|
nzContent: GetOutOfLineDetailsComponent, |
|
|
|
|
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
|
|
|
|
|
nzWidth: 1200, |
|
|
|
|
|
|
|
nzBodyStyle: { |
|
|
|
|
|
|
|
'border': '1px solid #6d9cc7', |
|
|
|
|
|
|
|
'border-radius': '0px', |
|
|
|
|
|
|
|
'padding': '0px', |
|
|
|
|
|
|
|
'box-shadow': '0 0 8px 0 #fff', |
|
|
|
|
|
|
|
'background': '#000D21', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
nzComponentParams: { |
|
|
|
|
|
|
|
data: data |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
nzFooter: null, |
|
|
|
|
|
|
|
nzOnOk: async () => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
|
|
|
|
modal.afterClose.subscribe(result => { |
|
|
|
|
|
|
|
this.isOpenModel = false |
|
|
|
|
|
|
|
this.rollStart() |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.readMess(item.notification.id) |
|
|
|
} |
|
|
|
} |
|
|
|
const modal = this.modal.create({ |
|
|
|
|
|
|
|
nzContent: GetOutOfLineDetailsComponent, |
|
|
|
|
|
|
|
nzViewContainerRef: this.viewContainerRef, |
|
|
|
|
|
|
|
nzWidth: 1200, |
|
|
|
|
|
|
|
nzBodyStyle: { |
|
|
|
|
|
|
|
'border': '1px solid #6d9cc7', |
|
|
|
|
|
|
|
'border-radius': '0px', |
|
|
|
|
|
|
|
'padding': '0px', |
|
|
|
|
|
|
|
'box-shadow': '0 0 8px 0 #fff', |
|
|
|
|
|
|
|
'background': '#000D21', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
nzComponentParams: { |
|
|
|
|
|
|
|
data: data |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
nzFooter: null, |
|
|
|
|
|
|
|
nzOnOk: async () => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
const instance = modal.getContentComponent(); |
|
|
|
|
|
|
|
modal.afterClose.subscribe(result => { |
|
|
|
|
|
|
|
this.isOpenModel = false |
|
|
|
|
|
|
|
this.rollStart() |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.readMess(item.notification.id) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//标记为已读
|
|
|
|
//标记为已读
|
|
|
|