Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -1,6 +0,0 @@
|
|||||||
<div nz-row style="margin-bottom: 24px">
|
|
||||||
<div nz-col nzSpan="8">
|
|
||||||
<input nz-input id="pickerInput" [(ngModel)]="addressInput" placeholder="请输入地址" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="map-container" id="container" tabindex="0" style="width: 800px; height: 500px"></div>
|
|
||||||
@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: your name
|
|
||||||
* @Date: 2021-12-06 20:30:17
|
|
||||||
* @LastEditTime: 2021-12-20 09:36:56
|
|
||||||
* @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\gaode-map\gaode-map.component.ts
|
|
||||||
*/
|
|
||||||
import { Component, Input, OnInit, Output, EventEmitter, OnDestroy } from '@angular/core';
|
|
||||||
import { _HttpClient } from '@delon/theme';
|
|
||||||
import { load } from '@amap/amap-jsapi-loader';
|
|
||||||
import { BaseService } from 'src/app/shared/services';
|
|
||||||
import { throwError } from 'rxjs';
|
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
|
||||||
@Component({
|
|
||||||
selector: 'app-gaode-map',
|
|
||||||
templateUrl: './gaode-map.component.html'
|
|
||||||
})
|
|
||||||
export class GaodeMapComponent implements OnInit, OnDestroy {
|
|
||||||
addressInput: any;
|
|
||||||
|
|
||||||
aMap: any;
|
|
||||||
constructor(private service: BaseService) {}
|
|
||||||
ngOnInit(): void {
|
|
||||||
this.mapInit();
|
|
||||||
// this.PoiPicker();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
|
||||||
if (this.aMap) {
|
|
||||||
this.aMap.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mapInit() {
|
|
||||||
AMapLoader.load({
|
|
||||||
// 首次调用 load
|
|
||||||
key: '63f9573ca55fef2b92d4ffe0c85dea8f', // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
||||||
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
||||||
plugins: [
|
|
||||||
// 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
||||||
'AMap.Scale',
|
|
||||||
'AMap.ToolBar',
|
|
||||||
'AMap.MapType',
|
|
||||||
'AMap.Driving',
|
|
||||||
'AMap.Geolocation'
|
|
||||||
],
|
|
||||||
AMapUI: {
|
|
||||||
// 是否加载 AMapUI,缺省不加载
|
|
||||||
version: '1.1', // AMapUI 缺省 1.1
|
|
||||||
plugins: [] // 需要加载的 AMapUI ui插件
|
|
||||||
},
|
|
||||||
Loca: {
|
|
||||||
// 是否加载 Loca, 缺省不加载
|
|
||||||
version: '2.0' // Loca 版本,缺省 1.3.2
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then(AMap => {
|
|
||||||
console.log(AMap);
|
|
||||||
|
|
||||||
this.aMap = new AMap.Map('container', {
|
|
||||||
viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D',
|
|
||||||
zoom: 16
|
|
||||||
});
|
|
||||||
this.aMap.on('complete', () => {
|
|
||||||
this.service.msgSrv.info('地图加载完成 !');
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
throwError(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
<div nz-row class="mb-xl">
|
|
||||||
<div nz-col nzSpan="8">
|
|
||||||
<input id="pickerInput" [(ngModel)]="addressInput" placeholder="请输入地址" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="map-container" id="container" tabindex="0" style="width: 800px; height: 500px"></div>
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
:host::ng-deep {
|
|
||||||
p.my-desc {
|
|
||||||
max-width : 300px;
|
|
||||||
margin : 5px 0;
|
|
||||||
line-height: 150%;
|
|
||||||
padding : 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,181 +0,0 @@
|
|||||||
import { Component, Input, OnInit, Output, EventEmitter, OnDestroy, ViewChild } from '@angular/core';
|
|
||||||
import { _HttpClient } from '@delon/theme';
|
|
||||||
import { load } from '@amap/amap-jsapi-loader';
|
|
||||||
import { BaseService } from 'src/app/shared/services';
|
|
||||||
import { throwError } from 'rxjs';
|
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
|
||||||
declare var AMap: any;
|
|
||||||
declare var AMapUI: any;
|
|
||||||
@Component({
|
|
||||||
selector: 'app-gaode-map',
|
|
||||||
styleUrls: ['./gaode-map.component.less'],
|
|
||||||
templateUrl: './gaode-map.component.html'
|
|
||||||
})
|
|
||||||
export class GaodeMapComponent implements OnInit, OnDestroy {
|
|
||||||
@ViewChild('modal')
|
|
||||||
modal: any;
|
|
||||||
addressInput: any;
|
|
||||||
|
|
||||||
aMap: any;
|
|
||||||
constructor(private service: BaseService) {}
|
|
||||||
ngOnInit(): void {
|
|
||||||
this.mapInit();
|
|
||||||
// this.PoiPicker();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
|
||||||
if (this.aMap) {
|
|
||||||
this.aMap.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mapInit() {
|
|
||||||
console.log(AMapLoader);
|
|
||||||
|
|
||||||
AMapLoader.load({
|
|
||||||
// 首次调用 load
|
|
||||||
key: '63f9573ca55fef2b92d4ffe0c85dea8f', // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
||||||
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
||||||
plugins: [
|
|
||||||
// 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
||||||
'AMap.SimpleMarker',
|
|
||||||
'AMap.PoiPicker',
|
|
||||||
'AMap.Scale',
|
|
||||||
'AMap.Marker',
|
|
||||||
'AMap.InfoWindow',
|
|
||||||
'AMap.ToolBar',
|
|
||||||
'AMap.MapType',
|
|
||||||
'AMap.Driving',
|
|
||||||
'AMap.Geolocation'
|
|
||||||
],
|
|
||||||
AMapUI: {
|
|
||||||
// 是否加载 AMapUI,缺省不加载
|
|
||||||
version: '1.1', // AMapUI 缺省 1.1
|
|
||||||
plugins: ['overlay/SimpleMarker', 'misc/PoiPicker'] // 需要加载的 AMapUI ui插件
|
|
||||||
},
|
|
||||||
Loca: {
|
|
||||||
// 是否加载 Loca, 缺省不加载
|
|
||||||
version: '2.0' // Loca 版本,缺省 1.3.2
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then(AMap => {
|
|
||||||
console.log(AMap);
|
|
||||||
|
|
||||||
var poiPicker = new AMapUI.PoiPicker({
|
|
||||||
//city:'北京',
|
|
||||||
input: 'pickerInput'
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(poiPicker);
|
|
||||||
|
|
||||||
this.aMap = new AMap.Map('container', {
|
|
||||||
resizeEnable: true,
|
|
||||||
zoom: 16
|
|
||||||
});
|
|
||||||
console.log(this.aMap);
|
|
||||||
|
|
||||||
this.aMap.on('complete', () => {
|
|
||||||
this.service.msgSrv.info('地图加载完成 !');
|
|
||||||
this.poiPickerReady(poiPicker);
|
|
||||||
// new AMapUI.SimpleMarker({
|
|
||||||
// //前景文字
|
|
||||||
// iconLabel: 'A',
|
|
||||||
// //图标主题
|
|
||||||
// iconTheme: 'default',
|
|
||||||
// //背景图标样式
|
|
||||||
// iconStyle: 'red',
|
|
||||||
// map: this.aMap,
|
|
||||||
// position: this.aMap.getCenter()
|
|
||||||
// });
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
throwError(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
poiPickerReady(poiPicker: any) {
|
|
||||||
(window as any).poiPicker = poiPicker;
|
|
||||||
const map = this.aMap;
|
|
||||||
const _this = this;
|
|
||||||
var marker = new AMapUI.SimpleMarker();
|
|
||||||
console.log(marker);
|
|
||||||
|
|
||||||
var infoWindow = new AMap.InfoWindow({
|
|
||||||
offset: new AMap.Pixel(0, -20)
|
|
||||||
});
|
|
||||||
console.log(infoWindow);
|
|
||||||
|
|
||||||
//选取了某个POI
|
|
||||||
poiPicker.on('poiPicked', function (poiResult: any) {
|
|
||||||
var source = poiResult.source,
|
|
||||||
poi = poiResult.item,
|
|
||||||
info = {
|
|
||||||
source: source,
|
|
||||||
id: poi.id,
|
|
||||||
name: poi.name,
|
|
||||||
location: poi.location.toString(),
|
|
||||||
address: poi.address
|
|
||||||
};
|
|
||||||
console.log(poi);
|
|
||||||
|
|
||||||
marker.setMap(map);
|
|
||||||
infoWindow.setMap(map);
|
|
||||||
|
|
||||||
marker.setPosition(poi.location);
|
|
||||||
infoWindow.setPosition(poi.location);
|
|
||||||
|
|
||||||
infoWindow.setContent('地址: <pre>' + poi.name + '</pre>');
|
|
||||||
infoWindow.open(map, marker.getPosition());
|
|
||||||
|
|
||||||
map.setCenter(marker.getPosition());
|
|
||||||
});
|
|
||||||
|
|
||||||
poiPicker.onCityReady(function () {
|
|
||||||
poiPicker.suggest('美食');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
createInfoWindow(title: any, content: any) {
|
|
||||||
var info = document.createElement('div');
|
|
||||||
info.className = 'custom-info input-card content-window-card';
|
|
||||||
|
|
||||||
//可以通过下面的方式修改自定义窗体的宽高
|
|
||||||
//info.style.width = "400px";
|
|
||||||
// 定义顶部标题
|
|
||||||
var top = document.createElement('div');
|
|
||||||
var titleD = document.createElement('div');
|
|
||||||
var closeX = document.createElement('img');
|
|
||||||
top.className = 'info-top';
|
|
||||||
titleD.innerHTML = title;
|
|
||||||
closeX.src = 'https://webapi.amap.com/images/close2.gif';
|
|
||||||
closeX.onclick = this.closeInfoWindow;
|
|
||||||
|
|
||||||
top.appendChild(titleD);
|
|
||||||
top.appendChild(closeX);
|
|
||||||
info.appendChild(top);
|
|
||||||
|
|
||||||
// 定义中部内容
|
|
||||||
var middle = document.createElement('div');
|
|
||||||
middle.className = 'info-middle';
|
|
||||||
middle.style.backgroundColor = 'white';
|
|
||||||
middle.innerHTML = content;
|
|
||||||
info.appendChild(middle);
|
|
||||||
|
|
||||||
// 定义底部内容
|
|
||||||
var bottom = document.createElement('div');
|
|
||||||
bottom.className = 'info-bottom';
|
|
||||||
bottom.style.position = 'relative';
|
|
||||||
bottom.style.top = '0px';
|
|
||||||
bottom.style.margin = '0 auto';
|
|
||||||
var sharp = document.createElement('img');
|
|
||||||
sharp.src = 'https://webapi.amap.com/images/sharp.png';
|
|
||||||
bottom.appendChild(sharp);
|
|
||||||
info.appendChild(bottom);
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
closeInfoWindow() {
|
|
||||||
this.aMap.clearInfoWindow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -21,7 +21,6 @@ import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bu
|
|||||||
import { SupplyManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component';
|
import { SupplyManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component';
|
||||||
import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component';
|
import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component';
|
||||||
import { SupplyManagementOnecarPublishComponent } from './components/onecar-publish/onecar-publish.component';
|
import { SupplyManagementOnecarPublishComponent } from './components/onecar-publish/onecar-publish.component';
|
||||||
import { GaodeMapComponent } from './components/gaode-map/gaode-map.component';
|
|
||||||
import { PublishGoodsChooseFamifiarComponent } from './components/choose-famifiar/choose-famifiar.component';
|
import { PublishGoodsChooseFamifiarComponent } from './components/choose-famifiar/choose-famifiar.component';
|
||||||
import { PublishchooseFamifiarSetCaptainComponent } from './components/choose-famifiar/set-captain/set-captain.component';
|
import { PublishchooseFamifiarSetCaptainComponent } from './components/choose-famifiar/set-captain/set-captain.component';
|
||||||
import { PublishchooseFamifiarAddComponent } from './components/choose-famifiar/add/add.component';
|
import { PublishchooseFamifiarAddComponent } from './components/choose-famifiar/add/add.component';
|
||||||
@ -42,7 +41,6 @@ const COMPONENTS: Type<void>[] = [
|
|||||||
SupplyManagementVehicleDetailComponent,
|
SupplyManagementVehicleDetailComponent,
|
||||||
SupplyManagementAddDriversComponent,
|
SupplyManagementAddDriversComponent,
|
||||||
SupplyManagementOnecarPublishComponent,
|
SupplyManagementOnecarPublishComponent,
|
||||||
GaodeMapComponent,
|
|
||||||
PublishGoodsChooseFamifiarComponent,
|
PublishGoodsChooseFamifiarComponent,
|
||||||
PublishchooseFamifiarSetCaptainComponent,
|
PublishchooseFamifiarSetCaptainComponent,
|
||||||
PublishchooseFamifiarAddComponent,
|
PublishchooseFamifiarAddComponent,
|
||||||
|
|||||||
@ -254,13 +254,14 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
|
|||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lockedStatus: {
|
approvalStatus: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '状态',
|
title: '审核状态',
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '正常', value: 0 },
|
{ label: '待审核', value: 10 },
|
||||||
{ label: '冻结', value: 1 }
|
{ label: '已成功', value: 20 },
|
||||||
|
{ label: '审核失败', value: 30 }
|
||||||
],
|
],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
|
|||||||
@ -53,11 +53,11 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="detailData?.approvalStatus!=10">
|
<ng-container *ngIf="detailData?.approvalStatus!=10">
|
||||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
|
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
|
||||||
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked">
|
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked">
|
||||||
启用
|
启用
|
||||||
</button>
|
</button>
|
||||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
|
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
|
||||||
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked">
|
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked">
|
||||||
冻结
|
冻结
|
||||||
</button>
|
</button>
|
||||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm
|
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm
|
||||||
|
|||||||
@ -75,7 +75,7 @@ export class FreightComponentsListDetailComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
.subscribe(res => {
|
.subscribe(res => {
|
||||||
if (res.data === true) {
|
if (res.data === true) {
|
||||||
if (type === 1) {
|
if (type === 0) {
|
||||||
this.service.msgSrv.success(`启用成功!`);
|
this.service.msgSrv.success(`启用成功!`);
|
||||||
} else {
|
} else {
|
||||||
this.service.msgSrv.success(`冻结成功!`);
|
this.service.msgSrv.success(`冻结成功!`);
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export class DunHelper {
|
|||||||
userInfo;
|
userInfo;
|
||||||
|
|
||||||
constructor(private overlay: Overlay) {
|
constructor(private overlay: Overlay) {
|
||||||
this.userInfo = JSON.parse(localStorage.getItem('user') || '');
|
this.userInfo = JSON.parse(localStorage.getItem('user') || '{}');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -125,7 +125,7 @@ export class EAUserService extends BaseService {
|
|||||||
|
|
||||||
async doAfterLogin() {
|
async doAfterLogin() {
|
||||||
await this.loadUserInfo();
|
await this.loadUserInfo();
|
||||||
// await this.loadUserMenus();
|
await this.loadUserMenus();
|
||||||
await this.loadUserRoles();
|
await this.loadUserRoles();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,9 +143,14 @@ export class EAUserService extends BaseService {
|
|||||||
* 加载用户菜单
|
* 加载用户菜单
|
||||||
*/
|
*/
|
||||||
async loadUserMenus() {
|
async loadUserMenus() {
|
||||||
return this.asyncRequest(this.$api_get_user_menus, { appId: sysConf.appId }).then(res => {
|
// return this.asyncRequest(this.$api_get_user_menus, { appId: sysConf.appId }).then(res => {
|
||||||
this.cacheSrv.set(cacheConf.menu, res);
|
// this.cacheSrv.set(cacheConf.menu, res);
|
||||||
});
|
// });
|
||||||
|
this.request('assets/mocks/menu-data.json').pipe(
|
||||||
|
map((res: any) => {
|
||||||
|
this.cacheSrv.set(cacheConf.menu, res.menu);
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user