Browse Source

活动列表、我的日程等处理按钮是否展示的功能

xingzai 2 years ago
parent
commit
fee8812524
2 changed files with 18 additions and 5 deletions
  1. 13 4
      controllers/activity.go
  2. 5 1
      services/activity.go

+ 13 - 4
controllers/activity.go

@@ -371,8 +371,12 @@ func (this *ActivityCoAntroller) ActivityList() {
 			go services.AddUserSearchLog(user, keyWordSearch, 6)
 		}
 	}
-	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp := new(models.GetCygxActivityListRep)
+	//处理列表的标签是否展示逻辑
+	for _, v := range list {
+		resp.List = append(resp.List, services.ActivityButtonShow(v))
+	}
+	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp.List = list
 	resp.Paging = page
 	br.Ret = 200
@@ -552,9 +556,11 @@ func (this *ActivityCoAntroller) ScheduleList() {
 	item.CompanyName = user.CompanyName
 	item.PageType = "MySchedule"
 	go models.AddCygxPageHistoryRecord(item)
-
 	resp := new(models.GetCygxActivityListRep)
-	resp.List = list
+	//处理列表的标签是否展示逻辑
+	for _, v := range list {
+		resp.List = append(resp.List, services.ActivityButtonShow(v))
+	}
 	resp.Paging = page
 	br.Ret = 200
 	br.Success = true
@@ -2807,7 +2813,10 @@ func (this *ActivityCoAntroller) ActivityListNew() {
 			resp.Label = detail.ActivityTypeName
 		}
 	}
-	resp.List = list
+	//处理列表的标签是否展示逻辑
+	for _, v := range list {
+		resp.List = append(resp.List, services.ActivityButtonShow(v))
+	}
 	resp.Paging = page
 	br.Ret = 200
 	br.Success = true

+ 5 - 1
services/activity.go

@@ -1288,7 +1288,11 @@ func ActivityButtonShow(item *models.ActivityDetail) (articleDetail *models.Acti
 	//IsShowMeetingReminder   bool                       `description:"是否展示会议提醒"`
 	//IsShowHelpSsk           bool                       `description:"是否展示帮我带问"`
 	//IsShowSignup            bool                       `description:"是否展示我要报名"`
-	articleDetail.IsShowAppointment = IsShowAppointment(articleDetail.ActivityTypeId, articleDetail.ChartPermissionName)
+
+	//如果后台在添加活的时候,关联的报告类型不隐藏预约纪要按钮,而且满足以下展示预约纪要按钮类型就展示
+	if articleDetail.IsHideAppointment == 0 {
+		articleDetail.IsShowAppointment = IsShowAppointment(articleDetail.ActivityTypeId, articleDetail.ChartPermissionName)
+	}
 	//专家电话会 1
 	if articleDetail.ActivityTypeId == 1 {
 		articleDetail.IsShowOutboundCall = true