订单
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-03 15:59:54
|
||||
* @LastEditors: your name
|
||||
* @LastEditTime: 2021-12-06 19:36:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\components\vehicle-detail\vehicle-detail.component.ts
|
||||
*/
|
||||
@ -11,8 +11,12 @@ import { ActivatedRoute } from '@angular/router';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementService } from '../../services/order-management.service';
|
||||
|
||||
import { OrderManagementGaodeMapComponent } from '../gaode-map/gaode-map.component';
|
||||
import * as $ from 'jquery';
|
||||
declare var AMapUI: any;
|
||||
declare var AMap: any;
|
||||
@Component({
|
||||
selector: 'app-supply-management-vehicle-detail',
|
||||
templateUrl: './vehicle-detail.component.html',
|
||||
@ -23,15 +27,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
id = this.route.snapshot.params.id;
|
||||
i: any;
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '内容', index: 'theme' },
|
||||
{ title: '操作人', index: 'operationUserPhone' },
|
||||
{ title: '操作时间', index: ' createTime' },
|
||||
{ title: '时间', index: 'operationUserPhone' },
|
||||
{ title: '地点', index: ' createTime' },
|
||||
];
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
private service: SupplyManagementService,
|
||||
private modalService: NzModalService
|
||||
) {
|
||||
|
||||
}
|
||||
@ -45,9 +49,68 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
|
||||
|
||||
|
||||
|
||||
hand() {
|
||||
this.modalService.create({
|
||||
nzTitle: '',
|
||||
nzContent: OrderManagementGaodeMapComponent,
|
||||
nzWidth: 1200
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
// poi选点
|
||||
PoiPicker() {
|
||||
AMapUI.setDomLibrary($);
|
||||
let map = new AMap.Map('container', {
|
||||
zoom: 10
|
||||
});
|
||||
AMapUI.loadUI(['misc/PoiPicker'], function (PoiPicker: any) {
|
||||
let poiPicker = new PoiPicker({
|
||||
// city:'北京',
|
||||
input: 'pickerInput'
|
||||
});
|
||||
//初始化poiPicker
|
||||
(window as any).poiPicker = poiPicker;
|
||||
|
||||
var marker = new AMap.Marker();
|
||||
|
||||
var infoWindow = new AMap.InfoWindow({
|
||||
offset: new AMap.Pixel(0, -20)
|
||||
});
|
||||
console.log('0000')
|
||||
console.log(PoiPicker)
|
||||
//选取了某个POI
|
||||
poiPicker.on('poiPicked', function (poiResult: any) {
|
||||
console.log(1111);
|
||||
console.log(poiResult)
|
||||
// console.log(this.addressInput)
|
||||
// this.addressInput = poiResult.item?.name
|
||||
var source = poiResult.source,
|
||||
poi = poiResult.item,
|
||||
info = {
|
||||
source: source,
|
||||
id: poi.id,
|
||||
name: poi.name,
|
||||
location: poi.location.toString(),
|
||||
address: poi.address
|
||||
};
|
||||
marker.setMap(map);
|
||||
infoWindow.setMap(map);
|
||||
|
||||
marker.setPosition(poi.location);
|
||||
infoWindow.setPosition(poi.location);
|
||||
|
||||
infoWindow.setContent(`POI信息: <pre>${JSON.stringify(info, null, 2)}</pre>`);
|
||||
infoWindow.open(map, marker.getPosition());
|
||||
|
||||
map.setCenter(marker.getPosition());
|
||||
});
|
||||
poiPicker.onCityReady(() => {
|
||||
// poiPicker.suggest('美食');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user