作者 yangfu

导出修改

@@ -14,10 +14,10 @@ func (data ExportCompanyUserData) DataFieldList() []excel.DataField { @@ -14,10 +14,10 @@ func (data ExportCompanyUserData) DataFieldList() []excel.DataField {
14 return []excel.DataField{ 14 return []excel.DataField{
15 {EnName: "UserCode", CnName: "用户编码"}, 15 {EnName: "UserCode", CnName: "用户编码"},
16 {EnName: "UserName", CnName: "用户姓名"}, 16 {EnName: "UserName", CnName: "用户姓名"},
17 - {EnName: "OrgName", CnName: "组织机构"}, 17 + {EnName: "Phone", CnName: "手机号"},
18 {EnName: "DepartmentName", CnName: "所属部门"}, 18 {EnName: "DepartmentName", CnName: "所属部门"},
19 {EnName: "EnableStatus", CnName: "状态"}, 19 {EnName: "EnableStatus", CnName: "状态"},
20 - {EnName: "Phone", CnName: "手机号"}, 20 + {EnName: "OrgName", CnName: "组织机构"},
21 } 21 }
22 } 22 }
23 23
@@ -78,10 +78,12 @@ func (data ExportCooperationUserData) DataFieldList() []excel.DataField { @@ -78,10 +78,12 @@ func (data ExportCooperationUserData) DataFieldList() []excel.DataField {
78 return []excel.DataField{ 78 return []excel.DataField{
79 {EnName: "UserCode", CnName: "用户编码"}, 79 {EnName: "UserCode", CnName: "用户编码"},
80 {EnName: "UserName", CnName: "用户姓名"}, 80 {EnName: "UserName", CnName: "用户姓名"},
81 - {EnName: "CooperationCompany", CnName: "合作公司"},  
82 - {EnName: "CooperationDeadline", CnName: "合作到期"},  
83 {EnName: "Phone", CnName: "手机号"}, 81 {EnName: "Phone", CnName: "手机号"},
84 - {EnName: "Email", CnName: "邮箱"}, 82 + {EnName: "CooperationCompany", CnName: "共创公司"},
  83 + {EnName: "CooperationDeadline", CnName: "共创到期"},
  84 + {EnName: "EnableStatus", CnName: "状态"},
  85 +
  86 + //{EnName: "Email", CnName: "邮箱"},
85 } 87 }
86 } 88 }
87 89
@@ -105,6 +107,19 @@ func (data ExportCooperationUserData) CellValue(index int, enName string) (value @@ -105,6 +107,19 @@ func (data ExportCooperationUserData) CellValue(index int, enName string) (value
105 return data[index].UserInfo.Phone 107 return data[index].UserInfo.Phone
106 case "Email": 108 case "Email":
107 return data[index].UserInfo.Email 109 return data[index].UserInfo.Email
  110 + case "EnableStatus":
  111 + status := data[index].EnableStatus
  112 + statusName := ""
  113 + // 状态(1:启用 2:禁用 3:注销)
  114 + switch status {
  115 + case 1:
  116 + statusName = "启用"
  117 + case 2:
  118 + statusName = "禁用"
  119 + case 3:
  120 + statusName = "注销"
  121 + }
  122 + return statusName
108 } 123 }
109 return nil 124 return nil
110 } 125 }