Browse Source

[完善]总平面图和层平面图分开

master
邵佳豪 3 years ago
parent
commit
794cc71263
  1. 10
      src/app/navigation/navigation.component.html
  2. 38
      src/app/ui/collection-tools-building/addPlaneFigure.html
  3. 466
      src/app/ui/collection-tools-building/collection-tools.component.html
  4. 356
      src/app/ui/collection-tools-building/collection-tools.component.scss
  5. 25
      src/app/ui/collection-tools-building/collection-tools.component.spec.ts
  6. 2082
      src/app/ui/collection-tools-building/collection-tools.component.ts
  7. 28
      src/app/ui/collection-tools-building/createBuilding.html
  8. 23
      src/app/ui/collection-tools-building/editBuilding.html
  9. 50
      src/app/ui/collection-tools-building/editPlaneFigure.html
  10. 191
      src/app/ui/collection-tools-building/leftFunctionalDomain.ts
  11. 247
      src/app/ui/collection-tools-building/panel.scss
  12. 24
      src/app/ui/collection-tools-building/viewdetails.html
  13. 13
      src/app/ui/collection-tools/collection-tools.component.html
  14. 3
      src/app/ui/ui-routing.module.ts
  15. 4
      src/app/ui/ui.module.ts

10
src/app/navigation/navigation.component.html

@ -8,7 +8,9 @@
<!-- basicinfo -->
<li [routerLink]="['/datacollection/basicinfo']" routerLinkActive="router-link-active">基本信息</li>
<!-- plan -->
<li [routerLink]="['/datacollection/collectionTools']" routerLinkActive="router-link-active">平面图</li>
<li [routerLink]="['/datacollection/collectionTools']" routerLinkActive="router-link-active">总平面图</li>
<!-- plan -->
<li [routerLink]="['/datacollection/collectionToolsbuilding']" routerLinkActive="router-link-active">层平面图</li>
<!-- allaround -->
<li [routerLink]="['/datacollection/allaround']" routerLinkActive="router-link-active">四周毗邻</li>
<!-- fire-fighting-device -->
@ -25,7 +27,9 @@
</div>
</mat-sidenav>
<button type="button" mat-button (click)="drawer.toggle()" class="shownav"><mat-icon>menu</mat-icon></button>
<button type="button" mat-button (click)="drawer.toggle()" class="shownav">
<mat-icon>menu</mat-icon>
</button>
<div class="example-sidenav-content">
<div style="height: 64px;">
@ -35,4 +39,4 @@
<router-outlet></router-outlet>
</div>
</div>
</mat-sidenav-container>
</mat-sidenav-container>

38
src/app/ui/collection-tools-building/addPlaneFigure.html

@ -0,0 +1,38 @@
<div class="functionalDomainContent">
<div mat-dialog-title>
<label *ngIf="!data.isBuilding">新建平面图</label>
<label *ngIf="data.isBuilding">新建楼层/区域</label>
</div>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div class="keyMargin">
<mat-form-field>
<input matInput name="name" required ngModel placeholder="名称">
</mat-form-field>
</div>
<div class="keyMargin" *ngIf="data.isBuilding">
<mat-checkbox name="isRefugeStorey" [(ngModel)]="checked">是否为避难层</mat-checkbox>
</div>
<div class="keyMargin">
<mat-form-field>
<input matInput name="area" type="number" ngModel placeholder="面积 (平方米)">
</mat-form-field>
</div>
<div class="keyMargin">
<textarea name="details" ngModel placeholder="详情"></textarea>
</div>
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
</div>
</form>
</div>

466
src/app/ui/collection-tools-building/collection-tools.component.html

@ -0,0 +1,466 @@
<div class="content">
<!-- header头部 -->
<div class="header">
<button mat-button (click)="toggle()">
<mat-icon style="vertical-align: middle;">toc</mat-icon>
</button>
<button mat-button (click)="toggle2()">
<mat-icon style="vertical-align: middle;">list</mat-icon>
</button>
<span [ngClass]="{'icongray': !basicInfo}" title="基本信息名称显示/隐藏" class="marginLeftRight" (click)="basicInfoClick()">
基本信息名称
<mat-icon>visibility</mat-icon>
</span>
<span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isMultiSelect" (change)='changeMultiSelect($event)'></mat-checkbox> 多选
</span>
<span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isShowLegend" (change)='changeLegend($event)' [disabled]='this.canvasData.selectPanelPoint.BackgroundImageUrl'></mat-checkbox> 显示图例
</span>
<button (click)="copyAsset()" class="copytobutn marginLeftRight" mat-button title="复制" style="margin:0 5px;" *ngIf="isEditPattern">
复制<mat-icon>library_books</mat-icon>
</button>
<button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern">
粘贴<mat-icon>screen_share</mat-icon>
</button>
<span title="适应缩放" class="zoom" (click)="adaptZoom()">
<img src="/assets/images/适应缩放.png" alt="">
适应缩放
</span>
<span title="重置缩放" class="zoom" (click)="resetZoom()">
<img src="/assets/images/重置缩放.png" alt="">
重置缩放
</span>
<span style="position: absolute;right: 60px;cursor: pointer;">
<mat-icon title="查看/编辑模式" (click)="lookpat()" *ngIf="isEditPattern">tv</mat-icon>
<mat-icon title="查看/编辑模式" (click)="editpat()" *ngIf="!isEditPattern">create</mat-icon>
<mat-icon *ngIf="isEditPattern " style="margin-left: 12px;" title="保存" (click)="saveSite()">description</mat-icon>
</span>
</div>
<!-- 头部操作栏 -->
<div class="headerOperate">
<button mat-button *ngFor="let item of allBuildings;let key = index" (click)="checkedBuilding(item,key)" class="bigeditdeletebtn"
[ngClass]="{'buildingbtnchecked': checkedBuildingIndex==key}">
<span>{{item.name}}</span>
<span class="editdeletebtn" *ngIf="isEditPattern">
<mat-icon (click)="editBuilding($event,item)"
style="font-size: 23px;vertical-align:sub;margin-left: 6px;color: rgb(26, 194, 26);">create</mat-icon>
<mat-icon (click)="deleteBuilding($event,item)"
style="font-size: 23px;vertical-align:sub;color: rgb(224, 51, 51);">delete</mat-icon>
</span>
</button>
<button mat-button (click)="createBuilding()" *ngIf="isEditPattern">
<span style="font-size: 24px;">+</span>
</button>
</div>
<!--功能区 -->
<div class="functionalDomain">
<div class='functionalDomainContent' id="functionalDomainContent">
<!-- H5Canvas -->
<app-working-area #canvas></app-working-area>
<!-- H5Canvas -->
<div id="leftDiv" (mousewheel)="$event.stopPropagation()" class='functionalDomainLeft publicCss' [ngClass]="{'togglePanel': toggleExpandPanel==true}" style="user-select: none">
<div class="leftDragDiv" (mousedown)="leftDivMouseDown($event)"></div>
<!-- 平面图 -->
<div class="planarGraph">
<div class="planarGraphHeader" (click)='togglePlanarGraph()'>
<mat-icon *ngIf="togglePlane">keyboard_arrow_up</mat-icon>
<mat-icon *ngIf="!togglePlane">keyboard_arrow_down</mat-icon>
<label class="overflowText" style="font-weight: 550;">平面图</label>
<label class="hover" *ngIf="isEditPattern">
<mat-icon (click)='foundPanel($event)'>add</mat-icon>
</label>
</div>
<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)' (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/*">
<mat-icon class="matIcons">photo_size_select_actual</mat-icon>
</a>
<a href="javascript:;" id="a-uploadImg" *ngIf="selectSitePlanIndex==key && !item.imageUrl && isEditPattern" title="上传底图" >
<input type="file" (change)='replaceBaseMap($event,item)' accept="image/*">
<img src="../../../assets/images/upload.jpg">
</a>
<!-- 右边定位操作栏 -->
<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>
<p class="functionButton">
<mat-icon class="functionIcon" title="编辑属性" (click)='editPlaneData(item)'>edit</mat-icon>
<mat-icon class="functionIcon" title="删除" (click)="deletePlaneData(item)">delete</mat-icon>
</p>
<p class="functionButton">
<mat-icon class="functionIcon" title="旋转底图" (click)='revolveImg(item)'>cached</mat-icon>
<mat-icon class="functionIcon" title="复制" (click)="duplicateLayer(item)">library_books</mat-icon>
</p>
<p class="functionButton">
<mat-icon class="functionIcon bigFunctionIcon" title="下移" (click)='moveDown(item,key)'>keyboard_arrow_down</mat-icon>
</p>
</div>
<!-- 右边定位操作栏 -->
</div>
</div>
</div>
<!-- 素材库 -->
<div id="materialBank" *ngIf="isEditPattern">
<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 style="flex: 1;overflow-y: auto;" [hidden]="!toggleMaterialBank">
<div>
<input type="text" class="searchLibrary" [(ngModel)]="searchInput" (ngModelChange)="libraryChange()">
<div class="panelLibraryFlex" *ngIf="searchLibrary.length">
<div class="imgBox" *ngFor="let items of searchLibrary;let key = index" [title]="items.name"
[ngClass]="{'selectImg': selectLibrary=='搜索' && selectImageIndex==key}" (click)='selectImg({name:"搜索"},items,key)'>
<img [src]="items.imageUrl" onerror="javascript:this.src='../../../assets/images/noImg.png'">
<p class="overflowText">{{items.name}}</p>
</div>
</div>
</div>
<ng-container *ngIf="!searchLibrary.length">
<mat-accordion *ngFor="let item of allLibrary" id="panelLibrary">
<mat-expansion-panel (opened)='opened(item)'>
<mat-expansion-panel-header>
<label class="text">{{item.name}}</label>
</mat-expansion-panel-header>
<div class="panelLibraryFlex">
<div class="imgBox" *ngFor="let items of item.images;let key = index" [title]="items.name"
(click)='selectImg(item,items,key)'
[ngClass]="{'selectImg': selectLibrary==item.name && selectImageIndex==key}">
<img [src]="items.imageUrl" onerror="javascript:this.src='../../../assets/images/noImg.png'">
<p class="overflowText">{{items.name}}</p>
</div>
</div>
</mat-expansion-panel>
</mat-accordion>
</ng-container>
</div>
</div>
</div>
<div id="rightDiv" (mousewheel)="$event.stopPropagation()" 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 [ngClass]="{'forbidden': !isEditPattern}" id="property" class="property" style="height: 50%;">
<div class="title">
<div>
<span style="user-select: none">属性</span>
</div>
</div>
<!-- 平面图属性 -->
<div class="siteproperty" style="user-select: none" *ngIf="isShowProperty && isShowAttribute && !isMultipleAsset">
<p>面积(平方米)</p>
<div class="siteproperty_size">{{canvasData.selectStorey.area}}</div>
<p>详情</p>
<div class="siteproperty_size">
{{canvasData.selectStorey.details}}
</div>
</div>
<!-- 素材属性 -->
<div class="assetsproperty" style="user-select: none" *ngIf="isShowProperty && !isShowAttribute && !isMultipleAsset">
<h3 style="text-align: center;font-weight: 900;">{{assetName}}</h3>
<div *ngIf="canvasAssetObj.InteractiveMode == 0">
<p>宽度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetWidth" (input)="assetWidthIunput()" [disabled]="!isEditPattern">
<p>高度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetHeight" (input)="assetHeightIunput()" [disabled]="!isEditPattern">
<p>角度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="sliderValue"
oninput="if(value>360)value=360;if(value<0)value=0;" (input)="assetAngleIunput()" [disabled]="!isEditPattern">
<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>
</div>
</div>
<!-- 如果是多点连线 -->
<div *ngIf="canvasAssetObj.Name == '普通墙' || canvasAssetObj.Name == '承重墙'">
<p>厚度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="sliderValueThickness"
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%;"
[(ngModel)]="sliderValueThickness" (change)="assetThicknessIunput()" [disabled]="!isEditPattern"></mat-slider>
</div>
</div>
<p style="margin-top: 4px;margin-bottom: 0px;">是否高亮</p>
<div>
<input class="input" [(ngModel)]="isHighLight" type="checkbox" [disabled]="!isEditPattern">
<span style="font-size: 14px;">选中高亮</span>
</div>
<div class="colorBigDiv" *ngIf="canvasAssetObj.FillMode == 0">
<div class="colorBigTemplateDiv">
<span>颜色</span>
<div class="colorTemplateDiv" [style]="{'background-color':selectedcolor}">
</div>
</div>
<div class="colorDiv" *ngIf="isEditPattern">
<ul>
<li (click)="selectcolor(item,key)" class="colorLi" *ngFor="let item of colors,let key=index" [style]="{'background-color':item}"></li>
</ul>
</div>
<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()" [disabled]="!isEditPattern"></mat-slider>
<span style="color: #9c9fa5;font-size: 12px;">{{colorDivSliderValue}}%</span>
</div>
<div *ngFor="let item of PropertyInfos;index as key ">
<!-- 单行文本 -->
<div *ngIf="item.PropertyType == 0">
<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>
<!-- 多行文本 -->
<div *ngIf="item.PropertyType == 1">
<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>
<!-- 数值 -->
<div *ngIf="item.PropertyType == 2">
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<input type="number" class="biginput" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)" [disabled]="!isEditPattern">
</div>
<!-- 图片数量 -->
<div *ngIf="item.PropertyType == 4" style="height: 140px;">
<div style="position: relative;width: 100%;height: 21px;margin: 1px 0;">
<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>
<input id="inputimg" [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 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 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 *ngIf="item.PropertyType == 5" class="selectDiv">
<p style="display: inline-block;">{{item.PropertyName}}</p>
<select (change)="direction(item,$event)" [disabled]="!isEditPattern">
<option value ="0" [selected]="item.PropertyValue =='0'"></option>
<option value ="1" [selected]="item.PropertyValue =='1'">西</option>
<option value ="2" [selected]="item.PropertyValue =='2'"></option>
<option value ="3" [selected]="item.PropertyValue =='3'"></option>
<option value ="4" [selected]="item.PropertyValue =='4'">东南</option>
<option value ="5" [selected]="item.PropertyValue =='5'">西南</option>
<option value ="6" [selected]="item.PropertyValue =='6'">东北</option>
<option value ="7" [selected]="item.PropertyValue =='7'">西北</option>
</select>
</div>
<!-- 布尔值 是1或否0 -->
<div *ngIf="item.PropertyType == 6">
<p>{{item.PropertyName}}</p>
<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>
</div>
<!-- 供给区域 -->
<div *ngIf="item.PropertyType == 7" class="selectDiv">
<p style="display: inline-block;">{{item.PropertyName}}</p>
<select (change)="supplyArea(item,$event)" [disabled]="!isEditPattern">
<option value ="0" [selected]="item.PropertyValue =='0'">全部</option>
<option value ="1" [selected]="item.PropertyValue =='1'">高区</option>
<option value ="2" [selected]="item.PropertyValue =='2'">中区</option>
<option value ="3" [selected]="item.PropertyValue =='3'">低区</option>
<option value ="4" [selected]="item.PropertyValue =='4'">高中区</option>
<option value ="5" [selected]="item.PropertyValue =='5'">高低区</option>
<option value ="6" [selected]="item.PropertyValue =='6'">中低区</option>
</select>
</div>
<!-- 供给类型 -->
<div *ngIf="item.PropertyType == 8" class="selectDiv">
<p style="display: inline-block;">{{item.PropertyName}}</p>
<select (change)="supplyType(item,$event)" value="4" [disabled]="!isEditPattern">
<option value ="0" [selected]="item.PropertyValue =='0'">消火栓</option>
<option value ="1" [selected]="item.PropertyValue =='1'">喷淋</option>
<option value ="2" [selected]="item.PropertyValue =='2'">水幕</option>
<option value ="3" [selected]="item.PropertyValue =='3'">泡沫</option>
<option value ="4" [selected]="item.PropertyValue =='4'">消防</option>
</select>
</div>
</div>
</div>
<!-- 框选多个素材属性 -->
<div class="assetsproperty" style="user-select: none" *ngIf="isShowProperty && isMultipleAsset">
<div *ngIf="multipleAsset.InteractiveMode == 0">
<p>宽度(像素)</p>
<input type="number" class="biginput" [(ngModel)]="multipleAsset.Width" (input)="multipleAssetWidthInput()" [disabled]="!isEditPattern">
<p>高度(像素)</p>
<input type="number" class="biginput" [(ngModel)]="multipleAsset.Height" (input)="multipleAssetHeightInput()" [disabled]="!isEditPattern">
<p>角度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="multipleAsset.Angle"
oninput="if(value>360)value=360;if(value<0)value=0;" (input)="multipleAssetAngleInput()" [disabled]="!isEditPattern">
<mat-slider color="primary" min="0" max="360" step="1" style="bottom: 12px;left: 2px;width: 70%;"
[(ngModel)]="multipleAsset.Angle" (change)="multipleAssetAngleInput()" [disabled]="!isEditPattern"></mat-slider>
</div>
</div>
<!-- 如果是多点连线 -->
<div *ngIf="multipleAsset.InteractiveMode == 1 || multipleAsset.InteractiveMode == 3">
<p>厚度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="multipleAsset.Thickness"
oninput="if(value>999)value=999;if(value<0)value=0;" (input)="multipleAssetThicknessInput()" [disabled]="!isEditPattern">
<mat-slider color="primary" min="0" max="999" step="1" style="bottom: 12px;left: 2px;width: 70%;"
[(ngModel)]="multipleAsset.Thickness" (change)="multipleAssetThicknessInput()" [disabled]="!isEditPattern"></mat-slider>
</div>
</div>
<div class="colorBigDiv" *ngIf="multipleAsset.FillMode == 0">
<div class="colorBigTemplateDiv">
<span>颜色</span>
<div class="colorTemplateDiv" [style]="{'background-color':selectedcolor}">
</div>
</div>
<div class="colorDiv" *ngIf="isEditPattern">
<ul>
<li (click)="multipleAssetSelectcolor(item,key)" class="colorLi" *ngFor="let item of colors,let key=index" [style]="{'background-color':item}"></li>
</ul>
</div>
<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)="multipleColorDivSliderChange()" [disabled]="!isEditPattern"></mat-slider>
<span style="color: #9c9fa5;font-size: 12px;">{{colorDivSliderValue}}%</span>
</div>
<div *ngFor="let item of multipleAsset.PropertyInfos;index as key ">
<!-- 单行文本 -->
<div *ngIf="item.PropertyType == 0">
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<input type="text" class="biginput" [name]="item.PropertyName" [(ngModel)]="item.PropertyValue" (input)="multipleAssetInputChange(item,$event)" [disabled]="!isEditPattern">
</div>
<!-- 多行文本 -->
<div *ngIf="item.PropertyType == 1">
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<textarea class="textarea" name="" id="" [(ngModel)]="item.PropertyValue" (input)="multipleAssetInputChange(item,$event)" [disabled]="!isEditPattern"></textarea>
</div>
<!-- 数值 -->
<div *ngIf="item.PropertyType == 2">
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<input type="number" class="biginput" [(ngModel)]="item.PropertyValue" (input)="multipleAssetInputChange(item,$event)" [disabled]="!isEditPattern">
</div>
<!-- 方向 -->
<!-- <div *ngIf="item.PropertyType == 5 " class="selectDiv">
<p style="display: inline-block;">{{item.PropertyName}}</p>
<select [(ngModel)]="item.PropertyValue" (change)="direction(item,$event)" [disabled]="!isEditPattern">
<option value ="0" [selected]="item.PropertyValue =='0'"></option>
<option value ="1" [selected]="item.PropertyValue =='1'">西</option>
<option value ="2" [selected]="item.PropertyValue =='2'"></option>
<option value ="3" [selected]="item.PropertyValue =='3'"></option>
<option value ="4" [selected]="item.PropertyValue =='4'">东南</option>
<option value ="5" [selected]="item.PropertyValue =='5'">西南</option>
<option value ="6" [selected]="item.PropertyValue =='6'">东北</option>
<option value ="7" [selected]="item.PropertyValue =='7'">西北</option>
</select>
</div> -->
<!-- 布尔值 是1或否0 -->
<div *ngIf="item.PropertyType == 6">
<p>{{item.PropertyName}}</p>
<input value='1' [(ngModel)]="item.PropertyValue" [disabled]="!isEditPattern" class="input" type="radio" name="radio" (click)="multipleAssetRadioChange(item,'1')"><span></span>
<input value='0' [(ngModel)]="item.PropertyValue" [disabled]="!isEditPattern" class="input" type="radio" name="radio" (click)="multipleAssetRadioChange(item,'0')"><span></span>
</div>
<!-- 供给区域 -->
<div *ngIf="item.PropertyType == 7" class="selectDiv">
<p style="display: inline-block;">{{item.PropertyName}}</p>
<select [(ngModel)]="item.PropertyValue" (change)="multipleSupplyArea(item,$event)" [disabled]="!isEditPattern">
<option value ="0">全部</option>
<option value ="1">高区</option>
<option value ="2">中区</option>
<option value ="3">低区</option>
<option value ="4">高中区</option>
<option value ="5">高低区</option>
<option value ="6">中低区</option>
</select>
</div>
<!-- 供给类型 -->
<div *ngIf="item.PropertyType == 8" class="selectDiv">
<p style="display: inline-block;">{{item.PropertyName}}</p>
<select [(ngModel)]="item.PropertyValue" (change)="multipleSupplyArea(item,$event)" [disabled]="!isEditPattern">
<option value ="0">消火栓</option>
<option value ="1">喷淋</option>
<option value ="2">水幕</option>
<option value ="3">泡沫</option>
<option value ="4">消防</option>
</select>
</div>
</div>
</div>
</div>
<!-- 消防要素 -->
<div id="firecategories" class="firecategories" style="height: 50%;">
<!-- 素材属性div鼠标拖动div -->
<div style="height:3px;width: 100%;position: absolute;top: 0;cursor: n-resize;z-index: 1000;" (mousedown)="firecategoriesDivMouseDown($event)"></div>
<div class="title">
<div>
<span style="user-select: none">消防要素</span>
</div>
</div>
<div class="firecategoriesTree">
<div class="hideAllTreeNode" (click)='toggoleAllTreenode()' *ngIf="allFireElements.length"><label>全部显示/隐藏</label><mat-icon [ngClass]="{'icongray': hideAllTreenode == false}">visibility</mat-icon></div>
<!-- 消防列表树写在这里 -->
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" >
<mat-tree-node [ngClass]="{'isLookPattern': !node.isLookPattern && !isEditPattern}" *matTreeNodeDef="let node;" matTreeNodePadding cdkTreeNodePaddingIndent='26' (click)="clickTreeNode(node)" >
<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 [ngClass]="{'isLookPattern': !node.isLookPattern && !isEditPattern}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="clickTreeNode(node)">
<button mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<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>

356
src/app/ui/collection-tools-building/collection-tools.component.scss

@ -0,0 +1,356 @@
@import './panel.scss';
.icongray{
color: #D9D0DC;
}
.content {
width: 100%;
height: 100%;
overflow: hidden;
box-sizing: border-box;
padding: 3px;
display: flex;
flex-direction: column;
.buildingbtnchecked{
background-color: #34A6FD;
color: white;
}
}
//header头部
.header {
position: relative;
flex: 5%;
display: flex;
align-items:center;
min-height: 40px;
background-color: #fff;
.zoom{
display: flex;
align-items: center;
margin-left: 15px;
cursor: pointer;
img{
margin-right: 3px;
}
}
.marginLeftRight {
margin: 0 8px;
font-size: 16px;
user-select: none;
cursor: pointer;
.mat-icon { vertical-align: middle; font-size: 24px; }
}
.nameShow{
cursor: pointer;
user-select: none;
}
.copytobutn{
width: 60px;
min-width: 60px;
display: flex;
justify-content: center;
}
span{
height: 24px;
line-height: 24px;
}
}
//头部操作栏
.headerOperate {
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;
}
}
}
//功能区
// icon统一样式
.mat-icon {
cursor:pointer;
vertical-align: middle;
}
//左右两侧功能栏 统一样式
.publicCss {
background-color: #fff;
border-radius: 5px;
position: absolute;
height: 100%;
top: 0;
}
.functionalDomain {
flex: 90%;
.functionalDomainContent {
position: relative;
width: 100%;
height: 100%;
}
.functionalDomainLeft {
display: flex;
flex-direction: column;
margin-left: 0px;
transition: margin-left 0.5s;
min-width: 230px;
border: 1px solid #E6EAEE;
width: 230px;
left: 0;
.leftDragDiv{
position: absolute;
right: 0;
height: 100%;
width: 3px;
z-index: 1000;
cursor: e-resize;
}
}
.functionalDomainRight {
margin-right: 0px;
transition: margin-right 0.5s;
border: 1px solid #464646;
width: 230px;
right: 0;
}
//右边导航栏显示隐藏
.togglePanel2 {
margin-right: -2000px;
transition: margin-right 1s;
}
//左侧导航栏显示隐藏
.togglePanel {
margin-left: -2000px;
transition: margin-left 1s;
}
}
//右边操作栏
.title{
width: 100%;
height: 35px;
background-color: #464646;
div{
width: 50%;
height: 35px;
line-height: 35px;
background-color: #595959;
border-radius: 5px;
span{
color: white;
font-size: 14px;
font-weight: 400;
padding-left: 5px;
}
}
}
//右侧属性
.property{
display: flex;
flex-flow: column;
.siteproperty{
height: 100%;
overflow-y: auto;
p{
color: #9c9fa5;
padding-left: 5px;
}
.siteproperty_size{
background-color: #e3e3e3;
width: 93%;
margin: 0 auto;
border-radius: 3px;
min-height: 21px;
}
.rightAttribute{
width: 12%;
height: 99.5%;
position: absolute;
top: 0;
right: 0;
bottom: 0;
border: 2px solid #464646;
}
}
.assetsproperty{
overflow-y: auto;
height: 100%;
p{
color: #9c9fa5;
margin:1px 0 3px 8px;
font-size: 14px;
}
span{
font-size: 15px;
}
input{
height: 18px;
}
.biginput{
display: block;
width: 88%;
margin: 0 auto;
}
.smallinput{
display: block;
width: 19%;
margin-left: 8px;
}
.textarea{
display: block;
width: 88%;
height: 50px;
margin: 0 auto;
}
.swiper-button-next{
right: 6px;
}
.swiper-button-prev{
left: 6px;
}
.swiper-container{
// --swiper-theme-color: #ff6600;/* 设置Swiper风格 */
// --swiper-navigation-color: #00ff33;/* 单独设置按钮颜色 */
--swiper-navigation-size:20px;/* 设置按钮大小 */
}
.hoverred:hover{
color: rgb(187, 28, 28);
}
.selectDiv{
height: 21px;
position: relative;
margin-bottom: 5px;
select{
width: 98px;
height: 22px;
vertical-align: middle;
position: absolute;
right: 10px;
top: 1px;
border: 1px solid rgb(208, 211, 214);
border-radius: 2px;
}
}
.colorBigDiv{
width: 88%;
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{
.colorLi{
width: 24px;
height: 24px;
list-style: none;
float: left;
border: 2px solid white;
}
.coloractive{
border: 2px solid black;
}
}
}
}
}
.hideAllTreeNode {
box-sizing: border-box;
margin: 3px 0;
padding: 0 6px 0 10px;
font-size: 14px;
height: 24px;
line-height: 24px;
display: flex;
label { display: inline-block; flex: 1; cursor: pointer; }
}
//右侧消防要素
.firecategories{
position: relative;
display: flex;
flex-flow: column;
.firecategoriesTree{
overflow-y: auto;
height: 100%;
mat-tree-node{
position: relative;
}
.isLookCss{
position: absolute;
right: 6px;
}
}
}
// 解决轮播图蓝框问题
div:focus {
outline: none;
}
//没有图片时显示无图片背景图
.noImgCss{
background: url(../../../assets/images/noImg.png) no-repeat center center;
background-size: 88% 100%;/*按比例缩放*/
}
.input{
width: 18px;
height: 18px;
vertical-align: middle;
margin-left: 9px;
margin-right: 3px;
}
// tree
.mat-tree-node{
min-height: 0;
height: 32px;
line-height: 32px;
font-size: 13px;
cursor: pointer;
}
.mat-tree-node:hover{
background-color: #ccebf8;
}
.isLookPattern{
display: none;
}
.treeText{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: inline-block;
width: 65px;
}

25
src/app/ui/collection-tools-building/collection-tools.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CollectionToolsComponent } from './collection-tools.component';
describe('CollectionToolsComponent', () => {
let component: CollectionToolsComponent;
let fixture: ComponentFixture<CollectionToolsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CollectionToolsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CollectionToolsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

2082
src/app/ui/collection-tools-building/collection-tools.component.ts

File diff suppressed because it is too large Load Diff

28
src/app/ui/collection-tools-building/createBuilding.html

@ -0,0 +1,28 @@
<div mat-dialog-title>新增建筑</div>
<div>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div mat-dialog-content>
<mat-form-field>
<input type="text" matInput ngModel
required name="propertyName" placeholder="建筑名称" autocomplete="off">
</mat-form-field>
</div>
<div mat-dialog-content>
<mat-form-field>
<mat-select [(value)]="selected" required ngModel name="buildingId" placeholder="建筑类型">
<mat-option *ngFor="let item of allBuildingType" [value]="item.id">
{{item.name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div mat-dialog-actions>
<button mat-raised-button color="primary" type="submit"
[disabled]="!form.form.valid">
确定
</button>
<button mat-raised-button mat-dialog-close>取消</button>
</div>
</form>
</div>

23
src/app/ui/collection-tools-building/editBuilding.html

@ -0,0 +1,23 @@
<div mat-dialog-title>编辑建筑</div>
<div>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div mat-dialog-content>
<mat-form-field>
<input type="text" matInput [(ngModel)]="defaultName" required name="propertyName" placeholder="建筑名称" autocomplete="off">
</mat-form-field>
</div>
<div mat-dialog-content>
<mat-form-field>
<mat-select required [(ngModel)]="defaultBuildingType" name="buildingId" placeholder="建筑类型">
<mat-option *ngFor="let item of allBuildingType" [value]="item.id">
{{item.name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div mat-dialog-actions>
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">确定</button>
<button mat-raised-button mat-dialog-close>取消</button>
</div>
</form>
</div>

50
src/app/ui/collection-tools-building/editPlaneFigure.html

@ -0,0 +1,50 @@
<div class="functionalDomainContent">
<div mat-dialog-title>
<label *ngIf="!data.isBuilding">编辑平面图</label>
<label *ngIf="data.isBuilding">编辑楼层/区域</label>
</div>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div class="keyMargin">
<mat-form-field>
<input matInput name="name" required [(ngModel)]="name" placeholder="名称">
</mat-form-field>
</div>
<div class="keyMargin" *ngIf="data.isBuilding">
<mat-checkbox name="isRefugeStorey" [(ngModel)]="checked">是否为避难层</mat-checkbox>
</div>
<div class="keyMargin">
<mat-form-field>
<input matInput name="area" type="number" [(ngModel)]="area" placeholder="面积 (平方米)">
</mat-form-field>
</div>
<div class="keyMargin">
<textarea name="details" [(ngModel)]="details" placeholder="详情"></textarea>
</div>
<div class="keyMargin image">
<mat-form-field>
<input matInput name="imageWidth" type="number" [(ngModel)]="imgWidth" placeholder="宽" (input)='inputChange(0)'>
</mat-form-field>
<mat-form-field>
<input matInput name="imageHeight" type="number" [(ngModel)]="imgHeight" placeholder="高" (input)='inputChange(1)'>
</mat-form-field>
<label><mat-checkbox color="primary" [(ngModel)]="isItEqual" name="isItEqual" (change)='setImgScale($event)'></mat-checkbox>长宽等比</label>
<p style="font-size: 12px; margin-bottom: 25px;">按Enter键可浏览图片效果</p>
</div>
<div class="submitBottom">
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">
确定
</button>
<button mat-raised-button (click)='close()' type="button">取消</button>
</div>
</form>
</div>

191
src/app/ui/collection-tools-building/leftFunctionalDomain.ts

@ -0,0 +1,191 @@
import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { CanvasShareDataService } from 'src/app/canvas-share-data.service';
import { EventManager } from '@angular/platform-browser';
@Component({
selector: 'app-leftFunctionalDomain',
templateUrl: './addPlaneFigure.html',
styleUrls: ['./panel.scss']
})
export class leftFunctionalDomainComponent2 implements OnInit {
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {
}
checked:boolean = false;//是否为避难层
//提交表单创建平面图
onSubmit (e) {
if (!this.data.isBuilding) { //总平面图 创建平面图
let data = {
companyId: sessionStorage.getItem('companyId'),
name: e.name,
order: this.data.order,
area:Number(e.area),
details:e.details,
enabled: true,
modifiedTime: new Date(),
}
this.http.post('/api/CompanyAccount/SitePlans',data).subscribe(data=>{
this.dialogRef.close('总平面图');
})
} else { //建筑 创建楼层/区域
let data = {
isRefugeStorey: e.isRefugeStorey,
buildingId: this.data.Panel.id,
name: e.name,
order: this.data.order,
area:Number(e.area),
details:e.details,
enabled: true,
modifiedTime: new Date(),
}
this.http.post('/api/CompanyAccount/BuildingAreas',data).subscribe(data=>{
this.dialogRef.close('建筑');
})
}
}
}
//编辑平面图 楼层/区域
@Component({
selector: 'app-editPlaneFigure',
templateUrl: './editPlaneFigure.html',
styleUrls: ['./panel.scss']
})
export class editPlaneFigureComponent2 implements OnInit {
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<any>,@Inject(MAT_DIALOG_DATA) public data,public canvasData: CanvasShareDataService,private eventManager: EventManager,) { }
ngOnInit(): void {
this.name = this.data.buildingData.name || ''
this.checked = this.data.buildingData.isRefugeStorey || false
this.area = this.data.buildingData.area || 0
this.details = this.data.buildingData.details || ''
this.imgWidth = this.data.buildingData.imageWidth || 0
this.imgHeight = this.data.buildingData.imageHeight || 0
this.oldWidth = JSON.parse(JSON.stringify(this.data.buildingData.imageWidth || 0))
this.oldHeight = JSON.parse(JSON.stringify(this.data.buildingData.imageHeight || 0))
if (this.imgWidth==0 && this.imgHeight==0 && this.data.buildingData.imageUrl) {
let that = this
let img = new Image()
img.src = this.data.buildingData.imageUrl
img.onload = function () {
that.imgWidth = img.width
that.imgHeight = img.height
that.imgScale = Number((that.imgWidth/that.imgHeight))
}
} else {
this.imgScale = Number((this.imgWidth/this.imgHeight))
}
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
if (event.keyCode === 13) {
event.preventDefault();
}
});
}
oldWidth:number; //原图片宽
oldHeight:number; //原图片高
name:any; //name
checked:boolean = false;//是否为避难层
area:number; //面积
details:string; //详情
imgWidth:number; //图片宽度
imgHeight:number; //图片高度
isItEqual:boolean = true; //是否等比
imgScale:number; //图片 宽高比例
//图片 宽高变化时
inputChange (e) {
if (this.isItEqual) {
if (e == 0) { //需要改高度
this.imgHeight = Math.round(this.imgWidth / this.imgScale)
this.canvasData.selectStorey.imageWidth = this.imgWidth
this.canvasData.selectStorey.imageHeight = this.imgHeight
} else { //需要改宽度
this.imgWidth = Math.round(this.imgHeight * this.imgScale)
this.canvasData.selectStorey.imageWidth = this.imgWidth
this.canvasData.selectStorey.imageHeight = this.imgHeight
}
} else {
this.canvasData.selectStorey.imageWidth = this.imgWidth
this.canvasData.selectStorey.imageHeight = this.imgHeight
}
}
//重新计算 宽高比例
setImgScale (e) {
e.checked? this.imgScale = Number((this.imgWidth/this.imgHeight)) : null
}
//关闭
close () {
if (this.oldWidth === this.imgWidth && this.oldHeight === this.imgHeight) {
this.dialogRef.close()
} else {
this.canvasData.selectStorey.imageWidth = this.oldWidth
this.canvasData.selectStorey.imageHeight = this.oldHeight
this.dialogRef.close('更新背景图');
}
}
//提交表单修改平面图
onSubmit (e) {
if (!this.data.isBuilding) { //总平面图 修改平面图
let data = {
companyId: sessionStorage.getItem('companyId'),
id: this.data.buildingData.id,
name: e.name,
cadUrl: this.data.buildingData.cadUrl,
imageUrl: this.data.buildingData.imageUrl,
imageWidth: this.imgWidth,
imageHeight: this.imgHeight,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
details:e.details,
enabled: this.data.buildingData.enabled,
modifiedTime: new Date(),
}
this.http.put(`/api/CompanyAccount/SitePlans/${this.data.buildingData.id}`,data).subscribe(data=>{
this.dialogRef.close('总平面图');
})
} else { //建筑 修改楼层/区域
let data = {
isRefugeStorey: e.isRefugeStorey,
buildingId: this.data.Panel.id,
id: this.data.buildingData.id,
name: e.name,
cadUrl: this.data.buildingData.cadUrl,
imageUrl: this.data.buildingData.imageUrl,
imageWidth: this.imgWidth,
imageHeight: this.imgHeight,
imageAngle: this.data.buildingData.imageAngle,
order: this.data.buildingData.order,
area:e.area,
details:e.details,
enabled: this.data.buildingData.enabled,
modifiedTime: new Date(),
}
this.http.put(`/api/CompanyAccount/BuildingAreas/${this.data.buildingData.id}`,data).subscribe(data=>{
this.dialogRef.close('建筑');
})
}
}
}

247
src/app/ui/collection-tools-building/panel.scss

@ -0,0 +1,247 @@
.matIcons {
color: #8E909F;
}
//平面图 素材库 公共样式 头部
.planarGraphHeader{
height: 35px;
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);
}
//平面图头部字体图标样式
.hover {
width: 18px;
height: 18px;
margin-left: 90px;
border: 1px solid #999;
border-radius: 3px;
.mat-icon {font-size: 18px; color: #999;}
}
.hover:hover {
background-color: #4DA5FA;
.mat-icon {color: #fff;}
}
//平面图
.sitePlanContent {
overflow: hidden;
position: relative;
width: 100%;
height: 35px;
line-height: 35px;
box-sizing: border-box;
padding: 0 10px 0 25px;
.mat-icon {
font-size: 20px;
}
.planEveryRow {
display: inline-block;
max-width: 155px;
}
}
//替换底图 inputfile
.a-upload {
display: block;
float: right;
margin: 8px 18px 0 0;
width: 20px;
height: 20px;
line-height: 20px;
text-align: center;
position: relative;
overflow: hidden;
input {
position: absolute;
width: 20px;
height: 20px;
left: 0;
top: 0;
opacity: 0;
}
}
.a-upload:hover {
.mat-icon {
color: #fff;
}
}
//上传底图 inputfile
#a-uploadImg {
display: block;
width: 300px;
height: 170px;
position: fixed;
top: 40%;
left: 48%;
overflow: hidden;
border-radius: 5px;
border: 1px solid #999;
z-index: 999;
input {
position: absolute;
width: 300px;
height: 170px;
left: 0;
top: 0;
opacity: 0;
}
img {
width: 100%;
height: auto;
}
}
#a-uploadImg:hover {
border: 5px solid skyblue;
}
//hover时显示右边操作栏
.sitePlanContent:hover {
#rightOperate {
opacity: 1;
}
}
//右边操作栏
#rightOperate{
width: 50px;
height: 100px;
z-index: 99999;
border-radius: 0 100px 100px 0;
background-color: #F0F4F7;
// #F0F4F7 cdced1
opacity: 0;
transition: opacity 0.5s ease-out;
.functionButton {
height: 25%;
line-height: 25px;
}
.bigFunctionIcon {
font-size: 24px;
}
.functionIcon {
color: #999;
}
.functionIcon:hover {
color: #4DA5FA;
}
}
//素材库溢出隐藏
#materialBank {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
padding-bottom: 10px;
margin: 1px 0;
.mat-expansion-panel-header {
height: 40px !important;
}
}
//素材库图片flex
#panelLibrary .text{
box-sizing: border-box;
margin-left: 10px;
}
//模糊搜索 input
.searchLibrary {
display: block;
border: 1px solid rgb(219, 212, 212);
border-radius: 5px;
outline: none;
box-sizing: border-box;
margin: 5px auto;
padding-left: 5px;
width: 95%;
height: 30px;
}
.panelLibraryFlex {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between; /* 水平居中 */
.imgBox {
width: 70px;
height: 100px;
display: inline-block;
text-align: center;
border-radius: 3px;
margin: 5px 0;
img {
width: 70px;
height: auto;
max-height: 70px;
cursor:pointer;
}
p {
font-size: 12px;
cursor:pointer;
}
}
}
//文本溢出
.overflowText {
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
// 楼层/区域 是避难层时
.isRefugeStorey {
color: #fff;
background-color: rgb(238, 186, 186);
}
//选中平面图时
.selectSitePlan {
color: #fff;
background-color: #6BC2FF;
}
//选中素材库图片时
.selectImg {
color: #fff;
background-color: #4DA5FA;
}
//左侧功能区弹出框样式
.keyMargin {
width: 100%;
margin: 5px 0;
.mat-form-field {
width: 100%;
}
}
.image {
.mat-form-field {
margin-right: 15px;
width: 30%;
}
}
.submitBottom {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between; /* 水平居中 */
}
.functionalDomainContent {
width: 300px;
height: 100%;
textarea {
border-radius: 5px;
border: 1px solid #999;
width: 100%;
height: 120px;
resize:none;
}
}

24
src/app/ui/collection-tools-building/viewdetails.html

@ -0,0 +1,24 @@
<div style="position: relative;width: 1400px;height: 800px;line-height: 800px;" class="swiper-container">
<div style="position: absolute;right: -2px;top: -392px;cursor: pointer;z-index: 999;width: 24px;height: 24px;" (click)="closeDialog()">
<span><mat-icon>clear</mat-icon></span>
</div>
<div class="swiper-wrapper">
<div class="swiper-slide" style="text-align: center;" *ngFor="let img of imagesArr">
<img id="bigimg" (mousewheel)="zoomimg($event)" style="
max-width: 96%;
max-height: 100%;
min-width: 1px;
min-height: 1px;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;" [src]="img.PropertyValue" alt="">
</div>
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>

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

@ -48,19 +48,6 @@
[ngClass]="{'buildingbtnchecked': checkedBuildingIndex==-1}">
<span>总平面图</span>
</button>
<button mat-button *ngFor="let item of allBuildings;let key = index" (click)="checkedBuilding(item,key)" class="bigeditdeletebtn"
[ngClass]="{'buildingbtnchecked': checkedBuildingIndex==key}">
<span>{{item.name}}</span>
<span class="editdeletebtn" *ngIf="isEditPattern">
<mat-icon (click)="editBuilding($event,item)"
style="font-size: 23px;vertical-align:sub;margin-left: 6px;color: rgb(26, 194, 26);">create</mat-icon>
<mat-icon (click)="deleteBuilding($event,item)"
style="font-size: 23px;vertical-align:sub;color: rgb(224, 51, 51);">delete</mat-icon>
</span>
</button>
<button mat-button (click)="createBuilding()" *ngIf="isEditPattern">
<span style="font-size: 24px;">+</span>
</button>
</div>
<!--功能区 -->

3
src/app/ui/ui-routing.module.ts

@ -10,11 +10,13 @@ import { FunctionDivisionComponent } from './function-division/function-division
import { RealisticPictureComponent } from './realistic-picture/realistic-picture.component';
import { UploadingCADComponent } from './uploading-cad/uploading-cad.component';
import {CollectionToolsComponent} from './collection-tools/collection-tools.component'
import { CollectionToolsComponent2 } from './collection-tools-building/collection-tools.component';
const routes: Routes = [
{ path: 'userdata', component:UserdataComponent },
{ path: 'basicinfo', component:BasicinfoComponent },
{ path: 'plan', component:PlanComponent },
{ path: 'allaround', component:AllaroundComponent },
{ path: 'fire-fighting-device', component:FireFightingDeviceComponent },
{ path: 'key-site', component:KeySiteComponent },
@ -22,6 +24,7 @@ const routes: Routes = [
{ path: 'realistic-picture', component:RealisticPictureComponent },
{ path: 'uploadingCAD', component:UploadingCADComponent },
{ path: 'collectionTools', component:CollectionToolsComponent },
{ path: 'collectionToolsbuilding', component:CollectionToolsComponent2 },
];
@NgModule({

4
src/app/ui/ui.module.ts

@ -68,8 +68,10 @@ import { CollectionToolsComponent, CreateBuilding, EditBuilding, ViewDetails } f
import { WorkingAreaComponent } from '../working-area/working-area.component';
import {leftFunctionalDomainComponent,editPlaneFigureComponent} from './collection-tools/leftFunctionalDomain'
import { PaginatorModule } from './paginator/paginator.module';
import { CollectionToolsComponent2 ,CreateBuilding2,EditBuilding2,ViewDetails2} from './collection-tools-building/collection-tools.component';
import { leftFunctionalDomainComponent2,editPlaneFigureComponent2} from './collection-tools-building/leftFunctionalDomain';
@NgModule({
declarations: [UserdataComponent, ChangepasswordComponent, IsnoPipe, ConfirmpswDirective, TimePipe, EditUser, BasicinfoComponent, PlanComponent, AllaroundComponent, FireFightingDeviceComponent, KeySiteComponent, FunctionDivisionComponent, RealisticPictureComponent, UploadingCADComponent, AddHouseInfo, ImgDetails, ImagesData, ImgsDataDetail, KeySiteImgs, KeyImgDetail, addPartition, addPartitionAttribute, previewImg, addRealPicture, editRealPicture, readFile, editFile, LookMaster, previewBigImg, CollectionToolsComponent, WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,ChangepasswordComponent2
declarations: [UserdataComponent, ChangepasswordComponent, IsnoPipe, ConfirmpswDirective, TimePipe, EditUser, BasicinfoComponent, PlanComponent, AllaroundComponent, FireFightingDeviceComponent, KeySiteComponent, FunctionDivisionComponent, RealisticPictureComponent, UploadingCADComponent, AddHouseInfo, ImgDetails, ImagesData, ImgsDataDetail, KeySiteImgs, KeyImgDetail, addPartition, addPartitionAttribute, previewImg, addRealPicture, editRealPicture, readFile, editFile, LookMaster, previewBigImg, CollectionToolsComponent, WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,ChangepasswordComponent2,CollectionToolsComponent2,CreateBuilding2,EditBuilding2,ViewDetails2,leftFunctionalDomainComponent2,editPlaneFigureComponent2
],
imports: [

Loading…
Cancel
Save