From 1efe8ab8cd048418a1484d5440f1e8bda576c64d Mon Sep 17 00:00:00 2001 From: username <1105965053@qq.com> Date: Tue, 22 Sep 2020 11:38:15 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E8=BD=A6=E8=BE=86?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/plan-assistance/plan-assistance.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/ui/plan-assistance/plan-assistance.component.ts b/src/app/ui/plan-assistance/plan-assistance.component.ts index a3db338..58791b3 100644 --- a/src/app/ui/plan-assistance/plan-assistance.component.ts +++ b/src/app/ui/plan-assistance/plan-assistance.component.ts @@ -7269,7 +7269,11 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { // 监听canvas组件选中素材事件 this.workingArea.on("select",obj=>{ //选中素材属性注入函数 - this.selectCar(obj.assetData,false) + if (obj && obj.assetData && obj.assetData.ReachTime!=undefined) { + this.canvasData.selectCar = obj.assetData + this.selectCarID = JSON.parse(JSON.stringify( obj.assetData.Id || '' )) + this.bottomIsShow = true + } }) // 监听canvas组件取消选中素材事件 this.workingArea.on("deselect",obj=>{ @@ -7303,13 +7307,10 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { //选择 车辆 selectCar (e,isSelect:boolean = true) { if (e.ReachTime == 0) { - this.canvasData.selectCar = e - this.selectCarID = JSON.parse(JSON.stringify( e.Id )) - this.bottomIsShow = true let list = [] list.push(e.Id) isSelect? this.workingArea.setHighlight(list) : null - } else { + } else if (e.ReachTime && e.ReachTime != 0) { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000;