|
@@ -45,6 +45,13 @@ export class PageUserComponent implements OnInit {
|
|
|
{ value: '教师', text: '教师' },
|
|
|
],
|
|
|
},
|
|
|
+ accountState: {
|
|
|
+ listOfFilter: [
|
|
|
+ { value: '已认证', text: '已认证' },
|
|
|
+ { value: '待认证', text: '待认证' },
|
|
|
+ { value: '已禁用', text: '已禁用' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
companyType: {
|
|
|
listOfFilter: [
|
|
|
{ value: '教育部直属高校', text: '教育部直属高校' },
|
|
@@ -92,8 +99,9 @@ export class PageUserComponent implements OnInit {
|
|
|
parents: Array<any> = []; //所有一级列表
|
|
|
//筛选条件
|
|
|
filters: any = {
|
|
|
- identity: { type: 'string', value: [] },
|
|
|
- companyType: { type: 'string', value: [] },
|
|
|
+ identity: { type: 'profile', value: [] },
|
|
|
+ companyType: { type: 'profile', value: [] },
|
|
|
+ accountState: { type: 'user', value: [] },
|
|
|
};
|
|
|
constructor(
|
|
|
public tbookSer: textbookServer,
|
|
@@ -156,17 +164,25 @@ export class PageUserComponent implements OnInit {
|
|
|
let childrens = await this.tbookSer.getChild(
|
|
|
this.tbookSer.profile.user.department?.objectId
|
|
|
);
|
|
|
- this.tbookSer.profile.user.department;
|
|
|
+ // this.tbookSer.profile.user.department;
|
|
|
queryParams['where']['$or'][0]['user']['$inQuery']['where'][
|
|
|
'department'
|
|
|
] = {
|
|
|
- $in: [childrens],
|
|
|
+ $in: childrens,
|
|
|
};
|
|
|
}
|
|
|
+ for (const key in this.filters) {
|
|
|
+ const element = this.filters[key];
|
|
|
+ if (element.type == 'user' && element.value?.length > 0) {
|
|
|
+ queryParams['where']['$or'][0]['user']['$inQuery']['where'][key] = {
|
|
|
+ $in: element.value,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
let query = Parse.Query.fromJSON('Profile', queryParams);
|
|
|
for (const key in this.filters) {
|
|
|
const element = this.filters[key];
|
|
|
- if (element.value?.length > 0) {
|
|
|
+ if (element.type == 'profile' && element.value?.length > 0) {
|
|
|
query.containedIn(key, element.value);
|
|
|
}
|
|
|
}
|