车辆对接

This commit is contained in:
wangshiming
2022-01-12 14:56:09 +08:00
parent 0352cd2f08
commit c7eeba9ba9
15 changed files with 126 additions and 103 deletions

View File

@ -71,13 +71,13 @@ export class VehicleComponentsListComponent implements OnInit {
hidden: true,
},
},
carNo: {
carNo: {
title: '车牌号',
type: 'string',
ui: {
widget: 'select',
serverSearch: true,
searchDebounceTime: 250,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
onSearch: (q: any) => {
if (!!q) {
@ -85,19 +85,17 @@ export class VehicleComponentsListComponent implements OnInit {
.request(this.service.$api_get_getCarLicenseListByCarNo, {
carNo: q
})
.pipe(map((res: any) => (res.records as any[]).map((i) => (
{ label: i.carNo, value: i.carNo
} as SFSchemaEnum)
)
)
)
.pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
} as SFSelectWidgetSchema,
},
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
carNoColor: {
type: 'string',
title: '车牌颜色',