Browse Source

展示样式修改

xingzai 3 years ago
parent
commit
c191e3c71e
1 changed files with 10 additions and 5 deletions
  1. 10 5
      controllers/report.go

+ 10 - 5
controllers/report.go

@@ -972,7 +972,11 @@ func (this *ReportController) ReportList() {
 		}
 		subjectNamesNew = strings.TrimRight(subjectNamesNew, "/")
 		list[k].SubjectName = subjectNamesNew
-		list[k].IndustryName = industryName + "-" + subjectNamesNew
+		if subjectNamesNew != "" {
+			list[k].IndustryName = industryName + "-" + subjectNamesNew
+		} else {
+			list[k].IndustryName = industryName
+		}
 		resp.IndustryName = industryName
 	}
 	resp.List = list
@@ -1041,10 +1045,7 @@ func (this *ReportController) ReportListNew() {
 			br.ErrMsg = "获取信息失败,Err:" + err.Error()
 			return
 		}
-		fmt.Println(detail.IndustrialAndSubjectIds)
-		fmt.Println(detail.IndustrialManagementId)
 		firstStr := strings.Index(detail.IndustrialAndSubjectIds, "—")
-		fmt.Println(firstStr)
 		if firstStr == 0 {
 			condition += ` AND art.industrial_management_id = '` + strconv.Itoa(detail.IndustrialManagementId) + `'`
 		} else {
@@ -1093,7 +1094,11 @@ func (this *ReportController) ReportListNew() {
 		}
 		subjectNamesNew = strings.TrimRight(subjectNamesNew, "/")
 		list[k].SubjectName = subjectNamesNew
-		list[k].IndustryName = industryName + "-" + subjectNamesNew
+		if subjectNamesNew != "" {
+			list[k].IndustryName = industryName + "-" + subjectNamesNew
+		} else {
+			list[k].IndustryName = industryName
+		}
 		resp.IndustryName = industryName
 	}
 	resp.List = list