车辆对接

This commit is contained in:
wangshiming
2021-12-17 16:03:22 +08:00
parent 6d65ead997
commit 4bb0520a73
16 changed files with 524 additions and 343 deletions

View File

@ -1,9 +1,11 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { format } from 'path';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { VehicleService } from '../../../vehicle/services/vehicle.service';
@Component({
selector: 'app-Vehicle-components-list',
@ -69,7 +71,28 @@ export class VehicleComponentsListComponent implements OnInit {
hidden: true,
},
},
carNo: { title: '车牌号', type: 'string', ui: { showRequired: false } },
carNo: {
title: '车牌号',
type: 'string',
ui: {
widget: 'select',
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
onSearch: (q: any) => {
if (!!q) {
return this.service
.request(this.service.$api_get_getCarLicenseListByCarNo, {
carNo: q
})
.pipe(map((res: any[]) => (res as any[]).map((i) => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
} as SFSelectWidgetSchema,
},
carNoColor: {
type: 'string',
title: '车牌颜色',