Browse Source

[完善] 合并代码

zhuzhou
陈鹏飞 4 years ago
parent
commit
535d69e938
  1. 40
      src/app/canvas-share-data.service.ts
  2. 9
      src/app/data-collection/water-collection/water-collection.component.html
  3. 5
      src/app/data-collection/water-collection/water-collection.component.scss
  4. 25
      src/app/data-collection/water-collection/water-collection.component.ts
  5. 465
      src/app/key-unit/basicinfo-look/basicinfo.component.html
  6. 164
      src/app/key-unit/basicinfo-look/basicinfo.component.scss
  7. 1805
      src/app/key-unit/basicinfo-look/basicinfo.component.ts
  8. 11
      src/app/key-unit/basicinfo-look/lookmaster.component.html
  9. 12
      src/app/key-unit/basicinfo/addhouseinfo.component.ts
  10. 429
      src/app/key-unit/basicinfo/basicinfo.component.html
  11. 122
      src/app/key-unit/basicinfo/basicinfo.component.scss
  12. 1870
      src/app/key-unit/basicinfo/basicinfo.component.ts
  13. 5
      src/app/key-unit/key-unit-management/key-unit-management.component.html
  14. 8
      src/app/key-unit/key-unit-management/key-unit-management.component.scss
  15. 103
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  16. 27
      src/app/key-unit/key-unit-management/resultcompanyPlan.html
  17. 5
      src/app/key-unit/key-unit.module.ts
  18. 4
      src/app/plan-audit/allaround/allaround.component.ts
  19. 3
      src/app/plan-audit/basic-info/basic-info.component.ts
  20. 2
      src/app/plan-audit/cad-draw/cad-draw.component.ts
  21. 4
      src/app/plan-audit/fire-facilities/fire-facilities.component.ts
  22. 2
      src/app/plan-audit/function-partition/function-partition.component.ts
  23. 2
      src/app/plan-audit/key-site-look/key-site.component.ts
  24. 2
      src/app/plan-audit/plan-list/plan-list.component.ts
  25. 30
      src/app/plan-audit/plan-record/plan-record.component.html
  26. 23
      src/app/plan-audit/plan-record/plan-record.component.ts
  27. 2
      src/app/plan-audit/realistic-picture-look/realistic-picture.component.ts
  28. 24
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  29. 4
      src/app/plan-audit/wait-examineer/wait-examineer.component.scss
  30. 157
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  31. 2
      src/app/plan-audit/water-audit/water-audit.component.html
  32. 49
      src/app/plan-audit/water-audit/water-audit.component.ts
  33. 5
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  34. 15
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  35. 13
      src/app/statistic-analysis/echarts-data.service.ts
  36. 16
      src/app/ui/collection-tools-building/collection-tools.component.ts
  37. 5
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  38. 5
      src/app/ui/collection-tools/collection-tools.component.ts
  39. 476
      src/app/working-area/model/axImageShape.ts
  40. 34
      src/app/working-area/model/axMessageSystem.ts
  41. 2
      src/app/working-area/model/axShape.ts
  42. 3
      src/app/working-area/model/configuration.ts
  43. 2
      src/app/working-area/model/events.ts
  44. 21
      src/app/working-area/working-area.component.ts
  45. BIN
      src/assets/images/箭头.png
  46. BIN
      src/assets/images/箭头2.png
  47. BIN
      src/assets/images/箭头3.png

40
src/app/canvas-share-data.service.ts

@ -58,6 +58,8 @@ export class CanvasShareDataService {
['水泵接合器(地上)', '水泵接合器'],
['水泵接合器(地下)', '水泵接合器'],
['水泵接合器(墙壁)', '水泵接合器'],
['水泵接合器(喷淋)', '水泵接合器'],
['水泵接合器(消防)', '水泵接合器'],
['消防水泵房', '消防水泵房'],
['箱式消火栓', '箱式消火栓'],
['固定水炮', '消防水炮'],
@ -295,7 +297,22 @@ export class CanvasShareDataService {
facility.Id = '';
facility.Name = this.facilityAssetsName.get(item.Name);
facility.AssetName = item.Name;
facility.PropertyInfos = item.PropertyInfos;
facility.PropertyInfos = [];
item.PropertyInfos.forEach(e => {
var p: PropertyInfo = new PropertyInfo();
p.Enabled = e.Enabled;
p.Order = e.Order;
p.PhysicalUnit = e.PhysicalUnit;
p.PropertyName = e.PropertyName;
p.PropertyType = e.PropertyType;
p.PropertyValue = e.PropertyValue.toString();
p.Required = e.Required;
p.RuleName = e.RuleName;
p.RuleValue = e.RuleValue;
p.Tag = e.Tag;
p.Visible = e.Visible;
facility.PropertyInfos.push(p);
});
facility.SitePlanId = item.FloorId;
list.push(facility);
}
@ -316,7 +333,22 @@ export class CanvasShareDataService {
facility.Id = '';
facility.Name = this.facilityAssetsName.get(item.Name);
facility.AssetName = item.Name;
facility.PropertyInfos = item.PropertyInfos;
facility.PropertyInfos = [];
item.PropertyInfos.forEach(e => {
var p: PropertyInfo = new PropertyInfo();
p.Enabled = e.Enabled;
p.Order = e.Order;
p.PhysicalUnit = e.PhysicalUnit;
p.PropertyName = e.PropertyName;
p.PropertyType = e.PropertyType;
p.PropertyValue = e.PropertyValue.toString();
p.Required = e.Required;
p.RuleName = e.RuleName;
p.RuleValue = e.RuleValue;
p.Tag = e.Tag;
p.Visible = e.Visible;
facility.PropertyInfos.push(p);
});
facility.BuildingAreaId = item.FloorId;
list.push(facility);
}
@ -407,7 +439,7 @@ export class CompanyFacilityAssetInfo {
public Id: string;
public Name: string;
public AssetName: string;
public PropertyInfos: string;
public PropertyInfos: PropertyInfo[];
public AssetId: string;
public CompanyId: string;
public SitePlanId: string;
@ -419,7 +451,7 @@ export class BuildingFacilityAssetInfo {
public Id: string;
public Name: string;
public AssetName: string;
public PropertyInfos: string;
public PropertyInfos: PropertyInfo[];
public AssetId: string;
public BuildingId: string;
public BuildingAreaId: string;

9
src/app/data-collection/water-collection/water-collection.component.html

@ -79,8 +79,13 @@
</div>
</div>
<div class="btnbox">
<span class="save" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="submitAudit"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="state" *ngIf="waterData.verifyState == 3">(待审核)</span>
<span class="state" style="color: rgb(92, 214, 78);" *ngIf="waterData.verifyState == 4">(审核通过)</span>
<span class="state" *ngIf="waterData.verifyState == 5">(审核驳回)</span>
<span class="submitAudit" *ngIf="waterData.verifyState != 3 && waterData.verifyState != 4" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="state" *ngIf="waterData.verifyState == 3 || waterData.verifyState == 4" (click)="cancelAudit()">撤销审核</span>
<span class="save state" *ngIf="waterData.verifyState == 5 || waterData.verifyState != 3 && waterData.verifyState != 4" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>

5
src/app/data-collection/water-collection/water-collection.component.scss

@ -254,8 +254,11 @@
span:hover{
text-decoration: underline;
}
.state{
margin-right:30px;
}
.submitAudit{
margin: 0 30px;
margin-right:30px;
}
.close{
margin-right: 30px;

25
src/app/data-collection/water-collection/water-collection.component.ts

@ -198,7 +198,7 @@ export class WaterCollectionComponent implements OnInit {
//点击水源列表
selectedLiIndex:any
clickWaterLi(item,index){
// console.log(item)
console.log(item)
if(this.selectedLiIndex != index){
this.selectedLiIndex = index
this.clearData()
@ -430,6 +430,29 @@ export class WaterCollectionComponent implements OnInit {
})
}
}
//提交审核
submitAudit(){
let isTrue = window.confirm('请确认保存后提交审核,否则将无法审核最新内容,是否继续?')
if(isTrue){
console.log('提交审核的水源',this.waterData)
let body = {
title: this.waterData.name,
operation: this.waterData.verifyState == -1 ? 0 : 1,//操作方式
contentType: 12,//水源类型
itemId: this.waterData.id,
verifyState: 3,
}
this.http.post('/api/ContentVerifies',body).subscribe((data) => {
console.log('提交成功',data)
this.waterData.verifyState = 3
})
}
}
//撤销审核
cancelAudit(){
}
//关闭
close(){

465
src/app/key-unit/basicinfo-look/basicinfo.component.html

@ -1,11 +1,10 @@
<div style="height: 100%;display: flex; flex-direction: column;">
<div style="height: 100%;display: flex; flex-direction: column;overflow: hidden;">
<!-- header -->
<mat-accordion>
<mat-expansion-panel expanded hideToggle>
<mat-expansion-panel expanded>
<mat-expansion-panel-header style="color: black;">
<mat-panel-title>
单位信息
<mat-icon style="position: absolute;right:30px;">keyboard_arrow_down</mat-icon>
</mat-panel-title>
</mat-expansion-panel-header>
<div class="topbox">
@ -16,7 +15,7 @@
<span style="color: red;">*</span>
<span>统一社会信用代码:</span>
<mat-form-field>
<input readonly matInput id="creditcode" name="creditcode" type='text' #usci="ngModel"
<input matInput id="creditcode" name="creditcode" type='text' #usci="ngModel"
required minlength="1" maxlength="18"
[(ngModel)]="unitinfo.usci"
(focus)="closeorganizationbox()"
@ -31,8 +30,8 @@
<div class="inputbox">
<span style="color: red;">*</span>
<span>单位类型:</span>
<mat-form-field>
<mat-select disabled readonly required name="unittype" [(ngModel)]="defaultbuildingTypes">
<mat-form-field (click)="closeorganizationbox()">
<mat-select required name="unittype" [(ngModel)]="defaultbuildingTypes">
<mat-option [value]="item.id" *ngFor="let item of allunittype">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
@ -41,7 +40,7 @@
<span style="color: red;">*</span>
<span>联系人:</span>
<mat-form-field>
<input readonly matInput id="linkman" name="linkman" type='text'
<input matInput id="linkman" name="linkman" type='text'
required minlength="1"
[(ngModel)]="unitinfo.contacts"
(focus)="closeorganizationbox()"
@ -52,7 +51,7 @@
<span style="color: red;">*</span>
<span>联系电话:</span>
<mat-form-field>
<input readonly matInput id="linkphone" name="linkphone" type='text' #linkphone="ngModel"
<input matInput id="linkphone" name="linkphone" type='text' #linkphone="ngModel"
required pattern="^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[35-8]\d{2}|4(?:0\d|1[0-2]|9\d))|9[0135-9]\d{2}|66\d{2})\d{6}$"
[(ngModel)]="unitinfo.phone"
(focus)="closeorganizationbox()"
@ -68,41 +67,59 @@
<span style="color: red;">*</span>
<span>辖区中队:</span>
<mat-form-field style="width: 538px;">
<input readonly matInput id="organization" name="organization" type='text'
<input matInput id="organization" name="organization" type='text'
required minlength="1"
[(ngModel)]="selectedorganization"
(focus)="openorganizationbox()"
readonly="value" >
</mat-form-field>
</div>
<div id="organizationbox" class="organizationbox" *ngIf="isorganizationbox">
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button type="button" mat-icon-button disabled ></button>
<li>{{node.name}}</li>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button
type="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>
<li>{{node.name}}</li>
</mat-tree-node>
</mat-tree>
</div>
<div class="inputbox" style="width: 700px;">
<span style="color: red;">*</span>
<span>单位地址:</span>
<mat-form-field style="width: 538px;">
<input readonly matInput id="unitaddress" name="unitaddress" type='text'
<input matInput id="unitaddress" name="unitaddress" type='text'
required minlength="1"
[(ngModel)]="unitinfo.address"
(focus)="closeorganizationbox()">
</mat-form-field>
</div>
<div class="uploadimg" (click)="lookmaster()">
<div class="uploadimg">
<span>单位照片:</span>
<div class="uploadingimg">
<img [src]="imgsrc" alt="" style="width: 299px; height: 170px;" >
<div class="uploadingimg" (click)="lookmaster()">
<img [src]="imgsrc ? imgsrc : noImg" alt="" style="width: 299px; height: 170px;" >
</div>
<mat-spinner *ngIf="isspinner" diameter= 50></mat-spinner>
</div>
<!-- <div class="image">
<input id="selectedfile" type="file" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div> -->
<!-- <div class="addbtn">
<button type="submit" color="primary" class="submit1" mat-button mat-raised-button>保存</button>
<!-- <div class="image" (click)="closeorganizationbox()">
<input id="selectedfile" type="file" ng2FileSelect [uploader]="uploader" (change)="filechange($event)" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div> -->
</div>
<div class="mainright" id="setPosition">
<div style="width: 100%;height: 100%;" id="container">
</div>
<div class="gistopbox" *ngIf="isGisTopBox">
<div class="positionItem">
<span>
@ -120,9 +137,18 @@
{{markerPosition.y || '暂未标注'}}
</div>
</div>
<!-- <div class="setPosition" (click)="setPosition()">
<div class="setPosition">
<mat-icon style="width: 22px;height: 22px;font-size: 22px;">place</mat-icon> 位置
</div> -->
</div>
</div>
<div class="gistopbox hidden" [ngClass]="{'show': isGisTopBoxTwo}">
<div class="inputBox">
<span>位置: </span>
<input name="position" [(ngModel)]="searchTitle" id="tipinput" class="positionInput" type="text" autocomplete="off">
</div>
<div class="setPosition">
搜索
</div>
</div>
</div>
</div>
@ -130,61 +156,56 @@
</div>
</mat-expansion-panel>
</mat-accordion>
<!-- body -->
<div class="bottombox" style="flex: 70%;overflow-y: auto;" >
<div class="houseinfobox" style="height: 100%; overflow-y: auto;padding-bottom: 34px; box-sizing:border-box">
<!-- <button type="button" mat-icon-button class="addhouseinfo"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button> -->
<mat-tab-group style="height: 100%;;" >
<mat-tab [label]="item.username" *ngFor="let item of houses;let key = index">
<form style="height: 100%; overflow-y:auto; display: block;" (ngSubmit)="onSubmit2(form.value,item,key,form.invalid)" #form="ngForm" class="example-container">
<!-- 正常建筑 -->
<div class="highinfo" *ngIf="item.tongyong">
<div class="houseinfoinput" >
<div class="bodyBox" id="basicInfoBody">
<!-- <div>
<button type="button" mat-icon-button (click)="addhouseinfo()" class="addBuilding"><mat-icon>add_circle_outline</mat-icon></button>
</div> -->
<div style="height: 100%; box-sizing:border-box;overflow-y: auto;padding-left: 26px;">
<mat-tab-group style="height: 100%;" [selectedIndex]="selectedIndex" (selectedTabChange)="selectedTabChange($event)">
<mat-tab *ngFor="let item of houses;let key = index" label="{{item.name}}">
<ng-template matTabContent>
<form *ngIf="item.data && item.data.length!=0" style="height: 100%; overflow-y:auto; display: block;" (ngSubmit)="onSubmitBuildingInfo(form.value,item,key,form.invalid)" #form="ngForm" class="example-container">
<div class="buildInfoInput" >
<span>建筑名称:</span>
<mat-form-field>
<input readonly matInput id="housename" name="housename" type='text'
minlength="1" [(ngModel)]="item.name"
>
<input required matInput name="buildingName" type='text' minlength="1" [(ngModel)]="item.name">
</mat-form-field>
<span style="color: red;">*</span>
</div>
<div class="houseinfoinput">
<div class="buildInfoInput">
<span>建筑类型:</span>
<mat-form-field>
<mat-select disabled readonly name="unittype" [(ngModel)]="item.buildtype">
<mat-option [value]="n.name" *ngFor="let n of allunittype">{{n.name}}</mat-option>
<mat-select disabled name="buildingTypeName" [(ngModel)]="item.buildingTypes[0].name">
<mat-option [value]="n.name" *ngFor="let n of allunittype" (click)="templateBuildtype(n,item,key)">{{n.name}}</mat-option>
</mat-select>
</mat-form-field>
<span style="color: red;">*</span>
</div>
<div *ngFor="let item of item.buildingBasicGroups;let www = index" style="float: left;">
<h1 style="font-size: 22px;">{{item.name}}</h1>
<div class="houseinfoinput" *ngFor="let i of item.propertyInfos" style="float: left;margin-left: 250px;position: relative;">
<div *ngFor="let element of item.data[0].buildingBasicGroups;let groupsIndex = index "style="float: left;width:100%">
<!-- 类型为表单并且不是 罐区 -->
<div *ngIf="element.type == 0 && element.name.indexOf('罐区') == -1">
<p style="font-size: 22px;">{{element.name}}</p>
<div class="buildInfoInput" *ngFor="let i of element.propertyInfos;let inputIndex = index" style="float: left;margin-left: 250px;position: relative;">
<span>{{i.propertyName}}<span *ngIf="i.physicalUnit">({{i.physicalUnit}})</span></span>
<!-- 如果类型是文本 -->
<mat-form-field *ngIf="i.propertyType == 0 && i.propertyName != '耐火等级'">
<input readonly matInput name="{{i.propertyName}}{{www}}" type='text'
<input matInput name="{{groupsIndex}}{{inputIndex}}" type='text'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue">
</mat-form-field>
<!-- 如果类型是数字 -->
<mat-form-field *ngIf="i.propertyType == 2 && i.propertyName != '耐火等级'">
<input readonly matInput name="{{i.propertyName}}{{www}}" type='number'
<input matInput name="{{groupsIndex}}{{inputIndex}}" type='number'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue"
(change)="inputchange($event,i.ruleName,i.ruleValue,i)"
>
<!-- <mat-error *ngIf="isshowrule">{{rulevalue}}</mat-error> -->
</mat-form-field>
<!-- 如果类型是耐火等级 -->
<mat-form-field *ngIf="i.propertyName == '耐火等级'">
<mat-select readonly name="{{i.propertyName}}{{www}}" required="{{ i.required==true ? 'true' : 'false' }}" placeholder="请选择耐火等级" [(ngModel)]="i.propertyValue">
<mat-select name="{{groupsIndex}}{{inputIndex}}" required="{{ i.required==true ? 'true' : 'false' }}" placeholder="请选择耐火等级" [(ngModel)]="i.propertyValue">
<mat-option value="0">1级</mat-option>
<mat-option value="1">2级</mat-option>
<mat-option value="2">3级</mat-option>
@ -192,89 +213,65 @@
</mat-select>
</mat-form-field>
<!-- 如果类型是多行文本 -->
<textarea readonly *ngIf="i.propertyType == 1 && i.propertyName != '耐火等级'" style="width: 180px;height: 60px;" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{i.propertyName}}{{key}}"></textarea>
<textarea *ngIf="i.propertyType == 1 && i.propertyName != '耐火等级'" style="width: 180px;height: 60px;" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{groupsIndex}}{{inputIndex}}"></textarea>
<span style="color: red;" *ngIf="i.required">*</span>
<div *ngIf="i.isshowrule" style="position: absolute;
left: 205px;
top: 45px;
font-size: 11px;
color: red;">
<div *ngIf="i.isshowrule" style="position: absolute;left: 205px;top: 45px;font-size: 11px;color: red;">
<span>{{i.rulevalue}}</span>
</div>
</div>
</div>
<div class="CustomData" style="width: 200px;">
<!-- <mat-checkbox name="checkbuilding" [(ngModel)]="item.isCustomData" style="float: left;margin-right: 10px;"></mat-checkbox> -->
<h1 style="font-size: 22px;width: 200px;">自定义信息</h1>
</div>
<div *ngIf="item.isCustomData" style="position: relative;">
<!-- <button style="position: absolute;left: 0;" type="button" mat-icon-button class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button style="position: absolute;left:60px;" type="button" mat-icon-button class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button> -->
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index">
<mat-form-field>
<input readonly matInput type='text' name="{{key}}1CustomData"
required
[(ngModel)]="i.name">
</mat-form-field>
<span>:</span>
<mat-form-field>
<input readonly matInput type='text' name="{{key}}2CustomData"
required
[(ngModel)]="i.value">
</mat-form-field>
<span style="color: red;" *ngIf="i.required">*</span>
</div>
</div>
<!-- 类型为表格 并且不是 罐区 -->
<div *ngIf="element.type == 1 && element.name.indexOf('罐区') == -1">
<p style="font-size: 22px;">
{{element.name}}
</p>
<table *ngIf="element.submitted">
<tr>
<th *ngFor="let item of element.propertyInfos[0].origin;let index = index">
{{item.propertyName}}
<span style="color: red;" *ngIf="item.required">*</span>
</th>
</tr>
<tr *ngFor="let item of element.propertyInfos;let line = index">
<td *ngFor="let i of item.origin;let list = index">
<input *ngIf="i.propertyType != 1" style="height:45px" class="tankinfo" name="{{element.name}}{{line + 1}}-{{list + 1}}" type="{{i.propertyType == 0 ? 'text' : 'number'}}"
required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue">
<textarea class="tankinfo" *ngIf="i.propertyType == 1" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{element.name}}{{line + 1}}{{list + 1}}">
</textarea>
</td>
</tr>
</table>
</div>
<!-- 类型为表单 是罐区-->
<div *ngIf="element.type == 0 && element.name.indexOf('罐区') != -1">
<p style="font-size: 22px;">
<span *ngIf="element.name == '罐区1'">罐区信息</span>
</p>
<div *ngIf="element.submitted" >
<p style="font-size: 22px;">{{element.name}}</p>
<!-- 石油化工 -->
<div class="highinfo" *ngIf="item.isshiyou;let bigkey = index">
<div class="basicinfobox">
<div class="houseinfoinput">
<span>建筑名称:</span>
<mat-form-field>
<input readonly matInput id="housename" name="housename" type='text'
required minlength="1" [(ngModel)]="item.name"
>
</mat-form-field>
<span style="color: red;">*</span>
</div>
<div class="houseinfoinput" >
<span>建筑类型:</span>
<mat-form-field>
<mat-select disabled required name="unittype" [(ngModel)]="item.buildtype">
<mat-option [value]="n.name" *ngFor="let n of allunittype">{{n.name}}</mat-option>
</mat-select>
</mat-form-field>
<span style="color: red;">*</span>
</div>
<h1 style="font-size: 22px;">{{item.buildingBasicGroups[0].name}}</h1>
<div class="houseinfoinput" *ngFor="let i of item.buildingBasicGroups[0].propertyInfos;let smkey = index" style="float: left;margin-left: 250px;position: relative;">
<div class="buildInfoInput" *ngFor="let i of element.propertyInfos;let inputIndex = index" style="float: left;margin-left: 250px;position: relative;">
<span>{{i.propertyName}}<span *ngIf="i.physicalUnit">({{i.physicalUnit}})</span></span>
<!-- 如果类型是文本 -->
<mat-form-field *ngIf="i.propertyType == 0 && i.propertyName != '耐火等级'">
<input readonly matInput name="{{i.propertyName}}" type='text'
<input matInput name="{{groupsIndex}}{{inputIndex}}" type='text'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue">
</mat-form-field>
<!-- 如果类型是数字 -->
<mat-form-field *ngIf="i.propertyType == 2 && i.propertyName != '耐火等级'">
<input readonly matInput name="{{i.propertyName}}" type='number'
<input matInput name="{{groupsIndex}}{{inputIndex}}" type='number'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue"
(change)="inputchange($event,i.ruleName,i.ruleValue,i)"
>
<!-- <mat-error *ngIf="isshowrule">{{rulevalue}}</mat-error> -->
</mat-form-field>
<!-- 如果类型是耐火等级 -->
<mat-form-field *ngIf="i.propertyName == '耐火等级'">
<mat-select readonly name="{{i.propertyName}}" required="{{ i.required==true ? 'true' : 'false' }}" placeholder="请选择耐火等级" [(ngModel)]="i.propertyValue">
<mat-select name="{{groupsIndex}}{{inputIndex}}" required="{{ i.required==true ? 'true' : 'false' }}" placeholder="请选择耐火等级" [(ngModel)]="i.propertyValue">
<mat-option value="0">1级</mat-option>
<mat-option value="1">2级</mat-option>
<mat-option value="2">3级</mat-option>
@ -282,262 +279,66 @@
</mat-select>
</mat-form-field>
<!-- 如果类型是多行文本 -->
<textarea readonly *ngIf="i.propertyType == 1 && i.propertyName != '耐火等级'" style="width: 180px;height: 60px;" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{i.propertyName}}"></textarea>
<textarea *ngIf="i.propertyType == 1 && i.propertyName != '耐火等级'" style="width: 180px;height: 60px;" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{groupsIndex}}{{inputIndex}}"></textarea>
<span style="color: red;" *ngIf="i.required">*</span>
<div *ngIf="i.isshowrule" style=" position: absolute;
left: 205px;
top: 45px;
font-size: 11px;
color: red;">
<div *ngIf="i.isshowrule" style="position: absolute;left: 205px;top: 45px;font-size: 11px;color: red;">
<span>{{i.rulevalue}}</span>
</div>
</div>
</div>
<div class="deviceinfo">
<div style="width: 200px;">
<!-- <mat-checkbox name="item.buildingBasicGroups[1].name" *ngIf="item.buildingBasicGroups[1].isOptional" [(ngModel)]="item.buildingBasicGroups[1].submitted" style="float: left;margin-right: 10px;"></mat-checkbox> -->
<h1 style="font-size: 22px;width: 200px;">{{item.buildingBasicGroups[1].name}}</h1>
</div>
<table mat-table [dataSource]="devicedataSourcebox[item.buildingId]" class="mat-elevation-z8" *ngIf="item.buildingBasicGroups[1].submitted">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>
<button style="width: 24px;" type="button" mat-icon-button class="adddeviceinfo2" ><mat-icon>add_circle_outline</mat-icon></button>
<button style="width: 24px;" type="button" mat-icon-button class="removedeviceinfo" ><mat-icon>remove_circle_outline</mat-icon></button>
装置区名称<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<textarea readonly style="width: 100px;" [(ngModel)]="element.name" name="{{key}}1" required></textarea>
</td>
</ng-container>
<ng-container matColumnDef="flow">
<th mat-header-cell *matHeaderCellDef>工艺流程<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<textarea readonly [(ngModel)]="element.flow" name="{{key}}2" required></textarea>
</td>
</ng-container>
<ng-container matColumnDef="danger">
<th mat-header-cell *matHeaderCellDef>火灾危险性<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<textarea readonly [(ngModel)]="element.danger" name="{{key}}3" required></textarea>
</td>
</ng-container>
<ng-container matColumnDef="payattentionto">
<th mat-header-cell *matHeaderCellDef>灭火注意事项</th>
<td mat-cell *matCellDef="let element;let key = index">
<textarea readonly style="width: 100px;" [(ngModel)]="element.payattentionto" name="{{key}}4"></textarea>
<!-- 类型为表格 是罐区 -->
<div *ngIf="element.type == 1 && element.name.indexOf('罐区') != -1">
<p style="font-size: 22px;" *ngIf="element.submitted">
{{element.name}}
</p>
<table *ngIf="element.submitted">
<tr>
<th *ngFor="let item of element.propertyInfos[0].origin;let index = index">
{{item.propertyName}}
<span style="color: red;" *ngIf="item.required">*</span>
</th>
</tr>
<tr *ngFor="let item of element.propertyInfos;let line = index">
<td *ngFor="let i of item.origin;let list = index">
<input type="{{i.propertyType == 0 ? 'text' : 'number'}}" style="height:45px" class="tankinfo" name="{{element.name}}{{line + 1}}-{{list + 1}}"
required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</tr>
</table>
</div>
<div style="width: 200px;">
<!-- <mat-checkbox *ngIf="item.buildingBasicGroups[2].isOptional" name="item.buildingBasicGroups[2].name" [(ngModel)]="item.buildingBasicGroups[2].submitted" style="float: left;margin-right: 10px;"></mat-checkbox> -->
<h1 style="font-size: 22px;width: 200px;">储罐信息</h1>
</div>
<!-- <button *ngIf="item.buildingBasicGroups[2].submitted" type="button" mat-raised-button color="primary" style="margin-top: 30px;margin-right: 5px;">添加储罐</button>
<button *ngIf="item.buildingBasicGroups[2].submitted" type="button" mat-raised-button color="warn" style="margin-top: 30px;" matTooltip="会将此建筑处于末尾的储罐移除">移除末尾储罐</button> -->
<div *ngIf="item.buildingBasicGroups[2].submitted" style="margin-top: 30px;">
<div class="tankinfo" *ngFor="let x of item.bigfor;let www = index">
<p style="font-size: 22px; width: 200px;">{{x[0].name}}</p>
<div class="basicinfobox" >
<div class="houseinfoinput" *ngFor="let i of x[0].propertyInfos;let key = index" style="line-height: 65px;">
<span>{{i.propertyName}} {{i.physicalUnit}}:</span>
<mat-form-field *ngIf="i.propertyType == 0">
<input readonly matInput name="{{www+2}}-tanker-{{key}}" type='text'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue"
>
</mat-form-field>
<textarea readonly style="width: 180px;height: 45px;" *ngIf="i.propertyType == 1" [(ngModel)]="i.propertyValue" name="{{www+2}}-tanker-{{key}}"></textarea>
<span style="color: red;" *ngIf="i.required">*</span>
</div>
</div>
<p style="font-size: 22px; width: 200px;">{{x[1].name}}</p>
<div class="tankdetailinfo">
<table #table mat-table [dataSource]="x[1].propertyInfos" class="mat-elevation-z8" style="position: relative;">
<ng-container matColumnDef="tank">
<th mat-header-cell *matHeaderCellDef>
<!-- <button type="button" mat-icon-button class="adddeviceinfo" style="position: absolute;left: 0;"><mat-icon>add_circle_outline</mat-icon></button>
<button type="button" mat-icon-button class="removedeviceinfo"><mat-icon>remove_circle_outline</mat-icon></button> -->
罐区 </th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tank}}tank{{key}}" type='text'
[(ngModel)]="element.tank">
</td>
</ng-container>
<ng-container matColumnDef="tankid">
<th mat-header-cell *matHeaderCellDef>罐区编号<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tankid}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankid">
</td>
</ng-container>
<ng-container matColumnDef="tankmedium">
<th mat-header-cell *matHeaderCellDef>储存介质<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tankmedium}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankmedium">
</td>
</ng-container>
<ng-container matColumnDef="tanktype">
<th mat-header-cell *matHeaderCellDef>储罐类型<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tanktype}}tank{{key}}" type='text'
required
[(ngModel)]="element.tanktype">
</td>
</ng-container>
<ng-container matColumnDef="tankcapacity">
<th mat-header-cell *matHeaderCellDef>容量(m³)<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tankcapacity}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankcapacity">
</td>
</ng-container>
<ng-container matColumnDef="tankdiameter">
<th mat-header-cell *matHeaderCellDef>直径(m)<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tankdiameter}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankdiameter">
</td>
</ng-container>
<ng-container matColumnDef="tankheight">
<th mat-header-cell *matHeaderCellDef>高度(m)<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tankheight}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankheight">
</td>
</ng-container>
<ng-container matColumnDef="tanktectum">
<th mat-header-cell *matHeaderCellDef>顶盖形式</th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tanktectum}}tank{{key}}" type='text'
[(ngModel)]="element.tanktectum">
</td>
</ng-container>
<ng-container matColumnDef="tanktexture">
<th mat-header-cell *matHeaderCellDef>浮盘材质</th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.tanktexture}}tank{{key}}" type='text'
[(ngModel)]="element.tanktexture">
</td>
</ng-container>
<ng-container matColumnDef="platetype">
<th mat-header-cell *matHeaderCellDef>浮盘类型</th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.platetype}}tank{{key}}" type='text'
[(ngModel)]="element.platetype">
</td>
</ng-container>
<ng-container matColumnDef="foamgeneratorid">
<th mat-header-cell *matHeaderCellDef>泡沫产生器型号</th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.foamgeneratorid}}tank{{key}}" type='text'
[(ngModel)]="element.foamgeneratorid">
</td>
</ng-container>
<ng-container matColumnDef="foamgeneratortype">
<th mat-header-cell *matHeaderCellDef>泡沫产生器形式</th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.foamgeneratortype}}tank{{key}}" type='text'
[(ngModel)]="element.foamgeneratortype">
</td>
</ng-container>
<ng-container matColumnDef="isprotect">
<th mat-header-cell *matHeaderCellDef>是否设置氮封惰化保护装置</th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.isprotect}}tank{{key}}" type='text'
[(ngModel)]="element.isprotect">
</td>
</ng-container>
<ng-container matColumnDef="fendinggroyneheight">
<th mat-header-cell *matHeaderCellDef>防护堤高度(m)<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.fendinggroyneheight}}tank{{key}}" type='text'
required
[(ngModel)]="element.fendinggroyneheight">
</td>
</ng-container>
<ng-container matColumnDef="portnum">
<th mat-header-cell *matHeaderCellDef>半固定泡沫灭火接口数量</th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.portnum}}tank{{key}}" type='text'
[(ngModel)]="element.portnum">
</td>
</ng-container>
<ng-container matColumnDef="else">
<th mat-header-cell *matHeaderCellDef>其它设施</th>
<td mat-cell *matCellDef="let element;let key = index">
<input readonly style="height:45px" class="tankinfo" name="{{www}}{{element.else}}tank{{key}}" type='text'
[(ngModel)]="element.else">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns2"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns2;"></tr>
</table>
</div>
</div>
</div>
<div class="CustomData" style="width: 200px;margin-top: 60px;">
<!-- <mat-checkbox name="checkbuilding" [(ngModel)]="item.isCustomData" style="float: left;margin-right: 10px;"></mat-checkbox> -->
<h1 style="font-size: 22px;width: 200px;">自定义信息</h1>
</div>
<div *ngIf="item.isCustomData" style="position: relative;">
<button style="position: absolute;left: 0;font-size: 11px;" type="button" mat-icon-button class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button style="position: absolute;left:60px;" type="button" mat-icon-button class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index">
<div style="position: relative;" *ngIf="item.isCustomData">
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.customData.customProperties;let key = index">
<mat-form-field>
<input readonly matInput type='text' name="{{key}}1CustomData"
<input matInput type='text' name="customData{{key}}Name"
required
[(ngModel)]="i.name">
</mat-form-field>
<span>:</span>
<mat-form-field>
<input readonly matInput type='text' name="{{key}}2CustomData"
<input matInput type='text' name="customData{{key}}Value"
required
[(ngModel)]="i.value">
</mat-form-field>
<span style="color: red;" *ngIf="i.required">*</span>
</div>
</div>
</form>
</ng-template>
</div>
<!-- <div class="infobtnbox">
<button type="submit()" mat-button mat-raised-button color="primary" >保存</button>
<button type="button" mat-raised-button color="warn">删除</button>
</div> -->
</form>
</mat-tab>
</mat-tab-group>
</div>
</div>
</div>

164
src/app/key-unit/basicinfo-look/basicinfo.component.scss

@ -1,7 +1,7 @@
.topbox{
height: 485px;
width: 100%;
// border-bottom: 1px solid black;
padding-bottom: 20px;
.mainbox{
height: 100%;
position: relative;
@ -9,7 +9,6 @@
.mainleft{
width:800px;
height: 100%;
// background-color: yellow;
float: left;
.inputbox{
width: 343px;
@ -41,13 +40,8 @@
}
.addbtn{
width: 695px;
position: absolute;
bottom: -495px;
text-align: center;
margin-bottom:20px;
button{
margin: 0 4px;
}
margin:20px 0;
padding-bottom: 20px;
}
.uploadimg{
width: 400px;
@ -56,18 +50,13 @@
margin-top:12px;
position: relative;
margin-left: 80px;
cursor: pointer;
span{
float: left;
}
// img{
// float: left;
// }
.uploadingimg{
width: 299px;
height: 170px;
// background: url('../../../assets/images/upload2.png') no-repeat center center;
cursor: pointer;
position: absolute;
top: 0px;
left: 79px;
@ -77,20 +66,11 @@
}
.image{
// position: absolute;
// top: 199px;
// left: 160px;
// width: 299px;
// height: 170px;
input{
// width: 299px;
// height: 170px;
width: 190px;
margin-top: 160px;
cursor: pointer;
}
// opacity:0;
}
}
.mainright{
@ -107,7 +87,6 @@
}
.gistopbox{
position: absolute;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
border-radius: 4px;
left: 5%;
@ -146,32 +125,49 @@
align-items: center;
justify-content: center;
}
.inputBox{
width: 63%;
display: flex;
align-items: center;
.positionInput{
border: 0;
border-radius: 6px;
width: 90%;
height: 34px;
background: #F2F2F2;
margin-left: 8px;
box-sizing: border-box;
padding-left: 10px;
}
}
}
.hidden{
opacity: 0;
z-index: -1;
}
.show{
opacity: 1;
z-index: 1;
}
}
.bottombox{
// height:400px;
width: 100%;
// background-color: skyblue;
.bottomtitle{
height: 60px;
// background-color: orange;
line-height: 60px;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
.houseinfobox{
// height:340px;
overflow: auto;
.addhouseinfo{
float: left;
}
}
.bodyBox{
flex: 70%;overflow-y: auto;
position: relative;
.addBuilding{
position: absolute;
z-index: 999;
left: 0;
top: 3px;
}
.buildInfoInput{
width: 393px;
text-align: end;
margin-left:240px;
}
.infobtnbox{
margin-left: 800px;
position: absolute;
top: 30px;
right: 75px;
@ -182,19 +178,7 @@
margin-top: 15px;
}
}
.infotitle{
font-size: 28px;
font-weight: 900;
margin-left: 180px;
}
.houseinfoinput{
width: 393px;
text-align: end;
margin-left:240px;
}
}
}
.btn{
width: 100%;
text-align: center;
@ -206,37 +190,29 @@
margin-top: 58px;
margin-left: 203px;
}
.mat-table{
width: 99%;
}
table{
width: 1000px;
thead{
width: 99%;
tr{
th{
width: 60px;
display: block;
float: left;
}
}
display: flex;
td,th{
flex: 1;
}
tbody{
tr{
th{
display: flex;
align-items: center;
justify-content: center;
td{
width: 60px;
display: block;
float: left;
text-align: center;
}
input{
border: 0px ;
}
}
}
table,table tr th, table tr td { border: 0.1px solid gray; }
table { text-align: center; border-collapse: collapse; padding:2px;}
.deviceinfo{
// border-bottom: 1px solid black;;
padding-bottom: 60px;
}
.tankdetailinfo{
@ -250,14 +226,10 @@ table{
}
.tankinfo{
display: block;
width: 100%;
// height: 45px;
width: 97.5%;
text-align: center;
border: 0px;
}
// .adddeviceinfo{
// // position: absolute;
// // left: 0px;
// }
.submit1{
margin-left: -66px !important;
}
@ -269,31 +241,7 @@ textarea {
height: 110px;
resize: none;
}
//预览图片旋转角度
.img1{
transform:rotate(90deg) scale(0.55);
height: 100%;
}
.img2{
transform:rotate(180deg);
// height: 100%;
}
.img3{
transform:rotate(270deg) scale(0.55);
// height: 100%;
}
.img4{
transform:rotate(90deg) scale(1.3);
// height: 100%;
}
.img5{
transform:rotate(180deg);
// height: 100%;
}
.img6{
transform:rotate(270deg) scale(1.3);
// height: 100%;
}
.imgbox{
text-align: center;
height: 750px;

1805
src/app/key-unit/basicinfo-look/basicinfo.component.ts

File diff suppressed because it is too large Load Diff

11
src/app/key-unit/basicinfo-look/lookmaster.component.html

@ -4,7 +4,7 @@
<ng-container *ngIf="isshowimg; else elseTemplate">
<div class="imgbox">
<img class="imgitemdefault" [src]="ImgUrl">
<!-- <img class="imgitemdefault" [src]="ImgUrl" [ngClass]="{'img1': rotateA==90,'img2': rotateA==180,'img3': rotateA==270,'img4': rotateB==10,'img5': rotateB==20,'img6': rotateB==30}" > -->
</div>
</ng-container>
<ng-template #elseTemplate >
@ -14,4 +14,13 @@
</div>
<!--
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div> -->
<!-- <div class="previewImgBottom">
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button>
</div> -->

12
src/app/key-unit/basicinfo/addhouseinfo.component.ts

@ -21,7 +21,6 @@ import { MatSnackBar } from '@angular/material/snack-bar';
this.dialogRef.close();
}
ngOnInit(): void {
// console.log(this.data)
this.getallunittype()
}
getallunittype(){
@ -30,27 +29,24 @@ import { MatSnackBar } from '@angular/material/snack-bar';
})
}
onSubmit(value){
this.http.get("/api/Buildings",{
params:{
companyId:this.data.unitId
}
}).subscribe((data:any)=>{
this.data.allBuildings = data
let allBuildings = data
let order
if(data.length == 0){
if(allBuildings.length == 0){
order = 0
}else{
order = data[data.length - 1].order + 1
order = allBuildings[allBuildings.length-1].order + 1
}
let buildingTypename = ""
this.allunittype.forEach(item => {
if(item.id == value.unittype){
buildingTypename = item.name
}
});
this.http.post("/api/Buildings",{
id: "",
name: value.name,
@ -68,10 +64,12 @@ import { MatSnackBar } from '@angular/material/snack-bar';
}}).subscribe(data=>{
this.dialogRef.close(data);
})
})
}
}

429
src/app/key-unit/basicinfo/basicinfo.component.html

@ -1,11 +1,10 @@
<div style="height: 100%;display: flex; flex-direction: column;">
<div style="height: 100%;display: flex; flex-direction: column;overflow: hidden;">
<!-- header -->
<mat-accordion>
<mat-expansion-panel expanded hideToggle >
<mat-expansion-panel expanded>
<mat-expansion-panel-header style="color: black;">
<mat-panel-title>
单位信息
<mat-icon style="position: absolute;right:30px;">keyboard_arrow_down</mat-icon>
</mat-panel-title>
</mat-expansion-panel-header>
<div class="topbox">
@ -66,7 +65,7 @@
</div>
<div class="inputbox" style="width: 700px;">
<span style="color: red;">*</span>
<span>消防救援站</span>
<span>辖区中队</span>
<mat-form-field style="width: 538px;">
<input matInput id="organization" name="organization" type='text'
required minlength="1"
@ -105,16 +104,15 @@
(focus)="closeorganizationbox()">
</mat-form-field>
</div>
<div class="uploadimg" (click)="lookmaster()">
<div class="uploadimg">
<span>单位照片:</span>
<div class="uploadingimg">
<img *ngIf="imgsrc" [src]="imgsrc" alt="" style="width: 299px; height: 170px;">
<img *ngIf="!imgsrc" [src]="noImgSrc" alt="" style="width: 299px; height: 170px;">
<div class="uploadingimg" (click)="lookmaster()">
<img [src]="imgsrc ? imgsrc : noImg" alt="" style="width: 299px; height: 170px;" >
</div>
<mat-spinner *ngIf="isspinner" diameter= 50></mat-spinner>
</div>
<div class="image" (click)="closeorganizationbox()">
<input id="selectedfile" type="file" (change)="filechange($event)" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
<input id="selectedfile" type="file" ng2FileSelect [uploader]="uploader" (change)="filechange($event)" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div class="addbtn">
<button type="submit" color="primary" class="submit1" mat-button mat-raised-button>保存</button>
@ -124,6 +122,7 @@
<div style="width: 100%;height: 100%;" id="container">
</div>
<div class="gistopbox" *ngIf="isGisTopBox">
<div class="positionItem">
<span>
@ -160,61 +159,56 @@
</div>
</mat-expansion-panel>
</mat-accordion>
<!-- body -->
<div class="bottombox" style="flex: 70%;overflow-y: auto;" >
<div class="houseinfobox" style="height: 100%; overflow-y: auto;box-sizing:border-box">
<button type="button" mat-icon-button (click)="addhouseinfo()" class="addhouseinfo"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<mat-tab-group style="height: 100%;;" (focusChange)="selecttab($event)" >
<mat-tab [label]="item.username" *ngFor="let item of houses;let key = index">
<form style="height: 100%; overflow-y:auto; display: block;" (ngSubmit)="onSubmit2(form.value,item,key,form.invalid)" #form="ngForm" class="example-container">
<!-- 正常建筑 -->
<div class="highinfo" *ngIf="item.tongyong">
<div class="houseinfoinput" >
<div class="bodyBox" id="basicInfoBody">
<div>
<button type="button" mat-icon-button (click)="addhouseinfo()" class="addBuilding"><mat-icon>add_circle_outline</mat-icon></button>
</div>
<div style="height: 100%; box-sizing:border-box;overflow-y: auto;padding-left: 26px;">
<mat-tab-group style="height: 100%;" [selectedIndex]="selectedIndex" (selectedTabChange)="selectedTabChange($event)">
<mat-tab *ngFor="let item of houses;let key = index" label="{{item.name}}">
<ng-template matTabContent>
<form *ngIf="item.data && item.data.length!=0" style="height: 100%; overflow-y:auto; display: block;" (ngSubmit)="onSubmitBuildingInfo(form.value,item,key,form.invalid)" #form="ngForm" class="example-container">
<div class="buildInfoInput" >
<span>建筑名称:</span>
<mat-form-field>
<input matInput id="housename" name="housename" type='text'
minlength="1" [(ngModel)]="item.name"
>
<input required matInput name="buildingName" type='text' minlength="1" [(ngModel)]="item.name">
</mat-form-field>
<span style="color: red;">*</span>
</div>
<div class="houseinfoinput">
<div class="buildInfoInput">
<span>建筑类型:</span>
<mat-form-field>
<mat-select name="unittype" [(ngModel)]="item.buildtype">
<mat-option [value]="n.name" *ngFor="let n of allunittype" (click)="templatebuildtype(n,item,key)">{{n.name}}</mat-option>
<mat-select name="buildingTypeName" [(ngModel)]="item.buildingTypes[0].name">
<mat-option [value]="n.name" *ngFor="let n of allunittype" (click)="templateBuildtype(n,item,key)">{{n.name}}</mat-option>
</mat-select>
</mat-form-field>
<span style="color: red;">*</span>
</div>
<div *ngFor="let item of item.buildingBasicGroups;let www = index" style="float: left;">
<h1 style="font-size: 22px;">{{item.name}}</h1>
<div class="houseinfoinput" *ngFor="let i of item.propertyInfos" style="float: left;margin-left: 250px;position: relative;">
<div *ngFor="let element of item.data[0].buildingBasicGroups;let groupsIndex = index "style="float: left;width:100%">
<!-- 类型为表单并且不是 罐区 -->
<div *ngIf="element.type == 0 && element.name.indexOf('罐区') == -1">
<p style="font-size: 22px;">{{element.name}}</p>
<div class="buildInfoInput" *ngFor="let i of element.propertyInfos;let inputIndex = index" style="float: left;margin-left: 250px;position: relative;">
<span>{{i.propertyName}}<span *ngIf="i.physicalUnit">({{i.physicalUnit}})</span></span>
<!-- 如果类型是文本 -->
<mat-form-field *ngIf="i.propertyType == 0 && i.propertyName != '耐火等级'">
<input matInput name="{{i.propertyName}}{{www}}" type='text'
<input matInput name="{{groupsIndex}}{{inputIndex}}" type='text'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue">
</mat-form-field>
<!-- 如果类型是数字 -->
<mat-form-field *ngIf="i.propertyType == 2 && i.propertyName != '耐火等级'">
<input matInput name="{{i.propertyName}}{{www}}" type='number'
<input matInput name="{{groupsIndex}}{{inputIndex}}" type='number'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue"
(change)="inputchange($event,i.ruleName,i.ruleValue,i)"
>
<!-- <mat-error *ngIf="isshowrule">{{rulevalue}}</mat-error> -->
</mat-form-field>
<!-- 如果类型是耐火等级 -->
<mat-form-field *ngIf="i.propertyName == '耐火等级'">
<mat-select name="{{i.propertyName}}{{www}}" required="{{ i.required==true ? 'true' : 'false' }}" placeholder="请选择耐火等级" [(ngModel)]="i.propertyValue">
<mat-select name="{{groupsIndex}}{{inputIndex}}" required="{{ i.required==true ? 'true' : 'false' }}" placeholder="请选择耐火等级" [(ngModel)]="i.propertyValue">
<mat-option value="0">1级</mat-option>
<mat-option value="1">2级</mat-option>
<mat-option value="2">3级</mat-option>
@ -222,89 +216,74 @@
</mat-select>
</mat-form-field>
<!-- 如果类型是多行文本 -->
<textarea *ngIf="i.propertyType == 1 && i.propertyName != '耐火等级'" style="width: 180px;height: 60px;" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{i.propertyName}}{{key}}"></textarea>
<textarea *ngIf="i.propertyType == 1 && i.propertyName != '耐火等级'" style="width: 180px;height: 60px;" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{groupsIndex}}{{inputIndex}}"></textarea>
<span style="color: red;" *ngIf="i.required">*</span>
<div *ngIf="i.isshowrule" style="position: absolute;
left: 205px;
top: 45px;
font-size: 11px;
color: red;">
<div *ngIf="i.isshowrule" style="position: absolute;left: 205px;top: 45px;font-size: 11px;color: red;">
<span>{{i.rulevalue}}</span>
</div>
</div>
</div>
<div class="CustomData" style="width: 200px;">
<mat-checkbox color="primary" (change)="checkCustomData($event)" name="checkbuilding" [(ngModel)]="item.isCustomData" style="float: left;margin-right: 10px;"></mat-checkbox>
<h1 style="font-size: 22px;width: 200px;">自定义信息</h1>
</div>
<div *ngIf="item.isCustomData" style="position: relative;">
<button style="position: absolute;left: 0;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index">
<mat-form-field>
<input matInput type='text' name="{{key}}1CustomData"
required
[(ngModel)]="i.name">
</mat-form-field>
<span>:</span>
<mat-form-field>
<input matInput type='text' name="{{key}}2CustomData"
required
[(ngModel)]="i.value">
</mat-form-field>
<span style="color: red;" *ngIf="i.required">*</span>
</div>
</div>
</div>
<!-- 石油化工 -->
<div class="highinfo" *ngIf="item.isshiyou;let bigkey = index">
<div class="basicinfobox">
<div class="houseinfoinput">
<span>建筑名称:</span>
<mat-form-field>
<input matInput id="housename" name="housename" type='text'
required minlength="1" [(ngModel)]="item.name"
>
</mat-form-field>
<span style="color: red;">*</span>
</div>
<div class="houseinfoinput" >
<span>建筑类型:</span>
<mat-form-field>
<mat-select required name="unittype" [(ngModel)]="item.buildtype">
<mat-option [value]="n.name" *ngFor="let n of allunittype" (click)="templatebuildtype(n,item,key)">{{n.name}}</mat-option>
</mat-select>
</mat-form-field>
<span style="color: red;">*</span>
<!-- 类型为表格 并且不是 罐区 -->
<div *ngIf="element.type == 1 && element.name.indexOf('罐区') == -1">
<p style="font-size: 22px;">
<mat-checkbox color="primary" (change)="checkboxChange(element,$event,item)" *ngIf="element.isOptional" [name]="element.name" [(ngModel)]="element.submitted" style="float: left;margin-right: 10px;"></mat-checkbox>
{{element.name}}
</p>
<table *ngIf="element.submitted">
<tr>
<th *ngFor="let item of element.propertyInfos[0].origin;let index = index">
<button *ngIf="index == 0" style="width: 24px;" type="button" mat-icon-button class="addline" (click)="addline(element.propertyInfos)"><mat-icon>add_circle_outline</mat-icon></button>
<button *ngIf="index == 0" style="width: 24px;" type="button" mat-icon-button class="removeline" (click)="removeline(element.propertyInfos)"><mat-icon>remove_circle_outline</mat-icon></button>
{{item.propertyName}}
<span style="color: red;" *ngIf="item.required">*</span>
</th>
</tr>
<tr *ngFor="let item of element.propertyInfos;let line = index">
<td *ngFor="let i of item.origin;let list = index">
<input *ngIf="i.propertyType != 1" style="height:45px" class="tankinfo" name="{{element.name}}{{line + 1}}-{{list + 1}}" type="{{i.propertyType == 0 ? 'text' : 'number'}}"
required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue">
<textarea class="tankinfo" *ngIf="i.propertyType == 1" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{element.name}}{{line + 1}}{{list + 1}}">
</textarea>
</td>
</tr>
</table>
</div>
<h1 style="font-size: 22px;">{{item.buildingBasicGroups[0].name}}</h1>
<div class="houseinfoinput" *ngFor="let i of item.buildingBasicGroups[0].propertyInfos;let smkey = index" style="float: left;margin-left: 250px;position: relative;">
<!-- 类型为表单 是罐区-->
<div *ngIf="element.type == 0 && element.name.indexOf('罐区') != -1">
<p style="font-size: 22px;">
<mat-checkbox color="primary" (change)="checkboxChange(element,$event,item)" *ngIf="element.isOptional && element.name == '罐区1'" [name]="element.name" [(ngModel)]="element.submitted" style="float: left;margin-right: 10px;"></mat-checkbox>
<span *ngIf="element.name == '罐区1'">罐区信息</span>
</p>
<div *ngIf="element.submitted" >
<p *ngIf="element.name == '罐区1'" style="margin: 5px 0;">
<button type="button" mat-raised-button color="primary" (click)="addTankBox(item,groupsIndex)" style="margin-right: 5px;">添加罐区</button>
<button type="button" mat-raised-button color="warn" (click)="removeTankBox(item,groupsIndex)" matTooltip="会将此建筑处于末尾的罐区移除">移除末尾罐区</button>
</p>
<p style="font-size: 22px;">{{element.name}}</p>
<div class="buildInfoInput" *ngFor="let i of element.propertyInfos;let inputIndex = index" style="float: left;margin-left: 250px;position: relative;">
<span>{{i.propertyName}}<span *ngIf="i.physicalUnit">({{i.physicalUnit}})</span></span>
<!-- 如果类型是文本 -->
<mat-form-field *ngIf="i.propertyType == 0 && i.propertyName != '耐火等级'">
<input matInput name="{{i.propertyName}}" type='text'
<input matInput name="{{groupsIndex}}{{inputIndex}}" type='text'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue">
</mat-form-field>
<!-- 如果类型是数字 -->
<mat-form-field *ngIf="i.propertyType == 2 && i.propertyName != '耐火等级'">
<input matInput name="{{i.propertyName}}" type='number'
<input matInput name="{{groupsIndex}}{{inputIndex}}" type='number'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue"
(change)="inputchange($event,i.ruleName,i.ruleValue,i)"
>
<!-- <mat-error *ngIf="isshowrule">{{rulevalue}}</mat-error> -->
</mat-form-field>
<!-- 如果类型是耐火等级 -->
<mat-form-field *ngIf="i.propertyName == '耐火等级'">
<mat-select name="{{i.propertyName}}" required="{{ i.required==true ? 'true' : 'false' }}" placeholder="请选择耐火等级" [(ngModel)]="i.propertyValue">
<mat-select name="{{groupsIndex}}{{inputIndex}}" required="{{ i.required==true ? 'true' : 'false' }}" placeholder="请选择耐火等级" [(ngModel)]="i.propertyValue">
<mat-option value="0">1级</mat-option>
<mat-option value="1">2级</mat-option>
<mat-option value="2">3级</mat-option>
@ -312,262 +291,78 @@
</mat-select>
</mat-form-field>
<!-- 如果类型是多行文本 -->
<textarea *ngIf="i.propertyType == 1 && i.propertyName != '耐火等级'" style="width: 180px;height: 60px;" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{i.propertyName}}"></textarea>
<textarea *ngIf="i.propertyType == 1 && i.propertyName != '耐火等级'" style="width: 180px;height: 60px;" required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue" name="{{groupsIndex}}{{inputIndex}}"></textarea>
<span style="color: red;" *ngIf="i.required">*</span>
<div *ngIf="i.isshowrule" style=" position: absolute;
left: 205px;
top: 45px;
font-size: 11px;
color: red;">
<div *ngIf="i.isshowrule" style="position: absolute;left: 205px;top: 45px;font-size: 11px;color: red;">
<span>{{i.rulevalue}}</span>
</div>
</div>
</div>
<div class="deviceinfo">
<div style="width: 200px;">
<mat-checkbox color="primary" (change)="checkboxchange(item.buildingBasicGroups[1].submitted,$event)" name="item.buildingBasicGroups[1].name" *ngIf="item.buildingBasicGroups[1].isOptional" [(ngModel)]="item.buildingBasicGroups[1].submitted" style="float: left;margin-right: 10px;"></mat-checkbox>
<h1 style="font-size: 22px;width: 200px;">{{item.buildingBasicGroups[1].name}}</h1>
</div>
<table mat-table [dataSource]="devicedataSourcebox[item.buildingId]" class="mat-elevation-z8" *ngIf="item.buildingBasicGroups[1].submitted">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>
<button style="width: 24px;" type="button" mat-icon-button class="adddeviceinfo2" (click)="adddeviceinfo(item)"><mat-icon>add_circle_outline</mat-icon></button>
<button style="width: 24px;" type="button" mat-icon-button class="removedeviceinfo" (click)="removedeviceinfo(item)"><mat-icon>remove_circle_outline</mat-icon></button>
装置区名称<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<textarea style="width: 100px;" [(ngModel)]="element.name" name="{{key}}1" required></textarea>
</td>
</ng-container>
<ng-container matColumnDef="flow">
<th mat-header-cell *matHeaderCellDef>工艺流程<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<textarea [(ngModel)]="element.flow" name="{{key}}2" required></textarea>
</td>
</ng-container>
<ng-container matColumnDef="danger">
<th mat-header-cell *matHeaderCellDef>火灾危险性<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<textarea [(ngModel)]="element.danger" name="{{key}}3" required></textarea>
</td>
</ng-container>
<ng-container matColumnDef="payattentionto">
<th mat-header-cell *matHeaderCellDef>灭火注意事项</th>
<td mat-cell *matCellDef="let element;let key = index">
<textarea style="width: 100px;" [(ngModel)]="element.payattentionto" name="{{key}}4"></textarea>
<!-- 类型为表格 是罐区 -->
<div *ngIf="element.type == 1 && element.name.indexOf('罐区') != -1">
<p style="font-size: 22px;" *ngIf="element.submitted">
{{element.name}}
</p>
<table *ngIf="element.submitted">
<tr>
<th *ngFor="let item of element.propertyInfos[0].origin;let index = index">
<button *ngIf="index == 0" style="width: 24px;" type="button" mat-icon-button class="addline" (click)="addline(element.propertyInfos)"><mat-icon>add_circle_outline</mat-icon></button>
<button *ngIf="index == 0" style="width: 24px;" type="button" mat-icon-button class="removeline" (click)="removeline(element.propertyInfos)"><mat-icon>remove_circle_outline</mat-icon></button>
{{item.propertyName}}
<span style="color: red;" *ngIf="item.required">*</span>
</th>
</tr>
<tr *ngFor="let item of element.propertyInfos;let line = index">
<td *ngFor="let i of item.origin;let list = index">
<input type="{{i.propertyType == 0 ? 'text' : 'number'}}" style="height:45px" class="tankinfo" name="{{element.name}}{{line + 1}}-{{list + 1}}"
required="{{ i.required==true ? 'true' : 'false' }}" [(ngModel)]="i.propertyValue">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</tr>
</table>
</div>
<div style="width: 200px;">
<mat-checkbox color="primary" (change)="checkboxchange(item,$event)" *ngIf="item.buildingBasicGroups[2].isOptional" name="item.buildingBasicGroups[2].name" [(ngModel)]="item.buildingBasicGroups[2].submitted" style="float: left;margin-right: 10px;"></mat-checkbox>
<h1 style="font-size: 22px;width: 200px;">储罐信息</h1>
</div>
<button *ngIf="item.buildingBasicGroups[2].submitted" type="button" mat-raised-button color="primary" (click)="addtankbox(item,bigkey)" style="margin-top: 30px;margin-right: 5px;">添加储罐</button>
<button *ngIf="item.buildingBasicGroups[2].submitted" type="button" mat-raised-button color="warn" (click)="removetankbox(item,bigkey)" style="margin-top: 30px;" matTooltip="会将此建筑处于末尾的储罐移除">移除末尾储罐</button>
<div *ngIf="item.buildingBasicGroups[2].submitted" style="margin-top: 30px;">
<div class="tankinfo" *ngFor="let x of item.bigfor;let www = index">
<p style="font-size: 22px; width: 200px;">{{x[0].name}}</p>
<div class="basicinfobox" >
<div class="houseinfoinput" *ngFor="let i of x[0].propertyInfos;let key = index" style="line-height: 65px;">
<span>{{i.propertyName}} {{i.physicalUnit}}:</span>
<mat-form-field *ngIf="i.propertyType == 0">
<input matInput name="{{www+2}}-tanker-{{key}}" type='text'
required="{{ i.required==true ? 'true' : 'false' }}"
[(ngModel)]="i.propertyValue"
>
</mat-form-field>
<textarea style="width: 180px;height: 45px;" *ngIf="i.propertyType == 1" [(ngModel)]="i.propertyValue" name="{{www+2}}-tanker-{{key}}"></textarea>
<span style="color: red;" *ngIf="i.required">*</span>
</div>
</div>
<p style="font-size: 22px; width: 200px;">{{x[1].name}}</p>
<div class="tankdetailinfo">
<table #table mat-table [dataSource]="x[1].propertyInfos" class="mat-elevation-z8" style="position: relative;">
<ng-container matColumnDef="tank">
<th mat-header-cell *matHeaderCellDef>
<button type="button" mat-icon-button class="adddeviceinfo" (click)="adddeviceinfo2(www,item)" style="position: absolute;left: 0;"><mat-icon>add_circle_outline</mat-icon></button>
<button type="button" mat-icon-button class="removedeviceinfo" (click)="removedeviceinfo3(www,item)"><mat-icon>remove_circle_outline</mat-icon></button>
罐区 </th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tank}}tank{{key}}" type='text'
[(ngModel)]="element.tank">
</td>
</ng-container>
<ng-container matColumnDef="tankid">
<th mat-header-cell *matHeaderCellDef>罐区编号<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tankid}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankid">
</td>
</ng-container>
<ng-container matColumnDef="tankmedium">
<th mat-header-cell *matHeaderCellDef>储存介质<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tankmedium}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankmedium">
</td>
</ng-container>
<ng-container matColumnDef="tanktype">
<th mat-header-cell *matHeaderCellDef>储罐类型<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tanktype}}tank{{key}}" type='text'
required
[(ngModel)]="element.tanktype">
</td>
</ng-container>
<ng-container matColumnDef="tankcapacity">
<th mat-header-cell *matHeaderCellDef>容量(m³)<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tankcapacity}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankcapacity">
</td>
</ng-container>
<ng-container matColumnDef="tankdiameter">
<th mat-header-cell *matHeaderCellDef>直径(m)<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tankdiameter}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankdiameter">
</td>
</ng-container>
<ng-container matColumnDef="tankheight">
<th mat-header-cell *matHeaderCellDef>高度(m)<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tankheight}}tank{{key}}" type='text'
required
[(ngModel)]="element.tankheight">
</td>
</ng-container>
<ng-container matColumnDef="tanktectum">
<th mat-header-cell *matHeaderCellDef>顶盖形式</th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tanktectum}}tank{{key}}" type='text'
[(ngModel)]="element.tanktectum">
</td>
</ng-container>
<ng-container matColumnDef="tanktexture">
<th mat-header-cell *matHeaderCellDef>浮盘材质</th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.tanktexture}}tank{{key}}" type='text'
[(ngModel)]="element.tanktexture">
</td>
</ng-container>
<ng-container matColumnDef="platetype">
<th mat-header-cell *matHeaderCellDef>浮盘类型</th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.platetype}}tank{{key}}" type='text'
[(ngModel)]="element.platetype">
</td>
</ng-container>
<ng-container matColumnDef="foamgeneratorid">
<th mat-header-cell *matHeaderCellDef>泡沫产生器型号</th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.foamgeneratorid}}tank{{key}}" type='text'
[(ngModel)]="element.foamgeneratorid">
</td>
</ng-container>
<ng-container matColumnDef="foamgeneratortype">
<th mat-header-cell *matHeaderCellDef>泡沫产生器形式</th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.foamgeneratortype}}tank{{key}}" type='text'
[(ngModel)]="element.foamgeneratortype">
</td>
</ng-container>
<ng-container matColumnDef="isprotect">
<th mat-header-cell *matHeaderCellDef>是否设置氮封惰化保护装置</th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.isprotect}}tank{{key}}" type='text'
[(ngModel)]="element.isprotect">
</td>
</ng-container>
<ng-container matColumnDef="fendinggroyneheight">
<th mat-header-cell *matHeaderCellDef>防护堤高度(m)<span style="color: red;">*</span></th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.fendinggroyneheight}}tank{{key}}" type='text'
required
[(ngModel)]="element.fendinggroyneheight">
</td>
</ng-container>
<ng-container matColumnDef="portnum">
<th mat-header-cell *matHeaderCellDef>半固定泡沫灭火接口数量</th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.portnum}}tank{{key}}" type='text'
[(ngModel)]="element.portnum">
</td>
</ng-container>
<ng-container matColumnDef="else">
<th mat-header-cell *matHeaderCellDef>其它设施</th>
<td mat-cell *matCellDef="let element;let key = index">
<input style="height:45px" class="tankinfo" name="{{www}}{{element.else}}tank{{key}}" type='text'
[(ngModel)]="element.else">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns2"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns2;"></tr>
</table>
</div>
</div>
</div>
<div class="CustomData" style="width: 200px;margin-top: 60px;">
<mat-checkbox color="primary" (change)="checkCustomData($event)" name="checkbuilding" [(ngModel)]="item.isCustomData" style="float: left;margin-right: 10px;"></mat-checkbox>
<h1 style="font-size: 22px;width: 200px;">自定义信息</h1>
</div>
<div *ngIf="item.isCustomData" style="position: relative;">
<button style="position: absolute;left: 0;font-size: 11px;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index">
<div style="position: relative;" *ngIf="item.isCustomData">
<button style="position: absolute;left: 100px;top: 5px;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData">
<mat-icon>add_circle_outline</mat-icon>
</button>
<button style="position: absolute;left:150px;top: 5px;" type="button" mat-icon-button (click)="popCustomData(item)" class="deleteCustomData">
<mat-icon>remove_circle_outline</mat-icon>
</button>
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.customData.customProperties;let key = index">
<mat-form-field>
<input matInput type='text' name="{{key}}1CustomData"
<input matInput type='text' name="customData{{key}}Name"
required
[(ngModel)]="i.name">
</mat-form-field>
<span>:</span>
<mat-form-field>
<input matInput type='text' name="{{key}}2CustomData"
<input matInput type='text' name="customData{{key}}Value"
required
[(ngModel)]="i.value">
</mat-form-field>
<span style="color: red;" *ngIf="i.required">*</span>
</div>
</div>
</div>
<div class="infobtnbox">
<button type="submit()" mat-button mat-raised-button color="primary" >保存</button>
<button type="button" mat-raised-button (click)="deletedbuilding(item)" color="warn">删除</button>
<button type="submit" mat-button mat-raised-button color="primary">保存</button>
<button type="button" mat-raised-button (click)="deletedbuilding(item,key)" color="warn">删除</button>
</div>
</form>
</mat-tab>
</ng-template>
</mat-tab-group>
</mat-tab>
</mat-tab-group>
</div>
</div>
</div>

122
src/app/key-unit/basicinfo/basicinfo.component.scss

@ -1,7 +1,7 @@
.topbox{
height: 485px;
width: 100%;
// border-bottom: 1px solid black;
padding-bottom: 20px;
.mainbox{
height: 100%;
position: relative;
@ -40,7 +40,8 @@
}
.addbtn{
width: 695px;
margin:9px 0;
margin:20px 0;
padding-bottom: 20px;
}
.uploadimg{
width: 400px;
@ -150,29 +151,23 @@
z-index: 1;
}
}
}
}
.bottombox{
// height:400px;
width: 100%;
// background-color: skyblue;
.bottomtitle{
height: 60px;
// background-color: orange;
line-height: 60px;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
.houseinfobox{
// height:340px;
overflow: auto;
.addhouseinfo{
float: left;
.bodyBox{
flex: 70%;overflow-y: auto;
position: relative;
.addBuilding{
position: absolute;
z-index: 999;
left: 0;
top: 3px;
}
.buildInfoInput{
width: 393px;
text-align: end;
margin-left:240px;
}
.infobtnbox{
margin-left: 800px;
position: absolute;
top: 30px;
right: 75px;
@ -183,19 +178,7 @@
margin-top: 15px;
}
}
.infotitle{
font-size: 28px;
font-weight: 900;
margin-left: 180px;
}
.houseinfoinput{
width: 393px;
text-align: end;
margin-left:240px;
}
}
}
.btn{
width: 100%;
text-align: center;
@ -207,37 +190,29 @@
margin-top: 58px;
margin-left: 203px;
}
.mat-table{
width: 100%;
}
table{
width: 1000px;
thead{
width: 99%;
tr{
th{
width: 60px;
display: block;
float: left;
}
}
display: flex;
td,th{
flex: 1;
}
tbody{
tr{
th{
display: flex;
align-items: center;
justify-content: center;
td{
width: 60px;
display: block;
float: left;
text-align: center;
}
input{
border: 0px ;
}
}
}
table,table tr th, table tr td { border: 0.1px solid gray; }
table { text-align: center; border-collapse: collapse; padding:2px;}
.deviceinfo{
// border-bottom: 1px solid black;;
padding-bottom: 60px;
}
.tankdetailinfo{
@ -251,14 +226,10 @@ table{
}
.tankinfo{
display: block;
width: 100%;
// height: 45px;
width: 97.5%;
text-align: center;
border: 0px;
}
// .adddeviceinfo{
// // position: absolute;
// // left: 0px;
// }
.submit1{
margin-left: -66px !important;
}
@ -270,31 +241,7 @@ textarea {
height: 110px;
resize: none;
}
//预览图片旋转角度
.img1{
transform:rotate(90deg) scale(0.55);
height: 100%;
}
.img2{
transform:rotate(180deg);
// height: 100%;
}
.img3{
transform:rotate(270deg) scale(0.55);
// height: 100%;
}
.img4{
transform:rotate(90deg) scale(1.3);
// height: 100%;
}
.img5{
transform:rotate(180deg);
// height: 100%;
}
.img6{
transform:rotate(270deg) scale(1.3);
// height: 100%;
}
.imgbox{
text-align: center;
height: 750px;
@ -313,8 +260,3 @@ textarea {
font-size: 12px;
color: red;
}
.mat-expansion-panel{
span{
color: black;
}
}

1870
src/app/key-unit/basicinfo/basicinfo.component.ts

File diff suppressed because it is too large Load Diff

5
src/app/key-unit/key-unit-management/key-unit-management.component.html

@ -104,7 +104,7 @@
<th mat-header-cell *matHeaderCellDef>
</th>
<td mat-cell *matCellDef="let element">
<mat-checkbox color="primary" (change)="checkChange($event,element)"></mat-checkbox>
<mat-checkbox color="primary" (change)="checkChange($event,element)" [disabled]="element.contentVerify!=null&&(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3)" (click)='checkClick(element)'></mat-checkbox>
</td>
</ng-container>
<ng-container matColumnDef="Follow">
@ -264,6 +264,9 @@
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element" class="operation">
<span (click)="unitdetails(element)" >查看详情</span>
<span style="color: blue;margin-left: 4px;" *ngIf="element.contentVerify==null||element.contentVerify.verifyState==-1||element.contentVerify.verifyState==1||element.contentVerify.verifyState==2||element.contentVerify.verifyState==4||element.contentVerify.verifyState==5" (click)='submitAudit(element)'>提交审核</span>
<span style="color: blue;margin-left: 4px;" *ngIf="element.contentVerify!=null&&(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3) " (click)="cancelAudit(element)">撤销审核</span>
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span>
<span (click)="Follow(element)" *ngIf="!element.isFollowed">关注单位</span>
<span (click)="unFollow(element)" *ngIf="element.isFollowed">取消关注</span>
</td>

8
src/app/key-unit/key-unit-management/key-unit-management.component.scss

@ -264,3 +264,11 @@
// background : #32cd32;
// background-image: linear-gradient(to right, #e2e7ee ,#FF4500, #FF8C00,#32cd32);
}
//审核结果
.auditDiv{
p{
margin: 8px 0;
margin-left: 16px;
}
}

103
src/app/key-unit/key-unit-management/key-unit-management.component.ts

@ -353,7 +353,6 @@ export class KeyUnitManagementComponent implements OnInit {
IntegrityScoreMax:this.integrityScoreMax/100||1
}
this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{
this.length = data.totalCount
this.allKeyUnitInfo = data
// data.items.sort( (a,b) => {
@ -429,11 +428,33 @@ export class KeyUnitManagementComponent implements OnInit {
}
selectedunitArr:any =[] //选中单位的数组
//勾选框事件
verifyState //判断是否可以修改
checkChange(e,element){
console.log(element)
if(element.contentVerify!=null){
this.verifyState=element.contentVerify.verifyState
}else{
this.verifyState=null
}
element.checked = e.checked
}
checkClick(element){
if(element.contentVerify!=null){
if(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('该单位正在审核不能选中','确定',config);
}
}
}
//编辑单位信息
editunit(){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
let selectedunitArr = []
let selectedunitobj = []
this.allKeyUnitInfo.items.forEach(item => {
@ -444,9 +465,6 @@ export class KeyUnitManagementComponent implements OnInit {
});
if(selectedunitArr.length == 0){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请先选择要修改的单位','确定',config);
}
if(selectedunitArr.length != 1 && selectedunitArr.length != 0){
@ -492,6 +510,12 @@ export class KeyUnitManagementComponent implements OnInit {
}
//删除单位信息
deleteunit(){
if(this.verifyState==0||this.verifyState==3){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('审核中,不能删除','确定',config);
}else{
let selectedunitArr = []
this.allKeyUnitInfo.items.forEach(item => {
if(item.checked){
@ -526,6 +550,8 @@ export class KeyUnitManagementComponent implements OnInit {
}
}
}
//重置
js:any //辖区中队输入框
@ -641,6 +667,45 @@ export class KeyUnitManagementComponent implements OnInit {
}
);
}
//提交审核
submitAudit(element){
console.log(element)
let body:any = {
title:element.name,
Operation:0,
itemId:element.id,
verifyState:3,
contentType:11
}
this.http.post(`/api/ContentVerifies`,body).subscribe(data=>{
this.getAllKeyUnit()
})
}
//撤销审核
cancelAudit(element){
let body:any = {
//title:element.name,
//Operation:0,
id:element.contentVerify.id,
itemId:element.id,
verifyState:-1,
contentType:11
}
this.http.delete(`/api/ContentVerifies/${element.contentVerify.id}`).subscribe(data=>{
this.getAllKeyUnit()
})
}
//审核结果
auditResult(element){
// console.log(element)
const dialogRef = this.dialog.open(companyAuditResult, {
width:"400px",
//height:"300px",
data: {element:element}
});
}
}
@ -763,3 +828,33 @@ export class upname{
}
}
//查看审核结果
@Component({
selector: 'resultmeet',
templateUrl: './resultcompanyPlan.html',
styleUrls: ['./key-unit-management.component.scss']
})
export class companyAuditResult{
constructor(private http: HttpClient,public dialogRef: MatDialogRef<companyAuditResult>,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {}
planName:any = this.data.element.name
createTime=''
organizationName=this.data.element.organizationName
verifyTime=''
remark=''
verifyOrganizationName
verifyState=100
ngOnInit(): void {
if(this.data.element.contentVerify!=null){
this.createTime=this.data.element.contentVerify.createTime
//this.organizationName=this.data.element.organizationName
this.verifyTime=this.data.element.contentVerify.verifyTime
this.remark=this.data.element.remark
this.verifyState=this.data.element.contentVerify.verifyState
this.verifyOrganizationName=this.data.element.contentVerify.verifyOrganizationName
}
}
onNoClick(): void {
this.dialogRef.close();
}
}

27
src/app/key-unit/key-unit-management/resultcompanyPlan.html

@ -0,0 +1,27 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-01-20 09:31:24
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-03 11:03:19
-->
<div style="text-align: center;">
<span mat-dialog-title>审批结果</span>
</div>
<div class="auditDiv">
<p>预案名称:{{planName}}</p>
<p>提交时间:{{createTime| date:'yyyy-MM-dd HH:mm:ss'||''}}</p>
<p>发起申请:{{organizationName ||''}}</p>
<mat-divider></mat-divider>
<p>审核时间:{{verifyTime| date:'yyyy-MM-dd HH:mm:ss'||''}}</p>
<p>审核机构:{{verifyOrganizationName||''}}</p>
<p>审核意见:{{remark||''}}</p>
<p>审核结果:{{verifyState==4?'审核通过':verifyState==5?'审核退回':''||''}}</p>
</div>
<div style="text-align: center;margin-top: 18px; ">
<button mat-raised-button (click)="onNoClick()">关闭</button>
</div>

5
src/app/key-unit/key-unit.module.ts

@ -84,10 +84,11 @@ import { WaterRoadComponent } from './water-road/water-road.component';
import { PhotoofthesceneComponent } from './photoofthescene/photoofthescene.component';
import { KnowRouteComponent } from './know-route/know-route.component';
import { FindProblemComponent } from './find-problem/find-problem.component';
import { upname } from './key-unit-management/key-unit-management.component'
import { upname } from './key-unit-management/key-unit-management.component';
import { companyAuditResult } from './key-unit-management/key-unit-management.component'
@NgModule({
declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeyImgDetail,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,LookMaster2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname],
declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeyImgDetail,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,LookMaster2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname,companyAuditResult],
exports:[ViewUnitDetailsPlanComponent],
imports: [
CommonModule,

4
src/app/plan-audit/allaround/allaround.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-11-26 17:10:54
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-03 15:29:11
* @LastEditTime: 2021-03-02 09:32:08
*/
import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@ -32,7 +32,7 @@ export class AllaroundComponent implements OnInit {
AllAdjoining:any = []; //所有单位毗邻
AllBuilding:any = []; //所有建筑 + 建筑毗邻图片
//单位相关数据
unitId:string = '5e9964caa760a059e84512e9'
unitId:string = sessionStorage.getItem('companyId')
//5ee19fe06f91049f5e23e937
//5fb78554919f2b44e464017e
//获取所有单位毗邻图片

3
src/app/plan-audit/basic-info/basic-info.component.ts

@ -59,7 +59,8 @@ export class BasicInfoComponent implements OnInit {
//每次初始化 加载 组件调用方法
everyInin () {
//this.unitId = sessionStorage.getItem('unitId')
this.unitId='5e9964caa760a059e84512e9'
this.unitId=sessionStorage.getItem('companyId')
if (this.unitId) {
this.getUnitInfo().then(()=>{
setTimeout(() => {

2
src/app/plan-audit/cad-draw/cad-draw.component.ts

@ -17,7 +17,7 @@ export class CadDrawComponent implements OnInit {
this.companyId = this.unitId
this.getAllCAD()
}
unitId:any = '5e9964caa760a059e84512e9'
unitId:any = sessionStorage.getItem('companyId')
displayedColumns: string[] = ['checked', 'name', 'time', 'state','size'];

4
src/app/plan-audit/fire-facilities/fire-facilities.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-11-23 09:28:54
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-03 10:12:45
* @LastEditTime: 2021-03-02 09:32:21
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import {HttpClient, HttpHeaders} from '@angular/common/http'
@ -32,7 +32,7 @@ export class FireFacilitiesComponent implements OnInit {
this.getAllBuilding()
}
unitId:any = '5e9964caa760a059e84512e9'
unitId:any = sessionStorage.getItem('companyId')
//定义属性数据
singleElection:Food[]=[
{value:'true', name: '有'},

2
src/app/plan-audit/function-partition/function-partition.component.ts

@ -20,7 +20,7 @@ export class FunctionPartitionComponent implements OnInit {
}
displayedColumns: string[] = ['checked', 'region', 'measure', 'situation'];
unitId:any = '5e9964caa760a059e84512e9'
unitId:any = sessionStorage.getItem('companyId')
companyId:any; //单位编号
companyFunctionalZoning:any=[]; //所有单位功能分区属性

2
src/app/plan-audit/key-site-look/key-site.component.ts

@ -23,7 +23,7 @@ export class KeySiteLookComponent implements OnInit {
this.getCompanyTips()
this.getAllBuilding()
}
unitId:any = '5e9964caa760a059e84512e9'
unitId:any = sessionStorage.getItem('companyId')
allCompanyPosition:any = []; //所有单位重点部位
companyTips:any; //所有单位重点提示

2
src/app/plan-audit/plan-list/plan-list.component.ts

@ -12,7 +12,7 @@ export class PlanListComponent implements OnInit {
constructor(private http: HttpClient,public snackBar: MatSnackBar,public dialog: MatDialog) { }
//单位相关数据
unitId:any = '5e9964caa760a059e84512e9'
unitId:any = sessionStorage.getItem('companyId')
ngOnInit(): void {
this.getAllBuildings()

30
src/app/plan-audit/plan-record/plan-record.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-20 10:40:25
* @LastEditTime: 2021-03-03 13:54:44
-->
<div class="box">
<div class="boxleft">
@ -118,8 +118,7 @@
</div>
<div class="boxright">
<mat-tab-group *ngIf="showtype==3" style="flex: 1;overflow-y: auto;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab-group *ngIf="showtype == 3" style="flex: 1;overflow-y: auto;margin-top: 10px;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="基本信息">
<ng-template matTabContent>
<app-basic-info></app-basic-info>
@ -127,50 +126,39 @@
</mat-tab>
<mat-tab label="平面图">
<ng-template matTabContent>
平面图
<app-plan-list></app-plan-list>
</ng-template>
</mat-tab>
<mat-tab label="四周毗邻">
<ng-template matTabContent>
四周毗邻
<app-allaround></app-allaround>
</ng-template>
</mat-tab>
<mat-tab label="消防设施">
<ng-template matTabContent>
消防设施
<app-fire-facilities></app-fire-facilities>
</ng-template>
</mat-tab>
<mat-tab label="重点部位">
<ng-template matTabContent>
重点部位
<app-key-site-look></app-key-site-look>
</ng-template>
</mat-tab>
<mat-tab label="功能分区">
<ng-template matTabContent>
功能分区
<app-function-partition></app-function-partition>
</ng-template>
</mat-tab>
<mat-tab label="实景图">
<ng-template matTabContent>
实景图
<app-realistic-picture-look></app-realistic-picture-look>
</ng-template>
</mat-tab>
<mat-tab label="CAD">
<ng-template matTabContent>
cad
</ng-template>
</mat-tab>
<!-- <mat-tab label="六熟悉">
<ng-template matTabContent>
六熟悉
<app-cad-draw></app-cad-draw>
</ng-template>
</mat-tab>
<mat-tab label="实战演练">
<ng-template matTabContent>
实战演练
</ng-template>
</mat-tab> -->
</mat-tab-group>
<div class="word" *ngIf="showtype==0">
<iframe [src]='iframeSrc'></iframe>

23
src/app/plan-audit/plan-record/plan-record.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-22 10:49:38
* @LastEditTime: 2021-03-03 14:01:47
*/
import { Component, OnInit,Inject } from '@angular/core';
import { FormControl } from '@angular/forms';
@ -133,12 +133,28 @@ export class PlanRecordComponent implements OnInit {
//表格点击事件
viewer//全景图对象
tableClick(e,item){
this.showtype = -1
//e.target.parentElement.bgColor='#2196F3'
//console.log(e,item)
this.organizationName=''
this.id=item.id
this.fetchUrl=''
this.viewer={}
if(item.contentType == 11){
window.setTimeout(()=>{
this.showtype = 3
sessionStorage.setItem('companyId',item.itemId)
},0)
}else if(item.contentType == 12){
//水源
this.showtype = 12
}else if(item.contentType == 13){
//消防力量
this.showtype = 13
}else if(item.contentType == 14){
//联动力量
this.showtype = 14
}else{
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{
this.companyId=data.companyId
this.companyName=data.companyName
@ -175,6 +191,9 @@ export class PlanRecordComponent implements OnInit {
})
}
if(e.checked){
this.shenheTable.push(item)

2
src/app/plan-audit/realistic-picture-look/realistic-picture.component.ts

@ -35,7 +35,7 @@ export class RealisticPictureLookComponent implements OnInit {
}
unitId:any = '5e9964caa760a059e84512e9'
unitId:any = sessionStorage.getItem('companyId')
companyId:any; //单位编号
allRealPicture:any=[]; //所有实景图文件

24
src/app/plan-audit/wait-examineer/wait-examineer.component.html

@ -54,12 +54,11 @@
</table>
<div class="tbodycss" id="tbodydiv" >
<table cellspacing="0" cellpadding="0" id="table" >
<tr *ngFor="let item of tableDate;let key = index" (click)='radioClick($event,item)'>
<tr [ngClass]="{'selectedTr': item.id == id}" *ngFor="let item of tableDate;let key = index" (click)='radioClick($event,item)'>
<td style="width: 15%;">
<mat-checkbox color="primary" (change)='radioClick($event,item)'></mat-checkbox>
<!-- <input type="checkbox" name="yuan" value={{item.id}} (click)='radioClick($event,item)'> -->
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':'消防车辆'}}</td>
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}</td>
<td style="width: 15%;" [ngClass]="{'green': item.operation == '1','red':item.operation == '2','blue':item.operation == '0'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 15%;">{{item.verifyOrganizationName}}</td>
<td style="width: 15%;" [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">{{item.verifyState=='0'?'待初审':item.verifyState=='1'?
@ -82,13 +81,14 @@
<button mat-raised-button style="color: #FFFFFF;background-color: #FF7161;float: right;" (click)='refuse()'>拒绝</button>
<button mat-raised-button style="color: #FFFFFF;background-color: #38D984;float: right;" (click)='agree()'>同意</button>
</div>
<div class="rightheadone" *ngIf="showtype==3">
<div class="rightheadone" style="display: none;">
<button mat-raised-button color="primary" (click)="buttonChange()"><img src="../../../assets/images/preview.png" style="margin-right: 3px;margin-bottom: 3px;display: none;">{{isallDate?'显示变更数据':'显示完整数据'}} </button>
<button mat-raised-button *ngIf="isallDate" style="background-color: #FFCC00; color: #FFFFFF;" (click)="preview()"><img src="../../../assets/images/change.png" style="margin-bottom: 2px;" > 预览得分</button>
</div>
</div>
<div id="company">
<mat-tab-group *ngIf="showtype == 3" style="flex: 1;overflow-y: auto;margin-top: 10px;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="基本信息">
<ng-template matTabContent>
@ -131,6 +131,8 @@
</ng-template>
</mat-tab>
</mat-tab-group>
</div>
<div id="firefacilities" *ngIf="showtype == 3 && !isallDate" style="margin: 10px;">
<mat-accordion class="tableContent" >
<mat-expansion-panel expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;">
@ -265,17 +267,17 @@
</div>
</div>
<!-- 水源审核 -->
<!-- <div class="waterAudit">
<app-water-audit></app-water-audit>
</div> -->
<div class="waterAudit" *ngIf="showtype == 12">
<app-water-audit [waterData]="waterData"></app-water-audit>
</div>
<!-- 消防力量审核 -->
<!-- <div class="fireForceAudit">
<div class="fireForceAudit" *ngIf="showtype == 13">
<app-fireforce-audit></app-fireforce-audit>
</div> -->
</div>
<!-- 联动力量审核 -->
<!-- <div class="LinkageForcesAudit">
<div class="LinkageForcesAudit" *ngIf="showtype == 14">
<app-linkageforces-audit></app-linkageforces-audit>
</div> -->
</div>
</div>
</div>
<div class="echarts" *ngIf="previewshow" ><!-- [style.display]="previewshow==true?'block':'none'" -->

4
src/app/plan-audit/wait-examineer/wait-examineer.component.scss

@ -50,6 +50,9 @@
overflow-y: auto;
height: 700px;
width: 100%;
.selectedTr{
background-color: #b3d3ee;
}
}
table{
margin-left:10px;
@ -71,6 +74,7 @@
}
.boxright{
height: 100%;
width: 55%;
flex: 1;
background-color: #FFFFFF;
margin-left: 10px;

157
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-25 16:13:50
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-22 10:49:28
* @LastEditTime: 2021-03-03 15:13:25
*/
import { Component, Inject, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
@ -103,7 +103,7 @@ export class WaitExamineerComponent implements OnInit {
chuorzhong//判断初审还是终审
radioid//选中的id
shenheTable=[]//选中要审核的对象
showtype//0:word,1:全景图,2:二维三维,3:重点单位
showtype=-1//0:word,1:全景图,2:二维三维,3:重点单位
compantData={name:'',buildingTypes:[],address:''}
organizationName
planData
@ -122,7 +122,7 @@ export class WaitExamineerComponent implements OnInit {
verifyState:[0,3]
}
this.http.get("/api/ContentVerifies",{params:paramsdata}).subscribe((data:any)=>{
//console.log(data)
console.log(data)
this.tableDate=data.items
this.count=data.totalCount
})
@ -153,13 +153,37 @@ export class WaitExamineerComponent implements OnInit {
}
//radio点击事件
viewer//全景图对象
waterData:any//需要传递给子组件的水源信息
radioClick(e,item){
this.showtype = -1
//e.target.parentElement.bgColor='#2196F3'
//console.log(e,item)
console.log(item)
this.organizationName=''
this.id=item.id
this.fetchUrl=''
this.viewer={}
if(item.contentType == 11){
window.setTimeout(()=>{
this.showtype = 3
sessionStorage.setItem('companyId',item.itemId)
},0)
}else if(item.contentType == 12){
//水源
// console.log(item.itemId)
this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data)=>{
console.log('水源',data)
this.waterData = data
this.showtype = 12
})
}else if(item.contentType == 13){
//消防力量
this.showtype = 13
}else if(item.contentType == 14){
//联动力量
this.showtype = 14
}else{
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{
this.companyId=data.companyId
this.companyName=data.companyName
@ -196,6 +220,8 @@ export class WaitExamineerComponent implements OnInit {
})
}
if(e.checked){
this.shenheTable.push(item)
@ -304,17 +330,50 @@ export class WaitExamineerComponent implements OnInit {
//同意操作
agree(){
var agreeList=[]
var companyAgreeList=[]
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
/* if(this.chuorzhong==2){
this.snackBar.open('审核未通过,请修改后再来审核!','确定',config);
} */
//console.log(this.shenheTable)
console.log(this.shenheTable)
if(this.shenheTable.length==0){
this.snackBar.open('请选择要审核的预案!','确定',config);
this.snackBar.open('请勾选要审核的条目!','确定',config);
}
//单个审核
else if(this.shenheTable.length == 1){
let isTrue = window.confirm('确定同意选中条目的审核吗?')
if(isTrue){
//重点单位审核
if(this.shenheTable[0].contentType == 11){
let body:any = {
id:this.shenheTable[0].id,
itemId:this.shenheTable[0].itemId,
verifyState:4,
contentType:11,
title:this.shenheTable[0].title+'基本信息'
}
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate()
})
}else if(this.shenheTable[0].contentType == 12){
let body:any = {
id:this.shenheTable[0].id,
itemId:this.shenheTable[0].itemId,
verifyState:4,
contentType:12,
title:this.shenheTable[0].title
}
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
this.showtype = -1
this.getAlltabledate()
})
}else if(this.shenheTable[0].contentType == 13){
}else if(this.shenheTable[0].contentType == 14){
}else{
//预案审核
if(this.shenheTable[0].verifyState==0){
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:16}).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
@ -327,7 +386,26 @@ export class WaitExamineerComponent implements OnInit {
})
}
}
}
}
//批量审核
else{
let isTrue = window.confirm('确定同意选中条目的审核吗?')
if(isTrue){
if(this.shenheTable[0].contentType==11||this.shenheTable[0].contentType==12){ //批量审批水源和重点单位
for(var i=0;i<this.shenheTable.length;i++){
var body={
id:this.shenheTable[i].id,
itemId:this.shenheTable[i].itemId,
verifyState:4
}
companyAgreeList.push(body)
}
this.http.put(`/api/ContentVerifies/Batch`,companyAgreeList).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate()
})
}else{ //批量审核预案
for(var i=0;i<this.shenheTable.length;i++){
var cart={
planComponentId:this.shenheTable[i].itemId,
@ -341,6 +419,10 @@ export class WaitExamineerComponent implements OnInit {
this.getAlltabledate()
})
}
}
}
this.shenheTable=[]
}
//拒绝操作
@ -349,10 +431,46 @@ export class WaitExamineerComponent implements OnInit {
config.verticalPosition = 'top';
config.duration = 3000
var refuseList = []
var companyrefuseList=[]
if(this.shenheTable.length==0){
this.snackBar.open('请选择要审核的预案!','确定',config);
}
//单个审核拒绝
else if(this.shenheTable.length==1){
let isTrue = window.confirm('确定拒绝选中条目的审核吗?')
if(isTrue){
//重点单位审核拒绝
if(this.shenheTable[0].contentType == 11){
let body:any = {
id:this.shenheTable[0].id,
itemId:this.shenheTable[0].itemId,
verifyState:5,
contentType:11,
title:this.shenheTable[0].title+'基本信息'
}
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate()
})
}else if(this.shenheTable[0].contentType == 12){
let body:any = {
id:this.shenheTable[0].id,
itemId:this.shenheTable[0].itemId,
verifyState:5,
contentType:12,
title:this.shenheTable[0].title
}
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
this.showtype = -1
this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate()
})
}else if(this.shenheTable[0].contentType == 13){
}else if(this.shenheTable[0].contentType == 14){
}else{
//预案审核拒绝
if(this.shenheTable[0].verifyState==0){
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:32}).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
@ -365,7 +483,26 @@ export class WaitExamineerComponent implements OnInit {
})
}
}
}
}
//批量审核
else{
let isTrue = window.confirm('确定拒绝选中条目的审核吗?')
if(isTrue){
if(this.shenheTable[0].contentType==11||this.shenheTable[0].contentType==12){ //批量审批水源和重点单位
for(var i=0;i<this.shenheTable.length;i++){
var body={
id:this.shenheTable[i].id,
itemId:this.shenheTable[i].itemId,
verifyState:5
}
companyrefuseList.push(body)
}
this.http.put(`/api/ContentVerifies/Batch`,companyrefuseList).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate()
})
}else{
for(var i=0;i<this.shenheTable.length;i++){
var cart={
planComponentId:this.shenheTable[i].itemId,
@ -379,6 +516,8 @@ export class WaitExamineerComponent implements OnInit {
this.getAlltabledate()
})
}
}
}
this.shenheTable=[]

2
src/app/plan-audit/water-audit/water-audit.component.html

@ -4,7 +4,7 @@
<div class="tabsbox">
<div class="tabs">
<div class="selectedBtn">
<span>消火栓</span>
<span>{{selectedWaterTypeIndex == 0 ? '消火栓' : selectedWaterTypeIndex == 1 ? '消防水池' : selectedWaterTypeIndex == 2 ? '天然水源' : null}}</span>
</div>
</div>
</div>

49
src/app/plan-audit/water-audit/water-audit.component.ts

@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
declare var AMap: any;
@Component({
selector: 'app-water-audit',
@ -6,7 +6,7 @@ declare var AMap: any;
styleUrls: ['./water-audit.component.scss']
})
export class WaterAuditComponent implements OnInit {
@Input() public waterData: any;//data名字根据引用场景自定义
constructor() { }
map:any
newPositionMarker:any
@ -15,9 +15,12 @@ export class WaterAuditComponent implements OnInit {
' <img style="width:20px;height:24px" src="/assets/images/定位.png">' +
'</div>'
ngOnInit(): void {
this.selectedWaterTypeIndex = this.waterData.waterSourceType
this.waterData.detailData = JSON.parse(this.waterData.detailData)
this.fireCockData = this.waterData.detailData
console.log(789, this.fireCockData)
this.poolData = this.waterData.detailData
this.naturalWaterData = this.waterData.detailData
setTimeout(() => {
this.map = new AMap.Map('container', {
zoom:18
@ -38,27 +41,27 @@ export class WaterAuditComponent implements OnInit {
}, 0);
}
selectedWaterTypeIndex:number = 0//选择的水源类型 0消火栓 1水池 2天然水源
selectedWaterTypeIndex:number //选择的水源类型 0消火栓 1水池 2天然水源
fireCockData:any = []//消火栓详情
poolData:any = []//水池详情
naturalWaterData:any = []//天然水源详情
waterData:any = {
id: "60125d31d31fab7de81c56b0",
name: "上海中心消火栓01",
administrativeRegion: "上海区",
governmentLevel: "1",
village: "小高社区",
address: "国际会议中心",
location: {
x: 121.496717,
y: 31.239452
},
detailData: "[{\"PropertyName\":\"可用状态\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"放置形式\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"管网形式\",\"PropertyValue\":\"2\"},{\"PropertyName\":\"管网直径\",\"PropertyValue\":\"2\"},{\"PropertyName\":\"管网压力类型\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"管网压力范围\",\"PropertyValue\":\"2222\"},{\"PropertyName\":\"接口形式\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"接口口径\",\"PropertyValue\":\"3\"},{\"PropertyName\":\"最大流量\",\"PropertyValue\":\"333\"},{\"PropertyName\":\"供水单位\",\"PropertyValue\":\"剃剃头\"},{\"PropertyName\":\"联系方式\",\"PropertyValue\":\"119\"},{\"PropertyName\":\"备注\",\"PropertyValue\":\"突突突突突突\"}]",
detailItems: null,
createTime: "2021-02-03T02:36:57.451Z",
creatorId: "5e8eced2aaca5f7c1025309b",
deleted: false,
waterSourceType: 0,
integrityScore: 0.21052632
}
// waterData:any = {
// id: "60125d31d31fab7de81c56b0",
// name: "上海中心消火栓01",
// administrativeRegion: "上海区",
// governmentLevel: "1",
// village: "小高社区",
// address: "国际会议中心",
// location: {
// x: 121.496717,
// y: 31.239452
// },
// detailData: "[{\"PropertyName\":\"可用状态\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"放置形式\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"管网形式\",\"PropertyValue\":\"2\"},{\"PropertyName\":\"管网直径\",\"PropertyValue\":\"2\"},{\"PropertyName\":\"管网压力类型\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"管网压力范围\",\"PropertyValue\":\"2222\"},{\"PropertyName\":\"接口形式\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"接口口径\",\"PropertyValue\":\"3\"},{\"PropertyName\":\"最大流量\",\"PropertyValue\":\"333\"},{\"PropertyName\":\"供水单位\",\"PropertyValue\":\"剃剃头\"},{\"PropertyName\":\"联系方式\",\"PropertyValue\":\"119\"},{\"PropertyName\":\"备注\",\"PropertyValue\":\"突突突突突突\"}]",
// detailItems: null,
// createTime: "2021-02-03T02:36:57.451Z",
// creatorId: "5e8eced2aaca5f7c1025309b",
// deleted: false,
// waterSourceType: 0,
// integrityScore: 0.21052632
// }
}

5
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -297,6 +297,11 @@ export class EntryPlanLookComponent implements OnInit {
}else{
this.http.put(`/api/PlanComponents/${element.id}/Cancel`,"").subscribe(data=>{
this.getAllPlanComponents()
},err => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open(err,'确定',config);
})
}
}

15
src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts

@ -16,7 +16,7 @@ export class BuildingTypeOneComponent implements OnInit {
ngOnInit(): void {
window.setTimeout(()=>{
this.initCharts()
},0)
},100)
}
ngOnDestroy(): void {
this.indexBzt.clear()
@ -28,11 +28,14 @@ export class BuildingTypeOneComponent implements OnInit {
count=0//总数
indexData=[]//所有数据
initCharts(){
this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{
for(var i=0;i<data.companyStatistics.buildingTypeStatistics.buildingTypes.length;i++){
this.lengthdata.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i].buildingTypeName)
this.count=this.count+data.companyStatistics.buildingTypeStatistics.buildingTypes[i].count
this.indexData.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i])
this.echartsData.getData(null)
console.log(this.echartsData.allDate)
this.http.get("/api/StatisticsAnalysis/BuildingTypes").subscribe((data:any)=>{
console.log(data)
for(var i=0;i<data.buildingTypeStatistics.buildingTypes.length;i++){
this.lengthdata.push(data.buildingTypeStatistics.buildingTypes[i].buildingTypeName)
this.count=this.count+data.buildingTypeStatistics.buildingTypes[i].count
this.indexData.push(data.buildingTypeStatistics.buildingTypes[i])
}
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}})

13
src/app/statistic-analysis/echarts-data.service.ts

@ -409,7 +409,7 @@ export class EchartsDataService {
BuildingTypeId:datas.id
}
//var res
this.http.get("/api/StatisticsAnalysis/Companies",{params:paramsdata}).subscribe((data:any)=>{
this.http.get("/api/StatisticsAnalysis/BuildingTypes",{params:paramsdata}).subscribe((data:any)=>{
this.tishiData=data
console.log(this.tishiData)
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
@ -465,6 +465,17 @@ export class EchartsDataService {
}
//获取所有数据
allDate=[]
getData(paramsdata){
this.http.get("/api/StatisticsAnalysis",{params:paramsdata}).subscribe((data:any)=>{
this.allDate.push(data)
console.log(this.allDate)
return this.allDate
})
}
}

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

@ -669,7 +669,10 @@ export class CollectionToolsBuildingComponent implements OnInit {
this.isShowProperty = false
}
}, this)
AxMessageSystem.addListener('imageResize', (eventName, args1) => {
this.assetWidth = args1.Width
this.assetHeight = args1.Height
}, this)
if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1){ //查看模式
this.isEditPattern = false
this.isediticon = false
@ -1353,7 +1356,6 @@ export class CollectionToolsBuildingComponent implements OnInit {
});
this.dataSource.data = treeData
this.treeControl.expandAll()
}
//点击树节点
@ -1493,11 +1495,11 @@ export class CollectionToolsBuildingComponent implements OnInit {
let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据
let storeyData = JSON.parse(JSON.stringify( this.canvasData.originaleveryStoreyData || {} )) //当前 楼层 数据
for(let key in companyBuildingData.data){
if (companyBuildingData.data[key].FloorId === beforeOneId) { //处理 单位/建筑 数据是否归于当前楼层下
storeyData.data[key] = companyBuildingData.data[key]
}
}
// for(let key in companyBuildingData.data){
// if (companyBuildingData.data[key].FloorId === beforeOneId) { //处理 单位/建筑 数据是否归于当前楼层下
// storeyData.data[key] = companyBuildingData.data[key]
// }
// }
for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组
let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId )
if (!noMatch) {

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

@ -674,7 +674,10 @@ export class CollectionToolsPlanComponent implements OnInit {
this.isShowProperty = false
}
}, this)
AxMessageSystem.addListener('imageResize', (eventName, args1) => {
this.assetWidth = args1.Width
this.assetHeight = args1.Height
}, this)
if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1){ //查看模式
this.isEditPattern = false
this.isediticon = false

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

@ -691,7 +691,10 @@ export class CollectionToolsComponent implements OnInit {
this.isShowProperty = false
}
}, this)
AxMessageSystem.addListener('imageResize', (eventName, args1) => {
this.assetWidth = args1.Width
this.assetHeight = args1.Height
}, this)
this.canvasData.gameMode = GameMode.Assignment
if (sessionStorage.getItem('editable') == "0") { //查看模式
this.isEditPattern = false

476
src/app/working-area/model/axImageShape.ts

@ -5,8 +5,10 @@ import { PaintMode } from './paintModel';
import * as PIXI from 'pixi.js';
import { PropertyInfo } from './PropertyInfo';
import { AxShape } from './axShape';
import { Sprite } from 'pixi.js';
import { Sprite, Point, Rectangle } from 'pixi.js';
import { AxArrowConnector } from './axArrowConnector';
import { AxMessageSystem } from './axMessageSystem';
import { EVENT_IMAGE_RESIZE } from './events';
/**
*
@ -31,6 +33,7 @@ export class AxImageShape extends AxShape {
wordWrapWidth: 100,
});
text = new PIXI.Text(this.assetData.Name
+ '\r\n'
+ this.assetData.PropertyInfos?.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style);
@ -48,6 +51,16 @@ export class AxImageShape extends AxShape {
upRight: PIXI.Sprite;
downLeft: PIXI.Sprite;
downRight: PIXI.Sprite;
upDrag: boolean = false;
downDrag: boolean = false;
leftDrag: boolean = false;
rightDrag: boolean = false;
upLeftDrag: boolean = false;
upRightDrag: boolean = false;
downLeftDrag: boolean = false;
downRightDrag: boolean = false;
constructor(assetData: any, workingArea: WorkingAreaComponent) {
super(assetData, workingArea);
this.angle = -this.workingArea.backgroundImage.angle;
@ -71,84 +84,353 @@ export class AxImageShape extends AxShape {
this.addChild(this.image);
this.addChild(this.selectionBox);
////
// up
this.up = new PIXI.Sprite(this.pointTexture);
this.up.cursor = 'ns-resize';
this.up.anchor.set(0.5);
this.addChild(this.up);
this.up.interactive = true;
this.up.on('pointerdown', event => {
this.upDrag = true;
this.image.anchor.set(0.5, 1);
this.image.position.set(this.image.position.x, this.image.position.y + (this.image.height / 2));
event.stopPropagation();
});
this.up.on('pointermove', event => {
// 移动时调整形状大小,然后重绘边框
// 检查右下角距离鼠标的位置,
if (this.upDrag) {
var pos = this.toLocal(event.data.global);
var dY = Math.abs(pos.y - this.image.y);
this.assetData.Height = Math.abs(dY);
this.refresh();
AxMessageSystem.send(EVENT_IMAGE_RESIZE, this.assetData);
}
});
this.up.on('pointerup', event => {
if (this.upDrag) {
this.upDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x, this.image.position.y - (this.image.height / 2));
}
});
this.up.on('pointerupoutside', event => {
if (this.upDrag) {
this.upDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x, this.image.position.y - (this.image.height / 2));
}
});
this.up.visible = false;
// down
this.down = new PIXI.Sprite(this.pointTexture);
this.down.cursor = 'ns-resize';
this.down.anchor.set(0.5);
this.addChild(this.down);
this.down.interactive = true;
this.down.on('pointerdown', event => {
this.downDrag = true;
this.image.anchor.set(0.5, 0);
this.image.position.set(this.image.position.x, this.image.position.y - (this.image.height / 2));
event.stopPropagation();
});
this.down.on('pointermove', event => {
// 移动时调整形状大小,然后重绘边框
// 检查右下角距离鼠标的位置,
if (this.downDrag) {
var pos = this.toLocal(event.data.global);
var dY = Math.abs(pos.y - this.image.y);
this.assetData.Height = Math.abs(dY);
this.refresh();
AxMessageSystem.send(EVENT_IMAGE_RESIZE, this.assetData);
}
});
this.down.on('pointerup', event => {
if (this.downDrag) {
this.downDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x, this.image.position.y + (this.image.height / 2));
}
});
this.down.on('pointerupoutside', event => {
if (this.downDrag) {
this.downDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x, this.image.position.y + (this.image.height / 2));
}
});
this.down.visible = false;
// left
this.left = new PIXI.Sprite(this.pointTexture);
this.left.cursor = 'ew-resize';
this.left.anchor.set(0.5);
this.addChild(this.left);
this.left.interactive = true;
this.left.on('pointerdown', event => {
this.leftDrag = true;
this.image.anchor.set(1, 0.5);
this.image.position.set(this.image.position.x + (this.image.width / 2), this.image.position.y);
event.stopPropagation();
});
this.left.on('pointermove', event => {
// 移动时调整形状大小,然后重绘边框
// 检查右下角距离鼠标的位置,
if (this.leftDrag) {
var pos = this.toLocal(event.data.global);
var dX = Math.abs(pos.x - this.image.x);
this.assetData.Width = Math.abs(dX);
this.refresh();
AxMessageSystem.send(EVENT_IMAGE_RESIZE, this.assetData);
}
});
this.left.on('pointerup', event => {
if (this.leftDrag) {
this.leftDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y);
}
});
this.left.on('pointerupoutside', event => {
if (this.leftDrag) {
this.leftDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y);
}
});
this.left.visible = false;
// right
this.right = new PIXI.Sprite(this.pointTexture);
this.right.cursor = 'ew-resize';
this.right.anchor.set(0.5);
this.addChild(this.right);
this.right.interactive = true;
this.right.on('pointerdown', event => {
this.rightDrag = true;
this.image.anchor.set(0, 0.5);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y);
event.stopPropagation();
});
this.right.on('pointermove', event => {
// 移动时调整形状大小,然后重绘边框
// 检查右下角距离鼠标的位置,
if (this.rightDrag) {
var pos = this.toLocal(event.data.global);
var dX = Math.abs(pos.x - this.image.x);
this.assetData.Width = Math.abs(dX);
this.refresh();
AxMessageSystem.send(EVENT_IMAGE_RESIZE, this.assetData);
}
});
this.right.on('pointerup', event => {
if (this.rightDrag) {
this.rightDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x + (this.image.width / 2), this.image.position.y);
}
});
this.right.on('pointerupoutside', event => {
if (this.rightDrag) {
this.rightDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x + (this.image.width / 2));
}
});
this.right.visible = false;
// up-left
this.upLeft = new PIXI.Sprite(this.pointTexture);
this.upLeft.cursor = 'nwse-resize';
this.upLeft.anchor.set(0.5);
this.addChild(this.upLeft);
this.upLeft.interactive = true;
this.upLeft.on('pointerdown', event => {
this.upLeftDrag = true;
this.image.anchor.set(1);
this.image.position.set(this.image.position.x + (this.image.width / 2), this.image.position.y + (this.image.height / 2));
event.stopPropagation();
});
this.upLeft.on('pointermove', event => {
// 移动时调整形状大小,然后重绘边框
// 检查右下角距离鼠标的位置,
if (this.upLeftDrag) {
var pos = this.toLocal(event.data.global);
var dX = Math.abs(pos.x - this.image.x);
var dY = Math.abs(pos.y - this.image.y);
var result = dX > dY ? dX : dY;
this.assetData.Width = Math.abs(result);
this.assetData.Height = Math.abs(result);
this.refresh();
AxMessageSystem.send(EVENT_IMAGE_RESIZE, this.assetData);
}
});
this.upLeft.on('pointerup', event => {
if (this.upLeftDrag) {
this.upLeftDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y - (this.image.height / 2));
}
});
this.upLeft.on('pointerupoutside', event => {
if (this.upLeftDrag) {
this.upLeftDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y - (this.image.height / 2));
}
});
this.upLeft.visible = false;
// up-right
this.upRight = new PIXI.Sprite(this.pointTexture);
this.upRight.cursor = 'nesw-resize';
this.upRight.anchor.set(0.5);
this.addChild(this.upRight);
this.upRight.interactive = true;
this.upRight.on('pointerdown', event => {
this.upRightDrag = true;
this.image.anchor.set(0, 1);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y + (this.image.height / 2));
event.stopPropagation();
});
this.upRight.on('pointermove', event => {
// 移动时调整形状大小,然后重绘边框
// 检查右下角距离鼠标的位置,
if (this.upRightDrag) {
var pos = this.toLocal(event.data.global);
var dX = Math.abs(pos.x - this.image.x);
var dY = Math.abs(pos.y - this.image.y);
var result = dX > dY ? dX : dY;
this.assetData.Width = Math.abs(result);
this.assetData.Height = Math.abs(result);
this.refresh();
AxMessageSystem.send(EVENT_IMAGE_RESIZE, this.assetData);
}
});
this.upRight.on('pointerup', event => {
if (this.upRightDrag) {
this.upRightDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x + (this.image.width / 2), this.image.position.y - (this.image.height / 2));
}
});
this.upRight.on('pointerupoutside', event => {
if (this.upRightDrag) {
this.upRightDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x + (this.image.width / 2), this.image.position.y - (this.image.height / 2));
}
});
this.upRight.visible = false;
// down-left
this.downLeft = new PIXI.Sprite(this.pointTexture);
this.downLeft.cursor = 'nesw-resize';
this.downLeft.anchor.set(0.5);
this.addChild(this.downLeft);
this.downLeft.interactive = true;
this.downLeft.on('pointerdown', event => {
this.downLeftDrag = true;
this.image.anchor.set(1, 0);
this.image.position.set(this.image.position.x + (this.image.width / 2), this.image.position.y - (this.image.height / 2));
event.stopPropagation();
});
this.downLeft.on('pointermove', event => {
// 移动时调整形状大小,然后重绘边框
// 检查右下角距离鼠标的位置,
if (this.downLeftDrag) {
var pos = this.toLocal(event.data.global);
var dX = Math.abs(pos.x - this.image.x);
var dY = Math.abs(pos.y - this.image.y);
var result = dX > dY ? dX : dY;
this.assetData.Width = Math.abs(result);
this.assetData.Height = Math.abs(result);
this.refresh();
AxMessageSystem.send(EVENT_IMAGE_RESIZE, this.assetData);
}
});
this.downLeft.on('pointerup', event => {
if (this.downLeftDrag) {
this.downLeftDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y + (this.image.height / 2));
}
});
this.downLeft.on('pointerupoutside', event => {
if (this.downLeftDrag) {
this.downLeftDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y + (this.image.height / 2));
}
});
this.downLeft.visible = false;
// down-right
this.downRight = new PIXI.Sprite(this.pointTexture);
this.downRight.cursor = 'nwse-resize';
this.downRight.anchor.set(0.5);
this.addChild(this.downRight);
this.downRight.interactive = true;
this.downRight.on('pointerdown', event => {
this.downRightDrag = true;
this.image.anchor.set(0, 0);
this.image.position.set(this.image.position.x - (this.image.width / 2), this.image.position.y - (this.image.height / 2));
event.stopPropagation();
});
this.downRight.on('pointermove', event => {
// 移动时调整形状大小,然后重绘边框
// 检查右下角距离鼠标的位置,
if (this.downRightDrag) {
var pos = this.toLocal(event.data.global);
var dX = Math.abs(pos.x - this.image.x);
var dY = Math.abs(pos.y - this.image.y);
var result = dX > dY ? dX : dY;
this.assetData.Width = Math.abs(result);
this.assetData.Height = Math.abs(result);
this.refresh();
AxMessageSystem.send(EVENT_IMAGE_RESIZE, this.assetData);
}
});
this.downRight.on('pointerup', event => {
if (this.downRightDrag) {
this.downRightDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x + (this.image.width / 2), this.image.position.y + (this.image.height / 2));
}
});
this.downRight.on('pointerupoutside', event => {
if (this.downRightDrag) {
this.downRightDrag = false;
this.image.anchor.set(0.5);
this.image.position.set(this.image.position.x + (this.image.width / 2), this.image.position.y + (this.image.height / 2));
}
});
this.downRight.visible = false;
////
// if (this.assetData.CanConnect) {
// // connectPoint
// this.connectPoint = new PIXI.Sprite(this.connectPointTexture);
// this.connectPoint.anchor.set(0.5);
// this.connectPoint.x = this.image.x;
// this.connectPoint.y = this.image.y;
// this.addChild(this.connectPoint);
// this.connectPoint.interactive = true;
// this.connectPoint
// .on('pointerdown', event => {
// event.stopPropagation();
// // this.paintingPipeline(this.x, this.y);
// })
// .on('pointerover', event => {
// this.setSelectionBox(true, this.connectPoint);
// })
// .on('pointerout', event => {
// this.setSelectionBox(false);
// });
// // this.showConnectionPoint(false);
// }
this.setItemScale(1 / this.workingArea.backgroundImage.scale.x);
}
// // 设置选择框
// public setSelectionBox(b: boolean, sprite?: PIXI.Sprite) {
// if (b) {
// this.selectionBox.lineStyle(2, 0x00EB00, 1);
// this.selectionBox.position = sprite.position;
// this.selectionBox.drawRect(- sprite.width / 2, - sprite.height / 2, sprite.width, sprite.height);
// } else {
// this.selectionBox.clear();
// }
// }
// 设置名称
public setNameVisible(value: boolean, mode: GameMode) {
if (this.assetData.GameMode === mode) {
this.text.visible = value;
}
}
// // 显示连接点
// public showConnectionPoint(b: boolean) {
// this.connectPoint.visible = b;
// }
/**
*
* @param value
*/
public setPointVisiable(value: boolean) {
const rect = this.getLocalBounds();
this.up.x = rect.right - rect.width / 2;
this.up.y = rect.top;
this.down.x = rect.right - rect.width / 2;
this.down.y = rect.bottom;
this.left.x = rect.left;
this.left.y = rect.bottom - rect.height / 2;
this.right.x = rect.right;
this.right.y = rect.bottom - rect.height / 2;
this.upLeft.x = rect.left;
this.upLeft.y = rect.top;
this.upRight.x = rect.right;
@ -157,6 +439,10 @@ export class AxImageShape extends AxShape {
this.downLeft.y = rect.bottom;
this.downRight.x = rect.right;
this.downRight.y = rect.bottom;
this.up.visible = value;
this.down.visible = value;
this.left.visible = value;
this.right.visible = value;
this.upLeft.visible = value;
this.upRight.visible = value;
this.downLeft.visible = value;
@ -172,6 +458,14 @@ export class AxImageShape extends AxShape {
super.drawBorder(scale);
const rect = this.getLocalBounds();
this.up.x = rect.right - rect.width / 2;
this.up.y = rect.top;
this.down.x = rect.right - rect.width / 2;
this.down.y = rect.bottom;
this.left.x = rect.left;
this.left.y = rect.bottom - rect.height / 2;
this.right.x = rect.right;
this.right.y = rect.bottom - rect.height / 2;
this.upLeft.x = rect.left;
this.upLeft.y = rect.top;
this.upRight.x = rect.right;
@ -191,81 +485,57 @@ export class AxImageShape extends AxShape {
this.upRight.scale.set(scale);
this.downLeft.scale.set(scale);
this.downRight.scale.set(scale);
this.up.scale.set(scale);
this.down.scale.set(scale);
this.left.scale.set(scale);
this.right.scale.set(scale);
}
}
// paintingPipeline(x: number, y: number) {
// if (this.assetData.CanConnect) {
// if (this.workingArea.getPaintMode() === PaintMode.Pipeline) {
// if (this.workingArea.paintingShape === null) {
// this.workingArea.previewLineSegment.visible = true;
// this.workingArea.currentClickPoint.position =
// new PIXI.Point(this.workingArea.circleShadow.x, this.workingArea.circleShadow.y);
// this.workingArea.paintPoints.push(new PIXI.Point(x, y));
// const json = JSON.parse(JSON.stringify(this.workingArea.canvasData.selectTemplateData.propertyInfos));
// const list = [];
// json.forEach(element => {
// const property = new PropertyInfo(element);
// list.push(property);
// });
// const tempData = {
// TemplateId: this.workingArea.canvasData.selectTemplateData.id,
// CanConnect: this.workingArea.canvasData.selectTemplateData.canConnect,
// Pipelines: new Array(),
// FloorId: this.workingArea.canvasData.selectStorey.id,
// Angle: this.workingArea.canvasData.selectTemplateData.angle,
// Color: this.workingArea.canvasData.selectTemplateData.color,
// Enabled: this.workingArea.canvasData.selectTemplateData.enabled,
// FillMode: this.workingArea.canvasData.selectTemplateData.fillMode,
// FireElementId: this.workingArea.canvasData.selectTemplateData.fireElementId,
// FixedSize: this.workingArea.canvasData.selectTemplateData.fixedSize,
// Height : 32,
// Width : 32,
// Id: ObjectID.default.generate(),
// ImageUrl: this.workingArea.canvasData.selectTemplateData.imageUrl,
// InteractiveMode: this.workingArea.canvasData.selectTemplateData.interactiveMode,
// MultiPoint : JSON.parse(JSON.stringify(this.workingArea.paintPoints)),
// Point: new PIXI.Point(0, 0),
// Name : this.workingArea.canvasData.selectTemplateData.name,
// PropertyInfos: list,
// Border : this.workingArea.canvasData.selectTemplateData.border,
// DrawMode : this.workingArea.canvasData.selectTemplateData.drawMode,
// Thickness : this.workingArea.canvasData.selectTemplateData.thickness,
// IsFromBuilding : this.workingArea.canvasData.selectTemplateData.isFromBuilding,
// GameMode: this.workingArea.canvasData.gameMode,
// LinkedObjects: new Array(this.assetData.Id),
// Tag: this.workingArea.canvasData.selectTemplateData.tag
// };
// this.workingArea.paintingShape = new AxArrowConnector(tempData, this.workingArea, false, true);
// this.assetData.Pipelines.push(this.workingArea.paintingShape.assetData.Id);
// this.workingArea.emit('createIcon', this.workingArea.paintingShape);
// } else {
// this.workingArea.previewLineSegment.visible = false;
// this.workingArea.currentClickPoint.position =
// new PIXI.Point(this.workingArea.circleShadow.x, this.workingArea.circleShadow.y);
// this.workingArea.paintPoints.push(new PIXI.Point(x, y));
// this.workingArea.paintingShape.assetData.MultiPoint =
// JSON.parse(JSON.stringify(this.workingArea.paintPoints));
// this.workingArea.paintingShape.assetData.LinkedObjects.push(this.assetData.Id);
// this.assetData.Pipelines.push(this.workingArea.paintingShape.assetData.Id);
// this.workingArea.paintingShape.redraw();
// this.workingArea.initPipelineData();
// }
// }
// }
// }
// 刷新
public refresh() {
if (this.assetData.CanConnect) {
}
this.image.width = this.assetData.Width;
this.image.height = this.assetData.Height;
this.image.angle = this.assetData.Angle;
this.text.text = this.assetData.Name
+ '\r\n'
+ this.assetData.PropertyInfos?.find(item => item.PropertyName === '名称/编号')?.PropertyValue;
if (this.image.anchor.x == 0) {
if (this.image.anchor.y == 0) {
this.text.x = this.image.x + this.image.width / 2;
this.text.y = this.image.y;
} else if (this.image.anchor.y == 0.5) {
this.text.x = this.image.x + this.image.width / 2;
this.text.y = this.image.y - this.image.height / 2;
} else if (this.image.anchor.y == 1) {
this.text.x = this.image.x + this.image.width / 2;
this.text.y = this.image.y - this.image.height;
}
} else if (this.image.anchor.x == 0.5) {
if (this.image.anchor.y == 0) {
this.text.x = this.image.x;
this.text.y = this.image.y;
} else if (this.image.anchor.y == 0.5) {
} else if (this.image.anchor.y == 1) {
this.text.x = this.image.x;
this.text.y = this.image.y - this.image.height;
}
} else if (this.image.anchor.x == 1) {
if (this.image.anchor.y == 0) {
this.text.x = this.image.x - this.image.width / 2;
this.text.y = this.image.y;
} else if (this.image.anchor.y == 0.5) {
this.text.x = this.image.x - this.image.width / 2;
this.text.y = this.image.y - this.image.height / 2;
} else if (this.image.anchor.y == 1) {
this.text.x = this.image.x - this.image.width / 2;
this.text.y = this.image.y - this.image.height;
}
}
this.angle = -this.workingArea.backgroundImage.angle;
this.drawBorder(1 / this.workingArea.backgroundImage.scale.x);
}
}

34
src/app/working-area/model/axMessageSystem.ts

@ -11,8 +11,8 @@ export class AxMessageSystem {
* @param callback
* @param context
*/
public static addListener(name: string, callback: () => void, context: any) {
const observers: Observer[] = AxMessageSystem.listeners[name];
public static addListener(name: string, callback: Function, context: any) {
let observers: Observer[] = AxMessageSystem.listeners[name];
if (!observers) {
AxMessageSystem.listeners[name] = [];
}
@ -25,18 +25,18 @@ export class AxMessageSystem {
* @param callback
* @param context
*/
public static removeListener(name: string, callback: () => void, context: any) {
const observers: Observer[] = AxMessageSystem.listeners[name];
if (!observers) { return; }
const length = observers.length;
public static removeListener(name: string, callback: Function, context: any) {
let observers: Observer[] = AxMessageSystem.listeners[name];
if (!observers) return;
let length = observers.length;
for (let i = 0; i < length; i++) {
const observer = observers[i];
let observer = observers[i];
if (observer.compar(context)) {
observers.splice(i, 1);
break;
}
}
if (observers.length === 0) {
if (observers.length == 0) {
delete AxMessageSystem.listeners[name];
}
}
@ -46,11 +46,11 @@ export class AxMessageSystem {
* @param name
*/
public static send(name: string, ...args: any[]) {
const observers: Observer[] = AxMessageSystem.listeners[name];
if (!observers) { return; }
const length = observers.length;
let observers: Observer[] = AxMessageSystem.listeners[name];
if (!observers) return;
let length = observers.length;
for (let i = 0; i < length; i++) {
const observer = observers[i];
let observer = observers[i];
observer.notify(name, ...args);
}
}
@ -61,12 +61,12 @@ export class AxMessageSystem {
*/
class Observer {
/** 回调函数 */
private callback: () => void;
private callback: Function = null;
/** 上下文 */
private context: any = null;
constructor(callback: () => void, context: any) {
const self = this;
constructor(callback: Function, context: any) {
let self = this;
self.callback = callback;
self.context = context;
}
@ -76,7 +76,7 @@ class Observer {
* @param args
*/
notify(...args: any[]): void {
const self = this;
let self = this;
self.callback.call(self.context, ...args);
}
@ -85,6 +85,6 @@ class Observer {
* @param context
*/
compar(context: any): boolean {
return context === this.context;
return context == this.context;
}
}

2
src/app/working-area/model/axShape.ts

@ -32,7 +32,7 @@ export class AxShape extends Graphics {
this.workingArea.backgroundImage.addChild(this);
this.zIndex = 200;
this.interactive = true;
this.buttonMode = true;
// this.buttonMode = true;
this
.on('pointerdown', event => {
event.stopPropagation();

3
src/app/working-area/model/configuration.ts

@ -77,7 +77,8 @@ export var config = {
directionalDrag: true,
boundsX: 500,
boundsY: 500,
viewBounds: 20000 };
viewBounds: 60000
};
export var wallInformation = { exterior: false, interior: false, midline: true, labels: true, exteriorlabel: 'e:', interiorlabel: 'i:', midlinelabel: 'm:' };

2
src/app/working-area/model/events.ts

@ -67,3 +67,5 @@ export const EVENT_MODIFY_TEXTURE_ATTRIBUTE = 'MODIFY_TEXTURE_ATTRIBUTE_EVENT';
export const EVENT_PARAMETRIC_GEOMETRY_UPATED = 'PARAMETRIC_GEOMETRY_UPATED_EVENT';
export const EVENT_SELECTION_CHANGED = 'selectionChanged';
export const EVENT_IMAGE_RESIZE = 'imageResize';

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

@ -21,7 +21,9 @@ import { AxSelection } from './model/axSelection';
import { AxMessageSystem } from './model/axMessageSystem';
import { Grid2D } from './model/grid2D';
import { Viewport } from 'pixi-viewport';
import { EVENT_SELECTION_CHANGED } from './model/events';
import { EVENT_IMAGE_RESIZE, EVENT_SELECTION_CHANGED } from './model/events';
import { Dimensioning } from './model/dimensioning';
import { Configuration, viewBounds } from './model/configuration';
@Component({
@ -164,8 +166,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* -
* -
*/
// todo shift绘制垂直线段
public VERSION = '1.3.0.20210220_beta';
public VERSION = '1.4.1.20210303_rc';
/**
*
*/
@ -208,7 +209,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.camera2D.destroy();
this.app.destroy();
}
public setMulitSelect(b: boolean) {
if (b) {
this.isCtrlKeyClicked = true;
@ -366,11 +366,12 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* 2D相机
*/
private createViewport(): void {
var gridSize = Dimensioning.cmToPixel(Configuration.getNumericValue(viewBounds) * 1);
this.camera2D = new Viewport({
screenWidth: this.app.view.width,
screenHeight: this.app.view.height,
worldWidth: 20000,
worldHeight: 20000,
worldWidth: gridSize,
worldHeight: gridSize,
interaction: this.app.renderer.plugins.interaction,
});
this.camera2D.pivot.set(0.5);
@ -379,10 +380,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.camera2D
.clamp({
left: -10000,
right: 10000,
top: -10000,
bottom: 10000,
left: -gridSize / 2,
right: gridSize / 2,
top: -gridSize / 2,
bottom: gridSize / 2,
})
.drag()
.pinch()

BIN
src/assets/images/箭头.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

BIN
src/assets/images/箭头2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

BIN
src/assets/images/箭头3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Loading…
Cancel
Save