正在显示
1 个修改的文件
包含
8 行增加
和
5 行删除
@@ -599,21 +599,24 @@ func (srv StaffAssessServeice) ExportPerformanceIndicator(in *query.ExportPerfor | @@ -599,21 +599,24 @@ func (srv StaffAssessServeice) ExportPerformanceIndicator(in *query.ExportPerfor | ||
599 | f.SetCellStyle(sheetName, axisStart, axisEnd, styleId100) | 599 | f.SetCellStyle(sheetName, axisStart, axisEnd, styleId100) |
600 | } | 600 | } |
601 | 601 | ||
602 | - var columnIndex = 'B' | 602 | + var columnIndex = 2 |
603 | for i := range in.Selected { | 603 | for i := range in.Selected { |
604 | - axis := fmt.Sprintf("%v3", string(columnIndex)) | 604 | + colName, _ := excelize.ColumnNumberToName(columnIndex) |
605 | + axis := fmt.Sprintf("%s3", colName) | ||
605 | f.SetCellStr(sheetName, axis, in.Selected[i].UserName) // 设置名称 | 606 | f.SetCellStr(sheetName, axis, in.Selected[i].UserName) // 设置名称 |
606 | columnIndex += 1 | 607 | columnIndex += 1 |
607 | } | 608 | } |
608 | 609 | ||
609 | // 填写反馈内容 | 610 | // 填写反馈内容 |
610 | for i := range rowDayList { | 611 | for i := range rowDayList { |
611 | - var columnIndex = 'B' // 从B4开始填充数据内容 | 612 | + var columnIndex = 2 // 从B4开始填充数据内容 |
613 | + | ||
612 | var rowIndex = 4 + (i * 3) | 614 | var rowIndex = 4 + (i * 3) |
613 | 615 | ||
614 | for j := range in.Selected { | 616 | for j := range in.Selected { |
615 | - axisStart := fmt.Sprintf("%v%v", string(columnIndex), rowIndex) | ||
616 | - axisEnd := fmt.Sprintf("%v%v", string(columnIndex), rowIndex+2) | 617 | + colName, _ := excelize.ColumnNumberToName(columnIndex) |
618 | + axisStart := fmt.Sprintf("%v%v", colName, rowIndex) | ||
619 | + axisEnd := fmt.Sprintf("%v%v", colName, rowIndex+2) | ||
617 | 620 | ||
618 | key := in.Selected[j].UserId + rowDayList[i] // key = 用户ID+日期 | 621 | key := in.Selected[j].UserId + rowDayList[i] // key = 用户ID+日期 |
619 | if v, ok := conditionMap[key]; ok { | 622 | if v, ok := conditionMap[key]; ok { |
-
请 注册 或 登录 后发表评论