...
|
...
|
@@ -68,3 +68,48 @@ func (data ExportCompanyUserData) DataListLen() int { |
|
|
func (data ExportCompanyUserData) TableTitle() []string {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
//exportCompanyUserData 导出共创用户数据
|
|
|
type ExportCooperationUserData []allied_creation_user.UserDetail
|
|
|
|
|
|
var _ excel.ExcelMaker = (*ExportCooperationUserData)(nil)
|
|
|
|
|
|
func (data ExportCooperationUserData) DataFieldList() []excel.DataField {
|
|
|
return []excel.DataField{
|
|
|
{EnName: "UserCode", CnName: "用户编码"},
|
|
|
{EnName: "UserName", CnName: "用户姓名"},
|
|
|
{EnName: "CooperationCompany", CnName: "合作公司"},
|
|
|
{EnName: "CooperationDeadline", CnName: "合作到期"},
|
|
|
{EnName: "Phone", CnName: "手机号"},
|
|
|
{EnName: "Email", CnName: "邮箱"},
|
|
|
}
|
|
|
}
|
|
|
|
|
|
func (data ExportCooperationUserData) CellValue(index int, enName string) (value interface{}) {
|
|
|
if index > data.DataListLen() {
|
|
|
return ""
|
|
|
}
|
|
|
switch enName {
|
|
|
case "UserCode":
|
|
|
return data[index].UserCode
|
|
|
case "UserName":
|
|
|
return data[index].UserInfo.UserName
|
|
|
case "CooperationCompany":
|
|
|
return data[index].CooperationInfo.CooperationCompany
|
|
|
case "CooperationDeadline":
|
|
|
return data[index].CooperationInfo.CooperationDeadline.Format("2006-01-02")
|
|
|
case "Phone":
|
|
|
return data[index].UserInfo.Phone
|
|
|
case "Email":
|
|
|
return data[index].UserInfo.Email
|
|
|
}
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
func (data ExportCooperationUserData) DataListLen() int {
|
|
|
return len(data)
|
|
|
}
|
|
|
|
|
|
func (data ExportCooperationUserData) TableTitle() []string {
|
|
|
return nil
|
|
|
} |
...
|
...
|
|