Browse Source

[完善]取消选中素材是属性栏清空

develop
邵佳豪 4 years ago
parent
commit
26912aab07
  1. 4
      src/app/ui/collection-tools/collection-tools.component.html
  2. 30
      src/app/ui/collection-tools/collection-tools.component.ts

4
src/app/ui/collection-tools/collection-tools.component.html

@ -154,7 +154,7 @@
</div>
</div>
<!-- 平面图属性 -->
<div class="siteproperty" style="user-select: none" *ngIf="isShowAttribute">
<div class="siteproperty" style="user-select: none" *ngIf="isShowProperty && isShowAttribute">
<p>面积(平方米)</p>
<div class="siteproperty_size">{{canvasData.selectStorey.area}}</div>
<p>详情</p>
@ -163,7 +163,7 @@
</div>
</div>
<!-- 素材属性 -->
<div class="assetsproperty" style="user-select: none" *ngIf="!isShowAttribute">
<div class="assetsproperty" style="user-select: none" *ngIf="isShowProperty && !isShowAttribute">
<h3 style="text-align: center;font-weight: 900;">{{assetName}}</h3>
<p>宽度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetWidth" (input)="assetWidthIunput()">

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

@ -244,6 +244,7 @@ export class CollectionToolsComponent implements OnInit {
isImgNumCss = false //控制上传文件input显隐
mySwiper:any //轮播图实例
setAssetsProperty(obj){
this.isShowProperty = true
this.isShowAttribute = false
let _this = this
this.imagesArr = []
@ -333,19 +334,16 @@ export class CollectionToolsComponent implements OnInit {
assetWidthIunput(){
this.canvasAssetObj.Width = this.assetWidth
// 需要将this.canvasAssetObj替换到serves服务对应对象中 ↓↓↓↓↓↓↓
}
//素材高度输入框改变
assetHeightIunput(){
this.canvasAssetObj.Height = this.assetHeight
}
//素材角度输入框改变
assetAngleIunput(){
this.canvasAssetObj.Angle = this.sliderValue
}
//素材是否高亮改变----->本地操作行为
@ -359,7 +357,6 @@ export class CollectionToolsComponent implements OnInit {
return i.PropertyName == item.PropertyName
})
this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value
}
//动态属性素材布尔值框改变radio
@ -449,7 +446,6 @@ export class CollectionToolsComponent implements OnInit {
}
//此处需要把 this.canvasAssetObj这个传入对象 返回给canvas 或者在源数据中替换掉↓↓↓↓↓↓↓↓↓↓
})
} else if (file && fileSize>shardSize) { //上传文件>5MB时,分块上传
let config = new MatSnackBarConfig();
@ -487,7 +483,6 @@ export class CollectionToolsComponent implements OnInit {
this.mySwiper.update();
}, 0);
//此处需要把 this.canvasAssetObj这个传入对象 返回给canvas ↓↓↓↓↓↓↓↓↓↓
}
}
@ -497,7 +492,6 @@ export class CollectionToolsComponent implements OnInit {
return i.PropertyName == item.PropertyName
})
this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value
}
//动态属性供给区域select选择框
@ -521,24 +515,21 @@ export class CollectionToolsComponent implements OnInit {
this.getAllLibrary()
this.getSitePlan()
this.getAllBuildings()
setTimeout(() => {
// console.log(1,this.canvasData.selectStorey)
// console.log(2,this.canvasData.originalcompanyBuildingData)
// console.log(3,this.canvasData.originaleveryStoreyData)
}, 3000);
// this.setAssetsProperty(this.proObject) //测试
// console.log(1,this.canvasData.selectStorey)
// console.log(2,this.canvasData.originalcompanyBuildingData)
// console.log(3,this.canvasData.originaleveryStoreyData)
}
ngAfterViewInit(): void {
// 监听canvas组件选中素材事件
this.canvas.on("select",obj=>{
console.log(99999999999,obj)
//选中素材属性注入函数
this.setAssetsProperty(obj.assetData)
console.log(obj.assetData)
})
// 监听canvas组件取消选中素材事件
this.canvas.on("deselect ",obj=>{
console.log(99999999999,obj)
this.canvas.on("deselect",obj=>{
this.isShowProperty = false
})
}
//点击基本信息名称
@ -737,6 +728,7 @@ export class CollectionToolsComponent implements OnInit {
renovateTreeData () {
this.canvas.refresh()
this.canvasData.isChange = false //服务中 数据是否改动 改为false
this.isShowProperty = true
this.isShowAttribute = true //属性栏展示 默认数据
let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id
@ -757,7 +749,9 @@ export class CollectionToolsComponent implements OnInit {
//陈鹏飞↓↓↓
//陈鹏飞↓↓↓
allFireElements:any = []; //当前 单位/建筑 下的消防要素
isShowAttribute:boolean = true; //属性栏 是否显示 默认数据
isShowProperty:boolean = false //属性栏 是否有东西
toggleExpandPanel:boolean = false; //可展开面板展开或关闭
togglePlane:boolean = true; //可展开面板平面图 显隐

Loading…
Cancel
Save