浏览代码

人员列表过滤掉非单位负责人

yuwenfen 4 年之前
父节点
当前提交
c52635419c
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      pages/mission-action/components/personnel.vue

+ 8 - 1
pages/mission-action/components/personnel.vue

@@ -106,7 +106,14 @@
 					}
 				}).then(data => {
 					if(data) {
-            this.empDeptList = data || [];
+            let _empDeptList = data.map(item1 => {
+              return {
+                ...item1,
+                responseList: item1.responseList ?  item1.responseList.filter(item2 => item2.deptManage == 1) : []
+              }
+            }) || [];
+            _empDeptList = _empDeptList.filter(item => item.responseList.length > 0);
+            this.empDeptList = _empDeptList || [];
           }
 				});
 			}