• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript csv-export.service.CsvExportService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中app/core/ui-services/csv-export.service.CsvExportService的典型用法代码示例。如果您正苦于以下问题:TypeScript service.CsvExportService类的具体用法?TypeScript service.CsvExportService怎么用?TypeScript service.CsvExportService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: exportStatutes

 /**
  * Export all statute paragraphs as CSV
  *
  * @param statute statute PParagraphs to export
  */
 public exportStatutes(statutes: ViewStatuteParagraph[]): void {
     const exportProperties: CsvColumnDefinitionProperty<ViewStatuteParagraph>[] = [
         { property: 'title' },
         { property: 'text' }
     ];
     this.csvExport.export(statutes, exportProperties, this.translate.instant('Statute') + '.csv');
 }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:12,代码来源:statute-csv-export.service.ts


示例2: exportMotionList

    /**
     * Export all motions as CSV
     *
     * @param motions Motions to export
     * @param contentToExport content properties to export
     */
    public exportMotionList(motions: ViewMotion[], contentToExport: string[]): void {
        const properties = sortMotionPropertyList(['identifier', 'title'].concat(contentToExport));
        const exportProperties: (
            | CsvColumnDefinitionProperty<ViewMotion>
            | CsvColumnDefinitionMap<ViewMotion>)[] = properties.map(option => {
            if (option === 'recommendation') {
                return {
                    label: 'recommendation',
                    map: motion => this.motionRepo.getExtendedRecommendationLabel(motion)
                };
            } else if (option === 'state') {
                return {
                    label: 'state',
                    map: motion => this.motionRepo.getExtendedStateLabel(motion)
                };
            } else if (option === 'motion_block') {
                return {
                    label: 'Motion block',
                    map: motion => (motion.motion_block ? motion.motion_block.getTitle() : '')
                };
            } else {
                return { property: option } as CsvColumnDefinitionProperty<ViewMotion>;
            }
        });

        this.csvExport.export(motions, exportProperties, this.translate.instant('Motions') + '.csv');
    }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:33,代码来源:motion-csv-export.service.ts


示例3: exportMotionList

    /**
     * Export all motions as CSV
     *
     * @param motions Motions to export
     * @param contentToExport content properties to export
     * @param infoToExport meta info to export
     */
    public exportMotionList(motions: ViewMotion[], contentToExport: string[], infoToExport: InfoToExport[]): void {
        const propertyList = ['identifier', 'title'].concat(contentToExport, infoToExport);
        const exportProperties: CsvColumnDefinitionProperty<ViewMotion>[] = propertyList.map(option => {
            return { property: option } as CsvColumnDefinitionProperty<ViewMotion>;
        });

        this.csvExport.export(motions, exportProperties, this.translate.instant('Motions') + '.csv');
    }
开发者ID:jwinzer,项目名称:OpenSlides,代码行数:15,代码来源:motion-csv-export.service.ts


示例4: exportDummyMotion

 public exportDummyMotion(): void {
     const headerRow = ['Identifier', 'Title', 'Text', 'Reason', 'Submitters', 'Category', 'Origin', 'Motion block'];
     const rows = [
         ['A1', 'Title 1', 'Text 1', 'Reason 1', 'Submitter A', 'Category A', 'Last Year Conference A', 'Block A'],
         ['B1', 'Title 2', 'Text 2', 'Reason 2', 'Submitter B', 'Category B', null, 'Block A'],
         [null, 'Title 3', 'Text 3', null, null, null, null, null]
     ];
     this.csvExport.dummyCSVExport(headerRow, rows, `${this.translate.instant('motions-example')}.csv`);
 }
开发者ID:emanuelschuetze,项目名称:OpenSlides,代码行数:9,代码来源:motion-csv-export.service.ts


示例5: exportDummyCSV

 /**
  * Exports a short example file
  */
 public exportDummyCSV(): void {
     const header = ['Title', 'Text'];
     const rows = [
         ['ยง1', 'This is the first section'],
         ['ยง1, A 3', 'This is another important aspect'],
         ['ยง2', 'Yet another']
     ];
     const filename = `${this.translate.instant('Statute')}-${this.translate.instant('example')}.csv`;
     this.csvExport.dummyCSVExport(header, rows, filename);
 }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:13,代码来源:statute-csv-export.service.ts


示例6: downloadCsvExample

 /**
  * Triggers an example csv download
  */
 public downloadCsvExample(): void {
     const headerRow = ['Title', 'Text', 'Duration', 'Comment', 'Internal item'];
     const rows = [
         ['Demo 1', 'Demo text 1', '1:00', 'test comment', null],
         ['Break', null, '0:10', null, 'internal', null],
         ['Demo 2', 'Demo text 2', '1:30', null, 'hidden']
     ];
     this.exporter.dummyCSVExport(
         headerRow,
         rows,
         `${this.translate.instant('Agenda')}-${this.translate.instant('example')}.csv`
     );
 }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:16,代码来源:agenda-import-list.component.ts


示例7: downloadCsvExample

 /**
  * Triggers an example csv download
  */
 public downloadCsvExample(): void {
     const headerRow = [
         'Title',
         'Given name',
         'Surname',
         'Structure level',
         'Participant number',
         'Groups',
         'Comment',
         'Is active',
         'Is present',
         'Is a committee',
         'Initial password',
         'Email'
     ];
     const rows = [
         [
             'Dr.',
             'Max',
             'Mustermann',
             'Berlin',
             1234567890,
             'Delegates, Staff',
             'xyz',
             1,
             1,
             ,
             'initialPassword',
             null
         ],
         [
             null,
             'John',
             'Doe',
             'Washington',
             '75/99/8-2',
             'Committees',
             'This is a comment, without doubt',
             1,
             1,
             null,
             null,
             '[email protected]'
         ],
         [null, 'Fred', 'Bloggs', 'London', null, null, null, null, null, null, null, null],
         [null, null, 'Executive Board', null, null, null, null, null, null, 1, null, null]
     ];
     this.exporter.dummyCSVExport(headerRow, rows, `${this.translate.instant('participants-example')}.csv`);
 }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:52,代码来源:user-import-list.component.ts


示例8: exportItemList

 /**
  * Export all Agendas as CSV
  *
  * @param Agendas Agendas to export
  */
 public exportItemList(items: ViewItem[]): void {
     this.csvExport.export(
         items,
         [
             { label: 'Title', map: viewItem => viewItem.getTitle() },
             {
                 label: 'Text',
                 map: viewItem => (viewItem.contentObject ? viewItem.contentObject.getCSVExportText() : '')
             },
             { label: 'Duration', property: 'duration' },
             { label: 'Comment', property: 'comment' },
             { label: 'Item type', property: 'verboseCsvType' }
         ],
         this.translate.instant('Agenda') + '.csv'
     );
 }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:21,代码来源:agenda-csv-export.service.ts


示例9: exportCallList

 /**
  * Exports the call list.
  *
  * @param motions All motions in the CSV. They should be ordered by callListWeight correctly.
  */
 public exportCallList(motions: ViewMotion[]): void {
     this.csvExport.export(
         motions,
         [
             { label: 'Called', map: motion => (motion.sort_parent_id ? '' : motion.identifierOrTitle) },
             { label: 'Called with', map: motion => (!motion.sort_parent_id ? '' : motion.identifierOrTitle) },
             { label: 'submitters', map: motion => motion.submitters.map(s => s.short_name).join(',') },
             { property: 'title' },
             {
                 label: 'recommendation',
                 map: motion => (motion.recommendation ? this.motionRepo.getExtendedRecommendationLabel(motion) : '')
             },
             { property: 'motion_block', label: 'Motion block' }
         ],
         this.translate.instant('Call list') + '.csv'
     );
 }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:22,代码来源:motion-csv-export.service.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript file-export.service.FileExportService类代码示例发布时间:2022-05-25
下一篇:
TypeScript config.service.ConfigService类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap