|
|
@ -9,6 +9,7 @@ import {FlatTreeControl} from '@angular/cdk/tree'; |
|
|
|
import {WorkingAreaComponent} from '../../working-area/working-area.component' |
|
|
|
import {WorkingAreaComponent} from '../../working-area/working-area.component' |
|
|
|
import {CanvasShareDataService} from '../../canvas-share-data.service' //引入服务
|
|
|
|
import {CanvasShareDataService} from '../../canvas-share-data.service' //引入服务
|
|
|
|
import Viewer from 'viewerjs'; |
|
|
|
import Viewer from 'viewerjs'; |
|
|
|
|
|
|
|
import { MaskLayerService } from 'src/app/mask-layer.service'; |
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-collection-tools', |
|
|
|
selector: 'app-collection-tools', |
|
|
|
templateUrl: './collection-tools.component.html', |
|
|
|
templateUrl: './collection-tools.component.html', |
|
|
@ -18,7 +19,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
@ViewChild('canvas') canvas:WorkingAreaComponent; //父组件中获得子组件的引用
|
|
|
|
@ViewChild('canvas') canvas:WorkingAreaComponent; //父组件中获得子组件的引用
|
|
|
|
|
|
|
|
|
|
|
|
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private element: ElementRef,public canvasData: CanvasShareDataService) { } |
|
|
|
constructor(private maskLayerService:MaskLayerService, private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private element: ElementRef,public canvasData: CanvasShareDataService) { } |
|
|
|
// tree配置
|
|
|
|
// tree配置
|
|
|
|
private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数
|
|
|
|
private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数
|
|
|
|
return { |
|
|
|
return { |
|
|
@ -518,7 +519,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
//更新用于统计的数据
|
|
|
|
//更新用于统计的数据
|
|
|
|
this.canvasData.updateBuildingData() |
|
|
|
this.canvasData.updateBuildingData() |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(true) |
|
|
|
if (this.selectingSitePlan && this.selectingSitePlan.id) { |
|
|
|
if (this.selectingSitePlan && this.selectingSitePlan.id) { |
|
|
|
this.saveNum = [] |
|
|
|
this.saveNum = [] |
|
|
|
let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData)); |
|
|
|
let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData)); |
|
|
@ -553,6 +554,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post("/api/CompanyAccount/SitePlanData",SitePlanData).subscribe(data => { |
|
|
|
this.http.post("/api/CompanyAccount/SitePlanData",SitePlanData).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -571,6 +573,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post("/api/CompanyAccount/CompanyData",CompanyData).subscribe(data => { |
|
|
|
this.http.post("/api/CompanyAccount/CompanyData",CompanyData).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -590,6 +593,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post("/api/CompanyAccount/CompanyAdjoins/Batch",CompanyAdjoins).subscribe(data => { |
|
|
|
this.http.post("/api/CompanyAccount/CompanyAdjoins/Batch",CompanyAdjoins).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -609,6 +613,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post("/api/CompanyAccount/CompanyImportantLocations/Batch",CompanyImportantLocations).subscribe(data => { |
|
|
|
this.http.post("/api/CompanyAccount/CompanyImportantLocations/Batch",CompanyImportantLocations).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -628,6 +633,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post("/api/CompanyAccount/CompanyFacilityAssets/Batch",CompanyFacilityAssets).subscribe(data => { |
|
|
|
this.http.post("/api/CompanyAccount/CompanyFacilityAssets/Batch",CompanyFacilityAssets).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -648,6 +654,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post("/api/CompanyAccount/BuildingAreaData",SitePlanData).subscribe(data => { |
|
|
|
this.http.post("/api/CompanyAccount/BuildingAreaData",SitePlanData).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -666,6 +673,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post("/api/CompanyAccount/BuildingData",CompanyData).subscribe(data => { |
|
|
|
this.http.post("/api/CompanyAccount/BuildingData",CompanyData).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -685,6 +693,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post(`/api/CompanyAccount/BuildingAdjoins/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingAdjoins).subscribe(data => { |
|
|
|
this.http.post(`/api/CompanyAccount/BuildingAdjoins/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingAdjoins).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -704,6 +713,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post(`/api/CompanyAccount/BuildingImportantLocations/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingImportantLocations).subscribe(data => { |
|
|
|
this.http.post(`/api/CompanyAccount/BuildingImportantLocations/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingImportantLocations).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -723,6 +733,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.http.post(`/api/CompanyAccount/BuildingFacilityAssets/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingFacilityAssets).subscribe(data => { |
|
|
|
this.http.post(`/api/CompanyAccount/BuildingFacilityAssets/Batch?buildingId=${this.canvasData.selectStorey.buildingId}`,buildingFacilityAssets).subscribe(data => { |
|
|
|
this.saveNum.push("1") |
|
|
|
this.saveNum.push("1") |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
if(this.saveNum.length == 5){ |
|
|
|
|
|
|
|
this.maskLayerService.sendMessage(false) |
|
|
|
this.canvasData.isChange = false |
|
|
|
this.canvasData.isChange = false |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|