本文整理匯總了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();
}
}
);
}