徐振升 4 years ago
parent
commit
af52ecb9ba
  1. 21
      src/app/ui/collection-tools/collection-tools.component.html
  2. 6
      src/app/ui/collection-tools/collection-tools.component.scss
  3. 20
      src/app/ui/collection-tools/collection-tools.component.ts
  4. 35
      src/app/ui/collection-tools/panel.scss
  5. 55
      src/app/ui/similar-plans/similar-plans.component.html
  6. 17
      src/app/ui/similar-plans/similar-plans.component.scss
  7. 9
      src/app/ui/similar-plans/similar-plans.component.ts

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

@ -160,6 +160,7 @@
<mat-icon (click)='foundPanel($event)'>add</mat-icon>
</label>
</div>
<div [hidden]="!togglePlane" >
<div class="sitePlanContent" *ngFor="let item of sitePlanData;let key = index" [ngClass]="{'isRefugeStorey':item.isRefugeStorey==true,'selectSitePlan': selectSitePlanIndex==key}" (click)='selectSitePlan(item,key)'>
<mat-icon *ngIf="!item.imageUrl" class="matIcons">broken_image</mat-icon>
@ -203,10 +204,13 @@
<!-- 素材库 -->
<div id="materialBank" *ngIf="isEditPattern" [ngClass]="{'selectEditMode': pattern}" style="display: none;">
<div class="planarGraphHeader" (click)='toggleMaterial()'>
<!-- <div class="planarGraphHeader" (click)='toggleMaterial()'>
<mat-icon *ngIf="toggleMaterialBank">keyboard_arrow_up</mat-icon>
<mat-icon *ngIf="!toggleMaterialBank">keyboard_arrow_down</mat-icon>
<label class="overflowText" style="font-weight: 550;">素材库</label>
</div> -->
<div class="planarGraphHeader">
<label class="overflowText">素材库</label>
</div>
<div [hidden]="!toggleMaterialBank" [ngClass]="{'materialBankDIV': pattern}">
<mat-accordion *ngFor="let item of allLibrary" id="panelLibrary">
@ -232,14 +236,17 @@
<!-- 处置预案 -->
<div class="handlePlan">
<div class="planarGraphHeader" (click)='toggleHandlePlan()'>
<!-- <div class="planarGraphHeader" (click)='toggleHandlePlan()'>
<mat-icon *ngIf="toggleHandlePlans">keyboard_arrow_up</mat-icon>
<mat-icon *ngIf="!toggleHandlePlans">keyboard_arrow_down</mat-icon>
<mat-icon *ngIf="!toggleHandlePlans">keyboard_arrow_down</mat- icon>
<label class="overflowText" style="font-weight: 550;">处置预案</label>
<label style="margin-left: 45px;">
<mat-icon style="color: #c2a40ce8;" title="计算差异" (click)='countValue($event)'>flash_on</mat-icon>
<mat-icon style="margin-left: 3px;" title="新建空节点" (click)='addPanelPoint($event,null,fireTreeData)'>add</mat-icon>
</label>
</div> -->
<div class="planarGraphHeader">
<label class="overflowText">处置预案</label>
</div>
<div [hidden]="!toggleHandlePlans">
@ -249,12 +256,12 @@
<label title="{{node.name}}" class="textNode overflowText">
{{node.name}}
</label>
<div class="planIconDiv">
<!-- <div class="planIconDiv">
<mat-icon *ngIf="!node.sitePlanId && !node.buildingAreaId" (click)='editPanelPoint($event,node)'>edit</mat-icon>
<mat-icon *ngIf="node.level<1" (click)='addPanelPoint($event,node,null)'>add</mat-icon>
<mat-icon *ngIf="!node.sitePlanId && !node.buildingAreaId" (click)='copyPanelPoint($event,node,fireTreeData)'>library_books</mat-icon>
<mat-icon (click)='deletePanelPoint($event,node)'>delete_forever</mat-icon>
</div>
</div> -->
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding cdkTreeNodePaddingIndent='5' id="terrNodePublic" (click)='selectanelPoint(node)' [ngClass]="{'selectanelPoint': selectDisposalNode==node.id}">
@ -264,12 +271,12 @@
<label title="{{node.name}}" class="textNode overflowText">
{{node.name}}
</label>
<div class="planIconDiv">
<!-- <div class="planIconDiv">
<mat-icon *ngIf="!node.sitePlanId && !node.buildingAreaId" (click)='editPanelPoint($event,node)'>edit</mat-icon>
<mat-icon *ngIf="node.level<1" (click)='addPanelPoint($event,node,null)'>add</mat-icon>
<mat-icon *ngIf="!node.sitePlanId && !node.buildingAreaId" (click)='copyPanelPoint($event,node,fireTreeData)'>library_books</mat-icon>
<mat-icon (click)='deletePanelPoint($event,node)'>delete_forever</mat-icon>
</div>
</div> -->
</mat-tree-node>
</mat-tree>

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

@ -216,7 +216,7 @@
flex-direction: column;
margin-left: 0px;
transition: margin-left 0.5s;
border: 1px solid #E6EAEE;
border: 1px solid #30bbec;
left: 0;
z-index: 111;
.leftDragDiv{
@ -447,8 +447,8 @@ div:focus {
//没有图片时显示无图片背景图
.noImgCss{
background: url(../../../assets/images/noImg.png) no-repeat center center;
background-size: 88% 100%;/*按比例缩放*/
background: url(../../../assets/images/noImg.png) ;
background-size: 100% 100%;/*按比例缩放*/
}
.input{
width: 18px;

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

@ -479,7 +479,7 @@ export class CollectionToolsComponent implements OnInit {
}
ngOnInit(): void {
// this.canvas.setNameVisible(this.basicInfo,1)
let that = this
window.setTimeout(()=>{
document.getElementById("functionalDomainContent").oncontextmenu = function (event) {
@ -492,6 +492,7 @@ export class CollectionToolsComponent implements OnInit {
this.canvasData.getMessage().subscribe((message: any)=>{
console.log(message);//send a message
})
}
//右侧属性和消防要素切换
@ -1053,8 +1054,23 @@ export class CollectionToolsComponent implements OnInit {
     }
const nodes = this.treeControl.dataNodes;
const expandNodes = [];
nodes.forEach((item) => {
if(item.expandable && this.treeControl.isExpanded(item)){
expandNodes.push(item.id);
}
});
this.dataSource.data = [...this.dataSource.data]
this.treeControl.expandAll()
let newNodes = this.treeControl.dataNodes;
newNodes = newNodes.filter(n => {
return expandNodes.indexOf(n.id) >= 0;
});
newNodes.forEach(item => {
this.treeControl.expand(item);
});
//canvas上的素材显隐
let iconVisibleArr:any = []

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

@ -6,19 +6,17 @@
//平面图 素材库 公共样式 头部
.planarGraphHeader{
height: 35px;
min-height: 35px;
width: 100%;
text-align: center;
height: 40px;
line-height: 40px;
min-height: 40px;
cursor: pointer;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 24px;
border-radius: 5px;
font-family: Roboto, "Helvetica Neue", sans-serif;
font-size: 15px;
font-weight: 400;
color: #000;
background: linear-gradient(to top,#cdced1,#FFF);
text-align: center;
font-style: italic;
font-size: 20px;
color: white;
border-bottom:2px solid #accbf2;
}
//平面图头部字体图标样式
.hover {
@ -191,7 +189,7 @@
font-size: 20px;
width: 20px;
height: 20px;
color: #666;
color: white;
margin-right: 3px;
}
}
@ -258,7 +256,7 @@
}
//选中 处置节点时
.selectanelPoint {
background-color: #F4C235;
background-color: #0c2d44;
}
@ -288,3 +286,12 @@
resize:none;
}
}
.mat-tree{
background-color:transparent;
.mat-tree-node{
color: white;
}
.mat-tree-node:hover{
background-color: #0c2d44;
}
}

55
src/app/ui/similar-plans/similar-plans.component.html

@ -1,25 +1,30 @@
<!-- <div class="leisiTable">
<table>
<thead >
<td style="width:40%;">单位名称</td>
<td style="width:10%;">始建于</td>
<td style="width:10%;">着火物</td>
<td style="width:10%;">点火位置</td>
<td style="width:10%;">相近度</td>
<td style="width:20%;">详情</td>
</thead>
<tbody id="shujubody" >
<tr *ngFor="let leisi of leisiYuan">
<td style="color: #FFFFFF;">{{leisi.danweiName}}</td>
<td></td>
<td></td>
<td style="color: #FFFFFF;">{{leisi.weizhi}}</td>
<td [ngClass]="{'tdyanse56':leisi.xiangjin>=50&&leisi.xiangjin<=60,'tdyanse78':leisi.xiangjin>60,'tdyanse':leisi.xiangjin<50}">{{leisi.xiangjin}}%</td>
<td style="color: #CC5D13;">查看详情</td>
</tr>
</tbody>
</table>
</div> -->
<div style="width: 100%;height: 100%;">
<app-collection-tools></app-collection-tools>
</div>
<div style="width: 100%;height: 100%;position: relative;">
<div class="backBtn" *ngIf="isResponsePlans" (click)="back()">
返回
</div>
<div class="leisiTable" *ngIf="!isResponsePlans">
<table>
<thead >
<td style="width:40%;">单位名称</td>
<td style="width:10%;">始建于</td>
<td style="width:10%;">着火物</td>
<td style="width:10%;">点火位置</td>
<td style="width:10%;">相近度</td>
<td style="width:20%;">详情</td>
</thead>
<tbody id="shujubody" >
<tr *ngFor="let leisi of leisiYuan">
<td style="color: #FFFFFF;">{{leisi.danweiName}}</td>
<td></td>
<td></td>
<td style="color: #FFFFFF;">{{leisi.weizhi}}</td>
<td [ngClass]="{'tdyanse56':leisi.xiangjin>=50&&leisi.xiangjin<=60,'tdyanse78':leisi.xiangjin>60,'tdyanse':leisi.xiangjin<50}">{{leisi.xiangjin}}%</td>
<td style="color: #CC5D13;cursor: pointer;" (click)="openDeatails()">查看详情</td>
</tr>
</tbody>
</table>
</div>
<div style="width: 100%;height: 100%;" *ngIf="isResponsePlans">
<app-collection-tools></app-collection-tools>
</div>
</div>

17
src/app/ui/similar-plans/similar-plans.component.scss

@ -32,4 +32,21 @@
}
.tdyanse{
color: #FFFFFF;
}
.backBtn{
position: absolute;
right: 30px;
top: 8px;
width: 80px;
height: 30px;
line-height: 30px;
text-align: center;
color: white;
cursor: pointer;
border: 1px solid #0E79A9;
border-radius: 5px;
z-index: 8999;
}
.backBtn:hover{
background-color: #0c4c69;
}

9
src/app/ui/similar-plans/similar-plans.component.ts

@ -29,7 +29,12 @@ export class SimilarPlansComponent implements OnInit {
{danweiName:"中油广西田东石油化工总厂有限公司",year:"",zhoahuo:"XXX",weizhi:"3-1#储罐",xiangjin:parseFloat("30%")}
]
isResponsePlans = false //默认是否是处置预案
openDeatails(){
this.isResponsePlans = true
}
back(){
this.isResponsePlans = false
}
}

Loading…
Cancel
Save