本文整理汇总了TypeScript中@eg/core/org.service.OrgService.ancestors方法的典型用法代码示例。如果您正苦于以下问题:TypeScript service.OrgService.ancestors方法的具体用法?TypeScript service.OrgService.ancestors怎么用?TypeScript service.OrgService.ancestors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@eg/core/org.service.OrgService
的用法示例。
在下文中一共展示了service.OrgService.ancestors方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
this.gridSource.getRows = (pager: Pager) => {
const orgs = this.org.ancestors(this.contextOrg, true);
return this.pcrud.search('vms', {owner: orgs}, {
order_by: {vms: ['name']},
limit: pager.limit,
offset: pager.offset
});
};
示例2: getItemImportDefs
getItemImportDefs(): Promise<IdlObject[]> {
if (this.importItemAttrDefs) {
return Promise.resolve(this.importItemAttrDefs);
}
const owners = this.org.ancestors(this.auth.user().ws_ou(), true);
return this.pcrud.search('viiad', {owner: owners}, {}, {atomic: true})
.toPromise().then(defs => {
this.importItemAttrDefs = defs;
return defs;
});
}
示例3: getMergeProfiles
getMergeProfiles(): Promise<IdlObject[]> {
if (this.mergeProfiles) {
return Promise.resolve(this.mergeProfiles);
}
const owners = this.org.ancestors(this.auth.user().ws_ou(), true);
return this.pcrud.search('vmp',
{owner: owners}, {order_by: {vmp: ['name']}}, {atomic: true})
.toPromise().then(profiles => {
this.mergeProfiles = profiles;
return profiles;
});
}
示例4: getBibTrashGroups
getBibTrashGroups(): Promise<any> {
if (this.bibTrashGroups) {
return Promise.resolve(this.bibTrashGroups);
}
const owners = this.org.ancestors(this.auth.user().ws_ou(), true);
return this.pcrud.search('vibtg',
{always_apply : 'f', owner: owners},
{vibtg : ['label']},
{atomic: true}
).toPromise().then(groups => {
this.bibTrashGroups = groups;
return groups;
});
}
示例5: getMatchSets
// todo: differentiate between biblio and authority a la queue api
getMatchSets(mtype: string): Promise<IdlObject[]> {
const mstype = mtype.match(/bib/) ? 'biblio' : 'authority';
if (this.matchSets[mtype]) {
return Promise.resolve(this.matchSets[mtype]);
} else {
this.matchSets[mtype] = [];
}
const owners = this.org.ancestors(this.auth.user().ws_ou(), true);
return this.pcrud.search('vms',
{owner: owners, mtype: mstype}, {}, {atomic: true})
.toPromise().then(sets => {
this.matchSets[mtype] = sets;
return sets;
});
}