提交代码
This commit is contained in:
1 parent
718ab4cb38
commit
2fa8df6934
7 files changed
+31
-33
No files matched your search
+5
@@ -110,6 +110,11 @@ public class XskhDisciplineRecord extends TenantEntity {
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 违纪来源(1-宿舍卫生检查 2-教学区违纪)
|
||||
*/
|
||||
private String violationSource;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
|
||||
+5
@@ -128,6 +128,11 @@ public class XskhDisciplineRecordBo extends BaseEntity {
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 违纪来源(1-宿舍卫生检查 2-教学区违纪)
|
||||
*/
|
||||
private String violationSource;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
|
||||
+10
-1
@@ -131,11 +131,20 @@ public class XskhDisciplineRecordVo implements Serializable {
|
||||
* 状态(1-生效 2-已撤销)
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "student_discipline_status")
|
||||
@ExcelDictFormat(dictType = "xskh_discipline_status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 违纪来源(1-宿舍卫生检查 2-教学区违纪)
|
||||
*/
|
||||
@ExcelProperty(value = "违纪来源", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "xskh_violation_source")
|
||||
private String violationSource;
|
||||
|
||||
/**
|
||||
* 附件OSS ID列表,逗号分隔
|
||||
*/
|
||||
@ExcelProperty(value = "附件OSS ID列表")
|
||||
private String attachmentOssIds;
|
||||
|
||||
/**
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="disciplineContent" column="discipline_content" />
|
||||
<result property="scoreDeduction" column="score_deduction" />
|
||||
<result property="status" column="status" />
|
||||
<result property="violationSource" column="violation_source" />
|
||||
<result property="attachmentOssIds" column="attachment_oss_ids" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@@ -45,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXskhDisciplineRecordVo">
|
||||
select id, student_id, student_no, student_name, college_id, college_name, major_id, major_name, class_id, class_name, discipline_type_id, discipline_type_name, discipline_date, discipline_reason, discipline_content, score_deduction, status, attachment_oss_ids, create_by, create_time, create_dept, update_by, update_time, deleted, tenant_id from xskh_discipline_record
|
||||
select id, student_id, student_no, student_name, college_id, college_name, major_id, major_name, class_id, class_name, discipline_type_id, discipline_type_name, discipline_date, discipline_reason, discipline_content, score_deduction, status, violation_source, attachment_oss_ids, create_by, create_time, create_dept, update_by, update_time, deleted, tenant_id from xskh_discipline_record
|
||||
</sql>
|
||||
|
||||
<select id="selectStudentOptions" parameterType="String" resultMap="StudentOptionResult">
|
||||
|
||||
+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