优化首页表格

This commit is contained in:
YuNan 2025-03-19 17:49:52 +08:00
parent ffefebd785
commit 46d1d319f6
1 changed files with 15 additions and 0 deletions

View File

@ -334,6 +334,8 @@
const parent = this.collegeMajorOptions.find((p) => p.children && p.children.some((child) => child.value === item.value)); const parent = this.collegeMajorOptions.find((p) => p.children && p.children.some((child) => child.value === item.value));
//console.log('1111', parent.label); //console.log('1111', parent.label);
console.log('2222', this.collegeMajorOptions); console.log('2222', this.collegeMajorOptions);
//collegeMajor
this.collegeMajor = [];
if (parent) { if (parent) {
this.selectedLabel = `${parent.label} / ${item.label}`; this.selectedLabel = `${parent.label} / ${item.label}`;
this.collegeMajor[0] = parent.value; this.collegeMajor[0] = parent.value;
@ -864,6 +866,19 @@
} }
console.log('tableData', tableData); console.log('tableData', tableData);
tableData.forEach((item) => {
const year = item.batch.substring(0, 4);
console.log('year', year);
if (item.batch.includes('12-01')) {
item.batch = `${year}冬季`;
} else if (item.batch.includes('06-01')) {
item.batch = `${year}夏季`;
} else if (item.batch.includes('09-01')) {
item.batch = `${year}夏季`;
} else if (item.batch.includes('03-01')) {
item.batch = `${year}春季`;
}
});
this.dataSourceCet4 = tableData; // this.dataSourceCet4 = tableData; //
this.total = result.total; // this.total = result.total; //
this.totalName = result.totalName; // this.totalName = result.totalName; //