提交代码
This commit is contained in:
1 parent
718ab4cb38
commit
2fa8df6934
7 files changed
+31
-33
No files matched your search
+4
-28
@@ -666,38 +666,14 @@ const handleAttachmentData = async () => {
|
||||
|
||||
// 处理宿舍总分变化
|
||||
const handleTotalScoreChange = () => {
|
||||
if (hygieneForm.totalScore !== null && hygieneForm.totalScore !== undefined) {
|
||||
const score = parseFloat(hygieneForm.totalScore.toString());
|
||||
if (!isNaN(score) && score >= 0 && score <= 100) {
|
||||
// 自动为所有学生设置相同的个人得分
|
||||
studentScores.value.forEach((student) => {
|
||||
student.studentScore = score;
|
||||
});
|
||||
|
||||
if (studentScores.value.length > 0) {
|
||||
if (window.ElMessage) {
|
||||
window.ElMessage.success(`已自动为${studentScores.value.length}名学生设置个人得分:${score}分`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 移除联动逻辑,不再自动设置学生个人得分
|
||||
console.log('宿舍扣分变更为:', hygieneForm.totalScore);
|
||||
};
|
||||
|
||||
// 处理卫生等级变化
|
||||
const handleHygieneGradeChange = () => {
|
||||
if (hygieneForm.hygieneGrade && studentScores.value.length > 0) {
|
||||
// 自动为所有学生设置相同的评级
|
||||
studentScores.value.forEach((student) => {
|
||||
student.studentGrade = hygieneForm.hygieneGrade;
|
||||
});
|
||||
|
||||
const gradeDict = xg_dorm_hygiene_grade.value.find((dict: any) => dict.value === hygieneForm.hygieneGrade);
|
||||
const gradeLabel = gradeDict ? gradeDict.label : hygieneForm.hygieneGrade;
|
||||
|
||||
if (window.ElMessage) {
|
||||
window.ElMessage.success(`已自动为${studentScores.value.length}名学生设置评级:${gradeLabel}`);
|
||||
}
|
||||
}
|
||||
// 移除联动逻辑,不再自动设置学生评级
|
||||
console.log('卫生等级变更为:', hygieneForm.hygieneGrade);
|
||||
};
|
||||
|
||||
// 处理学生个人得分变化
|
||||
|
||||
+2
-2
@@ -56,9 +56,9 @@
|
||||
<el-form-item label="扣分分值" prop="scoreDeduction">
|
||||
<el-input-number v-model="form.scoreDeduction" :precision="2" placeholder="请输入扣分" style="width: 100%" />
|
||||
<!-- 违纪类型参考范围提示 -->
|
||||
<div v-if="form.disciplineTypeId" class="score-range-reference" style="font-size: 12px; color: #999; margin-top: 4px">
|
||||
<!-- <div v-if="form.disciplineTypeId" class="score-range-reference" style="font-size: 12px; color: #999; margin-top: 4px">
|
||||
参考范围:{{ currentTypeMinScore }} - {{ currentTypeMaxScore }}分
|
||||
</div>
|
||||
</div> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -322,9 +322,11 @@ const getList = async () => {
|
||||
};
|
||||
|
||||
/** 主弹窗关闭事件处理 */
|
||||
const handleMainDialogClose = () => {
|
||||
const handleMainDialogClose = async () => {
|
||||
mainDialog.visible = false;
|
||||
reset();
|
||||
// 弹窗关闭时自动刷新列表数据
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 编辑弹窗关闭事件处理 */
|
||||
|
||||
Reference in new issue
Block a user