车辆对接

This commit is contained in:
wangshiming
2022-01-12 09:48:10 +08:00
parent f52e7b2fc6
commit ba78e70eaf
6 changed files with 269 additions and 122 deletions

View File

@ -12,8 +12,7 @@ import { VehicleService } from '../../../vehicle/services/vehicle.service';
})
export class VehicleComponentsAuditComponent implements OnInit {
_$expand = false;
url = `/rule?_allow_anonymous=true`;
resourceStatus: any;
ui!: SFUISchema;
schema!: SFSchema;
columns!: STColumn[];
@ -32,16 +31,21 @@ export class VehicleComponentsAuditComponent implements OnInit {
* 查询参数
*/
get reqParams() {
const params: any = {
...(this.sf && this.sf.value),
};
if (this.sf?.value.effectiveDate) {
params.effectiveDateStart = this.sf?.value.effectiveDate[0];
params.effectiveDateEnd = this.sf?.value.effectiveDate[1];
const a:any = {};
console.log(this.resourceStatus)
if(this.resourceStatus === 1) {
a.approvalStatus = 10
} else if(this.resourceStatus === 2) {
a.approvalStatus = -1
} else if(this.resourceStatus === 3) {
a.approvalStatus = 20
} else if(this.resourceStatus === 4) {
a.approvalStatus = 30
}
delete params.effectiveDate;
delete params.expand;
return params;
return {
...a,
...this.sf?.value,
};
}
get selectedRows() {
@ -153,7 +157,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
this.columns = [
// { title: '', type: 'checkbox', className: 'text-center' },
{ title: '车牌号', className: 'text-center', index: 'carNo' },
{ title: '车牌颜色', className: 'text-center', index: 'carModelLabel' },
{ title: '车牌颜色', className: 'text-center', index: 'carNoColorLabel' },
{ title: '车型-车长-载重', className: 'text-center', render: 'carLength' },
{ title: '是否挂靠', className: 'text-center', render: 'isSelf' },
{ title: '所有人', className: 'text-center', index: 'carOwner' },
@ -166,13 +170,14 @@ export class VehicleComponentsAuditComponent implements OnInit {
badge: {
'-1': { text: '未上传', color: 'default' },
0: { text: '草稿', color: 'warning' },
15: { text: '已撤销', color: 'warning' },
10: { text: '待审核', color: 'warning' },
20: { text: '已审核', color: 'success' },
30: { text: '已驳回', color: 'error' },
40: { text: '证件过期', color: 'error' },
},
},
{ title: '申请时间', className: 'text-center', render: 'isSelf' },
{ title: '申请时间', className: 'text-center', index: 'createTime' },
{
title: '操作',
width: '170px',
@ -189,6 +194,16 @@ export class VehicleComponentsAuditComponent implements OnInit {
},
];
}
selectChange(e: number) {
console.log(e);
if(e>=1) {
this.resourceStatus = e;
}
this.initST();
setTimeout(() => {
this.st.load();
}, 500);
}
daoyun(item: any) {
this.router.navigate(['./view', item], { relativeTo: this.ar });
}