import { Component, Injector, ViewChild, ViewEncapsulation, Input, Output, EventEmitter, OnInit, AfterViewInit } from '@angular/core'; import { AppComponentBase } from '@shared/common/app-component-base'; import { TokenAuthServiceProxy } from '@shared/service-proxies/service-proxies'; import 'devexpress-reporting/dx-richedit'; import { AppSessionService } from '@shared/common/session/app-session.service'; import { AppConsts } from '@shared/AppConsts'; import { ActivatedRoute, Router } from '@angular/router'; import {Location} from '@angular/common'; import { appModuleAnimation } from '@shared/animations/routerTransition'; @Component({ selector: 'report-designer.component', encapsulation: ViewEncapsulation.None, templateUrl: './report-designer.component.html', animations: [appModuleAnimation()], styleUrls: [ "../../../../node_modules/jquery-ui/themes/base/all.css", "../../../../node_modules/devextreme/dist/css/dx.common.css", "../../../../node_modules/devextreme/dist/css/dx.light.css", "../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css", "../../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.light.css", "../../../../node_modules/@devexpress/analytics-core/dist/css/dx-querybuilder.css", "../../../../node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css", "../../../../node_modules/devexpress-reporting/dist/css/dx-reportdesigner.css", "./report-designer.component.less" ] }) export class ReportDesignerComponent extends AppComponentBase { getDesignerModelAction = "api/ReportDesignerClient/GetReportDesignerModel"; tenant = this._appSessionService.tenant; user = this._appSessionService.user; tenantId = this.tenant != undefined ? this.tenant.id : null; reportUrl: any; name: any; hostUrl = AppConsts.remoteServiceBaseUrl + '/'; //reportUrl: string = "XtraReport"; //invokeAction: string = 'CustomDocumentViewerController/Invoke'; //invokeAction: string = 'DXXRDV'; //hostUrl: string = "http://localhost:65302/"; constructor( injector: Injector, private _appSessionService: AppSessionService, private router: Router, private _location:Location, private route: ActivatedRoute ) { super(injector); } ngOnInit() { this.route.paramMap.subscribe(params => { this.name = params.get("name") }); if(this.name != null) { this.reportUrl = this.name + "/" + this.tenantId + "/" +this.user.id; } else { this.reportUrl = "StartReport" + "/" + this.tenantId + "/" +this.user.id; } } goBack(){ this._location.back(); } }