沈斌
2017-12-18 48df4c700b3190c8f3868da6cce7c98fce75f7c5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const list = [];
 
for (let i = 0; i < 50; i += 1) {
  list.push({
    key: i,
    disabled: false,
    name: '用户' + (i + 1),
    sex: ['男', '女'][i % 2],
    mobile: 13713713777 + i,
    email: `test_${i + 1}@test.com`,
    weixin: 'test',
    password: 'ISGMyneATSuhkiwz4BURBQ==',
    organization: '组织' + (i + 1),
    nickname:  '昵称' + (i + 1),
    updatedAt: new Date(`2017-07-${Math.floor(i / 2) + 1}`)
  });
}
 
export function getInstaller(params: any) {
  let ret = [...list];
  if (params.u_name) {
    ret = ret.filter(data => data.name.indexOf(params.u_name) > -1);
  }
  if (params.u_mobile) {
    ret = ret.filter(data => data.mobile.toString().indexOf(params.u_mobile) > -1);
  }
  return ret;
}