本文整理汇总了TypeScript中@eg/core/pcrud.service.PcrudService.retrieve方法的典型用法代码示例。如果您正苦于以下问题:TypeScript service.PcrudService.retrieve方法的具体用法?TypeScript service.PcrudService.retrieve怎么用?TypeScript service.PcrudService.retrieve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@eg/core/pcrud.service.PcrudService
的用法示例。
在下文中一共展示了service.PcrudService.retrieve方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getUser
getUser(id: number) {
this.pcrud.retrieve('au', id, {flesh: 1, flesh_fields: {au: ['settings']}})
.subscribe(user => {
this.user = user;
this.applyUserSettings();
});
}
示例2: ngOnInit
ngOnInit() {
this.pcrud.retrieve('vms', this.matchSetId)
.toPromise().then(ms => {
ms.owner(this.org.get(ms.owner()));
this.matchSet = ms;
});
}
示例3: getQueuedRecord
getQueuedRecord(): Promise<any> {
if (this.queuedRecord) {
return Promise.resolve('');
}
const idlClass = this.queueType === 'bib' ? 'vqbr' : 'vqar';
const flesh = {flesh: 1, flesh_fields: {}};
flesh.flesh_fields[idlClass] = ['matches'];
return this.pcrud.retrieve(idlClass, this.recordId, flesh)
.toPromise().then(rec => this.queuedRecord = rec);
}
示例4: getData
async getData(): Promise<any> {
return this.pcrud.retrieve('acp', this.copyId,
{flesh: 1, flesh_fields: {acp: ['call_number']}}).toPromise()
.then(copy => {
this.copy = copy;
return this.bib.getBibSummary(
copy.call_number().record()).toPromise();
}).then(summary => {
this.bibSummary = summary;
});
}
示例5: fetchHold
fetchHold() {
this.hold = null;
if (this.holdIds.length === 0) {
return;
} else if (this.isBatch()) {
// Use a dummy hold to store form values.
this.hold = this.idl.create('ahr');
} else {
// Form values are stored in the one hold we're editing.
this.pcrud.retrieve('ahr', this.holdIds[0])
.subscribe(hold => this.hold = hold);
}
}
示例6: getNextSessionTracker
getNextSessionTracker(id: number, observer: any) {
// No need for this to be an authoritative call.
// It will complete eventually regardless.
this.pcrud.retrieve('vst', id).subscribe(
tracker => {
if (tracker && tracker.state() === 'active') {
observer.next(tracker);
setTimeout(() =>
this.getNextSessionTracker(id, observer), 2000);
} else {
console.debug(
`Vandelay session tracker ${id} is ${tracker.state()}`);
observer.complete();
}
}
);
}