edit
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user