刘向辉 3 years ago
parent
commit
c2a196db1a
  1. 2
      src/app/babylon/controller/data-manager.ts
  2. 10
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-yg.ts
  3. 6
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
  4. 30
      src/app/pages/left-domain/left-domain.component.html
  5. 4
      src/app/pages/left-domain/left-domain.component.scss
  6. 3
      src/app/pages/left-domain/left-domain.component.ts
  7. 8
      src/app/pages/plan/plan.component.ts

2
src/app/babylon/controller/data-manager.ts

@ -444,7 +444,7 @@ export class DataManager {
case FacilityType.XF_MHQ_GF_8:
case FacilityType.XF_MHQ_GF_35: result = new PropertyData_MHQ(key, facilityType); break;
case FacilityType.JY_JYJ: result = new PropertyData_JYJ(key,"", "","", "","",); break;
case FacilityType.JY_YG: result = new PropertyData_YG(key); break;
case FacilityType.JY_YG: result = new PropertyData_YG(key,"", "","", "","",""); break;
case FacilityType.JY_SYGX: result = new PropertyData_SYGX(key); break;
case FacilityType.JY_YQHSGX: result = new PropertyData_YQHSGX(key); break;

10
src/app/babylon/model/data/institution/facility/property-data/in/property-data-yg.ts

@ -14,12 +14,18 @@ export class PropertyData_YG extends PropertyData_Base {
tankFarm: string = ""; //罐区
oilTankType: string = ""; //油罐类型
constructor(key: string) {
constructor(key: string,oilProductNo: string,oilTankVolume: string,safeVolume: string,quantity: string,tankFarm: string,oilTankType: string) {
super(key, FacilityType.JY_YG);
this.oilProductNo = oilProductNo
this.oilTankVolume = oilTankVolume
this.safeVolume = safeVolume
this.quantity = quantity
this.tankFarm = tankFarm
this.oilTankType = oilTankType
}
clone(key: string) {
let result = new PropertyData_YG(key);
let result = new PropertyData_YG(key,this.oilProductNo,this.oilTankVolume,this.safeVolume,this.quantity,this.tankFarm,this.oilTankType);
return result;
}

6
src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

@ -163,12 +163,8 @@ export class FacilityInfoInSceneWindow extends UIBase {
}
} else { // 单选
if (isChecked) { //选中
this.three.beforeOnefacilityInfo = facilityInfoUIItem[0].getID();
this.three.getPropertyData(facilityInfoUIItem[0])
console.log("通知前端选中设备", facilityInfoUIItem[0]);
this.three.selectProperty(facilityInfoUIItem[0])
} else { //取消选中
// this.three.isShowRightNature = false
this.three.beforeOnefacilityInfo = null
}

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

@ -18,8 +18,8 @@
<!-- 基本信息 -->
<!-- 加油机 -->
<div class="publicBox refueller" *ngIf="beforeFence === 1">
<div class="interval">
<p class="title">1类加油机</p>
<div class="interval" *ngFor="let item of FacilityList">
<p class="title">{{item.getName()}}<i nz-icon nzType="eye" nzTheme="outline" *ngIf="selectFacilityId === item.getID()"></i></p>
<div class="table">
<div class="tableHeader">
<p>品牌</p>
@ -29,11 +29,11 @@
<p>油泵类型</p>
</div>
<div class="tableContent">
<p>超大牌</p>
<p>2</p>
<p>4</p>
<p>92#</p>
<p>自吸泵</p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().brand"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().superBrand"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilGunNum"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilProductNo"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilPumpType"></p>
</div>
</div>
</div>
@ -41,8 +41,8 @@
<!-- 加油机 -->
<!-- 油罐设备 -->
<div class="publicBox refueller oilTank" *ngIf="beforeFence === 2">
<div class="interval">
<p class="title">1号油罐</p>
<div class="interval" *ngFor="let item of FacilityList">
<p class="title">{{item.getName()}}<i nz-icon nzType="eye" nzTheme="outline" *ngIf="selectFacilityId === item.getID()"></i></p>
<div class="table">
<div class="tableHeader">
<p>油品品号</p>
@ -53,12 +53,12 @@
<p>油罐类型</p>
</div>
<div class="tableContent">
<p>92#</p>
<p>200L</p>
<p>180L</p>
<p>1</p>
<p>独立罐区</p>
<p>防渗罐池</p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilProductNo"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilTankVolume"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().safeVolume"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().quantity"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().tankFarm"></p>
<p><input type="text" class="tableInput" [disabled]="!editModel" [(ngModel)]="item.getPropertyData().oilTankType"></p>
</div>
</div>
</div>

4
src/app/pages/left-domain/left-domain.component.scss

@ -33,8 +33,10 @@
}
}
.title{ font-size: 16px; height: 20px; line-height: 20px; margin-bottom: 20px; } //头部header
.publicBox{ width: 100%; height: 100%; overflow-y: auto; padding: 0 20px; }
.title{ font-size: 16px; height: 20px; line-height: 20px; margin-bottom: 20px; .anticon{ margin-left: 5px; font-size: 16px; } } //头部header
.tableInput{ border: none; outline: none; background-color: transparent; width: 100%; height: 100%; }
.baseInfo{ //基本信息
.interval{ margin-top: 10px; border-bottom: 1px solid rgb(197, 226, 245); } //分隔div
p{ height: 20px; line-height: 20px; }

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

@ -22,6 +22,7 @@ export class LeftDomainComponent implements OnInit {
editModel: boolean = true; //编辑/查看模式
beforeFence: number; //当前选中功能栏
FacilityList: FacilityInfoUIItem[] = []; //统计设备 list
selectFacilityId: string = null; //选中设备 ID
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
treeData: NzTreeNodeOptions[] = []; //tree data
@ -49,7 +50,7 @@ export class LeftDomainComponent implements OnInit {
}
})
this.FacilityList = list
console.log(this.FacilityList,this.FacilityList[0].getPropertyData(),'筛选设备')
this.selectFacilityId = null
if (this.beforeFence === 3) { //消防设施
this.handleTreeData(this.FacilityList)
}

8
src/app/pages/plan/plan.component.ts

@ -269,11 +269,13 @@ export class PlanComponent implements OnInit {
}
beforeOnePropertyData: FacilityInfoUIItem = null; //当前选择 设备
beforeOnefacilityInfo: string = null; //当前选择 设备ID
//获取选择设备 属性
getPropertyData(e: FacilityInfoUIItem) {
//选中 设备
selectProperty(e: FacilityInfoUIItem) {
this.beforeOnePropertyData = e
if (this.isShowChildComponent && this.leftDomain) {
this.leftDomain.selectFacilityId = e.getID()
}
}
selectRightTopFast: number = 0; //当前选择功能 快捷栏

Loading…
Cancel
Save