Browse Source

[完善] 消防素材完善, 版本号报错修正

develop
陈鹏飞 4 years ago
parent
commit
c7e14ae5ba
  1. 6
      src/app/ui/collection-tools/collection-tools.component.ts
  2. 4
      src/app/working-area/working-area.component.ts

6
src/app/ui/collection-tools/collection-tools.component.ts

@ -596,9 +596,8 @@ export class CollectionToolsComponent implements OnInit {
data.forEach(element => {
element.isTemplate = true //添加模板标识
element.isLook = true //添加是否可见标识
// element.isLookPattern = false
element.name!='其他'? element.children = [] : element.children
element.children? element.children : element.children = []
if(storeyData){
for(let key in storeyData.data){
if(element.id == storeyData.data[key].FireElementId){
@ -681,7 +680,8 @@ export class CollectionToolsComponent implements OnInit {
this.canvas.refresh()
this.canvasData.isChange = false //服务中 数据是否改动 改为false
this.isShowProperty = true
this.isShowAttribute = true //属性栏展示 默认数据
this.isShowAttribute = true
this.allFireElements[this.allFireElements.length-1].children = []
let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id
let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据

4
src/app/working-area/working-area.component.ts

@ -262,7 +262,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
public versionChecking(): void {
const floorData = this.canvasData.originaleveryStoreyData;
const buildingData = this.canvasData.originalcompanyBuildingData;
if (floorData.version === '1.0') {
if (floorData.version && floorData.version === '1.0') {
floorData.version = '2.0';
Object.keys(floorData.data).forEach(item => {
floorData.data[item].Point.y *= -1;
@ -271,7 +271,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
});
});
}
if (buildingData.version === '1.0') {
if (buildingData.version && buildingData.version === '1.0') {
buildingData.version = '2.0';
Object.keys(buildingData.data).forEach(item => {
buildingData.data[item].Point.y *= -1;

Loading…
Cancel
Save