v4.4 数据报表/操作日志/系统设置与月度分排行
1. 月度分排行:管理端首页支持总分/月度分切换与月份选择,新增排行榜导出CSV 2. 数据报表:新增考勤/作业统计页(日期范围、汇总与每人明细、CSV导出) 3. 操作日志:新增查看页(操作类型/操作人/日期筛选,分页) 4. 系统设置:密码策略可配置(长度/字符种类),全站改密与重置统一校验、前端提示同步;策略通过公开配置下发 5. 学期归档对比:查看归档时展示与上一学期的分数变化与名次升降 6. 历史记录导出支持按学生分表(每人一段,便于发家长) 7. 移动端适配:导航横向滚动、表格触控滚动、字号与弹窗优化 8. 版本升级至4.4(无数据库结构变更)
This commit is contained in:
1 parent
9a19add6c1
commit
768ea281e0
54 files changed
+1782
-90
No files matched your search
@@ -275,6 +275,45 @@ function validateScoreChange(value) {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前密码策略(由后端配置下发)
|
||||
*/
|
||||
function getPasswordPolicy() {
|
||||
return {
|
||||
minLength: window.PASSWORD_MIN_LENGTH || 6,
|
||||
maxLength: window.PASSWORD_MAX_LENGTH || 20,
|
||||
minTypes: window.PASSWORD_MIN_TYPES || 3
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 密码策略提示文本
|
||||
*/
|
||||
function describePasswordPolicy() {
|
||||
const p = getPasswordPolicy();
|
||||
return '密码长度' + p.minLength + '-' + p.maxLength + '位,需包含大写字母、小写字母、数字、特殊符号中的至少' + p.minTypes + '种';
|
||||
}
|
||||
|
||||
/**
|
||||
* 按密码策略校验,返回错误信息(空字符串表示通过)
|
||||
*/
|
||||
function validatePasswordByPolicy(password) {
|
||||
const p = getPasswordPolicy();
|
||||
if (!password || password.length < p.minLength) {
|
||||
return '密码长度至少' + p.minLength + '位';
|
||||
}
|
||||
if (password.length > p.maxLength) {
|
||||
return '密码长度不能超过' + p.maxLength + '位';
|
||||
}
|
||||
const types = [/[A-Z]/, /[a-z]/, /[0-9]/, /[^A-Za-z0-9]/].filter(function(re) {
|
||||
return re.test(password);
|
||||
}).length;
|
||||
if (types < p.minTypes) {
|
||||
return '密码需包含大写字母、小写字母、数字、特殊符号中的至少' + p.minTypes + '种';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function showToast(message, type = 'success') {
|
||||
const toast = document.createElement('div');
|
||||
toast.className = `toast toast-${type}`;
|
||||
@@ -490,6 +529,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
if (logoutBtn) {
|
||||
logoutBtn.addEventListener('click', logout);
|
||||
}
|
||||
document.querySelectorAll('.pwd-policy').forEach(function(el) {
|
||||
el.textContent = describePasswordPolicy();
|
||||
});
|
||||
});
|
||||
|
||||
function toggleActionDropdown(el) {
|
||||
|
||||
Reference in new issue
Block a user