This commit is contained in:
wangshiming
2021-12-10 14:42:47 +08:00
parent b513099359
commit 144b2eb8b9
13 changed files with 299 additions and 269 deletions

View File

@ -15,34 +15,6 @@ export class VehicleComponentsListComponent implements OnInit {
ui!: SFUISchema;
schema!: SFSchema;
columns!: STColumn[];
datalist = [
{
storeName: '企业名称',
contactsName: '152746565',
enterpriseName: '湖南',
unifiedSocialCreditCode: '45454',
contactsPhone: '*97889461561',
effectiveDateStr: '废弃eww',
enStatusStr2: '正常',
enStatusStr3: '正常',
unifiedSocialCreditCode3: '常用服务',
unifiedSocialCreditCode2: '正常',
tenantId: 1
},
{
storeName: '企业名称',
contactsName: '152746565',
enterpriseName: '湖南',
unifiedSocialCreditCode: '45454',
contactsPhone: '*97889461561',
effectiveDateStr: '废弃eww',
enStatusStr2: '正常',
enStatusStr3: '正常',
unifiedSocialCreditCode3: '常用服务',
unifiedSocialCreditCode2: '正常',
tenantId: 2
},
]
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ -96,8 +68,8 @@ export class VehicleComponentsListComponent implements OnInit {
hidden: true,
},
},
storeName: { title: '车牌号', type: 'string', ui: { showRequired: false } },
contactsName: {
carNo: { title: '车牌号', type: 'string', ui: { showRequired: false } },
carLength: {
title: '车型车长载重',
type: 'string',
ui: {
@ -119,7 +91,7 @@ export class VehicleComponentsListComponent implements OnInit {
widget: 'select',
},
},
enStatus12: {
carNoColor: {
type: 'string',
title: '车牌颜色',
enum: [
@ -136,11 +108,10 @@ export class VehicleComponentsListComponent implements OnInit {
},
},
},
enStatus2: {
isDriverLicenseExpire: {
type: 'string',
title: '到期状态',
enum: [
{ label: '全部', value: '' },
{ label: '正常', value: 0 },
{ label: '冻结', value: 1 },
{ label: '废弃', value: 2 },
@ -161,9 +132,9 @@ export class VehicleComponentsListComponent implements OnInit {
initST() {
this.columns = [
// { title: '', type: 'checkbox', className: 'text-center' },
{ title: '车牌号', className: 'text-center', index: 'storeName' },
{ title: '车牌颜色', className: 'text-center', index: 'contactsName' },
{ title: '车型-车长-载重', className: 'text-center', render: 'enterpriseName' },
{ title: '车牌号', className: 'text-center', index: 'carNo' },
{ title: '车牌颜色', className: 'text-center', index: 'carNoColor' },
{ title: '车型-车长-载重', className: 'text-center', render: 'carLength' },
{ title: '运营状态', className: 'text-center', index: 'effectiveDateStr',
type: 'badge',
badge: {
@ -175,23 +146,21 @@ export class VehicleComponentsListComponent implements OnInit {
{
title: '行驶证到期状态',
className: 'text-center',
index: 'enStatusStr2',
index: 'isDriverLicenseExpire',
type: 'badge',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
false: { text: '', color: 'success' },
true: { text: '', color: 'warning' },
},
},
{
title: '道运证到期状态',
className: 'text-center',
index: 'enStatusStr3',
index: 'isRoadTransportExpire',
type: 'badge',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
false: { text: '', color: 'success' },
true: { text: '', color: 'warning' },
},
},
{
@ -202,7 +171,7 @@ export class VehicleComponentsListComponent implements OnInit {
{
text: '查看',
click: (item) => {
this.router.navigate(['./detail', item.tenantId], { relativeTo: this.ar });
this.router.navigate(['./detail', item.id], { relativeTo: this.ar });
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
},
},
@ -211,7 +180,7 @@ export class VehicleComponentsListComponent implements OnInit {
];
}
daoyun(item: any) {
this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar });
this.router.navigate(['./view', item.id], { relativeTo: this.ar });
}
expandToggle() {
this._$expand = !this._$expand;