fix bug
This commit is contained in:
@ -10,7 +10,7 @@ import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
||||
import { CarSettleCarauthComponent } from '../list/carauth/carauth.component';
|
||||
@Component({
|
||||
selector: 'app-Vehicle-components-audit',
|
||||
templateUrl: './audit.component.html',
|
||||
templateUrl: './audit.component.html'
|
||||
})
|
||||
export class VehicleComponentsAuditComponent implements OnInit {
|
||||
_$expand = false;
|
||||
@ -22,7 +22,13 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
|
||||
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper) { }
|
||||
constructor(
|
||||
public service: VehicleService,
|
||||
private modal: NzModalService,
|
||||
private router: Router,
|
||||
private ar: ActivatedRoute,
|
||||
private modalHelper: ModalHelper
|
||||
) {}
|
||||
/**
|
||||
* 查询字段个数navigate
|
||||
*/
|
||||
@ -36,26 +42,26 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
get reqParams() {
|
||||
const a: any = {};
|
||||
if (this.resourceStatus === 1) {
|
||||
a.approvalStatus = 10
|
||||
a.approvalStatus = 10;
|
||||
} else if (this.resourceStatus === 2) {
|
||||
a.approvalStatus = 20
|
||||
a.approvalStatus = 20;
|
||||
} else if (this.resourceStatus === 3) {
|
||||
a.approvalStatus = 30
|
||||
a.approvalStatus = 30;
|
||||
}
|
||||
return {
|
||||
...a,
|
||||
...this.sf?.value,
|
||||
...this.sf?.value
|
||||
};
|
||||
}
|
||||
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter((item) => item.checked) || [];
|
||||
return this.st?.list.filter(item => item.checked) || [];
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
this.ar.url.subscribe((params) => {
|
||||
this.ar.url.subscribe(params => {
|
||||
this.st?.load(1);
|
||||
});
|
||||
}
|
||||
@ -71,8 +77,8 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
expand: {
|
||||
type: 'boolean',
|
||||
ui: {
|
||||
hidden: true,
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
carNo: {
|
||||
title: '车牌号',
|
||||
@ -106,7 +112,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:color' },
|
||||
containsAllLabel: true,
|
||||
containsAllLabel: true
|
||||
}
|
||||
},
|
||||
isSelf: {
|
||||
@ -114,11 +120,11 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
title: '是否挂靠',
|
||||
enum: [
|
||||
{ label: '是', value: 1 },
|
||||
{ label: '否', value: 0 },
|
||||
{ label: '否', value: 0 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
allowClear: true,
|
||||
allowClear: true
|
||||
}
|
||||
},
|
||||
saveUser: {
|
||||
@ -126,10 +132,10 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
title: '录入人员',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value,
|
||||
},
|
||||
},
|
||||
},
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
// approvalStatus: {
|
||||
// type: 'string',
|
||||
// title: '审核状态',
|
||||
@ -149,7 +155,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
},
|
||||
}
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 90, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
|
||||
}
|
||||
@ -162,7 +168,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
{ title: '车型-车长-载重', width: '180px', className: 'text-center', render: 'carLength' },
|
||||
{ title: '是否挂靠', width: '180px', className: 'text-center', render: 'isSelf' },
|
||||
{ title: '所有人', width: '180px', className: 'text-center', index: 'carOwner' },
|
||||
{ title: '录入人员', width: '180px', className: 'text-center', index: 'saveUser', },
|
||||
{ title: '录入人员', width: '180px', className: 'text-center', index: 'saveUser' },
|
||||
{
|
||||
title: '审核状态',
|
||||
className: 'text-center',
|
||||
@ -176,8 +182,8 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
10: { text: '待审核', color: 'warning' },
|
||||
20: { text: '已审核', color: 'success' },
|
||||
30: { text: '已驳回', color: 'error' },
|
||||
40: { text: '证件过期', color: 'error' },
|
||||
},
|
||||
40: { text: '证件过期', color: 'error' }
|
||||
}
|
||||
},
|
||||
{ title: '申请时间', width: '180px', className: 'text-center', index: 'createTime' },
|
||||
{
|
||||
@ -189,13 +195,13 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
{
|
||||
text: '查看',
|
||||
acl: { ability: ['VEHICLE-AUDIT-view'] },
|
||||
click: (item) => {
|
||||
click: item => {
|
||||
this.router.navigate(['./detail', item.id], { relativeTo: this.ar, queryParams: { carId: item.carId } });
|
||||
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
selectChange(e: number) {
|
||||
@ -213,7 +219,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
this.sf?.setValue('/expand', this._$expand);
|
||||
}
|
||||
creat() {
|
||||
this.router.navigate(['./new',], { relativeTo: this.ar });
|
||||
this.router.navigate(['./new'], { relativeTo: this.ar });
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
@ -224,19 +230,16 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
||||
}
|
||||
// 导出
|
||||
exportFire() {
|
||||
this.service.request(this.service.$api_carLicenseAudit_export, this.reqParams).subscribe((res: any) => {
|
||||
if(res) {
|
||||
this.service.msgSrv.success('导出成功,请去右上角下载中心下载')
|
||||
return
|
||||
}
|
||||
});
|
||||
let params = Object.assign({}, this.reqParams || {});
|
||||
params.pageSize = -1;
|
||||
this.service.exportStart(params, this.service.$api_carLicenseAudit_export);
|
||||
}
|
||||
addModal() {
|
||||
const i = {
|
||||
appUserId: '',
|
||||
}
|
||||
this.modalHelper.create(CarSettleCarauthComponent, { i }, { size: 900 }).subscribe((res) => {
|
||||
this.st.load()
|
||||
appUserId: ''
|
||||
};
|
||||
this.modalHelper.create(CarSettleCarauthComponent, { i }, { size: 900 }).subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
// putOnRecord: {
|
||||
// type: 'string',
|
||||
// title: '是否已备案',
|
||||
@ -308,11 +308,8 @@ export class VehicleComponentsListComponent implements OnInit {
|
||||
}
|
||||
// 导出
|
||||
exportFire() {
|
||||
this.service.request(this.service.$api_carLicense_export, this.reqParams).subscribe((res: any) => {
|
||||
if(res) {
|
||||
this.service.msgSrv.success('导出成功,请去右上角下载中心下载')
|
||||
return
|
||||
}
|
||||
});
|
||||
let params = Object.assign({}, this.reqParams || {});
|
||||
params.pageSize = -1;
|
||||
this.service.exportStart(params, this.service.$api_carLicense_export);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user