退伍复学-材料上传
This commit is contained in:
@@ -1170,28 +1170,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 班级选择事件(仅更新ID,不处理名称)
|
||||
// handleChange1(value) {
|
||||
// if (value && value.length === 3) {
|
||||
// const [gradeId, majorId, classId] = value;
|
||||
// // 仅更新子表的ID字段,名称仅前端展示(不提交给后端)
|
||||
// this.$set(this.form.maList[0], 'finaldata1', gradeId); // 年级ID
|
||||
// this.$set(this.form.maList[0], 'finaldata2', majorId); // 专业ID
|
||||
// this.$set(this.form.maList[0], 'newmajor', classId); // 班级ID
|
||||
|
||||
// // finalClassName 仅用于前端展示,不提交
|
||||
// const gradeItem = this.ClassNameList.find(item => item.value === gradeId);
|
||||
// if (gradeItem) {
|
||||
// const majorItem = gradeItem.children.find(item => item.value === majorId);
|
||||
// if (majorItem) {
|
||||
// const classItem = majorItem.children.find(item => item.value === classId);
|
||||
// if (classItem) {
|
||||
// this.finalClassName = classItem.label; // 仅前端展示
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
handleChange1(value) {
|
||||
if (value && value.length === 3) {
|
||||
const [gradeId, majorId, classId] = value;
|
||||
@@ -1221,17 +1200,7 @@ handleChange1(value) {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 年级选择事件(仅更新ID,不处理名称)
|
||||
// handleGradeChange(value) {
|
||||
// const selectedGrade = this.grade_list.find(item => item.gradeId === value);
|
||||
// if (selectedGrade) {
|
||||
// // 仅更新子表的ID字段,名称仅前端展示
|
||||
// this.$set(this.form.maList[0], 'finallabel', value); // 年级ID(存储用)
|
||||
// this.$set(this.form.maList[0], 'finalmajor', value); // 年级ID(选择框绑定)
|
||||
|
||||
// this.finalGradeName = selectedGrade.gradeName; // 仅前端展示
|
||||
// }
|
||||
// },
|
||||
handleGradeChange(value) {
|
||||
const selectedGrade = this.grade_list.find(item => item.gradeId === value);
|
||||
if (selectedGrade) {
|
||||
@@ -1248,40 +1217,6 @@ handleGradeChange(value) {
|
||||
this.$set(this.form.maList[0], 'finalmajor', '');
|
||||
}
|
||||
},
|
||||
// handleChange1(value) {
|
||||
// if (value && value.length === 3) {
|
||||
// const [gradeId, majorId, classId] = value;
|
||||
// // 从ClassNameList中找到对应班级名称
|
||||
// const gradeItem = this.ClassNameList.find(item => item.value === gradeId);
|
||||
// if (gradeItem) {
|
||||
// const majorItem = gradeItem.children.find(item => item.value === majorId);
|
||||
// if (majorItem) {
|
||||
// const classItem = majorItem.children.find(item => item.value === classId);
|
||||
// if (classItem) {
|
||||
// this.finalClassName = classItem.label;
|
||||
// // 【关键修改】实时更新form.maList[0]的字段,确保提交时能拿到最新值
|
||||
// this.$set(this.form.maList[0], 'finaldata1', gradeId); // 年级ID
|
||||
// this.$set(this.form.maList[0], 'finaldata2', majorId); // 专业ID
|
||||
// this.$set(this.form.maList[0], 'newmajor', classId); // 班级ID
|
||||
// this.$set(this.form.maList[0], 'finalClassName', classItem.label); // 班级名称
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
|
||||
// handleGradeChange(value) {
|
||||
// // 3. 选择框值变更时,同步更新显示名称和存储字段
|
||||
// const selectedGrade = this.grade_list.find(item => item.gradeId === value);
|
||||
// if (selectedGrade) {
|
||||
// this.finalGradeName = selectedGrade.gradeName; // 更新显示名称
|
||||
// // 【关键修改】实时更新form.maList[0]的字段
|
||||
// this.$set(this.form.maList[0], 'finallabel', value); // 年级ID(存储用)
|
||||
// this.$set(this.form.maList[0], 'finalmajor', value); // 年级ID(选择框绑定)
|
||||
// this.$set(this.form.maList[0], 'finalGradeName', selectedGrade.gradeName); // 年级名称
|
||||
// }
|
||||
// },
|
||||
|
||||
penaltyTypeMethodFormat(row, column) {
|
||||
return this.selectDictLabel(this.dict.type.rt_penalty_type, row.penaltyType)
|
||||
},
|
||||
@@ -1357,25 +1292,6 @@ handleGradeChange(value) {
|
||||
|
||||
// 退伍复学申请表单数据
|
||||
getBasicApplication(startUser) {
|
||||
// // let newName = this.startUser.replace(/-/g, "");
|
||||
// let newName = this.startUser.split('-')[0].trim();
|
||||
// getStname(newName).then((res) => {
|
||||
// // console.log("后端返回原始数据:",res.data);
|
||||
// this.form = res.data
|
||||
|
||||
// // 1. 初始化选择框绑定的核心字段(finalmajor)
|
||||
// if (this.form.maList && this.form.maList.length > 0) {
|
||||
// // 从maList中读取已保存的年级ID,赋值给finalmajor(选择框绑定字段)
|
||||
// this.$set(this.form.maList[0], 'finalmajor', this.form.maList[0].finallabel || '');
|
||||
// } else {
|
||||
// // 若无数据,初始化空值避免undefined
|
||||
// this.form.maList = [{ finalmajor: '', finallabel: '' }];
|
||||
// }
|
||||
|
||||
// this.getClassNameList()
|
||||
// this.listGrade()
|
||||
// this.getXWClassNameList()
|
||||
// });
|
||||
let newName = this.startUser.split('-')[0].trim();
|
||||
getStname(newName).then((res) => {
|
||||
console.log("后端返回原始数据:", res.data);
|
||||
@@ -1434,55 +1350,6 @@ handleGradeChange(value) {
|
||||
})
|
||||
},
|
||||
|
||||
// 获取学务班级名称列表
|
||||
// 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];
|
||||
// // 同步更新年级名称
|
||||
// this.finalGradeName = element.label;
|
||||
// this.$set(this.form.maList[0], 'finallabel', element.value);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
getXWClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data;
|
||||
@@ -1513,47 +1380,7 @@ handleGradeChange(value) {
|
||||
})
|
||||
},
|
||||
|
||||
/** 获取年级列表 */
|
||||
// async listGrade() {
|
||||
// try {
|
||||
// let res = await listGrade()
|
||||
// if (res.code == 200) {
|
||||
// this.grade_list = [...res.rows]
|
||||
// console.log(this.grade_list)
|
||||
// this.grade_list.forEach(element => {
|
||||
// // console.log("newgrade",this.form.maList[0].newgrade)
|
||||
// if (element.gradeId == this.form.maList[0].newgrade) {
|
||||
// this.saveGradeName = element.gradeName
|
||||
// }
|
||||
// if (element.gradeId == this.form.maList[0].finallabel) {
|
||||
// this.finalGradeName = element.gradeName
|
||||
// // this.$set(this.form.maList[0], 'finalmajor', element.gradeId);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// } catch (error) {
|
||||
// console.error('获取年级列表失败:', error)
|
||||
// }
|
||||
// },
|
||||
// async listGrade() {
|
||||
// try {
|
||||
// let res = await listGrade();
|
||||
// if (res.code == 200) {
|
||||
// this.grade_list = [...res.rows];
|
||||
// this.grade_list.forEach(element => {
|
||||
// if (element.gradeId == this.form.maList[0].newgrade) {
|
||||
// this.saveGradeName = element.gradeName;
|
||||
// }
|
||||
// if (element.gradeId == this.form.maList[0].finallabel) {
|
||||
// this.finalGradeName = element.gradeName;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// } catch (error) {
|
||||
// console.error('获取年级列表失败:', error);
|
||||
// }
|
||||
// },
|
||||
async listGrade() {
|
||||
try {
|
||||
let res = await listGrade(); // 调用后端接口获取年级列表
|
||||
|
||||
@@ -87,6 +87,21 @@
|
||||
</div> -->
|
||||
</el-card>
|
||||
|
||||
<!-- 材料上传 -->
|
||||
<el-card class="box-card1" v-if="form.conversion === 'N'">
|
||||
<el-form ref="form2" :model="form" :rules="rules2" label-width="80px">
|
||||
<el-form-item label="退役证明" prop="proof">
|
||||
<image-upload v-model="form.proof" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="idcard">
|
||||
<image-upload v-model="form.idcard" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料" prop="material">
|
||||
<image-upload v-model="form.material" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- 转专业材料上传 -->
|
||||
<el-card class="box-card1" v-if="form.conversion === 'Y'">
|
||||
<el-form ref="form2" :model="form" :rules="rules2" label-width="80px">
|
||||
|
||||
Reference in New Issue
Block a user