feat: 完成多模块功能迭代与优化

本次提交包含多模块功能更新:
1. 权限系统重构:移除硬编码admin放行逻辑,新增精细化权限控制,完善权限树形结构与用户/角色保护
2. 新增物料导入导出接口,补充台账查询条件
3. 优化列表查询排序逻辑,新增区域编码大小写不敏感搜索
4. 修复帮助抽屉重复弹出问题,补充页面权限控制
5. 新增弱密码提示逻辑,优化MES/WMS用户/角色管理权限
6. 调整路由结构,新增权限校验脚本与前端权限树重构
7. 补充数据库字段与依赖包更新
This commit is contained in:
SunYF
2026-09-03 18:13:59 +08:00
parent 572fa975bc
commit c1fc6d32b2
47 changed files with 1761 additions and 926 deletions
+12
View File
@@ -17,6 +17,8 @@ const (
FieldName = "name"
// FieldType holds the string denoting the type field in the database.
FieldType = "type"
// FieldParentCode holds the string denoting the parent_code field in the database.
FieldParentCode = "parent_code"
// FieldPath holds the string denoting the path field in the database.
FieldPath = "path"
// FieldIcon holds the string denoting the icon field in the database.
@@ -39,6 +41,7 @@ var Columns = []string{
FieldCode,
FieldName,
FieldType,
FieldParentCode,
FieldPath,
FieldIcon,
FieldSort,
@@ -66,6 +69,10 @@ var (
DefaultType string
// TypeValidator is a validator for the "type" field. It is called by the builders before save.
TypeValidator func(string) error
// DefaultParentCode holds the default value on creation for the "parent_code" field.
DefaultParentCode string
// ParentCodeValidator is a validator for the "parent_code" field. It is called by the builders before save.
ParentCodeValidator func(string) error
// DefaultPath holds the default value on creation for the "path" field.
DefaultPath string
// PathValidator is a validator for the "path" field. It is called by the builders before save.
@@ -109,6 +116,11 @@ func ByType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldType, opts...).ToFunc()
}
// ByParentCode orders the results by the parent_code field.
func ByParentCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldParentCode, opts...).ToFunc()
}
// ByPath orders the results by the path field.
func ByPath(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPath, opts...).ToFunc()