陈鹏飞 3 years ago
parent
commit
493ff761c4
  1. 46
      src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
  2. 47
      src/app/pages/criminal-records/criminal-records.component.ts
  3. 8
      src/app/pages/home-page/home-page.component.ts
  4. 32
      src/app/pages/home/home.component.ts
  5. 2
      src/app/pages/today-warning-admin/today-warning-admin.component.ts
  6. 3
      src/app/pages/today-warning/today-warning.component.ts

46
src/app/pages/criminal-records-admin/criminal-records-admin.component.ts

@ -532,30 +532,32 @@ export class CriminalRecordsAdminComponent implements OnInit {
if (!item.violateImage && !item.violateVideo) { if (!item.violateImage && !item.violateVideo) {
this.message.create('warning', '没有预警照片或视频!'); this.message.create('warning', '没有预警照片或视频!');
} else { } else {
const modal = this.modal.create({ if (item.violation.eventSystemName == '灭火器维护' || item.violation.eventSystemName == '证照预警') {
nzContent: GetOutOfLineDetailsComponent, this.message.create('warning', item.desc);
nzWrapClassName: "vertical-center-modal", } else {
nzViewContainerRef: this.viewContainerRef, const modal = this.modal.create({
nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200, nzContent: GetOutOfLineDetailsComponent,
nzBodyStyle: { nzWrapClassName: "vertical-center-modal",
'border': '1px solid #6d9cc7', nzViewContainerRef: this.viewContainerRef,
'border-radius': '0px', nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200,
'padding': '0px', nzBodyStyle: {
'box-shadow': '0 0 8px 0 #fff', 'border': '1px solid #6d9cc7',
'background': '#000D21', 'border-radius': '0px',
}, 'padding': '0px',
nzComponentParams: { 'box-shadow': '0 0 8px 0 #fff',
data: item 'background': '#000D21',
}, },
nzFooter: null, nzComponentParams: {
nzOnOk: async () => { data: item
},
nzFooter: null,
nzOnOk: async () => {
} }
}); });
const instance = modal.getContentComponent(); const instance = modal.getContentComponent();
}
} }
} }

47
src/app/pages/criminal-records/criminal-records.component.ts

@ -513,31 +513,32 @@ export class CriminalRecordsComponent implements OnInit {
if (!item.violateImage && !item.violateVideo) { if (!item.violateImage && !item.violateVideo) {
this.message.create('warning', '没有预警照片或视频!'); this.message.create('warning', '没有预警照片或视频!');
} else { } else {
const modal = this.modal.create({ if (item.violation.eventSystemName == '灭火器维护' || item.violation.eventSystemName == '证照预警') {
nzContent: GetOutOfLineDetailsComponent, this.message.create('warning', item.desc);
nzWrapClassName: "vertical-center-modal", } else {
nzViewContainerRef: this.viewContainerRef, const modal = this.modal.create({
nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200, nzContent: GetOutOfLineDetailsComponent,
nzBodyStyle: { nzWrapClassName: "vertical-center-modal",
'border': '1px solid #6d9cc7', nzViewContainerRef: this.viewContainerRef,
'border-radius': '0px', nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200,
'padding': '0px', nzBodyStyle: {
'box-shadow': '0 0 8px 0 #fff', 'border': '1px solid #6d9cc7',
'background': '#000D21', 'border-radius': '0px',
}, 'padding': '0px',
nzComponentParams: { 'box-shadow': '0 0 8px 0 #fff',
data: item 'background': '#000D21',
}, },
nzFooter: null, nzComponentParams: {
nzOnOk: async () => { data: item
},
nzFooter: null,
nzOnOk: async () => {
} }
}); });
const instance = modal.getContentComponent(); const instance = modal.getContentComponent();
}
} }
} }
goOilList() { goOilList() {

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

@ -410,7 +410,7 @@ export class HomePageComponent implements OnInit {
color: '#fff' color: '#fff'
}, },
active: { active: {
fontSize: document.documentElement.clientHeight < 750 ? 12 : 14, fontSize: document.documentElement.clientHeight < 750 ? 12 : 14,
color: '#fff', color: '#fff',
fontFamily: 'Microsoft YaHei', fontFamily: 'Microsoft YaHei',
}, },
@ -655,9 +655,9 @@ export class HomePageComponent implements OnInit {
isOpenModel: boolean = false isOpenModel: boolean = false
look(item) { look(item) {
console.log(item) // console.log(item)
if (item.notification.data.eventSystemName == '灭火器维护' || item.notification.data.eventSystemName == '证照预警') { if (item.notification.data.eventSystemName == '灭火器维护' || item.notification.data.eventSystemName == '证照预警') {
this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`); this.message.create('warning', item.notification.data.desc);
} else { } else {
this.isOpenModel = true this.isOpenModel = true
let data = { let data = {
@ -668,7 +668,7 @@ export class HomePageComponent implements OnInit {
nzContent: GetOutOfLineDetailsComponent, nzContent: GetOutOfLineDetailsComponent,
nzWrapClassName: "vertical-center-modal", nzWrapClassName: "vertical-center-modal",
nzViewContainerRef: this.viewContainerRef, nzViewContainerRef: this.viewContainerRef,
nzWidth: (document.documentElement.clientHeight<650 || document.documentElement.clientWidth<1400) ? 1000 : 1200, nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200,
nzBodyStyle: { nzBodyStyle: {
'border': '1px solid #6d9cc7', 'border': '1px solid #6d9cc7',
'border-radius': '0px', 'border-radius': '0px',

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

@ -106,20 +106,21 @@ export class HomeComponent implements OnInit {
modalData modalData
look(item) { look(item) {
if (item.notification.data.properties.EventSystemName == '灭火器维护' || item.notification.data.properties.EventSystemName == '证照预警') { let params = {
this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`); id: item.notification.entityId
} else { }
let params = { this.http.get('/api/services/app/ViolateRecord/Get', {
id: item.notification.entityId params: params
} }).subscribe((data: any) => {
this.http.get('/api/services/app/ViolateRecord/Get', { // console.log(data)
params: params if (item.notification.data.properties.EventSystemName == '灭火器维护' || item.notification.data.properties.EventSystemName == '证照预警') {
}).subscribe((data: any) => { this.message.create('warning', data.result.desc);
} else {
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: GetOutOfLineDetailsComponent, nzContent: GetOutOfLineDetailsComponent,
nzWrapClassName: "vertical-center-modal", nzWrapClassName: "vertical-center-modal",
nzViewContainerRef: this.viewContainerRef, nzViewContainerRef: this.viewContainerRef,
nzWidth: (document.documentElement.clientHeight<650 || document.documentElement.clientWidth<1400) ? 1000 : 1200, nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200,
nzBodyStyle: { nzBodyStyle: {
'border': '1px solid #6d9cc7', 'border': '1px solid #6d9cc7',
'border-radius': '0px', 'border-radius': '0px',
@ -142,10 +143,9 @@ export class HomeComponent implements OnInit {
} }
}) })
this.readMess(item.notification.id) this.readMess(item.notification.id)
}) }
}
})
} }
//标记为已读 //标记为已读
@ -266,7 +266,7 @@ export class HomeComponent implements OnInit {
//修改密码 //修改密码
changePassword() { changePassword() {
const modal:any = this.modal.create({ const modal: any = this.modal.create({
nzTitle: '修改密码', nzTitle: '修改密码',
nzContent: ChangePasswordComponent, nzContent: ChangePasswordComponent,
nzViewContainerRef: this.viewContainerRef, nzViewContainerRef: this.viewContainerRef,
@ -278,7 +278,7 @@ export class HomeComponent implements OnInit {
this.message.create('warning', '两次密码输入不一致!'); this.message.create('warning', '两次密码输入不一致!');
return false return false
} else { } else {
await new Promise((resolve,reject) => { await new Promise((resolve, reject) => {
let body = { let body = {
currentPassword: instance.validateForm.value.oldpassword, currentPassword: instance.validateForm.value.oldpassword,
newPassword: instance.validateForm.value.newpassword newPassword: instance.validateForm.value.newpassword
@ -287,7 +287,7 @@ export class HomeComponent implements OnInit {
resolve(data) resolve(data)
this.message.create('success', '修改成功!'); this.message.create('success', '修改成功!');
return true return true
},err=>{ }, err => {
this.message.create('warning', err.error.error.message); this.message.create('warning', err.error.error.message);
modal.config.nzOkLoading = false modal.config.nzOkLoading = false
return false return false

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

@ -162,7 +162,7 @@ export class TodayWarningAdminComponent implements OnInit {
isVisible=false isVisible=false
look(item) { look(item) {
if (item.violation.eventSystemName == '灭火器维护' || item.violation.eventSystemName == '证照预警') { if (item.violation.eventSystemName == '灭火器维护' || item.violation.eventSystemName == '证照预警') {
this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`); this.message.create('warning', item.desc);
} else { } else {
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: GetOutOfLineDetailsComponent, nzContent: GetOutOfLineDetailsComponent,

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

@ -113,8 +113,9 @@ export class TodayWarningComponent implements OnInit {
look(item) { look(item) {
console.log(item)
if (item.violation.eventSystemName == '灭火器维护' || item.violation.eventSystemName == '证照预警') { if (item.violation.eventSystemName == '灭火器维护' || item.violation.eventSystemName == '证照预警') {
this.message.create('warning', `证照或者器材即将临期,请联系加油站处理!`); this.message.create('warning', item.desc);
} else { } else {
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: GetOutOfLineDetailsComponent, nzContent: GetOutOfLineDetailsComponent,

Loading…
Cancel
Save