修改按单批次分析批次选择框lable

This commit is contained in:
YuNan 2025-03-16 15:45:09 +08:00
parent 930fbdf474
commit c123a87789
1 changed files with 15 additions and 0 deletions

View File

@ -214,12 +214,26 @@
//
async getBatch() {
const getBatch = await defHttp.get({ url: this.Url.getBatch });
console.log('1111', getBatch);
this.batchOptions = getBatch.batches.map((item) => {
return {
value: item.value,
label: item.label,
};
});
console.log('2222', this.batchOptions);
this.batchOptions.forEach((item) => {
const year = item.label.substring(0, 4);
if (item.label.includes('12-01')) {
item.label = `${year}冬季`;
} else if (item.label.includes('06-01')) {
item.label = `${year}夏季`;
} else if (item.label.includes('09-01')) {
item.label = `${year}夏季`;
} else if (item.label.includes('03-01')) {
item.label = `${year}春季`;
}
});
// const getCollege = await defHttp.get({ url: this.Url.getCollege });
// this.collegeOptions = getCollege.colleges;
@ -253,6 +267,7 @@
},
//
async query() {
this.getBatch();
let resultData = null;
try {
//this.batchnull