This commit is contained in:
wangshiming
2022-04-13 11:28:54 +08:00
parent 5336f93d0a
commit 4ec6d2b7ac
2 changed files with 25 additions and 20 deletions

View File

@ -1,4 +1,4 @@
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild, AfterViewInit } from '@angular/core';
import { Chart } from '@antv/g2';
import DataSet from '@antv/data-set';
import { DataService } from 'src/app/routes/datatable/services/data.service';
@ -7,7 +7,7 @@ import { DataService } from 'src/app/routes/datatable/services/data.service';
templateUrl: './map.component.html',
styleUrls: ['./map.component.less']
})
export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
export class DatatableCustomindexMapComponent implements OnInit, OnChanges, AfterViewInit {
el: any;
@Input() chartData: any;
chart: any;
@ -18,6 +18,10 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
userDv: any;
userData: any = [];
constructor(private service: DataService, private ngZone: NgZone) {}
ngAfterViewInit(): void {
throw new Error('Method not implemented.');
}
ngOnChanges(changes: SimpleChanges): void {
if (this.chartData) {
@ -84,18 +88,6 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
stroke: '#ccc',
lineWidth: 1
});
// 可视化用户数据
// this.userData = [
// { name: '山东', value: 21 },
// { name: '山东', value: 22},
// { name: '广东', value: 20, },
// { name: '广东', value: 20 },
// { name: '四川', value: 120 },
// { name: '湖南', value: 200 },
// { name: '河北', value: 30 },
// ];
let value: any = []
this.service.request(this.service.$api_getTransactionDistribution).subscribe((res: any) => {
if(res) {

View File

@ -202,15 +202,28 @@ export class OrderManagementRiskComponent implements OnInit {
} as SFSelectWidgetSchema
},
shipperId: {
title: '托运人',
type: 'string',
title: '托运人',
ui: {
widget: 'dict-select',
params: { dictKey: 'BulkFreightUnitPriceType' },
containsAllLabel: true,
widget: 'select',
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
},
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
} as SFSelectWidgetSchema
},
enterpriseInfoId: {