xuzhiheng 3 years ago
parent
commit
0b43a37d53
2 changed files with 14 additions and 1 deletions
  1. 14 1
      src/service/private_service.go
  2. BIN
      src/web/templates/.DS_Store

+ 14 - 1
src/service/private_service.go

@@ -368,7 +368,20 @@ func GetXlsxfile(mMap []map[string]interface{}, dataType int, fn string, fields
 			if len(fields) > 0 {
 				for _, vv := range fields {
 					for kk, _ := range vv {
-						row.AddCell().SetValue(v[kk])
+						if kk == "filehref" {
+							if filehrefs, ok := v["filehref"].([]interface{}); ok {
+								urlArr := ""
+								for _, href := range filehrefs {
+									if hrefs, oks := href.(map[string]interface{}); oks {
+										url := qu.ObjToString(hrefs["url"]) + "\n"
+										urlArr += url
+									}
+								}
+								row.AddCell().SetValue(urlArr)
+							}
+						} else {
+							row.AddCell().SetValue(v[kk])
+						}
 					}
 				}
 			}

BIN
src/web/templates/.DS_Store