更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

@@ -9,8 +9,6 @@ import (
"github.com/beego/beego/v2/client/orm"
)
// schedulingEmployee 排班看板/方案预览里的员工视图。
// Department 保留组织 ID 字符串,DepartmentName 供前端直接展示。
type schedulingEmployee struct {
ID uint `json:"id"`
Name string `json:"name"`
@@ -22,8 +20,6 @@ type schedulingEmployee struct {
AccountStatus int8 `json:"account_status"`
}
// scOrgIndex 租户组织架构的内存索引,用于把“部门/小组”展开成部门子树,
// 以及给员工补齐部门名称。一次请求只加载一次,避免 N+1 查询。
type scOrgIndex struct {
rows map[uint64]models.BackendOrganization
children map[uint64][]uint64
@@ -52,7 +48,6 @@ func (c *BackendOaSchedulingController) scLoadOrgIndex(tid uint64) *scOrgIndex {
return index
}
// subtreeIDs 返回节点自身及其全部下级组织 ID。
func (index *scOrgIndex) subtreeIDs(root uint64) map[uint64]bool {
result := map[uint64]bool{}
if root == 0 {
@@ -78,12 +73,10 @@ func (index *scOrgIndex) name(id uint64) string {
return ""
}
// scBaseEmployeeQuery 排班可选员工:未删除、非离职。
func (c *BackendOaSchedulingController) scBaseEmployeeQuery(tid uint64) orm.QuerySeter {
return employeeBaseQuery(tid)
}
// employeeBaseQuery 本租户在职员工查询(包级函数,排班与考勤共用)。
func employeeBaseQuery(tid uint64) orm.QuerySeter {
return models.Orm.QueryTable(new(models.BackendEmployee)).
Filter("tid", tid).
@@ -129,8 +122,6 @@ func (c *BackendOaSchedulingController) scEmployeeDTOs(tid uint64, rows []models
return result
}
// scEmployeesByOrg 按组织节点取员工;includeChild=true 时包含全部下级组织,
// 这样选中“公司/部门/小组”任意层级都能覆盖到该范围内的所有人。
func (c *BackendOaSchedulingController) scEmployeesByOrg(tid, orgID uint64, includeChild bool) ([]models.BackendEmployee, error) {
qs := c.scBaseEmployeeQuery(tid)
if orgID > 0 {
@@ -152,7 +143,6 @@ func (c *BackendOaSchedulingController) scEmployeesByOrg(tid, orgID uint64, incl
return rows, nil
}
// scEmployeesByIDs 按员工 ID 取员工,保持传入顺序由前端自行处理。
func (c *BackendOaSchedulingController) scEmployeesByIDs(tid uint64, ids []uint64) ([]models.BackendEmployee, error) {
if len(ids) == 0 {
return nil, nil
@@ -165,7 +155,6 @@ func (c *BackendOaSchedulingController) scEmployeesByIDs(tid uint64, ids []uint6
return rows, nil
}
// scResolveEmployees 把方案范围(公司 / 部门小组 / 指定员工)展开成员工列表。
func (c *BackendOaSchedulingController) scResolveEmployees(tid uint64, scopeType int8, orgID uint64, includeChild bool, employeeIDs []uint64) ([]models.BackendEmployee, error) {
switch scopeType {
case models.OaScopeEmployees:
@@ -177,8 +166,6 @@ func (c *BackendOaSchedulingController) scResolveEmployees(tid uint64, scopeType
}
}
// scWorkdays 从日期区间中筛出命中的星期(1=周一 ... 7=周日)。
// 未选择任何星期表示每天。
func scWorkdays(dates []string, weekdays map[int]bool) []string {
if len(weekdays) == 0 {
return dates