正在显示
1 个修改的文件
包含
7 行增加
和
3 行删除
@@ -782,10 +782,13 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContent | @@ -782,10 +782,13 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContent | ||
782 | //纵向-索引-第二列-员工id | 782 | //纵向-索引-第二列-员工id |
783 | //填充1,2 列 | 783 | //填充1,2 列 |
784 | rowNum++ | 784 | rowNum++ |
785 | - axisNum := fmt.Sprintf("%d", rowNum+5) | 785 | + axisNum := fmt.Sprintf("%d", (rowNum-1)*3+6) |
786 | userName := eData.userIdMap[v2.Name] | 786 | userName := eData.userIdMap[v2.Name] |
787 | xlsxFile.SetCellStr(sheetName, "A"+axisNum, v.Name) | 787 | xlsxFile.SetCellStr(sheetName, "A"+axisNum, v.Name) |
788 | xlsxFile.SetCellStr(sheetName, "B"+axisNum, userName) | 788 | xlsxFile.SetCellStr(sheetName, "B"+axisNum, userName) |
789 | + axisEnd := fmt.Sprintf("%d", (rowNum-1)*3+6+2) | ||
790 | + xlsxFile.MergeCell(sheetName, "A"+axisNum, "A"+axisEnd) | ||
791 | + xlsxFile.MergeCell(sheetName, "B"+axisNum, "B"+axisEnd) | ||
789 | } | 792 | } |
790 | } | 793 | } |
791 | //列数量 | 794 | //列数量 |
@@ -827,12 +830,13 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContent | @@ -827,12 +830,13 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ExportAssessContent | ||
827 | for _, v5 := range v4.Child { | 830 | for _, v5 := range v4.Child { |
828 | //纵向-索引-第二列-员工id | 831 | //纵向-索引-第二列-员工id |
829 | rowNum++ | 832 | rowNum++ |
830 | - axis := fmt.Sprintf("%s%d", colName, rowNum+5) | 833 | + axis := fmt.Sprintf("%s%d", colName, (rowNum-1)*3+6) |
831 | key := eData.dataKey(v5.Name, v4.Name, v.Name, v3.Name) | 834 | key := eData.dataKey(v5.Name, v4.Name, v.Name, v3.Name) |
832 | if d, ok := eData.data[key]; ok { | 835 | if d, ok := eData.data[key]; ok { |
833 | xlsxFile.SetCellStr(sheetName, axis, d.String()) | 836 | xlsxFile.SetCellStr(sheetName, axis, d.String()) |
834 | } | 837 | } |
835 | - xlsxFile.SetRowHeight(sheetName, rowNum+5, 50) | 838 | + axisEnd := fmt.Sprintf("%s%d", colName, (rowNum-1)*3+6+2) |
839 | + xlsxFile.MergeCell(sheetName, axis, axisEnd) | ||
836 | } | 840 | } |
837 | } | 841 | } |
838 | } | 842 | } |
-
请 注册 或 登录 后发表评论