baozw 4 years ago
parent
commit
76ae8be237
  1. 2
      src/app/http-interceptors/cache-token.service.ts
  2. 420
      src/app/ui/collection-tools/collection-tools.component.html
  3. 256
      src/app/ui/collection-tools/collection-tools.component.scss
  4. 35
      src/app/ui/collection-tools/collection-tools.component.ts
  5. 2
      src/app/ui/collection-tools/panel.scss
  6. 1
      src/app/ui/dangerous/dangerous.component.scss
  7. 6
      src/app/ui/plan-assistance/plan-assistance.component.html
  8. 205
      src/app/ui/plan-assistance/plan-assistance.component.ts
  9. 2
      src/app/ui/plan/collection-tools.component.ts
  10. 7
      src/app/ui/similar-plans/similar-plans.component.html
  11. 1
      src/app/ui/similar-plans/similar-plans.component.ts
  12. 223
      src/app/working-area/working-area.component.ts

2
src/app/http-interceptors/cache-token.service.ts

@ -16,7 +16,7 @@ export class CacheTokenService {
login () { login () {
return new Promise ((resolve,reject)=>{ return new Promise ((resolve,reject)=>{
sessionStorage.setItem("buildingTypeId",'5e7c9078a3050b1a840ed4ba'); //建筑类型 sessionStorage.setItem("buildingTypeId",'5e7c9078a3050b1a840ed4ba'); //建筑类型
sessionStorage.setItem("planId",''); //预案ID sessionStorage.setItem("planId",'5f6957a29e91f4410005f5d7'); //预案ID
sessionStorage.setItem("companyId",'5f67042b9e91f4410005f55c'); //单位ID sessionStorage.setItem("companyId",'5f67042b9e91f4410005f55c'); //单位ID
this.http.post('/api/Account/SignIn',this.loginData).subscribe((data:any)=>{ this.http.post('/api/Account/SignIn',this.loginData).subscribe((data:any)=>{
sessionStorage.setItem("level",data.level); sessionStorage.setItem("level",data.level);

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

@ -1,6 +1,6 @@
<div class="content"> <div class="content">
<!-- header头部 --> <!-- header头部 -->
<div class="header"> <div class="header" style="display: none;">
<button mat-button (click)="toggle()"> <button mat-button (click)="toggle()">
<mat-icon style="vertical-align: middle;">toc</mat-icon> <mat-icon style="vertical-align: middle;">toc</mat-icon>
</button> </button>
@ -47,7 +47,7 @@
</div> </div>
<!-- 头部操作栏 --> <!-- 头部操作栏 -->
<div class="headerOperate"> <div class="headerOperate" style="display: none;">
<button mat-button (click)="checkedBuilding({name:'总平面图'},-1)" <button mat-button (click)="checkedBuilding({name:'总平面图'},-1)"
[ngClass]="{'buildingbtnchecked': checkedBuildingIndex==-1}"> [ngClass]="{'buildingbtnchecked': checkedBuildingIndex==-1}">
<span>总平面图</span> <span>总平面图</span>
@ -112,18 +112,46 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 头部操作栏 -->
<div class="headerOperate">
<div class="bigeditdeletebtn" (click)="checkedBuilding({name:'总平面图'},-1)" [ngClass]="{'buildingbtnchecked': checkedBuildingIndex==-1}">
<span>总平面图</span>
</div>
<div class="bigeditdeletebtn" *ngFor="let item of allBuildings;let key = index" (click)="checkedBuilding(item,key)" [ngClass]="{'buildingbtnchecked': checkedBuildingIndex==key}">
<span>{{item.name}}</span>
</div>
<!-- <div class="bigTalkBox" style="position: absolute;right: 26px;">
<mat-icon class="titleIcon" (click)="openTalkDiv()">volume_up</mat-icon>
<div class="talkBox" *ngIf="isOpenTalk">
<div class="btndiv">
<div>泵房</div>
<div>控制室</div>
</div>
<div class="bottomDiv">
<div>
<mat-icon>settings_voice</mat-icon>
</div>
<div>
按住说话
</div>
<div>
<mat-icon>search</mat-icon>
</div>
</div>
</div>
</div> -->
</div>
<!--功能区 --> <!--功能区 -->
<div class="functionalDomain"> <div class="functionalDomain">
<div class='functionalDomainContent' id="functionalDomainContent"> <div class='functionalDomainContent' id="functionalDomainContent">
<!-- H5Canvas -->
<app-working-area #canvas [init]='this'></app-working-area>
<!-- H5Canvas --> <!-- H5Canvas -->
<div id="leftDiv" class='functionalDomainLeft publicCss' [ngClass]="{'togglePanel': toggleExpandPanel==true,'scenarioAssignment': !pattern}" style="user-select: none;"> <div id="leftDiv" class='functionalDomainLeft publicCss' [ngClass]="{'togglePanel': toggleExpandPanel==true,'scenarioAssignment': !pattern}" style="user-select: none;">
<div class="leftDragDiv" (mousedown)="leftDivMouseDown($event)"></div>
<!-- 平面图 --> <!-- 平面图 -->
<div class="planarGraph"> <div class="planarGraph" style="display: none;">
<div class="planarGraphHeader" (click)='togglePlanarGraph()'> <div class="planarGraphHeader" (click)='togglePlanarGraph()'>
<mat-icon *ngIf="togglePlane">keyboard_arrow_up</mat-icon> <mat-icon *ngIf="togglePlane">keyboard_arrow_up</mat-icon>
<mat-icon *ngIf="!togglePlane">keyboard_arrow_down</mat-icon> <mat-icon *ngIf="!togglePlane">keyboard_arrow_down</mat-icon>
@ -171,9 +199,10 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 平面图 -->
<!-- 素材库 --> <!-- 素材库 -->
<div id="materialBank" *ngIf="isEditPattern" [ngClass]="{'selectEditMode': pattern}"> <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_up</mat-icon>
<mat-icon *ngIf="!toggleMaterialBank">keyboard_arrow_down</mat-icon> <mat-icon *ngIf="!toggleMaterialBank">keyboard_arrow_down</mat-icon>
@ -200,8 +229,9 @@
</div> </div>
</div> </div>
<!-- 素材库 --> <!-- 素材库 -->
<!-- 处置预案 --> <!-- 处置预案 -->
<div class="handlePlan" *ngIf="!pattern"> <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_up</mat-icon>
<mat-icon *ngIf="!toggleHandlePlans">keyboard_arrow_down</mat-icon> <mat-icon *ngIf="!toggleHandlePlans">keyboard_arrow_down</mat-icon>
@ -249,207 +279,213 @@
</div> </div>
<!-- H5Canvas -->
<div class="canvas">
<app-working-area #canvas [init]='this'></app-working-area>
</div>
<div id="rightDiv" class="functionalDomainRight publicCss " [ngClass]="{'togglePanel2': toggleExpandPanelRight==true}" style="user-select: none;"> <div id="rightDiv" class="functionalDomainRight publicCss " [ngClass]="{'togglePanel2': toggleExpandPanelRight==true}" style="user-select: none;">
<!-- 右侧div鼠标拖动div -->
<div style="width: 3px;height: 100%;position: absolute;left: 0;cursor: e-resize;z-index: 1000;" (mousedown)="rightDivMouseDown($event)"></div> <div class="title">
<!-- 属性 --> <span (click)="rightSwitch(1)" [ngClass]="{selectedTitle: isProperty}">
<div [ngClass]="{'forbidden': !isEditPattern}" id="property" class="property" style="height: 50%;background-color: white;" cdkDrag cdkDragBoundary=".functionalDomain"> 属性
<div cdkDragHandle class="title"> </span>
<div> <span (click)="rightSwitch(2)" [ngClass]="{selectedTitle: !isProperty}">
<span style="user-select: none">属性</span> 消防要素
</div> </span>
</div> </div>
<!-- 平面图属性 --> <div style="width: 100%;height: 100%;">
<div class="siteproperty" style="user-select: none" *ngIf="isShowProperty && isShowAttribute"> <!-- 属性 -->
<p>面积(平方米)</p> <div *ngIf="isProperty" id="property" class="property" style="height: 94%;">
<div class="siteproperty_size">{{canvasData.selectStorey.area}}</div> <!-- 平面图属性 -->
<p>详情</p> <div class="siteproperty" style="user-select: none" *ngIf="isShowProperty && isShowAttribute">
<div class="siteproperty_size"> <p>面积(平方米)</p>
{{canvasData.selectStorey.details}} <div class="siteproperty_size">{{canvasData.selectStorey.area}}</div>
<p>详情</p>
<div class="siteproperty_size">
{{canvasData.selectStorey.details}}
</div>
</div> </div>
</div> <!-- 素材属性 -->
<!-- 素材属性 --> <div class="assetsproperty" style="user-select: none" *ngIf="isShowProperty && !isShowAttribute">
<div class="assetsproperty" style="user-select: none" *ngIf="isShowProperty && !isShowAttribute"> <h3 style="text-align: center;font-weight: 900;">{{assetName}}</h3>
<h3 style="text-align: center;font-weight: 900;">{{assetName}}</h3>
<div *ngIf="canvasAssetObj.InteractiveMode == 0"> <div *ngIf="canvasAssetObj.InteractiveMode == 0">
<p>宽度(像素)</p> <p>宽度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetWidth" (input)="assetWidthIunput()" [disabled]="!isEditPattern"> <div class="siteproperty_size">{{assetWidth}}</div>
<p>高度(像素)</p> <p>高度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetHeight" (input)="assetHeightIunput()" [disabled]="!isEditPattern"> <div class="siteproperty_size">{{assetHeight}}</div>
<p>角度</p> <p>角度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;"> <div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="sliderValue" <!-- <input type="number" class="smallinput" [(ngModel)]="sliderValue"
oninput="if(value>360)value=360;if(value<0)value=0;" (input)="assetAngleIunput()" [disabled]="!isEditPattern"> oninput="if(value>360)value=360;if(value<0)value=0;" (input)="assetAngleIunput()">
<mat-slider color="primary" min="0" max="360" step="1" style="bottom: 12px;left: 2px;width: 70%;" <mat-slider color="primary" min="0" max="360" step="1" style="bottom: 12px;left: 2px;width: 70%;"
[(ngModel)]="sliderValue" (change)="assetAngleIunput()" [disabled]="!isEditPattern"></mat-slider> [(ngModel)]="sliderValue" (change)="assetAngleIunput()"></mat-slider> -->
<div class="siteproperty_size">{{sliderValue}}</div>
</div>
</div> </div>
</div> <!-- 如果是多点连线 -->
<!-- 如果是多点连线 --> <div *ngIf="canvasAssetObj.InteractiveMode == 1">
<div *ngIf="canvasAssetObj.InteractiveMode == 1"> <p>厚度</p>
<p>厚度</p> <div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;"> <!-- <input type="number" class="smallinput" [(ngModel)]="sliderValueThickness"
<input type="number" class="smallinput" [(ngModel)]="sliderValueThickness" oninput="if(value>999)value=999;if(value<0)value=0;" (input)="assetThicknessIunput()">
oninput="if(value>999)value=999;if(value<0)value=0;" (input)="assetThicknessIunput()" [disabled]="!isEditPattern"> <mat-slider color="primary" min="0" max="999" step="1" style="bottom: 12px;left: 2px;width: 70%;"
<mat-slider color="primary" min="0" max="999" step="1" style="bottom: 12px;left: 2px;width: 70%;" [(ngModel)]="sliderValueThickness" (change)="assetThicknessIunput()"></mat-slider> -->
[(ngModel)]="sliderValueThickness" (change)="assetThicknessIunput()" [disabled]="!isEditPattern"></mat-slider> <div class="siteproperty_size">{{sliderValueThickness}}</div>
</div>
</div> </div>
</div>
<p style="margin-top: 4px;margin-bottom: 0px;">是否高亮</p> <!-- <p style="margin-top: 4px;margin-bottom: 0px;">是否高亮</p>
<div> <div>
<input class="input" [(ngModel)]="isHighLight" type="checkbox" [disabled]="!isEditPattern"> <input class="input" [(ngModel)]="isHighLight" type="checkbox">
<span style="font-size: 14px;">选中高亮</span> <span style="font-size: 14px;">选中高亮</span>
</div> </div> -->
<div class="colorBigDiv" *ngIf="canvasAssetObj.FillMode == 0"> <div *ngIf="canvasAssetObj.FillMode == 0" style="margin-top: 6px;">
<div class="colorBigTemplateDiv"> <div class="colorBigTemplateDiv">
<span>颜色</span> <span style="
<div class="colorTemplateDiv" [style]="{'background-color':selectedcolor}"> font-size: 16px;
color: #d0e0f4;
padding-left: 7px;
letter-spacing:3px;
margin: 5px 0;">颜色</span>
<div class="colorTemplateDiv" [style]="{'background-color':selectedcolor}">
</div>
</div> </div>
<!-- <div class="colorDiv">
<ul>
<li class="colorLi" *ngFor="let item of colors,let key=index" [style]="{'background-color':item}"></li>
</ul>
</div> -->
<p>透明度</p>
<!-- <span style="color: #9c9fa5;font-size: 14px;">透明度</span> -->
<!-- <mat-slider color="primary" min="0" max="100%" step="1" style="left: 1px; width: 55%;min-width: 90px;"
[(ngModel)]="colorDivSliderValue" (change)="colorDivSliderChange()"></mat-slider>
<span style="color: #9c9fa5;font-size: 12px;">{{colorDivSliderValue}}%</span> -->
<div class="siteproperty_size">{{colorDivSliderValue}}%</div>
</div> </div>
<div class="colorDiv" *ngIf="isEditPattern"> <div *ngFor="let item of PropertyInfos;index as key ">
<ul> <!-- 单行文本 -->
<li (click)="selectcolor(item,key)" class="colorLi" *ngFor="let item of colors,let key=index" [style]="{'background-color':item}"></li> <div *ngIf="item.PropertyType == 0">
</ul> <p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
</div> <!-- <input type="text" class="biginput" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)"> -->
<span style="color: #9c9fa5;font-size: 14px;">透明度</span> <div class="siteproperty_size">{{item.PropertyValue}}</div>
<mat-slider color="primary" min="0" max="100%" step="1" style="left: 1px; width: 55%;min-width: 90px;" </div>
[(ngModel)]="colorDivSliderValue" (change)="colorDivSliderChange()" [disabled]="!isEditPattern"></mat-slider> <!-- 多行文本 -->
<span style="color: #9c9fa5;font-size: 12px;">{{colorDivSliderValue}}%</span> <div *ngIf="item.PropertyType == 1">
</div> <p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<div *ngFor="let item of PropertyInfos;index as key "> <!-- <textarea class="textarea" name="" id="" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)"></textarea> -->
<!-- 单行文本 --> <div class="siteproperty_size">{{item.PropertyValue}}</div>
<div *ngIf="item.PropertyType == 0"> </div>
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p> <!-- 数值 -->
<input type="text" class="biginput" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)" [disabled]="!isEditPattern"> <div *ngIf="item.PropertyType == 2">
</div> <p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<!-- 多行文本 --> <div class="siteproperty_size">{{item.PropertyValue}}</div>
<div *ngIf="item.PropertyType == 1"> </div>
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p> <!-- 图片数量 -->
<textarea class="textarea" name="" id="" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)" [disabled]="!isEditPattern"></textarea> <div *ngIf="item.PropertyType == 4" style="height: 140px;">
</div> <div style="position: relative;width: 100%;height: 21px;margin: 1px 0;">
<!-- 数值 -->
<div *ngIf="item.PropertyType == 2"> <p style="width: 40%;display: inline-block;">{{item.PropertyName}}</p>
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p> <span style="width: 26%;text-align:right;font-size: 13px;">{{imagesArr.length ? imagesArr.length : 0}} / {{item.PropertyValue}}</span>
<input type="number" class="biginput" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)" [disabled]="!isEditPattern">
</div> <div style="position: relative;;width: 89%;border:1px solid rgb(208, 211, 214);height: 140px;margin: 6px auto;" class="swiper-container">
<!-- 图片数量 --> <div id="viewerjs" class="swiper-wrapper" [ngClass]="{'noImgCss': imagesArr.length == 0}">
<div *ngIf="item.PropertyType == 4" style="height: 140px;"> <div class="swiper-slide" style="text-align: center;" *ngFor="let img of imagesArr"><img [src]="img.PropertyValue + '?x-oss-process=image/resize,m_fixed,h_140,w_140'" alt="" [attr.data-original]="img.PropertyValue"></div>
<div style="position: relative;width: 100%;height: 21px;margin: 1px 0;"> </div>
<p style="width: 40%;display: inline-block;">{{item.PropertyName}}</p> <!-- 如果需要导航按钮 -->
<span style="width: 26%;text-align:right;font-size: 13px;">{{imagesArr.length ? imagesArr.length : 0}} / {{item.PropertyValue}}</span> <div class="swiper-button-next"></div>
<input [disabled]="!isEditPattern" *ngIf="isImgNumCss" accept="image/*" (change)="selectFile($event)" type="file" style="width: 33%;position: absolute;right: 10px;top: 1px;opacity: 0;z-index: 100;cursor: pointer;height: 21px;"> <div class="swiper-button-prev"></div>
<div style="width: 33%;height: 21px;line-height: 21px;text-align: center;position: absolute;right: 10px;top: 1px;z-index: 99;border: 1px solid rgb(208, 211, 214);border-radius: 2px;font-size: 13px;cursor: pointer;" (click)="imgNumBeyond()">添加</div>
<div style="position: relative;;width: 89%;border:1px solid rgb(208, 211, 214);height: 100px;margin: 6px auto;" class="swiper-container">
<div id="viewerjs" class="swiper-wrapper" [ngClass]="{'noImgCss': imagesArr.length == 0}">
<div class="swiper-slide" style="text-align: center;" *ngFor="let img of imagesArr"><img [src]="img.PropertyValue + '?x-oss-process=image/resize,m_fixed,h_100,w_100'" alt="" [attr.data-original]="img.PropertyValue"></div>
</div> </div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
<span style="position: absolute;right: 2px;top: 2px;cursor: pointer;z-index: 200;" *ngIf="isEditPattern">
<mat-icon class="hoverred" (click)="deleteImg()">delete</mat-icon>
</span>
</div> </div>
</div> </div>
</div> <!-- 方向 -->
<!-- 方向 --> <div *ngIf="item.PropertyType == 5">
<div *ngIf="item.PropertyType == 5" class="selectDiv"> <p>{{item.PropertyName}}</p>
<p style="display: inline-block;">{{item.PropertyName}}</p> <div class="siteproperty_size" *ngIf="item.PropertyValue ==0"></div>
<select (change)="direction(item,$event)" [disabled]="!isEditPattern"> <div class="siteproperty_size" *ngIf="item.PropertyValue ==1">西</div>
<option value ="0" [selected]="item.PropertyValue ==0"></option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==2"></div>
<option value ="1" [selected]="item.PropertyValue ==1">西</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==3"></div>
<option value ="2" [selected]="item.PropertyValue ==2"></option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==4">东南</div>
<option value ="3" [selected]="item.PropertyValue ==3"></option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==5">西南</div>
<option value ="4" [selected]="item.PropertyValue ==4">东南</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==6">东北</div>
<option value ="5" [selected]="item.PropertyValue ==5">西南</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==7">西北</div>
<option value ="6" [selected]="item.PropertyValue ==6">东北</option>
<option value ="7" [selected]="item.PropertyValue ==7">西北</option> </div>
</select> <!-- 布尔值 是1或否0 -->
</div> <div *ngIf="item.PropertyType == 6">
<!-- 布尔值 是1或否0 --> <p>{{item.PropertyName}}</p>
<div *ngIf="item.PropertyType == 6"> <div class="siteproperty_size" *ngIf="item.PropertyValue ==1"></div>
<p>{{item.PropertyName}}</p> <div class="siteproperty_size" *ngIf="item.PropertyValue ==0"></div>
<input [disabled]="!isEditPattern" [checked]="item.PropertyValue == 1" class="input" type="radio" name="radio" (click)="assetRadioChange(item,'1')"><span></span>
<input [disabled]="!isEditPattern" [checked]="item.PropertyValue == 0" class="input" type="radio" name="radio" (click)="assetRadioChange(item,'0')"><span></span> <!-- <input [checked]="item.PropertyValue == 1" class="input" type="radio" name="radio" (click)="assetRadioChange(item,'1')"><span>是</span>
</div> <input [checked]="item.PropertyValue == 0" class="input" type="radio" name="radio" (click)="assetRadioChange(item,'0')"><span></span> -->
<!-- 供给区域 --> </div>
<div *ngIf="item.PropertyType == 7" class="selectDiv"> <!-- 供给区域 -->
<p style="display: inline-block;">{{item.PropertyName}}</p> <div *ngIf="item.PropertyType == 7">
<select (change)="supplyArea(item,$event)" [disabled]="!isEditPattern"> <p style="display: inline-block;">{{item.PropertyName}}</p>
<option value ="0" [selected]="item.PropertyValue ==0">全部</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==0">全部</div>
<option value ="1" [selected]="item.PropertyValue ==1">高区</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==1">高区</div>
<option value ="2" [selected]="item.PropertyValue ==2">中区</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==2">中区</div>
<option value ="3" [selected]="item.PropertyValue ==3">低区</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==3">低区</div>
<option value ="4" [selected]="item.PropertyValue ==4">高中区</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==4">高中区</div>
<option value ="5" [selected]="item.PropertyValue ==5">高低区</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==5">高低区</div>
<option value ="6" [selected]="item.PropertyValue ==6">中低区</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==6">中底区</div>
</select> </div>
</div> <!-- 供给类型 -->
<!-- 供给类型 --> <div *ngIf="item.PropertyType == 8">
<div *ngIf="item.PropertyType == 8" class="selectDiv"> <p style="display: inline-block;">{{item.PropertyName}}</p>
<p style="display: inline-block;">{{item.PropertyName}}</p> <div class="siteproperty_size" *ngIf="item.PropertyValue ==0">消火栓</div>
<select (change)="supplyType(item,$event)" value="4" [disabled]="!isEditPattern"> <div class="siteproperty_size" *ngIf="item.PropertyValue ==1">喷淋</div>
<option value ="0" [selected]="item.PropertyValue ==0">消火栓</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==2">水幕</div>
<option value ="1" [selected]="item.PropertyValue ==1">喷淋</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==3">泡沫</div>
<option value ="2" [selected]="item.PropertyValue ==2">水幕</option> <div class="siteproperty_size" *ngIf="item.PropertyValue ==4">消防</div>
<option value ="3" [selected]="item.PropertyValue ==3">泡沫</option> </div>
<option value ="4" [selected]="item.PropertyValue ==4">消防</option> </div>
</select>
</div>
</div>
</div>
</div>
<!-- 消防要素 -->
<div id="firecategories" class="firecategories" style="height: 50%;" cdkDrag cdkDragBoundary=".functionalDomain">
<!-- 素材属性div鼠标拖动div -->
<div style="height:3px;width: 100%;position: absolute;top: 0;cursor: n-resize;z-index: 1000;" (mousedown)="firecategoriesDivMouseDown($event)"></div>
<div cdkDragHandle class="title">
<div>
<span style="user-select: none">消防要素</span>
</div> </div>
</div> </div>
<!-- 消防要素 -->
<div class="firecategoriesTree"> <div *ngIf="!isProperty" id="firecategories" class="firecategories" style="height:94%;">
<!-- 消防列表树写在这里 -->
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" cdkDropList [cdkDropListData]="dataSource" (cdkDropListDropped)="drop($event)"> <div class="firecategoriesTree">
<!-- 消防列表树写在这里 -->
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern}" *matTreeNodeDef="let node;" matTreeNodePadding cdkTreeNodePaddingIndent='26' (click)="clickTreeNode(node)" class="treeNode">
<button mat-icon-button disabled></button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name}}
</span>
<span *ngIf="node.isTemplate">({{node.children.length}})</span>
<span class="isLookCss" (click)="clickLookItem(node)"><mat-icon [ngClass]="{'icongray': node.isLook == false}">visibility</mat-icon></span>
</mat-tree-node>
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern && !isEditPattern}" *matTreeNodeDef="let node;" matTreeNodePadding cdkTreeNodePaddingIndent='26' (click)="clickTreeNode(node)" class="treeNode">
<button mat-icon-button disabled></button> <mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="clickTreeNode(node)"class="treeNode" >
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}"> <button mat-icon-button
{{node.name}} matTreeNodeToggle
</span> [attr.aria-label]="'toggle ' + node.name">
<span *ngIf="node.isTemplate">({{node.children.length}})</span> <mat-icon class="mat-icon-rtl-mirror">
<span class="isLookCss" (click)="clickLookItem(node)"><mat-icon [ngClass]="{'icongray': node.isLook == false}">visibility</mat-icon></span> {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-tree-node> </mat-icon>
</button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern && !isEditPattern}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="clickTreeNode(node)"class="treeNode" > {{node.name}}
<button mat-icon-button </span>
matTreeNodeToggle <span *ngIf="node.isTemplate && node.isNewElement">({{node.children.length}})</span>
[attr.aria-label]="'toggle ' + node.name"> <span class="isLookCss" (click)="clickLookItem(node)"><mat-icon [ngClass]="{'icongray': node.isLook == false}">visibility</mat-icon></span>
<mat-icon class="mat-icon-rtl-mirror"> </mat-tree-node>
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon> </mat-tree>
</button> </div>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name}}
</span>
<span *ngIf="node.isTemplate && node.isNewElement">({{node.children.length}})</span>
<span class="isLookCss" (click)="clickLookItem(node)"><mat-icon [ngClass]="{'icongray': node.isLook == false}">visibility</mat-icon></span>
</mat-tree-node>
</mat-tree>
</div> </div>
</div> </div>
</div> </div>
<div id="bottomDiv" class="bottomCss" *ngIf="!pattern"> <!-- <div id="bottomDiv" class="bottomCss" *ngIf="!pattern">
<div class="dragDiv" (mousedown)="bottomDivMouseDown($event)"></div> <div class="dragDiv" (mousedown)="bottomDivMouseDown($event)"></div>
<div class="title"> <div class="title">
<div (click)="details()" [ngClass]="{'detailsAndattentBtn': detailsAndattentBtn}"> <div (click)="details()" [ngClass]="{'detailsAndattentBtn': detailsAndattentBtn}">
@ -463,7 +499,7 @@
<textarea *ngIf="detailsAndattentBtn" name="" id="" rows="10" [(ngModel)]="canvasData.selectPanelPointBaseData.description"></textarea> <textarea *ngIf="detailsAndattentBtn" name="" id="" rows="10" [(ngModel)]="canvasData.selectPanelPointBaseData.description"></textarea>
<textarea *ngIf="!detailsAndattentBtn" name="" id="" rows="10" [(ngModel)]="canvasData.selectPanelPointBaseData.nodes"></textarea> <textarea *ngIf="!detailsAndattentBtn" name="" id="" rows="10" [(ngModel)]="canvasData.selectPanelPointBaseData.nodes"></textarea>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>

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

@ -12,8 +12,8 @@
flex-direction: column; flex-direction: column;
.buildingbtnchecked{ .buildingbtnchecked{
background-color: #34A6FD;
color: white; color: white;
background-image: url("../../../assets/images/标签选中.png")!important;
} }
} }
@ -63,38 +63,133 @@
} }
} }
//头部操作栏 // //头部操作栏
// .headerOperate {
// img {
// width: 24px;
// height: 24px;
// vertical-align: middle;
// margin-left: 1px;
// }
// span{
// font-size: 18px;
// }
// flex: 5%;
// display: flex;
// align-items:center;
// min-height: 40px;
// box-sizing: border-box;
// margin: 3px 0;
// background-color: white;
// button{
// border: 0.5px solid rgb(208, 211, 214);
// margin: 0 2px;
// }
// .editdeletebtn{
// display: none;
// }
// .bigeditdeletebtn:hover{
// .editdeletebtn{
// display: inline-block;
// }
// }
// }
.headerOperate { .headerOperate {
img { position: relative;
width: 24px;
height: 24px;
vertical-align: middle;
margin-left: 1px;
}
span{ span{
font-size: 18px; font-size: 18px;
} }
flex: 5%; flex: 2%;
display: flex; display: flex;
align-items:center; align-items:center;
min-height: 40px; min-height: 40px;
box-sizing: border-box; box-sizing: border-box;
margin: 3px 0; margin: 3px 0;
background-color: white;
button{ .bigeditdeletebtn{
border: 0.5px solid rgb(208, 211, 214); margin-right: 12px;
margin: 0 2px; height: 80%;
} display: flex;
.editdeletebtn{ flex-direction: column;
display: none; // align-items:center;/*由于flex-direction: column,因此align-items代表的是水平方向*/
justify-content: center;
user-select: none;
background-image: url("../../../assets/images/标签正常.png") ;
background-size:100% 100%;
color: white;
span{
padding: 0 13px;
padding-right: 18px;
}
} }
.bigeditdeletebtn:hover{ .bigeditdeletebtn:hover{
.editdeletebtn{ cursor: pointer;
display: inline-block; background-image: url("../../../assets/images/标签经过.png") ;
}
.bigTalkBox{
user-select: none;
.titleIcon{
font-size: 33px;
vertical-align: sub;
color: white;
}
.talkBox{
width: 309px;
height: 326px;
border: 1px solid #30bbec;
background-color: #013a64;
opacity: .9 ;
position: absolute;
top: 32px;
right:4px;
z-index: 2000;
.btndiv{
div{
border-radius: 18px;
width: 70px;
height: 30px;
text-align: center;
line-height: 30px;
display: inline-block;
font-size: 13px;
color: white;
cursor: pointer;
}
div:nth-child(1){
background-color: #fe9400;
margin: 10px;
}
div:nth-child(2){
background-color: #f95e5a;
}
}
.bottomDiv{
position: absolute;
bottom:6px;
width: 100%;
height: 32px;
line-height: 32px;
display: flex;
color: white;
text-align: center;
div:nth-child(1){
flex: 1;
}
div:nth-child(2){
flex: 6;
color: #409eff;
background: url('../../../assets/images/输入框.png');
background-size: 100% 100%;
}
div:nth-child(3){
flex: 1;
}
}
} }
} }
} }
//功能区 //功能区
// icon统一样式 // icon统一样式
.mat-icon { .mat-icon {
@ -103,27 +198,25 @@
} }
//左右两侧功能栏 统一样式 //左右两侧功能栏 统一样式
.publicCss { .publicCss {
overflow: hidden;
border-radius: 5px; border-radius: 5px;
position: absolute;
height: 100%;
top: 0; top: 0;
} }
.functionalDomain { .functionalDomain {
flex: 90%; flex: 98%;
.functionalDomainContent { .functionalDomainContent {
display: flex;
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.functionalDomainLeft { .functionalDomainLeft {
background-color: #fff; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left: 0px; margin-left: 0px;
transition: margin-left 0.5s; transition: margin-left 0.5s;
min-width: 235px;
border: 1px solid #E6EAEE; border: 1px solid #E6EAEE;
width: 235px;
left: 0; left: 0;
z-index: 111; z-index: 111;
.leftDragDiv{ .leftDragDiv{
@ -135,14 +228,19 @@
cursor: e-resize; cursor: e-resize;
} }
} }
.canvas{
flex: 5;
}
.functionalDomainRight { .functionalDomainRight {
color: white;
// background-color: #113e5e;
z-index: 1001; z-index: 1001;
margin-right: 0px; margin-right: 0px;
transition: margin-right 0.5s; transition: margin-right 0.5s;
border: 1px solid #464646; border: 1px solid #30bbec;
width: 235px; width: 235px;
right: 0; right: 0;
flex: 1;
} }
//右边导航栏显示隐藏 //右边导航栏显示隐藏
.togglePanel2 { .togglePanel2 {
@ -160,23 +258,23 @@
//右边操作栏 //右边操作栏
.title{ .title{
width: 100%; width: 100%;
height: 35px; height: 40px;
background-color: #464646; line-height: 40px;
div{ border-bottom:2px solid #accbf2;
width: 50%; display: flex;
height: 35px; align-content: center;
line-height: 35px; span{
background-color: #595959; display: inline-block;
border-radius: 5px; flex: 1;
span{ text-align: center;
color: white; }
font-size: 14px; span:hover{
font-weight: 400; cursor: pointer;
padding-left: 5px;
}
} }
} }
.selectedTitle{
background: #0c2d44;
}
//右侧属性 //右侧属性
.property{ .property{
@ -186,15 +284,20 @@
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
p{ p{
color: #9c9fa5; color: #d0e0f4;
padding-left: 5px; padding-left: 7px;
letter-spacing:3px;
margin: 5px 0;
} }
.siteproperty_size{ .siteproperty_size{
background-color: #e3e3e3; border-bottom:1px solid #d0e0f4;
width: 93%; width: 93%;
margin: 0 auto; margin: 0 auto;
border-radius: 3px;
min-height: 21px; min-height: 21px;
color: #2399f1;
padding-bottom: 5px;
font-size: 16px;
letter-spacing:2px;
} }
.rightAttribute{ .rightAttribute{
width: 12%; width: 12%;
@ -210,9 +313,21 @@
overflow-y: auto; overflow-y: auto;
height: 100%; height: 100%;
p{ p{
color: #9c9fa5;
margin:1px 0 3px 8px; color: #d0e0f4;
font-size: 14px; padding-left: 7px;
letter-spacing:3px;
margin: 5px 0;
}
.siteproperty_size{
border-bottom:1px solid #d0e0f4;
width: 93%;
margin: 0 auto;
min-height: 21px;
color: #2399f1;
padding-bottom: 5px;
font-size: 16px;
letter-spacing:2px;
} }
span{ span{
font-size: 15px; font-size: 15px;
@ -268,21 +383,7 @@
.colorBigDiv{ .colorBigDiv{
width: 88%; width: 88%;
margin-left: 8px; margin-left: 8px;
.colorBigTemplateDiv{
span{
color: #9c9fa5;
font-size: 14px;
height: 26px;
line-height: 26px;
}
.colorTemplateDiv{
width: 65%;
height: 22px;
display: inline-block;
vertical-align: middle;
margin-left: 26px;
}
}
.colorDiv{ .colorDiv{
.colorLi{ .colorLi{
@ -297,14 +398,28 @@
} }
} }
} }
.colorBigTemplateDiv{
span{
color: #9c9fa5;
font-size: 14px;
height: 26px;
line-height: 26px;
}
.colorTemplateDiv{
width: 65%;
height: 22px;
display: inline-block;
vertical-align: middle;
margin-left: 26px;
}
}
} }
} }
//右侧消防要素 //右侧消防要素
.firecategories{ .firecategories{
position: relative; position: relative;
display: flex; // display: flex;
flex-flow: column; // flex-flow: column;
.firecategoriesTree{ .firecategoriesTree{
overflow-y: auto; overflow-y: auto;
height: 100%; height: 100%;
@ -314,6 +429,13 @@
.isLookCss{ .isLookCss{
position: absolute; position: absolute;
right: 6px; right: 6px;
z-index: 1000;
}
}
.mat-tree{
background-color:transparent;
.mat-tree-node{
color: white!important;
} }
} }
} }

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

@ -479,7 +479,7 @@ export class CollectionToolsComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
// this.canvas.setNameVisible(this.basicInfo,1)
let that = this let that = this
window.setTimeout(()=>{ window.setTimeout(()=>{
document.getElementById("functionalDomainContent").oncontextmenu = function (event) { document.getElementById("functionalDomainContent").oncontextmenu = function (event) {
@ -494,7 +494,20 @@ export class CollectionToolsComponent implements OnInit {
}) })
} }
//右侧属性和消防要素切换
isProperty = true
rightSwitch(type){
if(type == 1){
this.isProperty = true
}else{
this.isProperty = false
}
}
//打开说话框
isOpenTalk = false
openTalkDiv(){
this.isOpenTalk = !this.isOpenTalk
}
ngAfterViewInit(): void { ngAfterViewInit(): void {
// 监听canvas组件选中素材事件 // 监听canvas组件选中素材事件
@ -530,7 +543,7 @@ export class CollectionToolsComponent implements OnInit {
} }
basicInfo:boolean = true //基本信息名称显隐 basicInfo:boolean = true //基本信息名称显隐
wantToWork:boolean = true //想定作业名称显隐 wantToWork:boolean = false //想定作业名称显隐
//点击基本信息名称 //点击基本信息名称
basicInfoClick(){ basicInfoClick(){
this.basicInfo = !this.basicInfo this.basicInfo = !this.basicInfo
@ -1064,24 +1077,21 @@ export class CollectionToolsComponent implements OnInit {
//计算 可视区域内宽度, 是否缩放背景图 //计算 可视区域内宽度, 是否缩放背景图
backGroundScale () { backGroundScale () {
let that = this let that = this
let dad = document.querySelector('.functionalDomainContent').clientWidth let dadWidth = document.querySelector('.canvas').clientWidth
let dadHeight = document.querySelector('.functionalDomainContent').clientHeight let dadHeight = document.querySelector('.canvas').clientHeight
let left = document.querySelector('.functionalDomainLeft').clientWidth
let right = document.querySelector('.functionalDomainRight').clientWidth
let imgWidth = dad - left - right//可视区域内 宽度
let img = new Image() let img = new Image()
img.src = this.selectingSitePlan.imageUrl; img.src = this.selectingSitePlan.imageUrl;
img.onload = function(){ img.onload = function(){
if (img.height > dadHeight && img.width > imgWidth) { if (img.height > dadHeight && img.width > dadWidth) {
let width = imgWidth/img.width let width = dadWidth/img.width
let height = dadHeight/img.height let height = dadHeight/img.height
that.canvas.setBackgroundScale((width>height? height : width)-0.005) that.canvas.setBackgroundScale((width>height? height : width)-0.005)
return return
} else if (img.height > dadHeight) { } else if (img.height > dadHeight) {
that.canvas.setBackgroundScale((dadHeight/img.height)-0.005) that.canvas.setBackgroundScale((dadHeight/img.height)-0.005)
return return
} else if (img.width > imgWidth) { } else if (img.width > dadWidth) {
that.canvas.setBackgroundScale((imgWidth/img.width)-0.005) that.canvas.setBackgroundScale((dadWidth/img.width)-0.005)
return return
} }
}; };
@ -1661,6 +1671,7 @@ export class CollectionToolsComponent implements OnInit {
let params = {componentId: sessionStorage.getItem('planId')} let params = {componentId: sessionStorage.getItem('planId')}
this.http.get('/api/Disasters',{params:params}).subscribe((data:any)=>{ this.http.get('/api/Disasters',{params:params}).subscribe((data:any)=>{
this.allFirePlan = data this.allFirePlan = data
this.getDisposalNode()
if (!data.length) { if (!data.length) {
let msg = { let msg = {
name: '灾情', name: '灾情',

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

@ -278,7 +278,7 @@
justify-content: space-between; /* 水平居中 */ justify-content: space-between; /* 水平居中 */
} }
.functionalDomainContent { .functionalDomainContent {
width: 300px; // width: 300px;
height: 100%; height: 100%;
textarea { textarea {
border-radius: 5px; border-radius: 5px;

1
src/app/ui/dangerous/dangerous.component.scss

@ -188,4 +188,5 @@
z-index: 101; z-index: 101;
left: 6px; left: 6px;
top: 0; top: 0;
} }

6
src/app/ui/plan-assistance/plan-assistance.component.html

@ -3,15 +3,15 @@
<div class="header leftHeader">到场力量</div> <div class="header leftHeader">到场力量</div>
<div class="list"> <div class="list">
<div class="tableDiv"> <div class="tableDiv">
<div class="tableRows" *ngFor="let item of allCarsData;let key = index" (click)='selectCar(item)' [ngClass]="{selectIcon: canvasData.selectCar.Id == item.Id}"> <div class="tableRows" *ngFor="let item of allCarsData;let key = index" (click)='selectCar(item)' [ngClass]="{selectIcon: selectCarID == item.Id}">
<div style="flex: 60%;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <div style="flex: 60%;display: flex;flex-direction: column;justify-content: center;align-items: center;">
<p style="flex: 60%;font-size: 16px;font-weight: 550;" class="contentText">{{item.Name}}</p> <p style="flex: 60%;font-size: 16px;font-weight: 550;" class="contentText">{{item.Name}}</p>
<p style="flex: 40%" class="contentText">{{item.FireTeamName}}</p> <p style="flex: 40%" class="contentText">{{item.FireTeamName}}</p>
</div> </div>
<div class="countdown" style="color: #37f76D;" *ngIf="item.ReachTime < 1">已到场</div> <div class="countdown" style="color: #37f76D;" *ngIf="item.ReachTime < 1">已到场</div>
<div class="countdown" *ngIf="item.ReachTime > 0"> <div class="countdown" *ngIf="item.ReachTime > 0">
<label [ngClass]="{smallFive: item.ReachTime<=300,bigTen: item.ReachTime>=600}"> <label [ngClass]="{smallFive: item.ReachTime<=300,bigTen: item.ReachTime>300}">
<countdown #key [config]="{leftTime: item.ReachTime,format: 'm分钟'}" (event)="handleEvent($event,item)"></countdown> <countdown #key [config]="{leftTime: item.ReachTime,notify: [299],format: 'm分钟'}" (event)="handleEvent($event,item)"></countdown>
</label> </label>
</div> </div>
</div> </div>

205
src/app/ui/plan-assistance/plan-assistance.component.ts

@ -1,6 +1,7 @@
import { Component, OnInit, AfterViewInit, ViewChild, } from '@angular/core'; import { Component, OnInit, AfterViewInit, ViewChild, } from '@angular/core';
import { WorkingAreaComponent } from 'src/app/working-area/working-area.component'; import { WorkingAreaComponent } from 'src/app/working-area/working-area.component';
import {CanvasShareDataService} from '../../canvas-share-data.service'; import {CanvasShareDataService} from '../../canvas-share-data.service';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import * as ObjectID from 'bson-objectid'; import * as ObjectID from 'bson-objectid';
@Component({ @Component({
@ -9,7 +10,7 @@ import * as ObjectID from 'bson-objectid';
styleUrls: ['./plan-assistance.component.scss'] styleUrls: ['./plan-assistance.component.scss']
}) })
export class PlanAssistanceComponent implements OnInit, AfterViewInit { export class PlanAssistanceComponent implements OnInit, AfterViewInit {
constructor(public canvasData: CanvasShareDataService) { } constructor(public canvasData: CanvasShareDataService, public snackBar: MatSnackBar, ) { }
@ViewChild('workingArea') @ViewChild('workingArea')
workingArea: WorkingAreaComponent; workingArea: WorkingAreaComponent;
@ -6639,7 +6640,7 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
DrawMode: null, DrawMode: null,
Thickness: 0, Thickness: 0,
IsFromBuilding: false, IsFromBuilding: false,
GameMode: 2 GameMode: 0
}; };
// 所有车辆信息 // 所有车辆信息
@ -6864,15 +6865,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237 y: 1237
}, },
Name: '水罐消防车', Name: '水罐消防车',
FireTeamName: '八塘消防救援站', //所属消防队 FireTeamName: '八塘消防救援站', // 所属消防队
ReachTime: 240, //到场剩余时间 ReachTime: 240, // 到场剩余时间
WaterYield: '12t',//载水量 WaterYield: '12t', // 载水量
Foam: '0t', //载泡沫 Foam: '0t', // 载泡沫
PeopleNum: 6, //载人数 PeopleNum: 6, // 载人数
Tonnage: '14t', //吨位 Tonnage: '14t', // 吨位
Assignment: '冷却', //执行任务 Assignment: '冷却', // 执行任务
LinkCar: '', //连接车辆 LinkCar: '', // 连接车辆
WaterOccupy: '', //水源占用 WaterOccupy: '', // 水源占用
PropertyInfos: [ PropertyInfos: [
{ {
Enabled: true, Enabled: true,
@ -6914,15 +6915,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237 y: 1237
}, },
Name: '水罐泡沫消防车', Name: '水罐泡沫消防车',
FireTeamName: '八塘消防救援站', //所属消防队 FireTeamName: '八塘消防救援站', // 所属消防队
ReachTime: 240, //到场剩余时间 ReachTime: 240, // 到场剩余时间
WaterYield: '6t',//载水量 WaterYield: '6t', // 载水量
Foam: '2t', //载泡沫 Foam: '2t', // 载泡沫
PeopleNum: 6, //载人数 PeopleNum: 6, // 载人数
Tonnage: '8t', //吨位 Tonnage: '8t', // 吨位
Assignment: '冷却', //执行任务 Assignment: '冷却', // 执行任务
LinkCar: '', //连接车辆 LinkCar: '', // 连接车辆
WaterOccupy: '', //水源占用 WaterOccupy: '', // 水源占用
PropertyInfos: [ PropertyInfos: [
{ {
Enabled: true, Enabled: true,
@ -6964,15 +6965,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237 y: 1237
}, },
Name: '水罐泡沫消防车', Name: '水罐泡沫消防车',
FireTeamName: '八塘消防救援站', //所属消防队 FireTeamName: '八塘消防救援站', // 所属消防队
ReachTime: 240, //到场剩余时间 ReachTime: 240, // 到场剩余时间
WaterYield: '3t',//载水量 WaterYield: '3t', // 载水量
Foam: '1t', //载泡沫 Foam: '1t', // 载泡沫
PeopleNum: 8, //载人数 PeopleNum: 8, // 载人数
Tonnage: '5t', //吨位 Tonnage: '5t', // 吨位
Assignment: '堵截', //执行任务 Assignment: '堵截', // 执行任务
LinkCar: '', //连接车辆 LinkCar: '', // 连接车辆
WaterOccupy: '', //水源占用 WaterOccupy: '', // 水源占用
PropertyInfos: [ PropertyInfos: [
{ {
Enabled: true, Enabled: true,
@ -7014,15 +7015,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237 y: 1237
}, },
Name: '举高喷射消防车', Name: '举高喷射消防车',
FireTeamName: '八塘消防救援站', //所属消防队 FireTeamName: '八塘消防救援站', // 所属消防队
ReachTime: 300, //到场剩余时间 ReachTime: 300, // 到场剩余时间
WaterYield: '16t',//载水量 WaterYield: '16t', // 载水量
Foam: '2t', //载泡沫 Foam: '2t', // 载泡沫
PeopleNum: 4, //载人数 PeopleNum: 4, // 载人数
Tonnage: '18t', //吨位 Tonnage: '18t', // 吨位
Assignment: '灭火', //执行任务 Assignment: '灭火', // 执行任务
LinkCar: '', //连接车辆 LinkCar: '', // 连接车辆
WaterOccupy: '', //水源占用 WaterOccupy: '', // 水源占用
PropertyInfos: [ PropertyInfos: [
{ {
Enabled: true, Enabled: true,
@ -7064,15 +7065,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237 y: 1237
}, },
Name: '水罐泡沫消防车', Name: '水罐泡沫消防车',
FireTeamName: '龚州消防救援站', //所属消防队 FireTeamName: '龚州消防救援站', // 所属消防队
ReachTime: 660, //到场剩余时间 ReachTime: 660, // 到场剩余时间
WaterYield: '6t',//载水量 WaterYield: '6t', // 载水量
Foam: '2t', //载泡沫 Foam: '2t', // 载泡沫
PeopleNum: 6, //载人数 PeopleNum: 6, // 载人数
Tonnage: '8t', //吨位 Tonnage: '8t', // 吨位
Assignment: '供液', //执行任务 Assignment: '供液', // 执行任务
LinkCar: '', //连接车辆 LinkCar: '', // 连接车辆
WaterOccupy: '', //水源占用 WaterOccupy: '', // 水源占用
PropertyInfos: [ PropertyInfos: [
{ {
Enabled: true, Enabled: true,
@ -7114,15 +7115,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237 y: 1237
}, },
Name: '水罐泡沫消防车', Name: '水罐泡沫消防车',
FireTeamName: '龚州消防救援站', //所属消防队 FireTeamName: '龚州消防救援站', // 所属消防队
ReachTime: 720, //到场剩余时间 ReachTime: 720, // 到场剩余时间
WaterYield: '5t',//载水量 WaterYield: '5t', // 载水量
Foam: '1t', //载泡沫 Foam: '1t', // 载泡沫
PeopleNum: 6, //载人数 PeopleNum: 6, // 载人数
Tonnage: '7t', //吨位 Tonnage: '7t', // 吨位
Assignment: '供液', //执行任务 Assignment: '供液', // 执行任务
LinkCar: '', //连接车辆 LinkCar: '', // 连接车辆
WaterOccupy: '', //水源占用 WaterOccupy: '', // 水源占用
PropertyInfos: [ PropertyInfos: [
{ {
Enabled: true, Enabled: true,
@ -7164,15 +7165,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237 y: 1237
}, },
Name: '水罐泡沫消防车', Name: '水罐泡沫消防车',
FireTeamName: '龚州消防救援站', //所属消防队 FireTeamName: '龚州消防救援站', // 所属消防队
ReachTime: 960, //到场剩余时间 ReachTime: 960, // 到场剩余时间
WaterYield: '3t',//载水量 WaterYield: '3t', // 载水量
Foam: '1t', //载泡沫 Foam: '1t', // 载泡沫
PeopleNum: 6, //载人数 PeopleNum: 6, // 载人数
Tonnage: '5t', //吨位 Tonnage: '5t', // 吨位
Assignment: '供液', //执行任务 Assignment: '供液', // 执行任务
LinkCar: '', //连接车辆 LinkCar: '', // 连接车辆
WaterOccupy: '', //水源占用 WaterOccupy: '', // 水源占用
PropertyInfos: [ PropertyInfos: [
{ {
Enabled: true, Enabled: true,
@ -7214,15 +7215,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237 y: 1237
}, },
Name: '举高喷射消防车', Name: '举高喷射消防车',
FireTeamName: '龚州消防救援站', //所属消防队 FireTeamName: '龚州消防救援站', // 所属消防队
ReachTime: 960, //到场剩余时间 ReachTime: 960, // 到场剩余时间
WaterYield: '18t',//载水量 WaterYield: '18t', // 载水量
Foam: '2t', //载泡沫 Foam: '2t', // 载泡沫
PeopleNum: 4, //载人数 PeopleNum: 4, // 载人数
Tonnage: '20t', //吨位 Tonnage: '20t', // 吨位
Assignment: '灭火', //执行任务 Assignment: '灭火', // 执行任务
LinkCar: '', //连接车辆 LinkCar: '', // 连接车辆
WaterOccupy: '', //水源占用 WaterOccupy: '', // 水源占用
PropertyInfos: [ PropertyInfos: [
{ {
Enabled: true, Enabled: true,
@ -7249,6 +7250,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
bottomIsShow = false; // 底部车辆信息是否展示 bottomIsShow = false; // 底部车辆信息是否展示
rightIsShow = true; // 右侧楼层是否展示 rightIsShow = true; // 右侧楼层是否展示
rightSayIsShow = false; // 右侧语音是否展示 rightSayIsShow = false; // 右侧语音是否展示
selectCarID:string = ''; // 选中车辆 样式
ngOnInit(): void { ngOnInit(): void {
const that = this; const that = this;
window.setTimeout(() => { window.setTimeout(() => {
@ -7261,28 +7264,62 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
ngAfterViewInit(): void { ngAfterViewInit(): void {
this.workingArea.loadDemoScene(this.demoData, 0.149); this.workingArea.loadDemoScene(this.demoData, 0.149);
this.dataInit();
// 监听canvas组件选中素材事件
this.workingArea.on("select",obj=>{
//选中素材属性注入函数
this.selectCar(obj.assetData,false)
})
// 监听canvas组件取消选中素材事件
this.workingArea.on("deselect",obj=>{
this.bottomIsShow = false;
this.selectCarID = ''
});
} }
// 开始绘制 // 开始绘制
plot(e) { plot(e) {
e == 0 ? this.workingArea.beginPaintingArrows() : this.workingArea.beginPaintPipeline();
}
// 到场车辆初始化
dataInit() {
this.allCarsData.forEach(item => {
item.ReachTime == 0 ? this.workingArea.ShowCarIcon(item) : null;
});
} }
//倒计时结束 // 倒计时结束
handleEvent (e,item) { handleEvent(e, item) {
e.left==0? item.ReachTime=0 : null if (e.left == 0) {
item.ReachTime = 0;
this.workingArea.ShowCarIcon(item);
} else {
item.ReachTime = e.left / 1000;
}
} }
//选择 车辆 //选择 车辆
selectCar (e) { selectCar (e,isSelect:boolean = true) {
console.log(e) if (e.ReachTime == 0) {
this.canvasData.selectCar = e this.canvasData.selectCar = e
this.bottomIsShow = true this.selectCarID = JSON.parse(JSON.stringify( e.Id ))
this.bottomIsShow = true
let list = []
list.push(e.Id)
isSelect? this.workingArea.setHighlight(list) : null
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000;
this.snackBar.open('车辆目前未到场', '确定', config);
}
} }
//关闭 底部车辆信息 // 关闭 底部车辆信息
closeBottom () { closeBottom() {
this.bottomIsShow = false this.bottomIsShow = false;
} }
// 打开 右侧楼层 // 打开 右侧楼层

2
src/app/ui/plan/collection-tools.component.ts

@ -9,7 +9,7 @@ import {WorkingAreaComponent} from '../../working-area/working-area.component'
import {CanvasShareDataService,GameMode} from '../../canvas-share-data.service' //引入服务 import {CanvasShareDataService,GameMode} from '../../canvas-share-data.service' //引入服务
import Viewer from 'viewerjs'; import Viewer from 'viewerjs';
@Component({ @Component({
selector: 'app-collection-tools', selector: 'plan',
templateUrl: './collection-tools.component.html', templateUrl: './collection-tools.component.html',
styleUrls: ['./collection-tools.component.scss'] styleUrls: ['./collection-tools.component.scss']
}) })

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

@ -1,4 +1,4 @@
<div class="leisiTable"> <!-- <div class="leisiTable">
<table> <table>
<thead > <thead >
<td style="width:40%;">单位名称</td> <td style="width:40%;">单位名称</td>
@ -19,4 +19,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div> -->
<div style="width: 100%;height: 100%;">
<app-collection-tools></app-collection-tools>
</div>

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

@ -31,4 +31,5 @@ export class SimilarPlansComponent implements OnInit {
} }

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

@ -121,6 +121,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// 是否登录 // 是否登录
public verificationURL = '/ui/plan'; // 验证url地址是否为验证页面 public verificationURL = '/ui/plan'; // 验证url地址是否为验证页面
public verificationURLTwo = '/ui/similarPlans'; // 验证url地址是否为验证页面
count = 0; count = 0;
isLogin() { isLogin() {
const token = sessionStorage.getItem('token'); // 判断 是否登录状态 const token = sessionStorage.getItem('token'); // 判断 是否登录状态
@ -241,7 +242,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.content.nativeElement.appendChild(this.app.view); this.content.nativeElement.appendChild(this.app.view);
const url = this.router.url; const url = this.router.url;
// tslint:disable-next-line: no-unused-expression // tslint:disable-next-line: no-unused-expression
url === this.verificationURL ? this.isLogin() : null; url === this.verificationURL || url === this.verificationURLTwo ? this.isLogin() : null;
this.createBackgroundImage(); this.createBackgroundImage();
// this.createPreviewSinglePointIcon(); // this.createPreviewSinglePointIcon();
@ -250,6 +251,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// this.createEnterPaintEndButton(); // this.createEnterPaintEndButton();
// this.backgroundImage.addChild(this.paintingLine); // this.backgroundImage.addChild(this.paintingLine);
this.on('select', obj => { this.on('select', obj => {
console.log('选择了' + obj);
if (this.allowEdit) { if (this.allowEdit) {
if (obj instanceof MultipointIcon) { if (obj instanceof MultipointIcon) {
obj.setPointVisiable(true); obj.setPointVisiable(true);
@ -372,7 +374,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
public setHighlight(ids: string[]): void { public setHighlight(ids: string[]): void {
this.selection.deselectAll(); this.selection.deselectAll();
ids.forEach(item => { ids.forEach(item => {
const obj = this.backgroundImage.getChildByName(item); let obj = this.backgroundImage.getChildByName(item);
if (obj === null) {
obj = this.app.stage.getChildByName(item);
}
this.selection.select(obj); this.selection.select(obj);
}); });
} }
@ -429,106 +434,118 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
list.forEach(element => { list.forEach(element => {
const single = new SinglePointIcon(element, this); const single = new SinglePointIcon(element, this);
}); });
this.setNameVisible(false, GameMode.BasicInformation);
this.setNameVisible(false, GameMode.BasicInformation);
const tempData = { const tempData = {
TemplateId: null, Id: '5f6719a4e03abe3856d87d7b',
FloorId: null, Name: '作业面',
Angle: 0, Angle: 0,
Color: 0, Color: '#066eed80',
Enabled: true, Point: {
FillMode: 0, x: 2139,
FireElementId: 0, y: 399
FixedSize: false, },
CanConnection: true, Width: 32,
ConnectionObjs: [], Border: {
Height: 45, w: 0,
Width: 45, x: 0,
Id: '5f67f92238f13cd2048cae9d', y: 0,
ImageUrl: './assets/images/泡沫消防车.png', z: 0
InteractiveMode: 0, },
MultiPoint: null, Height: 32,
Point: { Enabled: true,
x: 1295, FloorId: '5f670bb79e91f4410005f564',
y: 1237 DrawMode: 0,
}, FillMode: 1,
Name: '', GameMode: 1,
PropertyInfos: [ ImageUrl: '/api/Objects/PlanPlatform/5e7b384e8121c2286c0cb290.png',
{ CompanyId: '5f67042b9e91f4410005f55c',
Enabled: true, FixedSize: false,
Order: 0, CanConnection: true,
PhysicalUnit: '', ConnectionObjs: [],
PropertyName: '名称/编号', Thickness: 0,
PropertyType: 0, BuildingId: '5f6704859e91f4410005f55f',
PropertyValue: '', MultiPoint: [
Required: false, {
RuleName: '', x: 2139,
RuleValue: '', y: 399
Tag: '', },
Visible: true {
} x: 2194,
], y: 399
Border: null, },
DrawMode: null, {
Thickness: 0, x: 2194,
IsFromBuilding: false, y: 1217
GameMode: 2 },
}; {
x: 2139,
const tempData2 = { y: 1217
TemplateId: null, },
FloorId: null, ],
Angle: 0, TemplateId: '5e7b38610137e12020bd7f7b',
Color: 0, FireElementId: '5e7967f30814180f1c1ecaab',
Enabled: true, PropertyInfos: [
FillMode: 0, {
FireElementId: 0, Tag: '',
CanConnection: true, Order: 0,
ConnectionObjs: [], Enabled: true,
FixedSize: false, Visible: true,
Height: 45, Required: false,
Width: 45, RuleName: '',
Id: '5f67f92238f13cd2048cae9d', RuleValue: '',
ImageUrl: './assets/images/水罐消防车.png', PhysicalUnit: '',
InteractiveMode: 0, PropertyName: '名称/编号',
MultiPoint: null, PropertyType: 0,
Point: { PropertyValue: '15'
x: 1295, },
y: 1237 {
}, Tag: '',
Name: '', Order: 0,
PropertyInfos: [ Enabled: true,
{ Visible: true,
Enabled: true, Required: false,
Order: 0, RuleName: '',
PhysicalUnit: '', RuleValue: '',
PropertyName: '名称/编号', PhysicalUnit: '',
PropertyType: 0, PropertyName: '压力',
PropertyValue: '', PropertyType: 0,
Required: false, PropertyValue: '0.1Mpa'
RuleName: '', },
RuleValue: '', {
Tag: '', Tag: '',
Visible: true Order: 0,
} Enabled: true,
], Visible: true,
Border: null, Required: false,
DrawMode: null, RuleName: '',
Thickness: 0, RuleValue: '',
IsFromBuilding: false, PhysicalUnit: '张',
GameMode: 2 PropertyName: '图片',
}; PropertyType: 4,
this.ShowCarIcon(tempData); PropertyValue: '5'
this.ShowCarIcon(tempData2); },
this.ShowCarIcon(tempData); {
this.ShowCarIcon(tempData2); Tag: null,
this.ShowCarIcon(tempData); Order: 0,
this.ShowCarIcon(tempData2); Enabled: false,
Visible: false,
// // 开始绘制管线 Required: false,
// this.beginPaintPipeline(); RuleName: null,
this.beginPaintingArrows(); RuleValue: null,
PhysicalUnit: null,
PropertyName: '图片',
PropertyType: 3,
PropertyValue: '/api/Objects/WebPlan2D/5f67042b9e91f4410005f55c/5f6717b48db9a325049fa975.jpg'
}
],
IsFromBuilding: true,
InteractiveMode: 0
}
;
const poly = new PolygonIcon(tempData, this);
} }
/** /**
* *
@ -769,7 +786,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
} else { } else {
this.paintingArrows.ready = true; this.paintingArrows.ready = true;
this.paintingArrows = null; this.paintingArrows = null;
this.beginPaintPipeline();
} }
break; break;
} }
@ -959,7 +975,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
/** /**
* 线 * 线
*/ */
private beginPaintPipeline(): void { public beginPaintPipeline(): void {
this.paintMode = PaintMode.Pipeline; this.paintMode = PaintMode.Pipeline;
} }
public paintingPipelineFinish(): void { public paintingPipelineFinish(): void {
@ -968,7 +984,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.paintPoints.splice(0, this.paintPoints.length); this.paintPoints.splice(0, this.paintPoints.length);
this.paintingPipeline = null; this.paintingPipeline = null;
} }
this.beginPaintingArrows();
} }
public beginPaintingArrows(): void { public beginPaintingArrows(): void {
this.paintMode = PaintMode.Arrows; this.paintMode = PaintMode.Arrows;
@ -1258,6 +1273,10 @@ export class SinglePointIcon extends PIXI.Container {
this.text.y = this.image.y - this.image.height / 2; this.text.y = this.image.y - this.image.height / 2;
this.text.anchor.set(0.5, 1); this.text.anchor.set(0.5, 1);
if (this.assetData.GameMode === 2) {
this.text.visible = false;
}
this.addChild(this.text); this.addChild(this.text);
this.addChild(this.image); this.addChild(this.image);
} }

Loading…
Cancel
Save