Browse Source

[完善]平面图列表增加滚动

master
邵佳豪 3 years ago
parent
commit
1a4f690baf
  1. 2
      src/app/ui/basicinfo/basicinfo.component.ts
  2. 6
      src/app/ui/collection-tools/collection-tools.component.html
  3. 19
      src/app/ui/collection-tools/collection-tools.component.ts
  4. 3
      src/app/ui/collection-tools/panel.scss

2
src/app/ui/basicinfo/basicinfo.component.ts

@ -93,7 +93,7 @@ export class BasicinfoComponent implements OnInit {
this.getUnitAllBuildings()//获得单位下所有建筑
if (sessionStorage.getItem('isDefaultPassword') == 'true') {
let dialogRef = this.dialog.open(ChangepasswordComponent2,
{ width: '268px' });
{ width: '368px' });
dialogRef.afterClosed().subscribe((data) => {
sessionStorage.setItem('isDefaultPassword', 'false')

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

@ -82,9 +82,9 @@
<mat-icon (click)='foundPanel($event)'>add</mat-icon>
</label>
</div>
<div [hidden]="!togglePlane" >
<div [hidden]="!togglePlane" style="flex: 1;max-height: 700px;overflow-y: auto;overflow-x: hidden;" class="sitePlanContentBox">
<div class="sitePlanContent" *ngFor="let item of sitePlanData;let key = index"
[ngClass]="{'isRefugeStorey':item.isRefugeStorey==true,'selectSitePlan': selectSitePlanIndex==key}" (click)='selectSitePlan(item,key)'>
[ngClass]="{'isRefugeStorey':item.isRefugeStorey==true,'selectSitePlan': selectSitePlanIndex==key}" (click)='selectSitePlan(item,key)' (mouseenter)="hoverSitePlan(item,key)">
<label class="overflowText planEveryRow"><mat-icon *ngIf="!item.imageUrl" class="matIcons">broken_image</mat-icon>{{item.name}}</label>
<a href="javascript:;" class="a-upload" *ngIf="selectSitePlanIndex==key && isEditPattern" title="替换底图" >
<input type="file" (change)='replaceBaseMap($event,item)' accept="image/*">
@ -95,7 +95,7 @@
<img src="../../../assets/images/upload.jpg">
</a>
<!-- 右边定位操作栏 -->
<div id="rightOperate" *ngIf="selectSitePlanIndex==key && item.imageUrl && isEditPattern" (click)="$event.stopPropagation();">
<div id="rightOperate" class="rightOperate" *ngIf="selectSitePlanIndex==key && item.imageUrl && isEditPattern" (click)="$event.stopPropagation();">
<p class="functionButton">
<mat-icon class="functionIcon bigFunctionIcon" title="上移" (click)='moveUp(item,key)'>keyboard_arrow_up</mat-icon>
</p>

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

@ -1406,6 +1406,25 @@ export class CollectionToolsComponent implements OnInit {
} //if
}
if (this.element.nativeElement.querySelector('#rightOperate')) {
setTimeout(() => {
this.element.nativeElement.querySelector('#rightOperate').style.position = 'fixed'
this.element.nativeElement.querySelector('#rightOperate').style.left = document.getElementsByClassName('sitePlanContentBox')[0].children[this.selectSitePlanIndex].getBoundingClientRect().left + document.getElementById("leftDiv").offsetWidth + 'px'
this.element.nativeElement.querySelector('#rightOperate').style.top = document.getElementsByClassName('sitePlanContentBox')[0].children[this.selectSitePlanIndex].getBoundingClientRect().top - 32 + 'px'
}, 0);
}
}
hoverSitePlan(item,key){
if(key == this.selectSitePlanIndex){
if (this.element.nativeElement.querySelector('#rightOperate')) {
setTimeout(() => {
this.element.nativeElement.querySelector('#rightOperate').style.position = 'fixed'
this.element.nativeElement.querySelector('#rightOperate').style.left = document.getElementsByClassName('sitePlanContentBox')[0].children[this.selectSitePlanIndex].getBoundingClientRect().left + document.getElementById("leftDiv").offsetWidth + 'px'
this.element.nativeElement.querySelector('#rightOperate').style.top = document.getElementsByClassName('sitePlanContentBox')[0].children[this.selectSitePlanIndex].getBoundingClientRect().top - 32 + 'px'
}, 0);
}
}
}
//新增平面图 楼层/区域

3
src/app/ui/collection-tools/panel.scss

@ -114,9 +114,6 @@
#rightOperate{
width: 50px;
height: 100px;
position: absolute;
top: -32px;
right: -48px;
z-index: 99999;
border-radius: 0 100px 100px 0;
background-color: #F0F4F7;

Loading…
Cancel
Save