edit
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle-detail\\vehicle-detail.component.ts
|
||||
*/
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
@ -14,6 +14,7 @@ import format from 'date-fns/format';
|
||||
import { NzCardComponent } from 'ng-zorro-antd/card';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { Subscription, fromEvent } from 'rxjs';
|
||||
import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component';
|
||||
import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component';
|
||||
import { WaybillManagementServe } from '../../services/waybill-management.service';
|
||||
@ -22,7 +23,7 @@ import { WaybillManagementServe } from '../../services/waybill-management.servic
|
||||
templateUrl: './vehicle-detail.component.html',
|
||||
styleUrls: ['./vehicle-detail.component.less']
|
||||
})
|
||||
export class WaybillManagementVehicleDetailComponent implements OnInit {
|
||||
export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestroy {
|
||||
|
||||
id = this.route.snapshot.params.id;
|
||||
MapList: any[]=[];
|
||||
@ -53,6 +54,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
|
||||
scrollTop = 0;
|
||||
subscribeScoll!: Subscription;
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
@ -62,9 +65,17 @@ export class WaybillManagementVehicleDetailComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.subscribeScoll.unsubscribe();
|
||||
}
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initData()
|
||||
this.getTrajectory()
|
||||
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
|
||||
this.scrollTop = document.documentElement.scrollTop;
|
||||
});
|
||||
}
|
||||
initData() {
|
||||
const params = {
|
||||
|
||||
Reference in New Issue
Block a user