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;