|
|
|
@ -11,6 +11,13 @@ export class BuildingBasicInfosService {
|
|
|
|
|
readonly c_get = "/Get"; |
|
|
|
|
readonly c_post = "/PostOrPut"; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通用消息头 |
|
|
|
|
*/ |
|
|
|
|
headers = { |
|
|
|
|
"Content-Type": "application/json" |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//获取单位信息的api
|
|
|
|
|
baseUrl = 'api/Services/3D/BuildingBasicInfo'; |
|
|
|
|
|
|
|
|
@ -20,6 +27,7 @@ export class BuildingBasicInfosService {
|
|
|
|
|
markUrl = "api/Services/3D/Sandboxie"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor( |
|
|
|
|
private http: HttpClient |
|
|
|
|
) { } |
|
|
|
@ -38,9 +46,11 @@ export class BuildingBasicInfosService {
|
|
|
|
|
postBuildingBasicInfos(name: string, data: any): Observable<any> { |
|
|
|
|
let params = { |
|
|
|
|
name: name, |
|
|
|
|
// content: JSON.stringify(data),
|
|
|
|
|
} |
|
|
|
|
return this.http.post<any>(this.baseUrl + this.c_post, (data), { params }) |
|
|
|
|
|
|
|
|
|
let instance = this; |
|
|
|
|
|
|
|
|
|
return this.http.post<any>(this.baseUrl + this.c_post, `'${JSON.stringify(data)}'`, { instance.headers, params }) |
|
|
|
|
.pipe( |
|
|
|
|
catchError((err) => this.handleError(err)) |
|
|
|
|
); |
|
|
|
|