Browse Source

[完善] 左侧功能栏功能完成,样式调整

develop
陈鹏飞 5 years ago
parent
commit
7885ab985e
  1. 2
      src/app/ui/collection-tools/collection-tools.component.html
  2. 2
      src/app/ui/collection-tools/collection-tools.component.scss
  3. 43
      src/app/ui/collection-tools/collection-tools.component.ts
  4. 20
      src/app/ui/collection-tools/panel.scss

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

@ -75,7 +75,7 @@
<mat-icon *ngIf="!togglePlane">keyboard_arrow_down</mat-icon>
<label class="overflowText" style="font-weight: 550;">平面图</label>
<label class="hover">
<mat-icon (click)='foundPanel($event)' class="matIcons">add</mat-icon>
<mat-icon (click)='foundPanel($event)'>add</mat-icon>
</label>
</div>
<div [hidden]="!togglePlane">

2
src/app/ui/collection-tools/collection-tools.component.scss

@ -93,7 +93,7 @@
transition: margin-left 0.5s;
min-width: 150px;
border: 1px solid #E6EAEE;
width: 14%;
width: 13%;
left: 0;
}
.functionalDomainRight {

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

@ -588,6 +588,9 @@ export class CollectionToolsComponent implements OnInit {
companyBuildingData:any; // 单位/建筑 数据 ←消防要素/canvas使用
everyStoreyData:any; // 总平面图/楼层/区域 楼层数据 ←消防要素/canvas使用
originalcompanyBuildingData:any; // 原始数据 单位/建筑 数据
originaleveryStoreyData:any; // 原始数据 总平面图/楼层/区域
toggleExpandPanel:boolean = false; //可展开面板展开或关闭
togglePlane:boolean = true; //可展开面板平面图 显隐
toggleMaterialBank:boolean = false; //可展开面板素材库 显隐
@ -648,6 +651,7 @@ export class CollectionToolsComponent implements OnInit {
//获取 单位 数据
getSitePlanCompanyData () {
this.http.get('/api/CompanyAccount/CompanyData').subscribe((data:any)=>{
this.originalcompanyBuildingData = JSON.parse(JSON.stringify(data || {})) //深拷贝一份 单位原数据
if (data) {
this.companyBuildingData = JSON.parse(data.data)
} else {
@ -660,6 +664,7 @@ export class CollectionToolsComponent implements OnInit {
getSitePlanStorey (e) {
let params = {sitePlanId: e.id}
this.http.get(`/api/CompanyAccount/SitePlanData`,{params}).subscribe((data:any)=>{
this.originaleveryStoreyData = JSON.parse(JSON.stringify(data || {})) //深拷贝一份 楼层原数据
if (data && data.data && this.companyBuildingData) {
data.data = JSON.parse(data.data)
for(let key in this.companyBuildingData){
@ -679,6 +684,7 @@ export class CollectionToolsComponent implements OnInit {
//获取 建筑 数据
getBuildingData (e) {
this.http.get(`/api/CompanyAccount/BuildingData`,{params:e}).subscribe((data:any)=>{
this.originalcompanyBuildingData = JSON.parse(JSON.stringify(data || {})) //深拷贝一份 建筑原数据
if (data) {
this.companyBuildingData = JSON.parse(data.data)
} else {
@ -691,6 +697,7 @@ export class CollectionToolsComponent implements OnInit {
getBuildingStorey (e) {
let params = {buildingAreaId: e.id}
this.http.get(`/api/CompanyAccount/BuildingAreaData`,{params}).subscribe((data:any)=>{
this.originaleveryStoreyData = JSON.parse(JSON.stringify(data || {})) //深拷贝一份 楼层原数据
if (data && data.data && this.companyBuildingData) {
data.data = JSON.parse(data.data)
for(let key in this.companyBuildingData){
@ -838,7 +845,41 @@ export class CollectionToolsComponent implements OnInit {
//复制图层 平面图 楼层/区域
duplicateLayer (item) {
console.log('复制',item)
if (this.checkedBuildingIndex==-1) { //总平面图
item.id = ""
item.modifiedTime = new Date()
item.name = item.name + '(副本)'
item.order = this.sitePlanData[this.sitePlanData.length-1].order+1
this.http.post('/api/CompanyAccount/SitePlans',item).subscribe((data:any)=>{
let newData = {
version: this.originaleveryStoreyData.version || "1.0",
id: "",
data: this.originaleveryStoreyData.data || null,
sitePlanId: data.id
}
this.http.post('/api/CompanyAccount/SitePlanData',newData).subscribe(data=>{
this.renovateSitePlan()
})
})
} else { //楼层/区域
item.id = ""
item.modifiedTime = new Date()
item.name = item.name + '(副本)'
item.order = this.sitePlanData[this.sitePlanData.length-1].order+1
this.http.post('/api/CompanyAccount/BuildingAreas',item).subscribe((data:any)=>{
let newData = {
version: this.originaleveryStoreyData.version || "1.0",
id: "",
data: this.originaleveryStoreyData.data || null,
buildingAreaId: data.id
}
this.http.post('/api/CompanyAccount/BuildingAreaData',newData).subscribe(data=>{
this.renovateBuilding()
})
})
}
}
//平面图 楼层/区域 替换底图

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

@ -6,7 +6,7 @@
//平面图 素材库 公共样式 头部
.planarGraphHeader{
height: 48px;
height: 35px;
cursor: pointer;
display: flex;
flex-direction: row;
@ -16,29 +16,29 @@
font-family: Roboto, "Helvetica Neue", sans-serif;
font-size: 15px;
font-weight: 400;
color: rgba(0, 0, 0, 0.87);
background: linear-gradient(to top,#cdced1,#FFF);
color: #000;
background: linear-gradient(to right,#c5c3c3,#868080);
// background: linear-gradient(to top,#cdced1,#FFF);
}
//平面图头部字体图标样式
.hover {
width: 18px;
height: 18px;
margin-left: 40%;
border: 1px solid #8E909F;
border: 1px solid #fff;
border-radius: 3px;
.mat-icon {font-size: 18px;}
.mat-icon {font-size: 18px; color: #fff;}
}
.hover:hover {
background-color: #4DA5FA;
.mat-icon {color: #fff;}
}
//平面图
.sitePlanContent {
position: relative;
width: 100%;
height: 36px;
line-height: 36px;
height: 35px;
line-height: 35px;
box-sizing: border-box;
padding: 0 10px 0 25px;
.mat-icon {
@ -136,6 +136,10 @@
flex-direction: column;
overflow: hidden;
padding-bottom: 10px;
margin: 1px 0;
.mat-expansion-panel-header {
height: 40px !important;
}
}
//素材库图片flex
#panelLibrary .text{

Loading…
Cancel
Save