From aa030344b966d18a3ce5b196c1646715da3c37e1 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 12 Nov 2021 14:55:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E4=B8=AD=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../facilityinfoinscene-window.ts | 6 +----- src/app/pages/left-domain/left-domain.component.html | 4 ++-- src/app/pages/left-domain/left-domain.component.scss | 2 +- src/app/pages/left-domain/left-domain.component.ts | 2 ++ src/app/pages/plan/plan.component.ts | 8 +++++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts index 91dc478..3250cd0 100644 --- a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts +++ b/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 } diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index 65c0b73..7314d40 100644 --- a/src/app/pages/left-domain/left-domain.component.html +++ b/src/app/pages/left-domain/left-domain.component.html @@ -19,7 +19,7 @@
-

{{item.getName()}}

+

{{item.getName()}}

品牌

@@ -42,7 +42,7 @@
-

{{item.getName()}}

+

{{item.getName()}}

油品品号

diff --git a/src/app/pages/left-domain/left-domain.component.scss b/src/app/pages/left-domain/left-domain.component.scss index 1238ac9..af3f38d 100644 --- a/src/app/pages/left-domain/left-domain.component.scss +++ b/src/app/pages/left-domain/left-domain.component.scss @@ -34,7 +34,7 @@ } .publicBox{ width: 100%; height: 100%; overflow-y: auto; padding: 0 20px; } -.title{ font-size: 16px; height: 20px; line-height: 20px; margin-bottom: 20px; } //头部header +.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{ //基本信息 diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index eb3d85b..351f80a 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/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,6 +50,7 @@ export class LeftDomainComponent implements OnInit { } }) this.FacilityList = list + this.selectFacilityId = null if (this.beforeFence === 3) { //消防设施 this.handleTreeData(this.FacilityList) } diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index 01bb492..be42d05 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/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; //当前选择功能 快捷栏