From f1dc67f92ac86346e0e1415bf4e9627978fcc6c2 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 16 Feb 2022 16:38:09 +0800 Subject: [PATCH] fix bug --- .../vehicle-detail.component.html | 4 +- .../vehicle-detail.component.ts | 25 ++++-- .../components/bulk/bulk.component.ts | 19 ----- .../update-price/update-price.component.html | 28 ++++--- .../update-price/update-price.component.ts | 12 ++- .../amap-path-simplifier.component.ts | 80 +++++-------------- 6 files changed, 69 insertions(+), 99 deletions(-) diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index fbb2e773..efb2e553 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-02-11 13:55:32 + * @LastEditTime : 2022-02-16 15:42:18 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -206,7 +206,7 @@ -->
- +
diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 5a4e24b5..5d971ed1 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-02-10 14:45:47 + * @LastEditTime : 2022-02-16 16:37:16 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -22,6 +22,7 @@ import { OrderManagementService } from '../../services/order-management.service' }) export class OrderManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; + MapList: any; i: any = { unLoadingPlaceList: [], billExpenseDetails: [], @@ -63,25 +64,21 @@ export class OrderManagementVehicleDetailComponent implements OnInit { ) {} ngOnInit(): void { - console.log(this.id); this.initData(); } initData() { this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => { - console.log(res); if (res) { this.i = res; this.approvalLsit = res.scheduleVOList; this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0]; this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0]; this.approvalLsit.map((item: any, key: any) => { - console.log(item); if (item.displayStatus === 'HIDE') { delete this.approvalLsit[key]; } }); - console.log(this.approvalLsit); } }); } @@ -105,7 +102,6 @@ cancellation() { } // 修改订单 changeOrder() { - console.log(this.id); this.router.navigate(['order-management/vehicle-detailChange', this.id]); } agreement(value: any) { @@ -128,6 +124,21 @@ cancellation() { elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' , }); // elf['elementRef'].nativeElement.className = 'target-fix' } - console.log(elf) + } + MapInit() { + this.service.request('/api/sdc/billShipper/getTrajectoryByBillId', { id: this.id }).subscribe(res => { + if (res?.trackArray) { + const points = res?.trackArray; + const 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))] + }); + }); + console.log(list); + this.MapList = list + } + }); } } diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index 5fad5395..8f7de8b8 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -367,25 +367,6 @@ export class SupplyManagementBulkComponent implements OnInit { }, 500); } - /** - * 更新运费 - */ - updatePrice(item: any) { - const modalRef = this.modal.create({ - nzTitle: '修改单价', - nzWidth: '600px', - nzContent: SupplyManagementUpdatePriceComponent, - nzComponentParams: { - i: item, - }, - nzFooter: null, - }); - modalRef.afterClose.subscribe(res => { - if (res) { - this.st.reload(); - } - }) - } /** * 二维码 diff --git a/src/app/routes/supply-management/components/update-price/update-price.component.html b/src/app/routes/supply-management/components/update-price/update-price.component.html index dd078c9e..43523177 100644 --- a/src/app/routes/supply-management/components/update-price/update-price.component.html +++ b/src/app/routes/supply-management/components/update-price/update-price.component.html @@ -1,29 +1,37 @@ +
- - + -

变更日志

- + -
黎日湛
-
18811112222
+ {{item.operator}}/ + {{item.telephone}}
- {{freightType[i?.freightType]}} + {{ freightType[i?.freightType] }} diff --git a/src/app/routes/supply-management/components/update-price/update-price.component.ts b/src/app/routes/supply-management/components/update-price/update-price.component.ts index 3960664a..41494016 100644 --- a/src/app/routes/supply-management/components/update-price/update-price.component.ts +++ b/src/app/routes/supply-management/components/update-price/update-price.component.ts @@ -28,10 +28,16 @@ export class SupplyManagementUpdatePriceComponent implements OnInit { public service: SupplyManagementService ) { } - + get reqParams() { + return { + operateObject: this.record?.resourceCode, + operateType: 7, + }; + } ngOnInit(): void { this.initSF(); this.initSt(); + console.log(this.record) if (this.record?.id) this.getGoodsResourceShipperDeatail(this.record?.id); } @@ -88,8 +94,8 @@ export class SupplyManagementUpdatePriceComponent implements OnInit { */ initSt() { this.columns = [ - { title: '日志内容', width: 120, index: 'owner', className: 'text-center' }, - { title: '更新时间', index: 'goodsQuantity', width: 100, className: 'text-center' }, + { title: '日志内容', width: 120, index: 'operationContent', className: 'text-center' }, + { title: '更新时间', index: 'operatorTimestamp', width: 100, className: 'text-center' }, { title: '操作人', width: 100, render: 'operator', className: 'text-center' }, ]; } diff --git a/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts b/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts index 1d1e57d8..32051cb2 100644 --- a/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts +++ b/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts @@ -16,46 +16,36 @@ const CONFIG = amapConf; export class AmapPathSimplifierComponent implements OnInit, OnChanges { aMap: any; pathSimplifierIns: any; - @Input() - pathList: any = [ - { - name: '路线1', - points: [] - } - ]; + pathList: any = []; @Input() selectedIndex = 0; @Input() mapWidth = '800px'; - + @Input('MapList') MapList: any; @Input() mapHeight = '500px'; @Output() clcikPointEvent = new EventEmitter(); - constructor() {} + constructor(public service: BaseService) {} ngOnChanges(changes: SimpleChanges): void { - if (changes.pathList.currentValue && this.pathSimplifierIns) { - this.setData(changes.pathList.currentValue); + if (changes?.pathList?.currentValue && this?.pathSimplifierIns) { + this.setData(changes.pathList?.currentValue); + this.setPathIndex(this.selectedIndex); } } ngOnInit(): void { this.mapInit(); - const points = - [{"gtm":"20210818/143018","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143018","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143019","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143020","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143104","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143105","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143106","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143106","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143110","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807550","lat":"23986841"},{"gtm":"20210818/143113","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807549","lat":"23986841"},{"gtm":"20210818/143114","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807549","lat":"23986841"},{"gtm":"20210818/143115","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807549","lat":"23986841"},{"gtm":"20210818/143116","hgt":"500","spd":"60.0","agl":"0","mlg":"1002.0","lon":"69807549","lat":"23986841"},{"gtm":"20210818/145810","hgt":"500","spd":"75.0","agl":"213","mlg":"1913.0","lon":"69784998","lat":"18249159"},{"gtm":"20210818/145820","hgt":"500","spd":"104.0","agl":"201","mlg":"1916.0","lon":"69781350","lat":"18241809"},{"gtm":"20210818/145830","hgt":"500","spd":"79.0","agl":"201","mlg":"1919.0","lon":"69777969","lat":"18234378"},{"gtm":"20210818/145840","hgt":"500","spd":"80.0","agl":"226","mlg":"1922.0","lon":"69773709","lat":"18227730"},{"gtm":"20210818/145850","hgt":"500","spd":"76.0","agl":"244","mlg":"1925.0","lon":"69765879","lat":"18223848"},{"gtm":"20210818/145900","hgt":"500","spd":"62.0","agl":"237","mlg":"1928.0","lon":"69759309","lat":"18220848"},{"gtm":"20210818/145910","hgt":"500","spd":"90.0","agl":"223","mlg":"1931.0","lon":"69752670","lat":"18216108"},{"gtm":"20210818/145920","hgt":"500","spd":"80.0","agl":"215","mlg":"1934.0","lon":"69747369","lat":"18210438"},{"gtm":"20210818/145930","hgt":"500","spd":"76.0","agl":"223","mlg":"1937.0","lon":"69741948","lat":"18204129"},{"gtm":"20210818/145940","hgt":"500","spd":"84.0","agl":"229","mlg":"1940.0","lon":"69735558","lat":"18199218"},{"gtm":"20210818/145950","hgt":"500","spd":"76.0","agl":"197","mlg":"1943.0","lon":"69730818","lat":"18193989"},{"gtm":"20210818/150000","hgt":"500","spd":"101.0","agl":"207","mlg":"1949.0","lon":"69724290","lat":"18178518"},{"gtm":"20210818/150010","hgt":"500","spd":"84.0","agl":"221","mlg":"1952.0","lon":"69719379","lat":"18172389"},{"gtm":"20210818/150020","hgt":"500","spd":"91.0","agl":"231","mlg":"1955.0","lon":"69712380","lat":"18167088"},{"gtm":"20210818/150030","hgt":"500","spd":"81.0","agl":"224","mlg":"1958.0","lon":"69705558","lat":"18161859"},{"gtm":"20210818/150040","hgt":"500","spd":"90.0","agl":"225","mlg":"1961.0","lon":"69699270","lat":"18156309"},{"gtm":"20210818/150050","hgt":"500","spd":"82.0","agl":"227","mlg":"1964.0","lon":"69692910","lat":"18151590"},{"gtm":"20210818/150100","hgt":"500","spd":"85.0","agl":"224","mlg":"1967.0","lon":"69687138","lat":"18146079"},{"gtm":"20210818/150110","hgt":"500","spd":"90.0","agl":"233","mlg":"1970.0","lon":"69680229","lat":"18141198"},{"gtm":"20210818/150120","hgt":"500","spd":"88.0","agl":"231","mlg":"1973.0","lon":"69673020","lat":"18136299"},{"gtm":"20210818/150130","hgt":"500","spd":"80.0","agl":"198","mlg":"1976.0","lon":"69668670","lat":"18130170"},{"gtm":"20210818/150140","hgt":"500","spd":"77.0","agl":"191","mlg":"1979.0","lon":"69666309","lat":"18123399"},{"gtm":"20210818/150150","hgt":"500","spd":"73.0","agl":"183","mlg":"1982.0","lon":"69665250","lat":"18116928"},{"gtm":"20210818/150200","hgt":"500","spd":"55.0","agl":"184","mlg":"1985.0","lon":"69664770","lat":"18110490"},{"gtm":"20210818/150210","hgt":"500","spd":"0.0","agl":"0","mlg":"1988.0","lon":"69664578","lat":"18108669"},{"gtm":"20210818/150220","hgt":"500","spd":"3.0","agl":"184","mlg":"1991.0","lon":"69664578","lat":"18108639"},{"gtm":"20210818/150230","hgt":"500","spd":"3.0","agl":"184","mlg":"1994.0","lon":"69664578","lat":"18108639"},{"gtm":"20210818/150240","hgt":"500","spd":"0.0","agl":"0","mlg":"1997.0","lon":"69664569","lat":"18108579"},{"gtm":"20210818/150250","hgt":"500","spd":"0.0","agl":"0","mlg":"2000.0","lon":"69664590","lat":"18108588"},{"gtm":"20210818/150300","hgt":"500","spd":"3.0","agl":"186","mlg":"2003.0","lon":"69664590","lat":"18108570"},{"gtm":"20210818/150310","hgt":"500","spd":"0.0","agl":"0","mlg":"2006.0","lon":"69664590","lat":"18108480"},{"gtm":"20210818/150320","hgt":"500","spd":"2.0","agl":"0","mlg":"2009.0","lon":"69664560","lat":"18108348"},{"gtm":"20210818/150330","hgt":"500","spd":"2.0","agl":"0","mlg":"2012.0","lon":"69664560","lat":"18108330"},{"gtm":"20210818/150340","hgt":"500","spd":"0.0","agl":"0","mlg":"2015.0","lon":"69664548","lat":"18108330"},{"gtm":"20210818/150350","hgt":"500","spd":"0.0","agl":"0","mlg":"2018.0","lon":"69664560","lat":"18108390"},{"gtm":"20210818/150400","hgt":"500","spd":"3.0","agl":"0","mlg":"2021.0","lon":"69664548","lat":"18108369"},{"gtm":"20210818/150410","hgt":"500","spd":"0.0","agl":"0","mlg":"2024.0","lon":"69664548","lat":"18108348"},{"gtm":"20210818/150420","hgt":"500","spd":"3.0","agl":"0","mlg":"2027.0","lon":"69664539","lat":"18108330"},{"gtm":"20210818/150430","hgt":"500","spd":"23.0","agl":"189","mlg":"2030.0","lon":"69664509","lat":"18107700"},{"gtm":"20210818/150440","hgt":"500","spd":"0.0","agl":"0","mlg":"2033.0","lon":"69664449","lat":"18107328"},{"gtm":"20210818/150450","hgt":"500","spd":"0.0","agl":"0","mlg":"2036.0","lon":"69664449","lat":"18107298"},{"gtm":"20210818/150500","hgt":"500","spd":"0.0","agl":"0","mlg":"2039.0","lon":"69664449","lat":"18107298"},{"gtm":"20210818/150510","hgt":"500","spd":"0.0","agl":"0","mlg":"2042.0","lon":"69664458","lat":"18107310"},{"gtm":"20210818/150520","hgt":"500","spd":"7.0","agl":"183","mlg":"2045.0","lon":"69664449","lat":"18107298"},{"gtm":"20210818/150530","hgt":"500","spd":"52.0","agl":"192","mlg":"2048.0","lon":"69664200","lat":"18105558"},{"gtm":"20210818/150540","hgt":"500","spd":"73.0","agl":"196","mlg":"2051.0","lon":"69662679","lat":"18099798"},{"gtm":"20210818/150550","hgt":"500","spd":"84.0","agl":"199","mlg":"2054.0","lon":"69659478","lat":"18092538"},{"gtm":"20210818/150600","hgt":"500","spd":"83.0","agl":"187","mlg":"2057.0","lon":"69657000","lat":"18085290"},{"gtm":"20210818/150610","hgt":"500","spd":"64.0","agl":"184","mlg":"2060.0","lon":"69656340","lat":"18078798"},{"gtm":"20210818/150620","hgt":"500","spd":"83.0","agl":"219","mlg":"2063.0","lon":"69654069","lat":"18072798"},{"gtm":"20210818/150630","hgt":"500","spd":"71.0","agl":"273","mlg":"2066.0","lon":"69646119","lat":"18071670"},{"gtm":"20210818/150640","hgt":"500","spd":"79.0","agl":"273","mlg":"2069.0","lon":"69638340","lat":"18072078"},{"gtm":"20210818/150650","hgt":"500","spd":"78.0","agl":"274","mlg":"2072.0","lon":"69638208","lat":"18072090"},{"gtm":"20210818/150700","hgt":"500","spd":"69.0","agl":"257","mlg":"2075.0","lon":"69631200","lat":"18071898"},{"gtm":"20210818/150710","hgt":"500","spd":"86.0","agl":"246","mlg":"2078.0","lon":"69623100","lat":"18068829"},{"gtm":"20210818/150720","hgt":"500","spd":"6.0","agl":"265","mlg":"2081.0","lon":"69619899","lat":"18067518"},{"gtm":"20210818/150730","hgt":"500","spd":"0.0","agl":"0","mlg":"2084.0","lon":"69619680","lat":"18067458"},{"gtm":"20210818/150740","hgt":"500","spd":"3.0","agl":"230","mlg":"2087.0","lon":"69619650","lat":"18067449"},{"gtm":"20210818/150750","hgt":"500","spd":"0.0","agl":"0","mlg":"2090.0","lon":"69619560","lat":"18067410"}] - - points.forEach(item => { - this.pathList[0].points.push({ - name: item?.hgt, - lnglat: [Number((Number(item?.lon) / 600000).toFixed(6)), Number((Number(item?.lat) / 600000).toFixed(6))] - }); - }); - - + this.pathList = [ + { + name: '路线1', + points: this.MapList + } + ]; + // this.DataInit(); } - ngOnDestroy(): void { if (this.aMap) { this.aMap.destroy(); @@ -117,49 +107,23 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges { renderAllPointsIfNumberBelow: 100 //绘制路线节点,如不需要可设置为-1 } }); - // var navg1 = this.pathSimplifierIns.createPathNavigator(0, { - // loop: true, - // speed: 100000, - // pathNavigatorStyle: { - // width: 24, - // height: 24, - // //使用图片 - // content: '', - // strokeStyle: null, - // fillStyle: null, - // //经过路径的样式 - // pathLinePassedStyle: { - // lineWidth: 6, - // strokeStyle: 'black', - // dirArrowStyle: { - // stepSpace: 15, - // strokeStyle: 'red' - // } - // } - // } - // }); - // navg1.start(); (window as any).pathSimplifierIns = this.pathSimplifierIns; this.setData(this.pathList); - this.setPathIndex(this.selectedIndex); + if(this.pathList.length>0){ + this.setPathIndex(this.selectedIndex); + } this.pathSimplifierIns.on('pointClick', (e: any, info: any) => { this.clcikPointEvent.emit({ e, info }); console.log('Click: ' + info.pathData.points[info.pointIndex].name); }); - console.log(this.pathSimplifierIns) - console.log() - console.log(this.pathSimplifierIns.renderEngine) - console.log(this.pathSimplifierIns.renderEngine.layer) - // navg1.start(); - var navg1 = this.pathSimplifierIns.createPathNavigator(0, { - loop: true, //循环播放 - speed: 1000000 //巡航速度,单位千米/小时 - }); - navg1.start(); - - + // navg1.start(); + // var navg1 = this.pathSimplifierIns.createPathNavigator(0, { + // loop: true, //循环播放 + // speed: 1000000 //巡航速度,单位千米/小时 + // }); + // navg1.start(); } setData(pathList: Array) {