本文整理匯總了TypeScript中@eg/core/pcrud.service.PcrudService.retrieveAll方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript service.PcrudService.retrieveAll方法的具體用法?TypeScript service.PcrudService.retrieveAll怎麽用?TypeScript service.PcrudService.retrieveAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@eg/core/pcrud.service.PcrudService
的用法示例。
在下文中一共展示了service.PcrudService.retrieveAll方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ngOnInit
ngOnInit() {
this.pcrud.retrieveAll('crad', {order_by: {crad: 'label'}})
.subscribe(attr => {
this.bibAttrDefs.push(attr);
this.bibAttrDefEntries.push({id: attr.name(), label: attr.label()});
});
}
示例2: getCopyStatuses
getCopyStatuses(): Promise<any> {
if (this.copyStatuses) {
return Promise.resolve(this.copyStatuses);
}
return this.pcrud.retrieveAll('ccs', {}, {atomic: true})
.toPromise().then(stats => {
this.copyStatuses = stats;
return stats;
});
}
示例3: open
open(args: NgbModalOptions): Promise<boolean> {
if (this.cancelReasons.length === 0) {
this.pcrud.retrieveAll('ahrcc', {}, {atomic: true}).toPromise()
.then(reasons => {
this.cancelReasons =
reasons.map(r => ({id: r.id(), label: r.label()}));
});
}
return super.open(args);
}
示例4: getBibSources
getBibSources(): Promise<IdlObject[]> {
if (this.bibSources) {
return Promise.resolve(this.bibSources);
}
return this.pcrud.retrieveAll('cbs',
{order_by: {cbs: 'id'}},
{atomic: true}
).toPromise().then(sources => {
this.bibSources = sources;
return sources;
});
}
示例5: getAttrDefs
getAttrDefs(dtype: string): Promise<IdlObject[]> {
if (this.attrDefs[dtype]) {
return Promise.resolve(this.attrDefs[dtype]);
}
const cls = (dtype === 'bib') ? 'vqbrad' : 'vqarad';
const orderBy = {};
orderBy[cls] = 'id';
return this.pcrud.retrieveAll(cls,
{order_by: orderBy}, {atomic: true}).toPromise()
.then(list => {
this.attrDefs[dtype] = list;
return list;
});
}