|
|
|
@ -5,7 +5,7 @@ import { BuildingBasicInfosService } from "src/app/service/babylon/building-basi
|
|
|
|
|
import { ObjectsService } from "src/app/service/objects.service"; |
|
|
|
|
import { InsitutionDataSimple } from "../model/data/institution/institution-data-simple"; |
|
|
|
|
import { AllMarkPlanData } from "../model/data/mark/mark-plan-data"; |
|
|
|
|
import { ModeManager } from "./mode-manager"; |
|
|
|
|
import { ModeManager, ModeType } from "./mode-manager"; |
|
|
|
|
|
|
|
|
|
//服务器通信
|
|
|
|
|
export class ServeManager { |
|
|
|
@ -95,7 +95,7 @@ export class ServeManager {
|
|
|
|
|
|
|
|
|
|
this.buildingBISrv.getMarkData(institutionID) |
|
|
|
|
.subscribe(data => { |
|
|
|
|
ModeManager.log(data); |
|
|
|
|
// ModeManager.log(data);
|
|
|
|
|
if (onSuccess) { |
|
|
|
|
onSuccess(institutionID, JSON.parse((data as any).result)); |
|
|
|
|
} |
|
|
|
@ -103,8 +103,14 @@ export class ServeManager {
|
|
|
|
|
if (error instanceof HttpErrorResponse) { |
|
|
|
|
if (error.status === 404) { |
|
|
|
|
ModeManager.log("没有标绘数据,新建:" + error.error); |
|
|
|
|
if (ModeManager.currentMode == ModeType.Edit) { |
|
|
|
|
onSuccess(institutionID, null); //data 为null ,表示新建
|
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
PlanComponent.instance.openSnackBar("暂无数据"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
if (onError) { |
|
|
|
|
onError(institutionID, error); |
|
|
|
@ -138,6 +144,7 @@ export class ServeManager {
|
|
|
|
|
} |
|
|
|
|
//PlanComponent.instance.openSnackBar("保存标绘信息成功");
|
|
|
|
|
// alert("保存标绘信息成功");
|
|
|
|
|
PlanComponent.instance.openSnackBar("保存成功"); |
|
|
|
|
|
|
|
|
|
//暂时没有失败的回调 onError
|
|
|
|
|
}) |
|
|
|
|