Explorar o código

过滤空单位

ellisran hai 3 meses
pai
achega
f5a793a866
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 } });