From 8a507c1523a1f6269559a98625dbed0ad039205d Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 13 Jan 2021 16:44:08 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84=E9=81=AE?= =?UTF-8?q?=E7=BD=A9=E5=B1=82=E4=B8=8D=E6=B6=88=E5=A4=B1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.ts | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 9cdbeaa..d4040f4 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -519,8 +519,9 @@ export class CollectionToolsComponent implements OnInit { //更新用于统计的数据 this.canvasData.updateBuildingData() - this.maskLayerService.sendMessage(true) + if (this.selectingSitePlan && this.selectingSitePlan.id) { + this.maskLayerService.sendMessage(true) this.saveNum = [] let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData)); SitePlanData.data = JSON.stringify(SitePlanData.data) @@ -546,6 +547,7 @@ export class CollectionToolsComponent implements OnInit { config.verticalPosition = 'top'; config.duration = 3000 this.snackBar.open('保存失败,毗邻存在相同方向','确定',config); + this.maskLayerService.sendMessage(false) return false }else{ //如果是单位 总平面图 @@ -562,6 +564,7 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 @@ -581,6 +584,7 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 @@ -601,11 +605,16 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.canvasData.isChange = true - this.snackBar.open('单位毗邻保存失败','确定',config); + if(err == 'infos 有重复方向!'){ + this.snackBar.open('单位毗邻同步失败,存在相同方向','确定',config); + }else{ + this.snackBar.open('单位毗邻同步失败','确定',config); + } }) //批量保存单位重点部位 @@ -621,11 +630,12 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.canvasData.isChange = true - this.snackBar.open('单位重点部位保存失败','确定',config); + this.snackBar.open('单位重点部位同步失败','确定',config); }) //批量保存单位消防设施素材 @@ -641,11 +651,12 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.canvasData.isChange = true - this.snackBar.open('单位消防设施素材保存失败','确定',config); + this.snackBar.open('单位消防设施素材同步失败','确定',config); }) }else{ //如果是建筑 @@ -662,6 +673,7 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 @@ -681,6 +693,7 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 @@ -701,11 +714,16 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.canvasData.isChange = true - this.snackBar.open('建筑毗邻保存失败','确定',config); + if(err == 'infos 有重复方向!'){ + this.snackBar.open('建筑毗邻同步失败,存在相同方向','确定',config); + }else{ + this.snackBar.open('建筑毗邻同步失败','确定',config); + } }) //批量保存建筑重点部位 @@ -721,11 +739,12 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.canvasData.isChange = true - this.snackBar.open('建筑重点部位保存失败','确定',config); + this.snackBar.open('建筑重点部位同步失败','确定',config); }) //批量保存建筑消防设施素材 @@ -741,11 +760,12 @@ export class CollectionToolsComponent implements OnInit { this.snackBar.open('保存成功','确定',config); } },err=>{ + this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.canvasData.isChange = true - this.snackBar.open('建筑消防设施素材保存失败','确定',config); + this.snackBar.open('建筑消防设施素材同步失败','确定',config); }) }