1
|
import {Injectable} from '@angular/core';
|
2
|
import {HttpClient} from "@angular/common/http";
|
3
|
import {timeout} from "rxjs/operators";
|
4
|
|
5
|
@Injectable()
|
6
|
export class HtmlProjectReportService {
|
7
|
|
8
|
constructor(private http: HttpClient ) {}
|
9
|
|
10
|
getHTML(id: string, requestType:string, csvAPIURL: string ):any {
|
11
|
let url = csvAPIURL;
|
12
|
url += '?format=html&type='+requestType+'&fq=(' +
|
13
|
//'((oaftype exact result) and (resulttypeid exact "'+resultTypeId+'")) and
|
14
|
'(relprojectid exact "'+id+'"))';
|
15
|
|
16
|
return this.http.get(url,{responseType: 'text'}).pipe(timeout(10000));
|
17
|
}
|
18
|
}
|