Browse Source

处理select框老数据

dev
cpf 3 years ago
parent
commit
5bd779bd86
  1. 12
      src/app/pages/left-domain/left-domain.component.html
  2. 24
      src/app/pages/left-domain/left-domain.component.ts

12
src/app/pages/left-domain/left-domain.component.html

@ -99,14 +99,14 @@
<p [title]="item.getPropertyData().safeVolume"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().safeVolume" (click)="stopBubbling($event)"></p>
<p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankType">
<nz-option nzValue="scg" nzLabel="双层罐"></nz-option>
<nz-option nzValue="dcg" nzLabel="单层罐+防渗罐池"></nz-option>
<nz-option nzValue="双层罐" nzLabel="双层罐"></nz-option>
<nz-option nzValue="单层罐+防渗罐池" nzLabel="单层罐+防渗罐池"></nz-option>
</nz-select>
</p>
<p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilPumpType">
<nz-option nzValue="zxb" nzLabel="自吸泵"></nz-option>
<nz-option nzValue="qyb" nzLabel="潜油泵"></nz-option>
<nz-option nzValue="自吸泵" nzLabel="自吸泵"></nz-option>
<nz-option nzValue="潜油泵" nzLabel="潜油泵"></nz-option>
</nz-select>
</p>
</div>
@ -164,8 +164,8 @@
<p [title]="item.getPropertyData().VRUType" class="overflowP" id="orvrContent{{item.modelInfo.key}}"><textarea nz-input nzAutosize id="orvrNum{{item.modelInfo.key}}" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUType" (click)="stopBubbling($event)" (input)="textInput(item)"></textarea></p>
<p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUType_2">
<nz-option nzValue="fss" nzLabel="分散式"></nz-option>
<nz-option nzValue="jzs" nzLabel="集中式"></nz-option>
<nz-option nzValue="分散式" nzLabel="分散式"></nz-option>
<nz-option nzValue="集中式" nzLabel="集中式"></nz-option>
</nz-select>
</p>
<p [title]="item.getPropertyData().VRUPumpType"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUPumpType" (click)="stopBubbling($event)"></p>

24
src/app/pages/left-domain/left-domain.component.ts

@ -94,6 +94,12 @@ export class LeftDomainComponent implements OnInit {
window.setTimeout(()=>{
this.textInput(item)
},0)
if (this.beforeFence === 2) {
item.getPropertyData().oilTankType = this.setNewData(item.getPropertyData().oilTankType)
item.getPropertyData().oilPumpType = this.setNewData(item.getPropertyData().oilPumpType)
} else if (this.beforeFence === 6) {
item.getPropertyData().VRUType_2 = this.setNewData(item.getPropertyData().VRUType_2)
}
})
}
if (this.beforeFence === 3) { //消防设施
@ -122,6 +128,24 @@ export class LeftDomainComponent implements OnInit {
}
//处理 油罐罐区/油气回收 select框老数据
setNewData(e: string):string {
if(e === "scg") {
e = "双层罐"
} else if (e === "dcg") {
e = "单层罐+防渗罐池"
} else if (e === "zxb") {
e = "自吸泵"
} else if (e === "qyb") {
e = "潜油泵"
} else if (e === "fss") {
e = "分散式"
} else if (e === "jzs") {
e = "集中式"
}
return e
}
//选中 设备
selectFacility(event, item: FacilityInfoUIItem) {
if (event.target.localName == 'img') {

Loading…
Cancel
Save