车辆对接
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
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 { of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
||||
@Component({
|
||||
selector: 'app-Vehicle-components-audit',
|
||||
@ -68,7 +70,28 @@ export class VehicleComponentsAuditComponent 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: '车牌颜色',
|
||||
@ -80,9 +103,12 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
isSelf: {
|
||||
type: 'string',
|
||||
title: '是否挂靠',
|
||||
enum: [
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false },
|
||||
],
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'Whether' },
|
||||
widget: 'select',
|
||||
}
|
||||
},
|
||||
saveUser: {
|
||||
|
||||
Reference in New Issue
Block a user