39 lines
853 B
TypeScript
39 lines
853 B
TypeScript
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);
|
|
}
|
|
}
|