当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript service.OrgService.get方法代码示例

本文整理汇总了TypeScript中@eg/core/org.service.OrgService.get方法的典型用法代码示例。如果您正苦于以下问题:TypeScript service.OrgService.get方法的具体用法?TypeScript service.OrgService.get怎么用?TypeScript service.OrgService.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@eg/core/org.service.OrgService的用法示例。


在下文中一共展示了service.OrgService.get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: createUrl

    createUrl(params: UnapiParams): string {
        const depth = params.depth || 0;
        const org = params.orgId ? this.org.get(params.orgId) : this.org.root();

        return `${UNAPI_PATH}${params.target}/${params.id}${params.extras}/` +
            `${org.shortname()}/${depth}&format=${params.format}`;
    }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:7,代码来源:unapi.service.ts

示例2: constructor

    constructor(
        private router: Router,
        private pcrud: PcrudService,
        private auth: AuthService,
        private org: OrgService) {

        this.gridSource = new GridDataSource();
        this.contextOrg = this.org.get(this.auth.user().ws_ou());

        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
            });
        };

        this.createNew = () => {
            this.editDialog.mode = 'create';
            this.editDialog.open({size: 'lg'}).then(
                ok => this.grid.reload(),
                err => {}
            );
        };

        this.deleteSelected = (matchSets: IdlObject[]) => {
            matchSets.forEach(matchSet => matchSet.isdeleted(true));
            this.pcrud.autoApply(matchSets).subscribe(
                val => console.debug('deleted: ' + val),
                err => {},
                ()  => this.grid.reload()
            );
        };
    }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:35,代码来源:match-set-list.component.ts

示例3: applyUrlParams

    applyUrlParams(context: CatalogSearchContext, params: ParamMap): void {

        // Reset query/filter args.  The will be reconstructed below.
        context.reset();

        // These fields can be copied directly into place
        ['format', 'sort', 'available', 'global', 'identQuery', 'identQueryType']
        .forEach(field => {
            const val = params.get(field);
            if (val !== null) {
                context[field] = val;
            }
        });

        if (params.get('limit')) {
            context.pager.limit = +params.get('limit');
        }

        if (params.get('offset')) {
            context.pager.offset = +params.get('offset');
        }

        ['query', 'fieldClass', 'joinOp', 'matchOp'].forEach(field => {
            const arr = params.getAll(field);
            if (arr && arr.length) {
                context[field] = arr;
            }
        });

        CATALOG_CCVM_FILTERS.forEach(code => {
            const val = params.get(code);
            if (val) {
                context.ccvmFilters[code] = val.split(/,/);
            } else {
                context.ccvmFilters[code] = [''];
            }
        });

        params.getAll('facets').forEach(blob => {
            const facet = JSON.parse(blob);
            context.addFacet(new FacetFilter(facet.c, facet.n, facet.v));
        });

        if (params.get('org')) {
            context.searchOrg = this.org.get(+params.get('org'));
        }
    }
开发者ID:jamesrf,项目名称:Evergreen,代码行数:47,代码来源:catalog-url.service.ts

示例4: getOrgName

 getOrgName(id: number) {
     if (id) {
         return this.org.get(id).shortname();
     }
 }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:5,代码来源:detail.component.ts

示例5: orgName

 orgName(orgId: number): string {
     return this.org.get(orgId).shortname();
 }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:3,代码来源:record.component.ts

示例6: applyUrlParams

    applyUrlParams(context: CatalogSearchContext, params: ParamMap): void {

        // Reset query/filter args.  The will be reconstructed below.
        context.reset();
        let val;

        if (params.get('org')) {
            context.searchOrg = this.org.get(+params.get('org'));
        }

        if (val = params.get('limit')) {
            context.pager.limit = +val;
        }

        if (val = params.get('offset')) {
            context.pager.offset = +val;
        }

        if (val = params.get('sort')) {
            context.sort = val;
        }

        if (val = params.get('global')) {
            context.global = val;
        }

        if (val = params.get('showBasket')) {
            context.showBasket = val;
        }

        if (params.get('marcValue')) {
            context.marcSearch.tags = params.getAll('marcTag');
            context.marcSearch.subfields = params.getAll('marcSubfield');
            context.marcSearch.values = params.getAll('marcValue');
        }

        if (params.get('identQuery')) {
            context.identSearch.value = params.get('identQuery');
            context.identSearch.queryType = params.get('identQueryType');
        }

        if (params.get('browseTerm')) {
            context.browseSearch.value = params.get('browseTerm');
            context.browseSearch.fieldClass = params.get('browseClass');
            if (params.has('browsePivot')) {
                context.browseSearch.pivot = +params.get('browsePivot');
            }
        }

        const ts = context.termSearch;

        // browseEntry and query searches may be facet-limited
        params.getAll('facets').forEach(blob => {
            const facet = JSON.parse(blob);
            ts.addFacet(new FacetFilter(facet.c, facet.n, facet.v));
        });

        if (params.has('hasBrowseEntry')) {

            ts.hasBrowseEntry = params.get('hasBrowseEntry');

        } else if (params.has('query')) {

            // Scalars
            ['format', 'available', 'date1', 'date2',
                'dateOp', 'groupByMetarecord', 'fromMetarecord']
            .forEach(field => {
                if (params.has(field)) {
                    ts[field] = params.get(field);
                }
            });

            // Arrays
            ['query', 'fieldClass', 'joinOp', 'matchOp'].forEach(field => {
                const arr = params.getAll(field);
                if (params.has(field)) {
                    ts[field] = params.getAll(field);
                }
            });

            CATALOG_CCVM_FILTERS.forEach(code => {
                const ccvmVal = params.get(code);
                if (ccvmVal) {
                    ts.ccvmFilters[code] = ccvmVal.split(/,/);
                } else {
                    ts.ccvmFilters[code] = [''];
                }
            });

            if (params.get('copyLocations')) {
                ts.copyLocations = params.get('copyLocations').split(/,/);
            }
        }
    }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:94,代码来源:catalog-url.service.ts

示例7:

 .toPromise().then(ms => {
     ms.owner(this.org.get(ms.owner()));
     this.matchSet = ms;
 });
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:4,代码来源:match-set.component.ts

示例8:

 id => this.staffCat.prefOrg = this.org.get(id)
开发者ID:jamesrf,项目名称:Evergreen,代码行数:1,代码来源:resolver.service.ts

示例9:

 ]).then(settings => {
     this.staffCat.defaultSearchOrg =
         this.org.get(settings['eg.search.search_lib']);
     this.staffCat.prefOrg =
         this.org.get(settings['eg.search.pref_lib']);
 });
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:6,代码来源:resolver.service.ts


注:本文中的@eg/core/org.service.OrgService.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。