本文整理汇总了TypeScript中@eg/core/server-store.service.ServerStoreService类的典型用法代码示例。如果您正苦于以下问题:TypeScript service.ServerStoreService类的具体用法?TypeScript service.ServerStoreService怎么用?TypeScript service.ServerStoreService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了service.ServerStoreService类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: fetchSettings
fetchSettings(): Promise<any> {
const promises = [];
promises.push(
this.store.getItem('eg.search.search_lib').then(
id => this.staffCat.defaultSearchOrg = this.org.get(id)
)
);
promises.push(
this.store.getItem('eg.search.pref_lib').then(
id => this.staffCat.prefOrg = this.org.get(id)
)
);
return Promise.all(promises);
}
示例2: Error
saveGridConfig(): Promise<any> {
if (!this.persistKey) {
throw new Error('Grid persistKey required to save columns');
}
const conf = new GridPersistConf();
conf.version = 2;
conf.limit = this.pager.limit;
conf.columns = this.columnSet.compileSaveObject();
return this.store.setItem('eg.grid.' + this.persistKey, conf);
}
示例3: fetchSettings
fetchSettings(): Promise<any> {
return this.store.getItemBatch([
'eg.search.search_lib',
'eg.search.pref_lib'
]).then(settings => {
this.staffCat.defaultSearchOrg =
this.org.get(settings['eg.search.search_lib']);
this.staffCat.prefOrg =
this.org.get(settings['eg.search.pref_lib']);
});
}
示例4: printViaHatch
printViaHatch(printReq: PrintRequest) {
// Send a full HTML document to Hatch
const html = `<html><body>${printReq.text}</body></html>`;
this.serverStore.getItem(`eg.print.config.${printReq.printContext}`)
.then(config => {
const msg = new HatchMessage({
action: 'print',
content: html,
settings: config || {},
contentType: 'text/html',
showDialog: printReq.showDialog
});
this.hatch.sendRequest(msg).then(
ok => console.debug('Print request succeeded'),
err => console.warn('Print request failed', err)
);
});
}
示例5: getGridConfig
getGridConfig(persistKey: string): Promise<GridPersistConf> {
if (!persistKey) { return Promise.resolve(null); }
return this.store.getItem('eg.grid.' + persistKey);
}