This commit is contained in:
Taric Xin
2022-05-06 10:38:22 +08:00
parent cb14f5f6cb
commit d3ab4611ba
19 changed files with 239 additions and 407 deletions

View File

@ -3,37 +3,32 @@ import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper } from '@delon/theme';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of, Subject } from 'rxjs';
import { map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom';
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',
styleUrls: ['../../../commom/less/commom-table.less']
})
export class VehicleComponentsAuditComponent implements OnInit {
_$expand = false;
export class VehicleComponentsAuditComponent extends BasicTableComponent implements OnInit {
resourceStatus: any = 1;
defaultTabs = 1;
ui!: SFUISchema;
schema!: SFSchema;
columns!: STColumn[];
@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
) {}
/**
* 查询字段个数navigate
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
private modalHelper: ModalHelper,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
@ -65,6 +60,11 @@ export class VehicleComponentsAuditComponent implements OnInit {
this.st?.load(1);
});
}
search() {
this.st?.load(1);
}
dataProcess(data: STData[]): STData[] {
return data.map((i, index) => {
i.showSortFlag = false;
@ -101,9 +101,6 @@ export class VehicleComponentsAuditComponent implements OnInit {
return of([]);
}
},
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
carNoColor: {
@ -130,12 +127,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
saveUser: {
type: 'string',
title: '录入人员',
ui: {
visibleIf: {
expand: (value: boolean) => value
}
}
},
}
// approvalStatus: {
// type: 'string',
// title: '审核状态',
@ -170,7 +162,6 @@ export class VehicleComponentsAuditComponent implements OnInit {
// }
}
};
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
}
initST() {
@ -228,20 +219,9 @@ export class VehicleComponentsAuditComponent implements OnInit {
daoyun(item: any) {
this.router.navigate(['./view', item], { relativeTo: this.ar });
}
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
creat() {
this.router.navigate(['./new'], { relativeTo: this.ar });
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
// 导出
exportFire() {
let params = Object.assign({}, this.reqParams || {});