|
|
@ -6,7 +6,7 @@ import {leftFunctionalDomainComponent,editPlaneFigureComponent,editDisposalNodeC |
|
|
|
import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree'; |
|
|
|
import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree'; |
|
|
|
import {FlatTreeControl} from '@angular/cdk/tree'; |
|
|
|
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, DisposalNodeData} from '../../canvas-share-data.service' //引入服务
|
|
|
|
import Viewer from 'viewerjs'; |
|
|
|
import Viewer from 'viewerjs'; |
|
|
|
import Swiper from 'swiper'; |
|
|
|
import Swiper from 'swiper'; |
|
|
|
import { saveOneDialog } from './save'; |
|
|
|
import { saveOneDialog } from './save'; |
|
|
@ -157,8 +157,11 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
if (!this.pattern) { |
|
|
|
if (!this.pattern) { |
|
|
|
this.pattern = true |
|
|
|
this.pattern = true |
|
|
|
this.canvasData.gameMode = GameMode.BasicInformation |
|
|
|
this.canvasData.gameMode = GameMode.BasicInformation |
|
|
|
|
|
|
|
this.canvasData.selectPanelPoint = new DisposalNodeData(); |
|
|
|
this.mateDeleteCustomize() |
|
|
|
this.mateDeleteCustomize() |
|
|
|
this.getAllLibrary() |
|
|
|
this.getAllLibrary() |
|
|
|
|
|
|
|
this.checkedBuildingIndex = -1 |
|
|
|
|
|
|
|
this.getSitePlan() //总平面图一层
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1237,7 +1240,6 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
isRefresh? await this.canvas.refresh() : null |
|
|
|
isRefresh? await this.canvas.refresh() : null |
|
|
|
this.canvas.setNameVisible(this.basicInfo,0) |
|
|
|
this.canvas.setNameVisible(this.basicInfo,0) |
|
|
|
this.canvas.setNameVisible(this.wantToWork,1) |
|
|
|
this.canvas.setNameVisible(this.wantToWork,1) |
|
|
|
// this.canvasData.selectPanelPoint.Data = {}
|
|
|
|
|
|
|
|
isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false
|
|
|
|
isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false
|
|
|
|
isRefresh? this.isShowProperty = true : null |
|
|
|
isRefresh? this.isShowProperty = true : null |
|
|
|
isRefresh? this.isShowAttribute = true : null |
|
|
|
isRefresh? this.isShowAttribute = true : null |
|
|
@ -1413,7 +1415,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
selectSitePlan (item,index) { |
|
|
|
selectSitePlan (item,index) { |
|
|
|
|
|
|
|
|
|
|
|
if (this.selectSitePlanIndex != index) { |
|
|
|
if (this.selectSitePlanIndex != index) { |
|
|
|
|
|
|
|
this.canvasData.selectPanelPoint = new DisposalNodeData(); |
|
|
|
if (this.canvasData.isChange) { //true 数据被改动
|
|
|
|
if (this.canvasData.isChange) { //true 数据被改动
|
|
|
|
let isTrue = confirm('是否保存当前编辑数据') |
|
|
|
let isTrue = confirm('是否保存当前编辑数据') |
|
|
|
if (isTrue) { //先保存数据 在切换
|
|
|
|
if (isTrue) { //先保存数据 在切换
|
|
|
@ -1892,8 +1894,6 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sitePlanIcon = {fire:0,force:0} // 总平面图 火源/力量 图标 是否展示
|
|
|
|
sitePlanIcon = {fire:0,force:0} // 总平面图 火源/力量 图标 是否展示
|
|
|
|
sitePlanBuildingID:string = ''; //选择 数据节点对应建筑 火源/力量图标
|
|
|
|
|
|
|
|
storeyID:string = ''; //选择 数据节点对应楼层 火源/力量图标
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//刷新 建筑楼层 匹配 火源/力量 图标
|
|
|
|
//刷新 建筑楼层 匹配 火源/力量 图标
|
|
|
|
mateFireForce () { |
|
|
|
mateFireForce () { |
|
|
@ -1916,13 +1916,35 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
data[key].forceCount != 0? this.sitePlanIcon.force=1 : this.sitePlanIcon.force=0 |
|
|
|
data[key].forceCount != 0? this.sitePlanIcon.force=1 : this.sitePlanIcon.force=0 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let buildingMSG = this.canvasData.allNodeMarkers.highlightMarkers || {} |
|
|
|
|
|
|
|
for (let key in buildingMSG) { |
|
|
|
|
|
|
|
if (key === this.canvasData.selectPanelPoint.DisposalNodeId) { |
|
|
|
|
|
|
|
for (let keys in buildingMSG[key]) { |
|
|
|
|
|
|
|
this.sitePlanData.forEach(element => { //楼层
|
|
|
|
|
|
|
|
if (element.id === keys) { |
|
|
|
|
|
|
|
buildingMSG[key][keys].fireCount != 0? element.fire=2 : null |
|
|
|
|
|
|
|
buildingMSG[key][keys].forceCount != 0? element.force=2 : null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.allBuildings.forEach(element => { //建筑
|
|
|
|
|
|
|
|
if (element.id === keys) { // 相匹配时
|
|
|
|
|
|
|
|
buildingMSG[key][keys].fireCount != 0? element.fire=2 : null |
|
|
|
|
|
|
|
buildingMSG[key][keys].forceCount != 0? element.force=2 : null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (this.params.companyId === keys) { //总平面图时
|
|
|
|
|
|
|
|
buildingMSG[key][keys].fireCount != 0? this.sitePlanIcon.fire=2 : null |
|
|
|
|
|
|
|
buildingMSG[key][keys].forceCount != 0? this.sitePlanIcon.force=2 : null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 切换 基本信息时 刷新 删除 建筑楼层 自定义属性
|
|
|
|
// 切换 基本信息时 刷新 删除 建筑楼层 自定义属性
|
|
|
|
mateDeleteCustomize () { |
|
|
|
mateDeleteCustomize () { |
|
|
|
this.defaultExpandedKeys = [] |
|
|
|
this.defaultExpandedKeys = [] |
|
|
|
this.sitePlanBuildingID = '' |
|
|
|
|
|
|
|
this.storeyID = '' |
|
|
|
|
|
|
|
this.sitePlanIcon = {fire:0,force:0} |
|
|
|
this.sitePlanIcon = {fire:0,force:0} |
|
|
|
this.sitePlanData.forEach(element => { //楼层
|
|
|
|
this.sitePlanData.forEach(element => { //楼层
|
|
|
|
delete element.fire |
|
|
|
delete element.fire |
|
|
@ -1940,8 +1962,6 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
let params = {disasterId: this.allFirePlan[0].id || ''} |
|
|
|
let params = {disasterId: this.allFirePlan[0].id || ''} |
|
|
|
this.http.get('/api/DisasterData/Diffs',{params:params}).subscribe(data=>{ |
|
|
|
this.http.get('/api/DisasterData/Diffs',{params:params}).subscribe(data=>{ |
|
|
|
this.canvasData.allNodeMarkers = data |
|
|
|
this.canvasData.allNodeMarkers = data |
|
|
|
this.sitePlanBuildingID = '' |
|
|
|
|
|
|
|
this.storeyID = '' |
|
|
|
|
|
|
|
this.mateFireForce() |
|
|
|
this.mateFireForce() |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -2034,10 +2054,8 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
} else if (e.buildingAreaId || e.sitePlanId) { //当前节点 是 数据节点 时
|
|
|
|
} else if (e.buildingAreaId || e.sitePlanId) { //当前节点 是 数据节点 时
|
|
|
|
let msg = this.canvasData.findDisposalNode(e.parentId) |
|
|
|
let msg = this.canvasData.findDisposalNode(e.parentId) |
|
|
|
this.canvasData.selectPanelPointBaseData = msg |
|
|
|
this.canvasData.selectPanelPointBaseData = msg |
|
|
|
|
|
|
|
|
|
|
|
e.sitePlanId? this.sitePlanBuildingID = this.params.companyId : this.sitePlanBuildingID = e.buildingId //火源/力量图标高亮
|
|
|
|
|
|
|
|
e.sitePlanId? this.storeyID = e.sitePlanId : this.storeyID = e.buildingAreaId //火源/力量图标高亮
|
|
|
|
|
|
|
|
this.selectDisposalNode = e.parentId //选中 节点
|
|
|
|
this.selectDisposalNode = e.parentId //选中 节点
|
|
|
|
|
|
|
|
|
|
|
|
if (this.canvasData.selectPanelPoint.DisposalNodeId != e.id) { //选择节点 不是当前节点时
|
|
|
|
if (this.canvasData.selectPanelPoint.DisposalNodeId != e.id) { //选择节点 不是当前节点时
|
|
|
|
let params = {nodeId: e.id} |
|
|
|
let params = {nodeId: e.id} |
|
|
|
let parameter = { //查询 节点 对应 建筑/楼层 index,id
|
|
|
|
let parameter = { //查询 节点 对应 建筑/楼层 index,id
|
|
|
@ -2045,8 +2063,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
storeyId: e.sitePlanId? e.sitePlanId : e.buildingAreaId, //楼层id
|
|
|
|
storeyId: e.sitePlanId? e.sitePlanId : e.buildingAreaId, //楼层id
|
|
|
|
} |
|
|
|
} |
|
|
|
this.http.get('/api/DisposalNodeData',{params:params}).subscribe(data=>{ |
|
|
|
this.http.get('/api/DisposalNodeData',{params:params}).subscribe(data=>{ |
|
|
|
console.log(12121,data) |
|
|
|
this.canvasData.selectPanelPoint = this.canvasData.deserialize(JSON.stringify(data || new DisposalNodeData())) //选择 当前 节点
|
|
|
|
this.canvasData.selectPanelPoint = this.canvasData.deserialize(JSON.stringify(data)) //选择 当前 节点
|
|
|
|
|
|
|
|
this.canvasData.selectPanelPoint.Data = this.canvasData.deserialize(this.canvasData.selectPanelPoint.Data) |
|
|
|
this.canvasData.selectPanelPoint.Data = this.canvasData.deserialize(this.canvasData.selectPanelPoint.Data) |
|
|
|
this.seekPanelPoint(parameter) |
|
|
|
this.seekPanelPoint(parameter) |
|
|
|
}) |
|
|
|
}) |
|
|
|