Browse Source

[完善] 车辆选中完善

develop
陈鹏飞 4 years ago
parent
commit
1efe8ab8cd
  1. 11
      src/app/ui/plan-assistance/plan-assistance.component.ts

11
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;

Loading…
Cancel
Save