|
|
|
@ -196,6 +196,7 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value |
|
|
|
|
this.canvasData.isChange = true |
|
|
|
|
this.canvas.refresh() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//动态属性素材布尔值框改变radio
|
|
|
|
@ -241,7 +242,6 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
dialogRef.afterClosed().subscribe(data=>{ });
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//上传素材图片
|
|
|
|
|
selectFile(e){ |
|
|
|
|
let imgFile = e.target.files[0] || null //上传的文件
|
|
|
|
@ -391,6 +391,7 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
ngAfterViewInit(): void { |
|
|
|
|
// 监听canvas组件选中素材事件
|
|
|
|
|
this.canvas.on("select",obj=>{ |
|
|
|
|
console.log(obj.assetData) |
|
|
|
|
//选中素材属性注入函数
|
|
|
|
|
this.setAssetsProperty(obj.assetData) |
|
|
|
|
}) |
|
|
|
@ -486,10 +487,11 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
}else{ |
|
|
|
|
//如果是单位 总平面图
|
|
|
|
|
if(this.checkedBuildingIndex==-1){ |
|
|
|
|
//保存平面图数据
|
|
|
|
|
this.http.post("/api/CompanyAccount/SitePlanData",SitePlanData).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -503,10 +505,11 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.snackBar.open('平面图数据保存失败','确定',config); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
//保存建筑数据
|
|
|
|
|
this.http.post("/api/CompanyAccount/CompanyData",CompanyData).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -523,9 +526,9 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
//批量保存单位毗邻
|
|
|
|
|
let CompanyAdjoins = this.canvasData.getCompanyAdjoinInfo() |
|
|
|
|
this.http.post("/api/CompanyAccount/CompanyAdjoins/Batch",CompanyAdjoins).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -538,12 +541,13 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.canvasData.isChange = true |
|
|
|
|
this.snackBar.open('单位毗邻保存失败','确定',config); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
//批量保存单位重点部位
|
|
|
|
|
let CompanyImportantLocations = this.canvasData.getCompanyImportantLocations() |
|
|
|
|
this.http.post("/api/CompanyAccount/CompanyImportantLocations/Batch",CompanyImportantLocations).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -556,12 +560,13 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.canvasData.isChange = true |
|
|
|
|
this.snackBar.open('单位重点部位保存失败','确定',config); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
//批量保存单位消防设施素材
|
|
|
|
|
let CompanyFacilityAssets = this.canvasData.getAllCompanyFacilityAssetInfo() |
|
|
|
|
this.http.post("/api/CompanyAccount/CompanyFacilityAssets/Batch",CompanyFacilityAssets).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -574,12 +579,14 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.canvasData.isChange = true |
|
|
|
|
this.snackBar.open('单位消防设施素材保存失败','确定',config); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}else{ //如果是建筑
|
|
|
|
|
|
|
|
|
|
//建筑平面图数据
|
|
|
|
|
this.http.post("/api/CompanyAccount/BuildingAreaData",SitePlanData).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -593,10 +600,11 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.snackBar.open('平面图数据保存失败','确定',config); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
//建筑数据
|
|
|
|
|
this.http.post("/api/CompanyAccount/BuildingData",CompanyData).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -613,9 +621,9 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
//批量保存建筑毗邻
|
|
|
|
|
let buildingAdjoins = this.canvasData.getBuildingAdjoinInfo() |
|
|
|
|
this.http.post(`/api/CompanyAccount/BuildingAdjoins/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingAdjoins).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -628,12 +636,13 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.canvasData.isChange = true |
|
|
|
|
this.snackBar.open('建筑毗邻保存失败','确定',config); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
//批量保存建筑重点部位
|
|
|
|
|
let buildingImportantLocations = this.canvasData.getBuildingImportantLocations() |
|
|
|
|
this.http.post(`/api/CompanyAccount/BuildingImportantLocations/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingImportantLocations).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -646,12 +655,13 @@ export class CollectionToolsComponent implements OnInit {
|
|
|
|
|
this.canvasData.isChange = true |
|
|
|
|
this.snackBar.open('建筑重点部位保存失败','确定',config); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
//批量保存建筑消防设施素材
|
|
|
|
|
let buildingFacilityAssets = this.canvasData.getAllBuildingFacilityAssetInfo() |
|
|
|
|
this.http.post(`/api/CompanyAccount/BuildingFacilityAssets/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingFacilityAssets).subscribe(data => { |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
this.saveNum.push("1") |
|
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
this.canvasData.isChange = false |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|