退伍复学-学务转专业调整
This commit is contained in:
@@ -447,30 +447,35 @@ export default {
|
||||
methods: {
|
||||
|
||||
// 获取学务班级名称列表
|
||||
getXWClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data
|
||||
// console.log(this.ClassNameList)
|
||||
if (this.ClassNameList != null) {
|
||||
this.ClassNameList.forEach(element => {
|
||||
if (element.value == this.form.maList[0].finaldata1) {
|
||||
// console.log(element.label)
|
||||
element.children.forEach(elementTwo => {
|
||||
if (elementTwo.value == this.form.maList[0].finaldata2) {
|
||||
// console.log(elementTwo.label)
|
||||
// this.saveClassName =elementTwo.label
|
||||
elementTwo.children.forEach(elementFree => {
|
||||
this.finalClassName = elementFree.label
|
||||
this.classVlue1 = [element.value, elementTwo.value, elementFree.value];
|
||||
// console.log(elementFree.label)
|
||||
});
|
||||
getXWClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data;
|
||||
if (this.ClassNameList != null) {
|
||||
this.ClassNameList.forEach(element => {
|
||||
if (element.value == this.form.maList[0].finaldata1) {
|
||||
element.children.forEach(elementTwo => {
|
||||
if (elementTwo.value == this.form.maList[0].finaldata2) {
|
||||
elementTwo.children.forEach(elementFree => {
|
||||
if (elementFree.value == this.form.maList[0].newmajor) {
|
||||
this.finalClassName = elementFree.label;
|
||||
this.classVlue1 = [element.value, elementTwo.value, elementFree.value];
|
||||
|
||||
// 关键修复:从年级列表中查找年级名称,而不是直接使用 element.label
|
||||
const gradeId = element.value;
|
||||
const gradeItem = this.grade_list.find(item => item.gradeId === gradeId);
|
||||
if (gradeItem) {
|
||||
this.finalGradeName = gradeItem.gradeName; // 正确的年级名称
|
||||
this.$set(this.form.maList[0], 'finallabel', gradeItem.gradeId); // 正确的年级ID
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/** 获取班级名称列表 */
|
||||
getClassNameList() {
|
||||
|
||||
Reference in New Issue
Block a user