fix bug
This commit is contained in:
		| @ -1,7 +1,7 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 15:31:52 | ||||
|  * @LastEditTime : 2022-02-21 19:52:43 | ||||
|  * @LastEditTime : 2022-03-02 16:24:32 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk-detail\\bulk-detail.component.ts | ||||
| @ -13,6 +13,7 @@ import { _HttpClient } from '@delon/theme'; | ||||
| import { NzCardComponent } from 'ng-zorro-antd/card'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import format from 'date-fns/format'; | ||||
| 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'; | ||||
| @ -28,27 +29,15 @@ export class WaybillManagementBulkeDetailComponent implements OnInit { | ||||
|   totalObj: any; | ||||
|   attObj: any; | ||||
|   isVisible = false; | ||||
|   logColumns: STColumn[] = [ | ||||
|     { title: '款项', index: 'costName' }, | ||||
|     { title: '运输费(元)', index: 'price',render: 'price' }, | ||||
|     { title: '支付时间', index: 'paymentTime' }, | ||||
|     { | ||||
|       title: '支付状态', | ||||
|       className: 'text-center', | ||||
|       index: 'paymentStatus', | ||||
|       type: 'badge', | ||||
|       width: '120px', | ||||
|       badge: { | ||||
|         '1': { text: '待申请', color: 'warning' }, | ||||
|         '2': { text: '已支付', color: 'success' }, | ||||
|         '3': { text: '已拒绝', color: 'warning' }, | ||||
|         '4': { text: '申请中', color: 'warning' }, | ||||
|       }, | ||||
|     }, | ||||
|   ]; | ||||
|   MapList: any[]=[]; | ||||
|   imges: any; | ||||
|   unLoadingPlaceVOList: any = []; | ||||
|  | ||||
|   logColumns: STColumn[] = [ | ||||
|     { title: '时间', index: 'vinOutTime' }, | ||||
|     { title: '地点', index: 'cityName' }, | ||||
|   ]; | ||||
|   trajectory = 'car'; | ||||
|   addressItems: any[] = []; //打点地址数据组 | ||||
|   constructor( | ||||
|     private route: ActivatedRoute, | ||||
|     private msgSrv: NzMessageService, | ||||
| @ -61,7 +50,7 @@ export class WaybillManagementBulkeDetailComponent implements OnInit { | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initData() | ||||
|     | ||||
|     this.MapInit() | ||||
|   } | ||||
|   initData() { | ||||
|     const params = { | ||||
| @ -148,4 +137,30 @@ sureArrive(item: any) { | ||||
|     this.initData() | ||||
| }); | ||||
| } | ||||
|   // 获取轨迹 | ||||
|   MapInit() { | ||||
|     this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { | ||||
|       if (res) { | ||||
|         const points = res.trackArray; | ||||
|         let list :any[] = []; | ||||
|         points?.forEach((item: any) => { | ||||
|           list.push({ | ||||
|             name: item.hgt, | ||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] | ||||
|           }); | ||||
|         }); | ||||
|         this.MapList = list; | ||||
|         this.addressItems = res.parkArray; | ||||
|         if(this.addressItems && this.addressItems.length > 0){ | ||||
|           this.addressItems.forEach(item => { | ||||
|             item.vinOutTime = this.getLocalTime(item.vinOutTime); | ||||
|           }); | ||||
|         } | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   getLocalTime(time: any) { | ||||
|     return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user