diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
index 6113888..c38b226 100644
--- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
+++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
@@ -608,23 +608,31 @@ export class CriminalRecordsAdminComponent implements OnInit {
nzClosable: false,
nzOnOk: async () => {
if (instance.isScrap) {
- let body = {
- id: item.violatedItemSnapshotObj.id,
- isScrapped: true,
- organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
- }
- this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
- // item.violatedItemSnapshotObj = data.result
+ await new Promise(resolve => {
let body = {
- id: item.id,
- handleRecord: '报废成功!'
+ id: item.violatedItemSnapshotObj.id,
+ name: instance.copydata2.violatedItemSnapshotObj.name,
+ specification: instance.copydata2.violatedItemSnapshotObj.specification,
+ productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
+ purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
+ validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD'),
+ isScrapped: true,
+ organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
- this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
- this.message.create('success', '报废成功!');
- item.handleTime = new Date()
- return true
+ this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
+ let body = {
+ id: item.id,
+ handleRecord: '报废成功!'
+ }
+ this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
+ resolve(data)
+ this.message.create('success', '报废成功!');
+ item.handleTime = new Date()
+ return true
+ })
})
})
+
} else {
if (instance.validateForm.valid) {
await new Promise(resolve => {
diff --git a/src/app/pages/criminal-records/criminal-records.component.ts b/src/app/pages/criminal-records/criminal-records.component.ts
index 5434fb8..d369560 100644
--- a/src/app/pages/criminal-records/criminal-records.component.ts
+++ b/src/app/pages/criminal-records/criminal-records.component.ts
@@ -553,21 +553,28 @@ export class CriminalRecordsComponent implements OnInit {
nzClosable: false,
nzOnOk: async () => {
if (instance.isScrap) {
- let body = {
- id: item.violatedItemSnapshotObj.id,
- isScrapped: true,
- organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
- }
- this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
- // item.violatedItemSnapshotObj = data.result
+ await new Promise(resolve => {
let body = {
- id: item.id,
- handleRecord: '报废成功!'
+ id: item.violatedItemSnapshotObj.id,
+ name: instance.copydata2.violatedItemSnapshotObj.name,
+ specification: instance.copydata2.violatedItemSnapshotObj.specification,
+ productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
+ purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
+ validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD'),
+ isScrapped: true,
+ organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
- this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
- this.message.create('success', '报废成功!');
- item.handleTime = new Date()
- return true
+ this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
+ let body = {
+ id: item.id,
+ handleRecord: '报废成功!'
+ }
+ this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
+ resolve(data)
+ this.message.create('success', '报废成功!');
+ item.handleTime = new Date()
+ return true
+ })
})
})
} else {
diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts
index db26b09..3366345 100644
--- a/src/app/pages/home-page/home-page.component.ts
+++ b/src/app/pages/home-page/home-page.component.ts
@@ -6,6 +6,7 @@ import * as moment from 'moment';
import { NzModalService } from 'ng-zorro-antd/modal';
import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component';
import { NzMessageService } from 'ng-zorro-antd/message';
+import { DisposeequipmentComponent } from '../warning-statistics-list/disposeequipment/disposeequipment.component';
declare var tools
@Component({
@@ -668,36 +669,128 @@ export class HomePageComponent implements OnInit {
isOpenModel: boolean = false
look(item) {
- console.log('消息item', item)
- this.isOpenModel = true
- item.notification.data.id = item.notification.entityId
- let data = item.notification.data
- const modal = this.modal.create({
- nzContent: GetOutOfLineDetailsComponent,
- nzWrapClassName: "vertical-center-modal",
- nzViewContainerRef: this.viewContainerRef,
- nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 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 () => {
+ console.log('消息item', item)
+ if (item.notification.data.eventSystemName == '灭火器维护') {
+ this.isOpenModel = true
+ let copydata = item.notification.data
+ copydata.violatedItemSnapshotObj = JSON.parse(copydata.violatedItemSnapshot)
+ const modal = this.modal.create({
+ nzContent: DisposeequipmentComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 380,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {
+ data: copydata
+ },
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+ if (instance.isScrap) {
+ await new Promise(resolve => {
+ let body = {
+ id: copydata.violatedItemSnapshotObj.id,
+ isScrapped: true,
+ organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId,
+ name: instance.copydata2.violatedItemSnapshotObj.name,
+ specification: instance.copydata2.violatedItemSnapshotObj.specification,
+ productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
+ purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
+ validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD')
+ }
+ this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
+ let body = {
+ id: item.notification.entityId,
+ handleRecord: '报废成功!'
+ }
+ this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
+ resolve(data)
+ this.message.create('success', '报废成功!');
+ copydata.handleTime = new Date()
+ return true
+ })
+ })
+ })
+
+ } else {
+ if (instance.validateForm.valid) {
+ await new Promise(resolve => {
+ let body = {
+ id: copydata.violatedItemSnapshotObj.id,
+ name: instance.validateForm.value.name,
+ specification: instance.validateForm.value.specification,
+ productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
+ purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
+ validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
+ organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId
+ }
+ this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
+ let body = {
+ id: item.notification.entityId,
+ handleRecord: '维保成功!'
+ }
+ this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
+ resolve(data)
+ this.message.create('success', '维保成功!');
+ copydata.handleTime = new Date()
+ return true
+ })
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+
+
+ modal.afterClose.subscribe(result => {
+ this.isOpenModel = false
+ this.rollStart()
+ });
+ this.readMess(item.notification.id)
+ } else {
+ this.isOpenModel = true
+ item.notification.data.id = item.notification.entityId
+ let data = item.notification.data
+ const modal = this.modal.create({
+ nzContent: GetOutOfLineDetailsComponent,
+ nzWrapClassName: "vertical-center-modal",
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 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 instance = modal.getContentComponent();
- modal.afterClose.subscribe(result => {
- this.isOpenModel = false
- this.rollStart()
- });
- this.readMess(item.notification.id)
}
diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts
index 6b6a367..a5ce07b 100644
--- a/src/app/pages/home/home.component.ts
+++ b/src/app/pages/home/home.component.ts
@@ -119,101 +119,108 @@ export class HomeComponent implements OnInit {
params: params
}).subscribe((data: any) => {
console.log('推送信息后获取信息', data)
- let copydata = data.result
-
- if (item.notification.data.properties.EventSystemName == '灭火器维护') {
- copydata.violatedItemSnapshotObj = JSON.parse(copydata.violatedItemSnapshot)
- const modal = this.modal.create({
- nzContent: DisposeequipmentComponent,
- nzViewContainerRef: this.viewContainerRef,
- nzWidth: 380,
- nzBodyStyle: {
- 'border': '1px solid #91CCFF',
- 'border-radius': '0px',
- 'padding': '7px',
- 'box-shadow': '0 0 8px 0 #fff',
- 'background-image': 'linear-gradient(#003665, #000f25)'
- },
- nzComponentParams: {
- data: copydata
- },
- nzFooter: null,
- nzClosable: false,
- nzOnOk: async () => {
- if (instance.isScrap) {
- let body = {
- id: copydata.violatedItemSnapshotObj.id,
- isScrapped: true,
- organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId
- }
- this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
- // item.violatedItemSnapshotObj = data.result
- let body = {
- id: copydata.id,
- handleRecord: '报废成功!'
- }
- this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
- this.message.create('success', '报废成功!');
- item.handleTime = new Date()
- return true
- })
- })
- } else {
- if (instance.validateForm.valid) {
+
+ setTimeout(() => {
+ let copydata = data.result
+ if (item.notification.data.properties.EventSystemName == '灭火器维护') {
+ copydata.violatedItemSnapshotObj = JSON.parse(copydata.violatedItemSnapshot)
+ const modal = this.modal.create({
+ nzContent: DisposeequipmentComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 380,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {
+ data: copydata
+ },
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+ if (instance.isScrap) {
await new Promise(resolve => {
let body = {
id: copydata.violatedItemSnapshotObj.id,
- name: instance.validateForm.value.name,
- specification: instance.validateForm.value.specification,
- productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
- purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
- validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
- organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId
+ isScrapped: true,
+ organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId,
+ name: instance.copydata2.violatedItemSnapshotObj.name,
+ specification: instance.copydata2.violatedItemSnapshotObj.specification,
+ productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
+ purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
+ validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD')
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
let body = {
id: copydata.id,
- handleRecord: '维保成功!'
+ handleRecord: '报废成功!'
}
this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
resolve(data)
- this.message.create('success', '维保成功!');
+ this.message.create('success', '报废成功!');
copydata.handleTime = new Date()
return true
})
})
})
+
} else {
- this.message.create('warning', '请填写完整!');
- return false
+ if (instance.validateForm.valid) {
+ await new Promise(resolve => {
+ let body = {
+ id: copydata.violatedItemSnapshotObj.id,
+ name: instance.validateForm.value.name,
+ specification: instance.validateForm.value.specification,
+ productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
+ purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
+ validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
+ organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId
+ }
+ this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
+ let body = {
+ id: copydata.id,
+ handleRecord: '维保成功!'
+ }
+ this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
+ resolve(data)
+ this.message.create('success', '维保成功!');
+ copydata.handleTime = new Date()
+ return true
+ })
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
}
}
- }
- });
- const instance = modal.getContentComponent();
- } else {
- const modal = this.modal.create({
- nzContent: GetOutOfLineDetailsComponent,
- nzWrapClassName: "vertical-center-modal",
- nzViewContainerRef: this.viewContainerRef,
- nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200,
- nzBodyStyle: {
- 'border': '1px solid #6d9cc7',
- 'border-radius': '0px',
- 'padding': '0px',
- 'box-shadow': '0 0 8px 0 #fff',
- 'background': '#000D21',
- },
- nzComponentParams: {
- data: copydata
- },
- nzFooter: null,
- });
- const instance = modal.getContentComponent();
- }
-
-
-
+ });
+ const instance = modal.getContentComponent();
+ } else {
+ const modal = this.modal.create({
+ nzContent: GetOutOfLineDetailsComponent,
+ nzWrapClassName: "vertical-center-modal",
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200,
+ nzBodyStyle: {
+ 'border': '1px solid #6d9cc7',
+ 'border-radius': '0px',
+ 'padding': '0px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background': '#000D21',
+ },
+ nzComponentParams: {
+ data: copydata
+ },
+ nzFooter: null,
+ });
+ const instance = modal.getContentComponent();
+ }
+ }, 0);
diff --git a/src/app/pages/oil-station-info/oil-station-info.component.html b/src/app/pages/oil-station-info/oil-station-info.component.html
index f8faf68..8180c8e 100644
--- a/src/app/pages/oil-station-info/oil-station-info.component.html
+++ b/src/app/pages/oil-station-info/oil-station-info.component.html
@@ -322,7 +322,7 @@
已处置成功(维保)
+ style="color: green;text-align: center;margin-top: 12px;">已处置成功已处置成功(报废)
+ style="color: red;text-align: center;margin-top: 12px;">已处置成功