Browse Source

修正BUG

dev
陈鹏飞 3 years ago
parent
commit
650656d718
  1. 2
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
  2. 48
      src/app/pages/left-domain/left-domain.component.html
  3. 8
      src/app/pages/left-domain/left-domain.component.ts

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

@ -166,7 +166,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
if (isChecked) { //选中 if (isChecked) { //选中
this.three.selectProperty(facilityInfoUIItem[0]) this.three.selectProperty(facilityInfoUIItem[0])
} else { //取消选中 } else { //取消选中
this.three.isShowNature = false
} }
} }

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

@ -48,7 +48,7 @@
<!-- 加油机 --> <!-- 加油机 -->
<div class="publicBox refueller" *ngIf="beforeFence === 1"> <div class="publicBox refueller" *ngIf="beforeFence === 1">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}"> <div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p> <p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name" (click)="stopBubbling($event)"></p>
<div class="table"> <div class="table">
<div class="tableHeader"> <div class="tableHeader">
<p>品牌</p> <p>品牌</p>
@ -57,10 +57,10 @@
<p>油泵类型</p> <p>油泵类型</p>
</div> </div>
<div class="tableContent"> <div class="tableContent">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().brand"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().brand" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNum"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNum" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo" (click)="stopBubbling($event)"></p>
<p style="padding-left: 8px;"> <p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilPumpType"> <nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilPumpType">
<nz-option nzValue="zxb" nzLabel="自吸泵"></nz-option> <nz-option nzValue="zxb" nzLabel="自吸泵"></nz-option>
<nz-option nzValue="qyb" nzLabel="潜油泵"></nz-option> <nz-option nzValue="qyb" nzLabel="潜油泵"></nz-option>
@ -74,7 +74,7 @@
<!-- 油罐设备 --> <!-- 油罐设备 -->
<div class="publicBox refueller" *ngIf="beforeFence === 2"> <div class="publicBox refueller" *ngIf="beforeFence === 2">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}"> <div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p> <p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name" (click)="stopBubbling($event)"></p>
<div class="table"> <div class="table">
<div class="tableHeader"> <div class="tableHeader">
<p>油品品号</p> <p>油品品号</p>
@ -85,12 +85,12 @@
<p>油罐类型</p> <p>油罐类型</p>
</div> </div>
<div class="tableContent"> <div class="tableContent">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankVolume"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankVolume" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().safeVolume"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().safeVolume" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().quantity"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().quantity" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().tankFarm"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().tankFarm" (click)="stopBubbling($event)"></p>
<p style="padding-left: 8px;"> <p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankType"> <nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankType">
<nz-option nzValue="scg" nzLabel="双层罐"></nz-option> <nz-option nzValue="scg" nzLabel="双层罐"></nz-option>
<nz-option nzValue="dcg" nzLabel="单层罐+防渗罐池"></nz-option> <nz-option nzValue="dcg" nzLabel="单层罐+防渗罐池"></nz-option>
@ -112,25 +112,25 @@
<!-- 输油管线 --> <!-- 输油管线 -->
<div class="publicBox refueller" *ngIf="beforeFence === 5"> <div class="publicBox refueller" *ngIf="beforeFence === 5">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}"> <div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p> <p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name" (click)="stopBubbling($event)"></p>
<div class="table"> <div class="table">
<div class="tableHeader" style="flex: 50%;"> <div class="tableHeader" style="flex: 50%;">
<p>连接的加油机</p> <p>连接的加油机</p>
<p>连接的油罐</p> <p>连接的油罐</p>
</div> </div>
<div class="tableContent" style="flex: 50%;"> <div class="tableContent" style="flex: 50%;">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkJYJ"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkJYJ" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkYG"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().linkYG" (click)="stopBubbling($event)"></p>
</div> </div>
</div> </div>
<div class="propertyImage" id="pipelineViewer{{item.getID()}}"> <div class="propertyImage" id="pipelineViewer{{item.getID()}}">
<p class="imgTitle">设计图纸</p> <p class="imgTitle">设计图纸</p>
<img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img"> <img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img" (click)="stopBubbling($event)">
<div class="positionHandleImgVideo" style="width: 120px;" *ngIf="editMode && item.getPropertyData().img"> <div class="positionHandleImgVideo" style="width: 120px;" *ngIf="editMode && item.getPropertyData().img" (click)="stopBubbling($event)">
<a href="javascript:;" class="imgAndVideoUpload"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="upload" nzTheme="outline"></i></a> <a href="javascript:;" class="imgAndVideoUpload"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="upload" nzTheme="outline"></i></a>
<i nz-icon nzType="delete" nzTheme="outline" (click)="deleteImg(item)"></i> <i nz-icon nzType="delete" nzTheme="outline" (click)="deleteImg(item)"></i>
</div> </div>
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode && !item.getPropertyData().img"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a> <a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode && !item.getPropertyData().img" (click)="stopBubbling($event)"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a>
</div> </div>
</div> </div>
</div> </div>
@ -138,30 +138,30 @@
<!-- 油气回收 --> <!-- 油气回收 -->
<div class="publicBox refueller" *ngIf="beforeFence === 6"> <div class="publicBox refueller" *ngIf="beforeFence === 6">
<div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}"> <div class="interval" *ngFor="let item of FacilityList" (click)="selectFacility($event, item)" [ngClass]="{'selectFacility': selectFacilityId === item.getID()}">
<p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name"></p> <p class="title"><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().name" (click)="stopBubbling($event)"></p>
<div class="table"> <div class="table">
<div class="tableHeader" style="flex: 55%;"> <div class="tableHeader" style="flex: 55%;">
<p>油气回收系统类型</p> <p>油气回收系统类型</p>
<p>油气回收泵类型</p> <p>油气回收泵类型</p>
</div> </div>
<div class="tableContent" style="flex: 45%;"> <div class="tableContent" style="flex: 45%;">
<p style="padding-left: 8px;"> <p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUType"> <nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUType">
<nz-option nzValue="fss" nzLabel="分散式"></nz-option> <nz-option nzValue="fss" nzLabel="分散式"></nz-option>
<nz-option nzValue="jzs" nzLabel="集中式"></nz-option> <nz-option nzValue="jzs" nzLabel="集中式"></nz-option>
</nz-select> </nz-select>
</p> </p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUPumpType"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().VRUPumpType" (click)="stopBubbling($event)"></p>
</div> </div>
</div> </div>
<div class="propertyImage" id="orvrViewer{{item.getID()}}"> <div class="propertyImage" id="orvrViewer{{item.getID()}}">
<p class="imgTitle">设计图纸</p> <p class="imgTitle">设计图纸</p>
<img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img"> <img [hidden]="!item.getPropertyData().img" [src]="item.getPropertyData().img" [attr.data-original]="item.getPropertyData().img" (click)="stopBubbling($event)">
<div class="positionHandleImgVideo" style="width: 120px;" *ngIf="editMode && item.getPropertyData().img"> <div class="positionHandleImgVideo" style="width: 120px;" *ngIf="editMode && item.getPropertyData().img" (click)="stopBubbling($event)">
<a href="javascript:;" class="imgAndVideoUpload"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="upload" nzTheme="outline"></i></a> <a href="javascript:;" class="imgAndVideoUpload"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="upload" nzTheme="outline"></i></a>
<i nz-icon nzType="delete" nzTheme="outline" (click)="deleteImg(item)"></i> <i nz-icon nzType="delete" nzTheme="outline" (click)="deleteImg(item)"></i>
</div> </div>
<a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode && !item.getPropertyData().img"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a> <a href="javascript:;" class="bottomPlanUpload uploadImgBox" *ngIf="editMode && !item.getPropertyData().img" (click)="stopBubbling($event)"><input type="file" accept="image/*" (change)='uploadLeftDomainImg($event, item)'><i nz-icon nzType="plus" nzTheme="outline"></i></a>
</div> </div>
</div> </div>
</div> </div>

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

@ -101,8 +101,6 @@ export class LeftDomainComponent implements OnInit {
//选中 设备 //选中 设备
selectFacility(event, item: FacilityInfoUIItem) { selectFacility(event, item: FacilityInfoUIItem) {
event.stopPropagation();
event.preventDefault();
if (this.selectFacilityId != item.getID()) { if (this.selectFacilityId != item.getID()) {
this.selectFacilityId = item.getID() this.selectFacilityId = item.getID()
FacilityInfoInSceneWindow.instance.selectFacilityItem(item); FacilityInfoInSceneWindow.instance.selectFacilityItem(item);
@ -112,6 +110,12 @@ export class LeftDomainComponent implements OnInit {
} }
} }
//阻止 事件冒泡
stopBubbling(event) {
event.stopPropagation();
//event.preventDefault();
}
//上传设备 图片 //上传设备 图片
uploadLeftDomainImg(e, item: FacilityInfoUIItem) { uploadLeftDomainImg(e, item: FacilityInfoUIItem) {
if (e.target.files.length) { if (e.target.files.length) {

Loading…
Cancel
Save