|
@@ -67,11 +67,35 @@ func (this *ExcelClassifyController) List() {
|
|
|
// 获取二级分类
|
|
|
// 获取三级分类
|
|
|
// 根据来源获取所有excel表格(无内容)
|
|
|
- allExcelInfo, err := excel.GetNoContentExcelInfoAll(source, showUserId)
|
|
|
- if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
- br.Msg = "获取失败"
|
|
|
- br.ErrMsg = "获取表格信息失败,Err:" + err.Error()
|
|
|
- return
|
|
|
+ allExcelInfo := make([]*excel.ExcelClassifyItems, 0)
|
|
|
+ if source == utils.BALANCE_TABLE {
|
|
|
+ //找到当前协作人相关的表格ID
|
|
|
+ obj := new(excel.ExcelWorker)
|
|
|
+ existList, err := obj.GetBySysUserId(this.SysUser.AdminId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取表格协作人失败!"
|
|
|
+ br.ErrMsg = "获取表格协作人失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var excelIds []int
|
|
|
+ if len(existList) > 0 {
|
|
|
+ for _, v := range existList {
|
|
|
+ excelIds = append(excelIds, v.ExcelInfoId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ allExcelInfo, err = excel.GetBalanceNoContentExcelInfoAll(source, excelIds)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取表格信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ allExcelInfo, err = excel.GetNoContentExcelInfoAll(source, showUserId)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取表格信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 获取所有有权限的指标和分类
|
|
@@ -88,7 +112,9 @@ func (this *ExcelClassifyController) List() {
|
|
|
if classifyInfo, ok := classifyMap[v.ExcelClassifyId]; ok {
|
|
|
v.HaveOperaAuth = data_manage_permission.CheckExcelPermissionByPermissionIdList(v.IsJoinPermission, classifyInfo.IsJoinPermission, v.ExcelInfoId, v.ExcelClassifyId, permissionEdbIdList, permissionClassifyIdList)
|
|
|
}
|
|
|
-
|
|
|
+ if source == utils.BALANCE_TABLE && isShowMe && !v.HaveOperaAuth { // 过滤我不可编辑的表格
|
|
|
+ continue
|
|
|
+ }
|
|
|
ExcelInfoMap[v.ExcelClassifyId] = append(ExcelInfoMap[v.ExcelClassifyId], v)
|
|
|
}
|
|
|
|