Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
d7412b8982
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      app/admin/svc/svc_data_statisstics.go

+ 1
- 3
app/admin/svc/svc_data_statisstics.go View File

@@ -678,15 +678,13 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
titleList = []string{"年级", "班级", "早餐", "午餐", "晚餐"} titleList = []string{"年级", "班级", "早餐", "午餐", "晚餐"}
xlsx.SetSheetRow("Sheet1", "A2", &titleList) xlsx.SetSheetRow("Sheet1", "A2", &titleList)
xlsx.MergeCell("Sheet1", "A1", "E1") //合并单元格 xlsx.MergeCell("Sheet1", "A1", "E1") //合并单元格
style, err := xlsx.NewStyle(`{"fill":{"type":"pattern","color":["FFFF00"],"pattern":1}}`)
style, err := xlsx.NewStyle(`{"fill":{"type":"pattern","color":["FFFF00"],"pattern":1}, "alignment":{"horizontal":"center"}}`)
if err != nil { if err != nil {
logx.Error(err) logx.Error(err)
println("<<<<CentralKitchenForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) println("<<<<CentralKitchenForSchoolDataStatisticsExport3>>>>>Error:::", err.Error())
panic(err) panic(err)
} }
xlsx.SetCellStyle("Sheet1", "A1", "E1", style) xlsx.SetCellStyle("Sheet1", "A1", "E1", style)
style, err = xlsx.NewStyle(`{"alignment":{"horizontal":"center"}}`)
xlsx.SetCellStyle("Sheet1", "A1", "E1", style)


xlsx.SetColWidth("Sheet1", "A", "E", 20) xlsx.SetColWidth("Sheet1", "A", "E", 20)




Loading…
Cancel
Save