|
|
|
@ -33,9 +33,9 @@ export class ServeManager {
|
|
|
|
|
) => void, onError?: (key: string, error: any) => void) { |
|
|
|
|
this.buildingBISrv.getBuildingBasicInfos(key) |
|
|
|
|
.subscribe(data => { |
|
|
|
|
|
|
|
|
|
console.log("获取结果" + key, (data as any).result); |
|
|
|
|
if (onSuccess) { |
|
|
|
|
onSuccess(key, data); |
|
|
|
|
onSuccess(key, JSON.parse((data as any).result)); |
|
|
|
|
} |
|
|
|
|
}, error => { |
|
|
|
|
console.error("From serve" + key + "===" + error); |
|
|
|
@ -49,14 +49,14 @@ export class ServeManager {
|
|
|
|
|
saveInstitutionData(institutionData: any, key: string = 'test', onSuccess?: (key: string, |
|
|
|
|
result: string |
|
|
|
|
) => void, onError?: (key: string, error: string) => void) { |
|
|
|
|
let data = classToPlain(institutionData); |
|
|
|
|
let l_data = classToPlain(institutionData); |
|
|
|
|
|
|
|
|
|
console.log("保存单位", data); |
|
|
|
|
this.buildingBISrv.postBuildingBasicInfos(key, data) |
|
|
|
|
console.log("保存单位", l_data); |
|
|
|
|
this.buildingBISrv.postBuildingBasicInfos(key, l_data) |
|
|
|
|
.subscribe(data => { |
|
|
|
|
ModeManager.log("保存单位成功:" + key); |
|
|
|
|
console.log("保存单位成功:" + key, l_data); |
|
|
|
|
if (onSuccess) { |
|
|
|
|
onSuccess(key, data); |
|
|
|
|
onSuccess(key, data.result); |
|
|
|
|
} |
|
|
|
|
if (key != "InsList") { |
|
|
|
|
//ThreeDimensionalHomeComponent.instance.openSnackBar("保存单位成功");
|
|
|
|
@ -96,7 +96,7 @@ export class ServeManager {
|
|
|
|
|
.subscribe(data => { |
|
|
|
|
ModeManager.log(data); |
|
|
|
|
if (onSuccess) { |
|
|
|
|
onSuccess(institutionID, data); |
|
|
|
|
onSuccess(institutionID, JSON.parse((data as any).result)); |
|
|
|
|
} |
|
|
|
|
}, (error) => { |
|
|
|
|
if (error instanceof HttpErrorResponse) { |
|
|
|
@ -133,7 +133,7 @@ export class ServeManager {
|
|
|
|
|
.subscribe(data => { |
|
|
|
|
ModeManager.log("保存标绘信息成功:" + allMarkPlanData.institutionID); |
|
|
|
|
if (onSuccess) { |
|
|
|
|
onSuccess(allMarkPlanData.institutionID, data); |
|
|
|
|
onSuccess(allMarkPlanData.institutionID, data.result); |
|
|
|
|
} |
|
|
|
|
// ThreeDimensionalHomeComponent.instance.openSnackBar("保存标绘信息成功");
|
|
|
|
|
// alert("保存标绘信息成功");
|
|
|
|
|