當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。