Browse Source

no message

xingzai 1 year ago
parent
commit
a3f4fdcf14
1 changed files with 8 additions and 0 deletions
  1. 8 0
      controllers/report_selection.go

+ 8 - 0
controllers/report_selection.go

@@ -63,6 +63,13 @@ func (this *ReportSelectionController) Detail() {
 		br.ErrMsg = "报告ID错误" + strconv.Itoa(articleId)
 		return
 	}
+
+	PermissionNameMap, err := services.GetPermissionNameMap()
+	if err != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取失败 GetPermissionNameMap,Err:" + err.Error()
+		return
+	}
 	resp := new(models.ReportSelectionLetailResp)
 	//判断用户权限
 	hasPermission, err := services.GetUserhasPermission(user)
@@ -154,6 +161,7 @@ func (this *ReportSelectionController) Detail() {
 			}
 			item.BodyChartSummary = mapChartLog[v.PermissionName]
 			item.List = listSonLog
+			item.PermissionName = PermissionNameMap[v.ChartPermissionId]
 			items = append(items, item)
 			itemsSubject = append(itemsSubject, itemSubject)
 			//itemLogs = make([]*models.CygxReportSelectionLogDetail, 0)