- {{ form.xwIdea || '暂无意见' }}
+
+
{{ form.xwIdea }}拟编入____
+
+
{{ form.xwIdea || '暂无意见,' }},拟编入__{{finalGradeName}}_{{finalClassName}}__
+
+
+
+ ( 专业调整:)
+
+
+
+ -
+
+
+
+
+ {{ data.label }}
+ ({{ data.children.length }})
+
+
+
+
+
审批结果:
确 定
+
+
@@ -935,6 +972,7 @@ export default {
props: {},
data() {
return {
+ classVlue1: [],
// 模型xml数据
xmlData: '',
flowData: {},
@@ -961,6 +999,11 @@ export default {
saveClassName: null,
// 年级名称
saveGradeName: null,
+ // 最终班级名称
+ finalClassName: null,
+ // 最终年级名称
+ finalGradeName:null,
+
rules: {
penaltyNumber: [{ required: true, message: '请输入处分文号', trigger: 'blur' }],
letterServiceContent: [{ required: true, message: '请输入送达书', trigger: 'blur' }],
@@ -1127,6 +1170,102 @@ 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;
+ this.$set(this.form.maList[0], 'finaldata1', gradeId);
+ this.$set(this.form.maList[0], 'finaldata2', majorId);
+ this.$set(this.form.maList[0], 'newmajor', classId);
+ // 确保finalmajor与newmajor同步,存储班级ID
+ this.$set(this.form.maList[0], 'finalmajor', classId);
+
+ 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;
+ }
+ }
+ }
+ }
+},
+// 年级选择事件(仅更新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) {
+ // 仅更新年级ID和名称,不修改finalmajor
+ this.$set(this.form.maList[0], 'finallabel', value);
+ this.finalGradeName = selectedGrade.gradeName;
+ }
+},
+ // 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)
},
@@ -1207,8 +1346,19 @@ export default {
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()
});
},
/** 获取班级名称列表 */
@@ -1223,8 +1373,35 @@ export default {
element.children.forEach(elementTwo => {
if (elementTwo.value == this.form.maList[0].data2) {
// console.log(elementTwo.label)
+ this.saveClassName =elementTwo.label
+ // elementTwo.children.forEach(elementFree => {
+ // this.finalClassName = elementFree.label
+ // // console.log(elementFree.label)
+ // });
+ }
+ });
+ }
+ });
+ }
+ })
+ },
+
+ // 获取学务班级名称列表
+ 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.saveClassName = elementFree.label
+ this.finalClassName = elementFree.label
+ this.classVlue1 = [element.value, elementTwo.value, elementFree.value];
// console.log(elementFree.label)
});
}
@@ -1234,6 +1411,7 @@ export default {
}
})
},
+
/** 获取年级列表 */
async listGrade() {
try {
@@ -1242,11 +1420,17 @@ export default {
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)
}
@@ -1428,8 +1612,8 @@ export default {
this.form.remark = this.taskForm.remark
this.updateRtStuQuitSchool()
} else if (this.category == 'enlistmentReserve') { // 是应征入伍保留学籍申请,才执行
- if (this.taskName == '教务处主管领导审批') { // (最后一个领导审核完成之后,修改学生学籍状态, status:07是入伍保留学籍)
- updateStudent({ stuId: this.form.studentId, status: '07' }).then(response => { })
+ if (this.taskName == '教务处主管领导审批') { // (最后一个领导审核完成之后,修改学生学籍状态, status:30是入伍保留学籍)
+ updateStudent({ stuId: this.form.studentId, status: '30' }).then(response => { })
}
this.$modal.msgSuccess(response.msg)
} else if (this.category == "退伍复学") {
@@ -1484,16 +1668,65 @@ export default {
else if (this.taskName == "学务审核") {
const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName);
const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : "";
- updateBasic({
+ // updateBasic({
+ // id: stNameData.id,
+ // xwStatus: "1",
+ // xwIdea: this.taskForm.comment,
+ // xwTime: new Date(),
+ // xwQm: assigneeName
+ // }).then(response => {
+ // this.$modal.msgSuccess(response.msg)
+ // })
+ // // 构建要提交的参数
+ // const updateParams = {
+ // id: stNameData.id,
+ // xwStatus: "1",
+ // xwIdea: this.taskForm.comment,
+ // xwTime: new Date(),
+ // xwQm: assigneeName,
+ // finalGradeId: this.form.maList[0].finalmajor,
+ // // 其他你需要更新的字段...
+ // 'maList[0].finallabel': this.form.maList[0].finalmajor,
+ // 'maList[0].finaldata1': this.form.maList[0].finaldata1,
+ // 'maList[0].finaldata2': this.form.maList[0].finaldata2,
+ // 'maList[0].newmajor': this.form.maList[0].newmajor,
+ // 'maList[0].finalGradeName': this.finalGradeName,
+ // 'maList[0].finalClassName': this.finalClassName
+ // };
+
+ // // 【关键】打印要提交的参数
+ // console.log("updateBasic 提交的参数:", updateParams);
+
+ // // 调用更新接口
+ // updateBasic(updateParams).then(response => {
+ // this.$modal.msgSuccess(response.msg);
+ // });
+ // 1. 从 maList[0] 中提取需要更新的子表数据
+ const maList0 = this.form.maList[0] || {};
+
+ // 2. 构建主表更新参数
+ const updateParams = {
id: stNameData.id,
xwStatus: "1",
xwIdea: this.taskForm.comment,
xwTime: new Date(),
- xwQm: assigneeName
- }).then(response => {
- this.$modal.msgSuccess(response.msg)
- })
+ xwQm: assigneeName,
+ finalGradeId: maList0.finalmajor,
+ // 3. 关键:将子表数据包装到 maList 数组中
+ maList: [
+ {
+ ...maList0, // 包含 finaldata1, finaldata2, finallabel, newmajor 等
+ basicId: stNameData.id // 确保子表记录关联到正确的主表ID
+ }
+ ]
+ };
+ console.log("提交给后端的参数:", updateParams);
+
+ // 调用更新接口
+ updateBasic(updateParams).then(response => {
+ this.$modal.msgSuccess(response.msg);
+ });
}
// 二级学院审核
@@ -1539,18 +1772,36 @@ export default {
jwTime: new Date(),
jwQm: assigneeName
}).then(response => {
+ console.log("===== updateBasic 响应结果 =====", response);
this.$modal.msgSuccess(response.msg)
+
+ // 2. 打印updateStudent的前置条件
+ console.log("===== updateStudent 执行前置检查 =====");
+ console.log("是否转专业(conversion):", stNameData.conversion);
+ console.log("学生ID(studentId):", stNameData.studentId);
+ console.log("finaldata1(院部ID):", stNameData.maList ? stNameData.maList[0].finaldata1 : "无");
+ console.log("finaldata2(专业ID):", stNameData.maList ? stNameData.maList[0].finaldata2 : "无");
+ console.log("finalmajor(班级ID):", stNameData.maList ? stNameData.maList[0].finalmajor : "无");
})
if (stNameData.conversion == "Y") {
- updateStudent({
- stuId: stNameData.studentId,
- deptId: parseInt(stNameData.maList[0].data1),
- majorId: parseInt(stNameData.maList[0].data2),
- classId: parseInt(stNameData.maList[0].newmajor),
- status: '08',
- }).then(response => { })
+ const maList0 = this.form.maList ? this.form.maList[0] : {};
+ updateStudent({
+ stuId: stNameData.studentId,
+ deptId: parseInt(maList0.finaldata1),
+ majorId: parseInt(maList0.finaldata2),
+ classId: parseInt(maList0.finalmajor),
+ status: '31',
+ // updateStudent({
+ // stuId: stNameData.studentId,
+ // deptId: parseInt(stNameData.maList[0].finaldata1),
+ // majorId: parseInt(stNameData.maList[0].finaldata2),
+ // classId: parseInt(stNameData.maList[0].finalmajor),
+ // status: '31',
+ }).then(response => {
+ console.log("updateStudent",response)
+ })
} else {
- updateStudent({ stuId: stNameData.studentId, status: '08', }).then(response => { })
+ updateStudent({ stuId: stNameData.studentId, status: '31', }).then(response => { })
}
}
diff --git a/src/views/index.vue b/src/views/index.vue
index 082ae1b..dd4f1be 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -6,8 +6,27 @@
-->
+
+
+
+
+
为了确保您的信息准确无误,请确认并完善个人信息。
+
点击下方按钮前往信息修改页面进行确认。
+
+
+
+
-
+
\ No newline at end of file
diff --git a/src/views/routine/dis/basic/index.vue b/src/views/routine/dis/basic/index.vue
index 12525f4..c2988ea 100644
--- a/src/views/routine/dis/basic/index.vue
+++ b/src/views/routine/dis/basic/index.vue
@@ -5,9 +5,10 @@