|
@@ -131,7 +131,17 @@ func (b *UserExcel) drawTableContent() error {
|
|
users := b.Content
|
|
users := b.Content
|
|
if len(users) > 0 {
|
|
if len(users) > 0 {
|
|
for _, user := range users {
|
|
for _, user := range users {
|
|
- rowMaxHeight := DrawRow(b.Row, user.Name, user.Nid, user.Roles[0], user.Password)
|
|
|
|
|
|
+ role := ""
|
|
|
|
+ if user.Roles[0] == "admin" {
|
|
|
|
+ role = "管理员"
|
|
|
|
+ }
|
|
|
|
+ if user.Roles[0] == "teacher" {
|
|
|
|
+ role = "教员"
|
|
|
|
+ }
|
|
|
|
+ if user.Roles[0] == "student" {
|
|
|
|
+ role = "学员"
|
|
|
|
+ }
|
|
|
|
+ rowMaxHeight := DrawRow(b.Row, user.Name, user.Nid, role, user.Password)
|
|
b.RowsHeightArray = append(b.RowsHeightArray, map[int]float64{b.Row: rowMaxHeight})
|
|
b.RowsHeightArray = append(b.RowsHeightArray, map[int]float64{b.Row: rowMaxHeight})
|
|
b.Row++
|
|
b.Row++
|
|
}
|
|
}
|