刘向辉 3 years ago
parent
commit
82a2738908
  1. 2
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-yg.ts
  2. 31
      src/app/pages/left-domain/left-domain.component.html
  3. 7
      src/app/pages/left-domain/left-domain.component.scss
  4. 11
      src/app/pages/left-domain/left-domain.component.ts
  5. 1
      src/styles.scss

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

@ -16,6 +16,7 @@ export class PropertyData_YG extends PropertyData_Base {
constructor(key: string,oilProductNo: string,oilTankVolume: string,safeVolume: string,quantity: string,tankFarm: string,oilTankType: string) {
super(key, FacilityType.JY_YG);
this.name = "未命名";
this.oilProductNo = oilProductNo
this.oilTankVolume = oilTankVolume
this.safeVolume = safeVolume
@ -26,6 +27,7 @@ export class PropertyData_YG extends PropertyData_Base {
clone(key: string) {
let result = new PropertyData_YG(key,this.oilProductNo,this.oilTankVolume,this.safeVolume,this.quantity,this.tankFarm,this.oilTankType);
result.name = this.name;
return result;
}

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

@ -18,8 +18,12 @@
<!-- 基本信息 -->
<!-- 加油机 -->
<div class="publicBox refueller" *ngIf="beforeFence === 1">
<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="interval" *ngFor="let item of FacilityList" (click)="selectFacility(item)">
<!-- 选中样式 -->
<div class="positionLeftTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionLeftBottom" *ngIf="selectFacilityId === item.getID()"></div>
<div class="positionRightTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionRightBottom" *ngIf="selectFacilityId === item.getID()"></div>
<!-- 选中样式 -->
<p class="title"><input type="text" class="tableInput" [(ngModel)]="item.getPropertyData().name"></p>
<div class="table">
<div class="tableHeader">
<p>品牌</p>
@ -33,7 +37,12 @@
<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>
<p style="padding-left: 8px;">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editModel" [(ngModel)]="item.getPropertyData().oilPumpType">
<nz-option nzValue="zxb" nzLabel="自吸泵"></nz-option>
<nz-option nzValue="qyb" nzLabel="潜油泵"></nz-option>
</nz-select>
</p>
</div>
</div>
</div>
@ -41,8 +50,12 @@
<!-- 加油机 -->
<!-- 油罐设备 -->
<div class="publicBox refueller oilTank" *ngIf="beforeFence === 2">
<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="interval" *ngFor="let item of FacilityList" (click)="selectFacility(item)">
<!-- 选中样式 -->
<div class="positionLeftTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionLeftBottom" *ngIf="selectFacilityId === item.getID()"></div>
<div class="positionRightTop" *ngIf="selectFacilityId === item.getID()"></div><div class="positionRightBottom" *ngIf="selectFacilityId === item.getID()"></div>
<!-- 选中样式 -->
<p class="title"><input type="text" class="tableInput" [(ngModel)]="item.getPropertyData().name"></p>
<div class="table">
<div class="tableHeader">
<p>油品品号</p>
@ -58,7 +71,13 @@
<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>
<p style="padding-left: 8px;">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editModel" [(ngModel)]="item.getPropertyData().oilTankType">
<nz-option nzValue="scg" nzLabel="双层罐"></nz-option>
<nz-option nzValue="dcg" nzLabel="单层罐"></nz-option>
<nz-option nzValue="fsgc" nzLabel="防渗罐池"></nz-option>
</nz-select>
</p>
</div>
</div>
</div>

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

@ -36,6 +36,7 @@
.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%; }
.tableSelect{ width: 100%; height: 100%; color: #fff; }
.baseInfo{ //基本信息
.interval{ margin-top: 10px; border-bottom: 1px solid rgb(197, 226, 245); } //分隔div
@ -46,7 +47,11 @@
.textImage{ margin-bottom: 15px; height: auto; line-height: normal; img{ width: auto; height: 130px; } }
}
.refueller{ //加油机
.interval{ margin-top: 10px; } //分隔div
.interval{ margin-top: 10px; position: relative; cursor: pointer; } //分隔div
.positionLeftTop { position: absolute; width: 10px; height: 10px; left: -5px; top: -5px; border-left: 1px solid #fff; border-top: 1px solid #fff; } //左上角
.positionLeftBottom { position: absolute; width: 10px; height: 10px; left: -5px; bottom: -5px; border-left: 1px solid #fff; border-bottom: 1px solid #fff; } //左下角
.positionRightTop { position: absolute; width: 10px; height: 10px; right: -5px; top: -5px; border-right: 1px solid #fff; border-top: 1px solid #fff; } //右上角
.positionRightBottom { position: absolute; width: 10px; height: 10px; right: -5px; bottom: -5px; border-right: 1px solid #fff; border-bottom: 1px solid #fff; } //右下角
.table{
width: 100%;
border: 1px solid #91CCFF;

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

@ -56,6 +56,17 @@ export class LeftDomainComponent implements OnInit {
}
}
//选中 设备
selectFacility(item: FacilityInfoUIItem) {
if (this.selectFacilityId != item.getID()) {
this.selectFacilityId = item.getID()
FacilityInfoInSceneWindow.instance.selectFacilityItem(item);
} else {
this.selectFacilityId = null
item.onSelect(false)
}
}
//处理 treeData
handleTreeData(list: FacilityInfoUIItem[]) {
this.treeData = []

1
src/styles.scss

@ -107,6 +107,7 @@ h1 {
.ant-tree{ color: #C4E2FC; }
.ant-tree,.ant-tree-node-content-wrapper:hover,.ant-tree-node-content-wrapper.ant-tree-node-selected { background-color: transparent; }
.ant-tree-node-content-wrapper { width: 100%; }
.ant-select-single:not(.ant-select-customize-input) .ant-select-selector { border: none; border-radius: 0px; }
//滚动条样式
::-webkit-scrollbar {
width: 5px;

Loading…
Cancel
Save