|
@@ -36,11 +36,11 @@ class PersonalService extends CrudService {
|
|
|
async dealQueryCondition({ role, code, ...condition } = {}) {
|
|
|
condition = this.util.dealQuery(condition);
|
|
|
// 查询业务管理
|
|
|
- const busFind = async query => await this.adminModel.find({ ...query, role: '3' }, { code });
|
|
|
+ const busFind = async query => await this.adminModel.find({ ...query, role: '3' }, { code: 1 });
|
|
|
// 查询机构管理
|
|
|
- const orgFind = async query => await this.adminModel.find({ ...query, role: '2' }, { code });
|
|
|
+ const orgFind = async query => await this.adminModel.find({ ...query, role: '2' }, { code: 1 });
|
|
|
// 查询管理员
|
|
|
- const aFind = async query => await this.adminModel.find({ ...query, role: '1' }, { code });
|
|
|
+ const aFind = async query => await this.adminModel.find({ ...query, role: '1' }, { code: 1 });
|
|
|
if (role === '1' && code) {
|
|
|
// 管理员查询
|
|
|
// =>获取该code下的机构管理员列表 => 用机构管理员id 获取业务管理员列表 => 将code都整理出来作为查询条件
|
|
@@ -67,7 +67,7 @@ class PersonalService extends CrudService {
|
|
|
} else {
|
|
|
// 超级管理员查询
|
|
|
// 将所有管理员的code都查出来做条件
|
|
|
- const allAdmin = await this.adminModel.find({}, { code });
|
|
|
+ const allAdmin = await this.adminModel.find({}, { code: 1 });
|
|
|
const codes = allAdmin.map(i => i.code);
|
|
|
condition.code = codes;
|
|
|
}
|