作者 tangxvhui

修复bug:导出的数据列超过26列时出现异常

... ... @@ -599,21 +599,24 @@ func (srv StaffAssessServeice) ExportPerformanceIndicator(in *query.ExportPerfor
f.SetCellStyle(sheetName, axisStart, axisEnd, styleId100)
}
var columnIndex = 'B'
var columnIndex = 2
for i := range in.Selected {
axis := fmt.Sprintf("%v3", string(columnIndex))
colName, _ := excelize.ColumnNumberToName(columnIndex)
axis := fmt.Sprintf("%s3", colName)
f.SetCellStr(sheetName, axis, in.Selected[i].UserName) // 设置名称
columnIndex += 1
}
// 填写反馈内容
for i := range rowDayList {
var columnIndex = 'B' // 从B4开始填充数据内容
var columnIndex = 2 // 从B4开始填充数据内容
var rowIndex = 4 + (i * 3)
for j := range in.Selected {
axisStart := fmt.Sprintf("%v%v", string(columnIndex), rowIndex)
axisEnd := fmt.Sprintf("%v%v", string(columnIndex), rowIndex+2)
colName, _ := excelize.ColumnNumberToName(columnIndex)
axisStart := fmt.Sprintf("%v%v", colName, rowIndex)
axisEnd := fmt.Sprintf("%v%v", colName, rowIndex+2)
key := in.Selected[j].UserId + rowDayList[i] // key = 用户ID+日期
if v, ok := conditionMap[key]; ok {
... ...