This commit is contained in:
Taric Xin
2022-01-25 10:55:47 +08:00
parent 66177af625
commit ec2e1516f4
8 changed files with 73 additions and 27 deletions

View File

@ -0,0 +1,38 @@
import { Component, OnInit } from '@angular/core';
import { BaseService } from '@shared';
@Component({
selector: 'app-freight-table',
templateUrl: './freight-table.component.html',
styleUrls: ['./freight-table.component.less']
})
export class FreightTableComponent implements OnInit {
data: any[] = [];
headers: any[] = [];
constructor(public service: BaseService) {}
ngOnInit(): void {
this.loadHeaders();
this.loadData();
}
loadHeaders() {
this.service.request('/api/mdc/cuc/freightConfigItem/list').subscribe(res => {
if (res) {
this.headers = res;
}
});
}
loadData() {
this.service.request('/api/mdc/cuc/freightConfig/list').subscribe(res => {
if (res) {
this.data = res;
}
});
}
changeEndLength(event: any, i: number) {
console.log(event, i);
}
}