Browse Source

[完善]证照或者器材临期提醒

dev
邵佳豪 3 years ago
parent
commit
4489a77f36
  1. 10
      src/app/pages/home-page/home-page.component.ts
  2. 4
      src/app/pages/home/home.component.html
  3. 9
      src/app/pages/home/home.component.ts
  4. 11
      src/app/pages/today-warning-admin/today-warning-admin.component.ts
  5. 6
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html
  6. 1
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss
  7. 8
      src/app/pages/today-warning/today-warning.component.ts

10
src/app/pages/home-page/home-page.component.ts

@ -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 = {
@ -641,6 +642,10 @@ export class HomePageComponent implements OnInit {
isOpenModel: boolean = false isOpenModel: boolean = false
look(item) { look(item) {
console.log(item)
if (item.notification.data.eventSystemName == '灭火器维护' || item.notification.data.eventSystemName == '证照预警') {
this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`);
} else {
this.isOpenModel = true this.isOpenModel = true
let data = { let data = {
violateImage: item.notification.data.violateImage, violateImage: item.notification.data.violateImage,
@ -673,6 +678,9 @@ export class HomePageComponent implements OnInit {
this.readMess(item.notification.id) this.readMess(item.notification.id)
} }
}
//标记为已读 //标记为已读
readMess(id) { readMess(id) {
let body = { let body = {

4
src/app/pages/home/home.component.html

@ -88,3 +88,7 @@
</div> </div>
</div> </div>
</ng-template> </ng-template>
<!--
<nz-modal [(nzVisible)]="isVisible">
<app-get-out-of-line-details [data]="modalData"></app-get-out-of-line-details>
</nz-modal> -->

9
src/app/pages/home/home.component.ts

@ -102,8 +102,13 @@ export class HomeComponent implements OnInit {
} }
this.messageId.push(obj) this.messageId.push(obj)
} }
isVisible = false
modalData
look(item) { look(item) {
if (item.notification.data.properties.EventSystemName == '灭火器维护' || item.notification.data.properties.EventSystemName == '证照预警') {
this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`);
} else {
let params = { let params = {
id: item.notification.entityId id: item.notification.entityId
} }
@ -135,9 +140,11 @@ export class HomeComponent implements OnInit {
this.notificationService.remove(element.messageId) this.notificationService.remove(element.messageId)
} }
}) })
this.readMess(item.notification.id)
}) })
this.readMess(item.notification.id) }
} }
//标记为已读 //标记为已读

11
src/app/pages/today-warning-admin/today-warning-admin.component.ts

@ -159,14 +159,11 @@ export class TodayWarningAdminComponent implements OnInit {
} }
isVisible=false
look(item) { look(item) {
let type if (item.violation.eventSystemName == '灭火器维护' || item.violation.eventSystemName == '证照预警') {
if (item.violation.violationType.indexOf('卸油')) { this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`);
type = 1
} else { } else {
type = 0
}
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: GetOutOfLineDetailsComponent, nzContent: GetOutOfLineDetailsComponent,
nzViewContainerRef: this.viewContainerRef, nzViewContainerRef: this.viewContainerRef,
@ -189,6 +186,8 @@ export class TodayWarningAdminComponent implements OnInit {
const instance = modal.getContentComponent(); const instance = modal.getContentComponent();
} }
}
dispose(item) { dispose(item) {
console.log(item) console.log(item)
const modal = this.modal.create({ const modal = this.modal.create({

6
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html

@ -13,12 +13,6 @@
</div> </div>
<div class="content"> <div class="content">
<div *ngIf="selectedType == 'img'" class="imgbox"> <div *ngIf="selectedType == 'img'" class="imgbox">
<!-- <div class="imglist">
<span class="imglisttitle">截图列表</span>
<div class="img">
<img src="../../../../assets/images/bgImg.jpg" alt="">
</div>
</div> -->
<div class="bigimg"> <div class="bigimg">
<img [src]="imgUrl" alt=""> <img [src]="imgUrl" alt="">
</div> </div>

1
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss

@ -98,6 +98,7 @@
} }
.bigimg { .bigimg {
// min-width: 1149px;
flex: 1; flex: 1;
box-sizing: border-box; box-sizing: border-box;
padding-left: 13px; padding-left: 13px;

8
src/app/pages/today-warning/today-warning.component.ts

@ -113,12 +113,9 @@ export class TodayWarningComponent implements OnInit {
look(item) { look(item) {
let type if (item.violation.eventSystemName == '灭火器维护' || item.violation.eventSystemName == '证照预警') {
if (item.violation.violationType.indexOf('卸油')) { this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`);
type = 1
} else { } else {
type = 0
}
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: GetOutOfLineDetailsComponent, nzContent: GetOutOfLineDetailsComponent,
nzViewContainerRef: this.viewContainerRef, nzViewContainerRef: this.viewContainerRef,
@ -140,6 +137,7 @@ export class TodayWarningComponent implements OnInit {
}); });
const instance = modal.getContentComponent(); const instance = modal.getContentComponent();
} }
}
dispose(item) { dispose(item) {
console.log(item) console.log(item)

Loading…
Cancel
Save