Browse Source

Merge branch 'bugfix_10/9' into debug

ziwen 1 year ago
parent
commit
2a2c48b7ae
1 changed files with 5 additions and 5 deletions
  1. 5 5
      controllers/data_manage/edb_info.go

+ 5 - 5
controllers/data_manage/edb_info.go

@@ -4281,7 +4281,7 @@ func (this *EdbInfoController) EdbChartAdminList() {
 		systemAdminMap[v.AdminId] = v
 		departmentMap[v.DepartmentName] = v.DepartmentName
 		departmentAdminMap[v.AdminId] = v.DepartmentName
-		groupMap[v.GroupName] = v.DepartmentName
+		groupMap[v.GroupName+v.DepartmentName] = v.DepartmentName
 	}
 
 	depList := make([]company.DepartmentGroupAdmins, 0)
@@ -4301,7 +4301,7 @@ func (this *EdbInfoController) EdbChartAdminList() {
 			if v1 == depList[k].RealName && v1 != "" {
 				item := &company.DepartmentGroupAdmins{
 					AdminId:  "group_" + strconv.Itoa(k),
-					RealName: k1,
+					RealName: strings.Replace(k1,v1,"",-1),
 				}
 				depList[k].ChildrenList = append(depList[k].ChildrenList, item)
 			}
@@ -4310,8 +4310,8 @@ func (this *EdbInfoController) EdbChartAdminList() {
 
 	for _, admin := range systemAdminList {
 		for i, v := range depList {
-			for _, group := range v.ChildrenList {
-				if admin.GroupName == group.RealName {
+			for k, group := range v.ChildrenList {
+				if admin.GroupName == group.RealName && admin.DepartmentName == v.RealName {
 					item := &company.DepartmentGroupAdmins{
 						AdminId:      strconv.Itoa(admin.AdminId),
 						RealName:     admin.RealName,
@@ -4319,7 +4319,7 @@ func (this *EdbInfoController) EdbChartAdminList() {
 						Authority:    admin.Authority,
 					}
 					if group.RealName != "" {
-						group.ChildrenList = append(group.ChildrenList, item)
+						depList[i].ChildrenList[k].ChildrenList = append(depList[i].ChildrenList[k].ChildrenList, item)
 					} else {
 						depList[i].ChildrenList = append(depList[i].ChildrenList, item)
 					}