Browse Source

阀门与应急预案交换位置

dev
cpf 3 years ago
parent
commit
41af0a22f4
  1. 4
      src/app/pages/left-domain/left-domain.component.html
  2. 6
      src/app/pages/left-domain/left-domain.component.ts
  3. 12
      src/app/pages/plan/plan.component.html
  4. 14
      src/app/pages/plan/plan.component.ts

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

@ -188,7 +188,7 @@
</div> </div>
<!-- 油气回收 --> <!-- 油气回收 -->
<!-- 处置预案 --> <!-- 处置预案 -->
<div class="publicBox disposalPlan" *ngIf="beforeFence === 7 && allMarkPlanData" id="disposalPlan"> <div class="publicBox disposalPlan" *ngIf="beforeFence === 8 && allMarkPlanData" id="disposalPlan">
<nz-collapse> <nz-collapse>
<nz-collapse-panel *ngFor="let item of allMarkPlanData.datas;let key = index;" [nzHeader]="extraTpl" nzActive="true" nzShowArrow="false"> <nz-collapse-panel *ngFor="let item of allMarkPlanData.datas;let key = index;" [nzHeader]="extraTpl" nzActive="true" nzShowArrow="false">
<ng-template #extraTpl> <ng-template #extraTpl>
@ -212,7 +212,7 @@
</div> </div>
<!-- 处置预案 --> <!-- 处置预案 -->
<!-- 阀门 --> <!-- 阀门 -->
<div class="publicBox refueller" *ngIf="beforeFence === 8"> <div class="publicBox refueller" *ngIf="beforeFence === 7">
<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" (click)="stopBubbling($event)"></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">

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

@ -63,7 +63,7 @@ export class LeftDomainComponent implements OnInit {
} }
return return
} }
if (this.beforeFence === 7) { //应急预案 if (this.beforeFence === 8) { //应急预案
this.selectPlanId = null this.selectPlanId = null
this.selectNodeId = null this.selectNodeId = null
if (MarkWindow.instance) { if (MarkWindow.instance) {
@ -83,14 +83,14 @@ export class LeftDomainComponent implements OnInit {
item.getType() === "JY_SYGX" ? list.push(item) : null item.getType() === "JY_SYGX" ? list.push(item) : null
} else if (this.beforeFence === 6) { //油气回收 } else if (this.beforeFence === 6) { //油气回收
item.getType() === "JY_YQHSGX" ? list.push(item) : null item.getType() === "JY_YQHSGX" ? list.push(item) : null
} else if (this.beforeFence === 8) { //阀门 } else if (this.beforeFence === 7) { //阀门
item.getType() === "JY_FM" ? list.push(item) : null item.getType() === "JY_FM" ? list.push(item) : null
} }
}) })
this.FacilityList = list this.FacilityList = list
console.log(this.FacilityList[0].getPropertyData()) console.log(this.FacilityList[0].getPropertyData())
this.selectFacilityId = null this.selectFacilityId = null
if (this.beforeFence === 1 || this.beforeFence === 2 || this.beforeFence === 8) { //加油机/油罐设备/阀门 if (this.beforeFence === 1 || this.beforeFence === 2 || this.beforeFence === 7) { //加油机/油罐设备/阀门
this.FacilityList.forEach(item => { this.FacilityList.forEach(item => {
window.setTimeout(()=>{ window.setTimeout(()=>{
this.textInput(item) this.textInput(item)

12
src/app/pages/plan/plan.component.html

@ -27,10 +27,10 @@
<canvas id="center"></canvas> <canvas id="center"></canvas>
<!-- 左侧子组件 --> <!-- 左侧子组件 -->
<div class="leftChildComponent" *ngIf="isShowChildComponent && selectFence != 4" [ngStyle]="{ 'left': isShowLeftBuilding && editMode && userMode? '15%' : null }" [ngClass]="{'publicMoveUp': selectFence === 7}"> <div class="leftChildComponent" *ngIf="isShowChildComponent && selectFence != 4" [ngStyle]="{ 'left': isShowLeftBuilding && editMode && userMode? '15%' : null }" [ngClass]="{'publicMoveUp': selectFence === 8}">
<div class="leftChildHeader"> <div class="leftChildHeader">
<div><i nz-icon nzType="star" nzTheme="outline"></i></div> <div><i nz-icon nzType="star" nzTheme="outline"></i></div>
<div>{{allFence[selectFence]}}<i nz-icon nzType="plus-circle" nzTheme="outline" *ngIf="selectFence === 7 && editMode" (click)="noticeChildComponent(true)"></i><i nz-icon nzType="save" nzTheme="outline" *ngIf="selectFence === 7 && editMode" (click)="noticeChildComponent(false)"></i></div> <div>{{allFence[selectFence]}}<i nz-icon nzType="plus-circle" nzTheme="outline" *ngIf="selectFence === 8 && editMode" (click)="noticeChildComponent(true)"></i><i nz-icon nzType="save" nzTheme="outline" *ngIf="selectFence === 8 && editMode" (click)="noticeChildComponent(false)"></i></div>
<div (click)="toggleHeaderFence(selectFence)" title="关闭"><i nz-icon nzType="close-circle" nzTheme="outline"></i></div> <div (click)="toggleHeaderFence(selectFence)" title="关闭"><i nz-icon nzType="close-circle" nzTheme="outline"></i></div>
</div> </div>
<div class="leftChildCenter"><app-left-domain #leftDomain></app-left-domain></div> <div class="leftChildCenter"><app-left-domain #leftDomain></app-left-domain></div>
@ -39,7 +39,7 @@
<!-- 左侧建筑栏 --> <!-- 左侧建筑栏 -->
<div class="showLeftBuilding" title="显示" *ngIf="!isShowLeftBuilding && editMode && userMode" (click)="toggleLeftBuilding(true)"><i nz-icon nzType="right" nzTheme="outline"></i></div> <div class="showLeftBuilding" title="显示" *ngIf="!isShowLeftBuilding && editMode && userMode" (click)="toggleLeftBuilding(true)"><i nz-icon nzType="right" nzTheme="outline"></i></div>
<div class="leftBuilding" *ngIf="editMode && userMode" [ngClass]="{'isShowLeftBuilding': isShowLeftBuilding === false, 'publicMoveUp': selectFence === 7}"> <div class="leftBuilding" *ngIf="editMode && userMode" [ngClass]="{'isShowLeftBuilding': isShowLeftBuilding === false, 'publicMoveUp': selectFence === 8}">
<div class="hideLeft"><i nz-icon nzType="close" nzTheme="outline" title="隐藏" (click)="toggleLeftBuilding(false)"></i></div> <div class="hideLeft"><i nz-icon nzType="close" nzTheme="outline" title="隐藏" (click)="toggleLeftBuilding(false)"></i></div>
<div class="leftHeader"> <div class="leftHeader">
<h1><label>模型列表</label></h1> <h1><label>模型列表</label></h1>
@ -111,7 +111,7 @@
<!-- 右侧属性栏 --> <!-- 右侧属性栏 -->
<!-- 右侧图标栏 --> <!-- 右侧图标栏 -->
<div class="rightIcons" *ngIf="editMode && (selectFence === 0 || selectFence === 7)" [ngClass]="{'publicMoveUp': selectFence === 7}" [ngStyle]="{'width': selectFence === 7? '100px' : null}"> <div class="rightIcons" *ngIf="editMode && (selectFence === 0 || selectFence === 8)" [ngClass]="{'publicMoveUp': selectFence === 8}" [ngStyle]="{'width': selectFence === 8? '100px' : null}">
<div class="bottomCenter" id="bottomCenter"> <div class="bottomCenter" id="bottomCenter">
<ng-container *ngIf="selectFence === 0"> <ng-container *ngIf="selectFence === 0">
<div class="everyIcon" (click)='selectBottomIcon(item)' *ngFor="let item of allFacilityUIItemes" [ngClass]="{'selectLeftIcon': beforeOneIcon == item.getIconID()}"> <div class="everyIcon" (click)='selectBottomIcon(item)' *ngFor="let item of allFacilityUIItemes" [ngClass]="{'selectLeftIcon': beforeOneIcon == item.getIconID()}">
@ -119,7 +119,7 @@
<p>{{item.getIconName()}}</p> <p>{{item.getIconName()}}</p>
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="selectFence === 7"> <ng-container *ngIf="selectFence === 8">
<nz-collapse [nzBordered]="false"> <nz-collapse [nzBordered]="false">
<nz-collapse-panel [nzHeader]="allMarkData.iconsName[key]" [nzActive]="true" *ngFor="let element of allMarkData.icons; let key = index;"> <nz-collapse-panel [nzHeader]="allMarkData.iconsName[key]" [nzActive]="true" *ngFor="let element of allMarkData.icons; let key = index;">
<div class="everyIcon" (click)='selectBottomIcon(item)' *ngFor="let item of element" [ngClass]="{'selectLeftIcon': beforeOneIcon == item.key}"> <div class="everyIcon" (click)='selectBottomIcon(item)' *ngFor="let item of element" [ngClass]="{'selectLeftIcon': beforeOneIcon == item.key}">
@ -153,7 +153,7 @@
<!-- 右上角快捷栏 --> <!-- 右上角快捷栏 -->
<!-- 底部处置预案 --> <!-- 底部处置预案 -->
<div class="bottomPlan" *ngIf="selectFence === 7"> <div class="bottomPlan" *ngIf="selectFence === 8">
<div class="pulicPlanDiv bottomPlanHeader"> <div class="pulicPlanDiv bottomPlanHeader">
<div class="planHeaderText"> <div class="planHeaderText">
<p><input type="text" [(ngModel)]="beforePlanNode.name" [disabled]="!editMode"></p> <p><input type="text" [(ngModel)]="beforePlanNode.name" [disabled]="!editMode"></p>

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

@ -155,7 +155,7 @@ export class PlanComponent implements OnInit {
} }
ngOnDestroy(): void { //组件销毁前 销毁canvas ngOnDestroy(): void { //组件销毁前 销毁canvas
if (this.selectFence === 7) { //初始化 应急预案模块 if (this.selectFence === 8) { //初始化 应急预案模块
this.initializePlan() this.initializePlan()
} }
this.game.pauseRender(); this.game.pauseRender();
@ -173,7 +173,7 @@ export class PlanComponent implements OnInit {
//开发模式 选择单位 弹窗 //开发模式 选择单位 弹窗
modelInit(InsList) { } modelInit(InsList) { }
allFence: string[] = ["基本信息", "加油机", "油罐设备", "消防设施", "安全疏散", "输油管线", "油气回收", "应急预案", "阀门"]; //头部 功能栏 allFence: string[] = ["基本信息", "加油机", "油罐设备", "消防设施", "安全疏散", "输油管线", "油气回收", "阀门", "应急预案"]; //头部 功能栏
baseInfoMarks: baseInfoMark[] = [new baseInfoMark("毗邻"), new baseInfoMark("区域"), new baseInfoMark("图片"), new baseInfoMark("点位")] //基本信息 设备筛选list baseInfoMarks: baseInfoMark[] = [new baseInfoMark("毗邻"), new baseInfoMark("区域"), new baseInfoMark("图片"), new baseInfoMark("点位")] //基本信息 设备筛选list
selectFence: number = -1; //选中 头部功能栏 selectFence: number = -1; //选中 头部功能栏
isShowChildComponent: boolean = false; //是否 显示左侧子组件 isShowChildComponent: boolean = false; //是否 显示左侧子组件
@ -188,10 +188,10 @@ export class PlanComponent implements OnInit {
let fenceType: JYZInfoMoudleType = this.getFenceType(type) let fenceType: JYZInfoMoudleType = this.getFenceType(type)
this.isShowNature = false //隐藏属性栏 this.isShowNature = false //隐藏属性栏
if (this.selectFence != type) { if (this.selectFence != type) {
if (this.selectFence === 7) { //初始化 应急预案模块 if (this.selectFence === 8) { //初始化 应急预案模块
this.initializePlan() this.initializePlan()
} }
if (type === 7) { //初始化 应急预案 data if (type === 8) { //初始化 应急预案 data
this.isShowChildComponent && this.leftDomain ? this.leftDomain.initComponent(type) : null; //手动初始化子组件 this.isShowChildComponent && this.leftDomain ? this.leftDomain.initComponent(type) : null; //手动初始化子组件
this.selectFence = type this.selectFence = type
this.editMode ? this.isShowChildComponent = true : this.isShowChildComponent = false this.editMode ? this.isShowChildComponent = true : this.isShowChildComponent = false
@ -213,7 +213,7 @@ export class PlanComponent implements OnInit {
this.selectFence = -1 this.selectFence = -1
this.isShowChildComponent = false this.isShowChildComponent = false
buildingWindow.changeJYZInfoModel(fenceType, false) buildingWindow.changeJYZInfoModel(fenceType, false)
if (type === 7) { //初始化 应急预案模块 if (type === 8) { //初始化 应急预案模块
this.initializePlan() this.initializePlan()
} }
} }
@ -237,9 +237,9 @@ export class PlanComponent implements OnInit {
} else if (type === 6) { } else if (type === 6) {
fenceType = JYZInfoMoudleType.YQHSGX fenceType = JYZInfoMoudleType.YQHSGX
} else if (type === 7) { } else if (type === 7) {
fenceType = JYZInfoMoudleType.YJCZ
} else if (type === 8) {
fenceType = JYZInfoMoudleType.FM fenceType = JYZInfoMoudleType.FM
} else if (type === 8) {
fenceType = JYZInfoMoudleType.YJCZ
} }
return fenceType return fenceType
} }

Loading…
Cancel
Save