Browse Source

过滤空单位

ellisran 3 months ago
parent
commit
f5a793a866
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/controller/sub_proj_setting_controller.js

+ 1 - 1
app/controller/sub_proj_setting_controller.js

@@ -562,7 +562,7 @@ module.exports = app => {
                 const accountGroupList = unitList.map(item => {
                     const groupList = accountList.filter(item1 => item1.company === item.name);
                     return {groupName: item.name, groupList};
-                });
+                }).filter(x => { return x.groupList.length > 0; });
 
                 // 获取项目列表
                 const subProjects = await ctx.service.subProject.getAllDataByCondition({ where: { project_id: projectId, is_delete: 0 } });