作者 tangxvhui

bug 修复

... ... @@ -412,6 +412,13 @@ func (c *AuditController) ChanceDataExcel() {
param.PageIndex = 1
param.PageSize = 10000
sourceData, excelHead := serveaudit.GetAuditListForExcel(param, companyId, uid)
if len(sourceData) == 0 {
msg = &protocol.ResponseMessage{
Errno: 1, Errmsg: "没有数据可以导出",
}
c.ResposeJson(msg)
return
}
xlsMaker := exceltool.NewExcelMaker()
xlsMaker.SetListHead(excelHead)
err = xlsMaker.MakeListExcelForBeego(sourceData)
... ...
... ... @@ -136,7 +136,7 @@ func GetAuditListForExcel(param protocol.RequestAuditList, companyid int64, user
exceltool.ExcelHead{Key: "chance_type", Name: "一级分类"},
exceltool.ExcelHead{Key: "audit_template", Name: "二级分类"},
exceltool.ExcelHead{Key: "nick_name", Name: "提交人"},
exceltool.ExcelHead{Key: "department_id", Name: "提交部门"},
exceltool.ExcelHead{Key: "department", Name: "提交部门"},
exceltool.ExcelHead{Key: "create_at", Name: "提交时间"},
exceltool.ExcelHead{Key: "publish_status", Name: "公开状态"},
exceltool.ExcelHead{Key: "review_status", Name: "审核状态"},
... ...
... ... @@ -139,7 +139,9 @@ var CodePermissionObject = map[string]CodeToObject{
M_SYSTEM_OPPORTUNITY: NewOptionOpportunity, //机会管理
M_SYSTEM_ANNOUNCEMENT: NewPermissionOptionBase, //公告管理
M_SYSTEM_ACHIEVEMENT: NewPermissionOptionBase, //成果管理
M_SYSTEM_CHECK_RESULT: NewPermissionOptionBase, //机会筛选结果
M_SYSTEM_RANK: NewPermissionOptionBase, //排行榜配置管理
M_SYSTEM_RESERVE_TYPE: NewPermissionOptionBase, //储备池分类
}
func GetUserPermission(userCompanyid int64, code ...string) (map[string]PermissionOptionObject, error) {
... ...