Browse Source

[完善]修改处置设备弹出框

dev
邵佳豪 3 years ago
parent
commit
cd41ad1237
  1. 17
      src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.html
  2. 20
      src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.ts

17
src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.html

@ -6,13 +6,12 @@
<i nz-icon nzType="close" nzTheme="outline" (click)="destroyModal()"></i>
</div>
<nz-radio-group *ngIf="!data2.handleTime" class="radiobox" [(ngModel)]="radioValue"
(ngModelChange)="ngModelChange($event)">
<label nz-radio nzValue="A">维保</label>
<label nz-radio nzValue="B">报废</label>
</nz-radio-group>
<p *ngIf="!data2.handleTime && !isScrap" style="color: green;text-align: center;margin-top: 12px;">维保</p>
<p *ngIf="!data2.handleTime && isScrap" style="color: red;text-align: center;margin-top: 12px;">报废</p>
<p *ngIf="data2.handleTime && (isScraped == '维保' || isScraped == '报废')" style="text-align: center;color: #91CCFF;">
<br>
<span *ngIf="isScraped == '维保'" style="color: green;">已处置<br></span>
<span *ngIf="isScraped == '报废'" style="color: red;">已处置<br></span>
<span>器材名称:{{newdata.name}}</span><br>
<span *ngIf="isScraped == '维保'" style="color: green;">处置方式:维保<br></span>
<span *ngIf="isScraped == '报废'" style="color: red;">处置方式:报废<br></span>
@ -22,6 +21,13 @@
<span>下次维保日期:{{newdata.maintenanceDate | date:"yyyy-MM-dd"}}<br></span>
<span>有效期至:{{newdata.validityEndTime | date:"yyyy-MM-dd"}}</span>
</p>
<p *ngIf=" !data2.handleTime && isScrap" style="text-align: center;color: #91CCFF;">
<span>器材名称:{{data2.violatedItemSnapshotObj.name}}</span><br>
<span>存放地点:{{data2.violatedItemSnapshotObj.storageLocation}}<br></span>
<span>有效期至:{{data2.violatedItemSnapshotObj.validityEndTime | date:"yyyy-MM-dd"}}</span>
</p>
<form nz-form [formGroup]="validateForm" class="form">
<div *ngIf=" !data2.handleTime && !isScrap">
<p>消防器材名称</p>
@ -67,7 +73,6 @@
</nz-form-control>
</nz-form-item>
</div>
<div class="btnbox" *ngIf="!data2.handleTime">
<button nz-button type="submit" class="ok" (click)="ok()">确定</button>
<button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button>

20
src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.ts

@ -17,13 +17,16 @@ export class DisposeequipmentComponent implements OnInit {
radioValue = "A"
data2
copydata2
isScrap
isScraped
newdata
ngOnInit(): void {
this.data2 = JSON.parse(JSON.stringify(this.data))
this.copydata2 = JSON.parse(JSON.stringify(this.data))
console.log('快照预警数据', this.data2)
if (this.data2.handleTime) {
let params = {
@ -38,6 +41,12 @@ export class DisposeequipmentComponent implements OnInit {
this.isScraped = '维保'
}
})
}else{
if(this.data2.desc == '维保'){
this.isScrap = false
}else{
this.isScrap = true
}
}
this.validateForm = this.fb.group({
@ -57,13 +66,4 @@ export class DisposeequipmentComponent implements OnInit {
ok() {
this.modal.triggerOk()
}
//是否报废
isScrap = false
ngModelChange(e) {
if (e == 'A') {
this.isScrap = false
} else {
this.isScrap = true
}
}
}

Loading…
Cancel
Save