xyxie 5 months ago
parent
commit
ba9de572bb
1 changed files with 4 additions and 4 deletions
  1. 4 4
      controllers/data_manage/usda_fas_data.go

+ 4 - 4
controllers/data_manage/usda_fas_data.go

@@ -1236,12 +1236,12 @@ func (this *BaseFromUsdaFasController) ExportUsdaFasList() {
 	fileName := classifyName
 	if indexCode != "" && len(indexList) == 1 {
 		fileName = indexList[0].IndexName
-		fileName = strings.Replace(fileName, ": ", "_", -1)
-		fileName = strings.Replace(fileName, ", ", "_", -1)
-		fileName = strings.Replace(fileName, " ", "_", -1)
 	}
+	fileName = strings.Replace(fileName, ": ", "_", -1)
+	fileName = strings.Replace(fileName, ", ", "_", -1)
+	fileName = strings.Replace(fileName, " ", "_", -1)
 	fileName += time.Now().Format("06.01.02") + `.xlsx` //文件名称
-	//fmt.Println(fileName)
+	fmt.Println(fileName)
 	this.Ctx.Output.Download(downLoadnFilePath, fileName)
 	defer func() {
 		os.Remove(downLoadnFilePath)