Browse Source

[完善]消防设施完善

develop
陈鹏飞 5 years ago
parent
commit
69d155b761
  1. 8
      src/app/ui/fire-fighting-device/fire-fighting-device.component.html
  2. 6
      src/app/ui/fire-fighting-device/fire-fighting-device.component.scss
  3. 40
      src/app/ui/fire-fighting-device/fire-fighting-device.component.ts

8
src/app/ui/fire-fighting-device/fire-fighting-device.component.html

@ -35,7 +35,7 @@
<input type="text" [(ngModel)]="items.details" style="width: 80%;">
</label>
<label><mat-icon title="切换" (click)='SwitchBoard(items)' *ngIf="items.isBuiltin">radio_button_checked</mat-icon></label>
<label><mat-icon (click)='SwitchBoard(items)' *ngIf="items.isBuiltin">keyboard_arrow_down</mat-icon></label>
</mat-expansion-panel-header>
<div class="detailsTable">
@ -49,7 +49,7 @@
</table>
</div>
<div *ngFor="let tableMsg of items.loopTable" class="detailsTable">
<p style="text-align: center; font-size: 16px; margin: 5px 0;">总平面图名称: {{tableMsg.name}}</p>
<p style="text-align: center; font-size: 16px; margin: 5px 0;">{{tableMsg.name}}</p>
<table>
<tr>
<th *ngFor="let header of tableMsg.header">{{header}}</th>
@ -126,7 +126,7 @@
<input type="text" [(ngModel)]="items.details" style="width: 80%;">
</label>
<label><mat-icon title="切换" (click)='SwitchBuildingBoard(newItem,items)' *ngIf="items.isBuiltin">radio_button_checked</mat-icon></label>
<label><mat-icon (click)='SwitchBuildingBoard(newItem,items)' *ngIf="items.isBuiltin">keyboard_arrow_down</mat-icon></label>
</mat-expansion-panel-header>
<div class="detailsTable">
@ -140,7 +140,7 @@
</table>
</div>
<div *ngFor="let tableMsg of items.loopTable" class="detailsTable">
<p style="text-align: center; font-size: 16px; margin: 5px 0;">总平面图名称: {{tableMsg.name}}</p>
<p style="text-align: center; font-size: 16px; margin: 5px 0;">{{tableMsg.name}}</p>
<table>
<tr>
<th *ngFor="let header of tableMsg.header">{{header}}</th>

6
src/app/ui/fire-fighting-device/fire-fighting-device.component.scss

@ -11,6 +11,7 @@
}
}
.mat-icon {
color: black;
cursor:pointer;
}
@ -46,7 +47,10 @@ a {
//bottom用户输入框
.InputField {
display: inline-block;
margin: 10px 20px;
width: 40%;
text-align: right;
margin: 10px 25px;
input {width: 300px;}
label {margin-right: 10px;}
}
textarea {

40
src/app/ui/fire-fighting-device/fire-fighting-device.component.ts

@ -159,7 +159,8 @@ export class FireFightingDeviceComponent implements OnInit {
data[key].forEach(element => { //表格内容
let everyBody = {}
element.propertyInfos.forEach((elements,index) => {
if (elements.propertyType!=3) { everyBody[elements.propertyName] = elements.propertyValue }
if (elements.propertyType!=3 && elements.propertyType!=6) { everyBody[elements.propertyName] = elements.propertyValue+elements.physicalUnit }
if (elements.propertyType==6) { everyBody[elements.propertyName] = elements.propertyValue=='1'?'是':'否' }
});
tableMsg.body.push(everyBody)
});
@ -178,7 +179,8 @@ export class FireFightingDeviceComponent implements OnInit {
data.forEach(element => { //表格内容
let everyBody = {}
element.propertyInfos.forEach((elements,index) => {
if (elements.propertyType!=3) { everyBody[elements.propertyName] = elements.propertyValue }
if (elements.propertyType!=3 && elements.propertyType!=6) { everyBody[elements.propertyName] = elements.propertyValue+elements.physicalUnit }
if (elements.propertyType==6) { everyBody[elements.propertyName] = elements.propertyValue=='1'?'是':'否' }
});
e.body.push(everyBody)
});
@ -316,7 +318,8 @@ export class FireFightingDeviceComponent implements OnInit {
data[key].forEach(element => { //表格内容
let everyBody = {}
element.propertyInfos.forEach((elements,index) => {
if (elements.propertyType!=3) { everyBody[elements.propertyName] = elements.propertyValue }
if (elements.propertyType!=3 && elements.propertyType!=6) { everyBody[elements.propertyName] = elements.propertyValue+elements.physicalUnit }
if (elements.propertyType==6) { everyBody[elements.propertyName] = elements.propertyValue=='1'?'是':'否' }
});
tableMsg.body.push(everyBody)
});
@ -335,7 +338,8 @@ export class FireFightingDeviceComponent implements OnInit {
data.forEach(element => { //表格内容
let everyBody = {}
element.propertyInfos.forEach((elements,index) => {
if (elements.propertyType!=3) { everyBody[elements.propertyName] = elements.propertyValue }
if (elements.propertyType!=3 && elements.propertyType!=6) { everyBody[elements.propertyName] = elements.propertyValue+elements.physicalUnit }
if (elements.propertyType==6) { everyBody[elements.propertyName] = elements.propertyValue=='1'?'是':'否' }
});
e.body.push(everyBody)
});
@ -354,9 +358,14 @@ export class FireFightingDeviceComponent implements OnInit {
let newData = this.companyEachDetails[e.name]
if (newData) {
let data = {name:e.name, images:[]}
let imgName
for (let key in newData) {
newData[key].forEach(element => {
element.propertyInfos.forEach(elements => { if (elements.propertyType==3) {data.images.push(elements)} });
element.propertyInfos.forEach( elements => {
if (elements.propertyName.includes('名称')) {imgName = elements.propertyValue}
if (elements.propertyType==3) {
elements.propertyName = imgName
data.images.push(elements)} });
});
} //for
if (data.images.length) {
@ -375,10 +384,15 @@ export class FireFightingDeviceComponent implements OnInit {
this.snackBar.open('暂无图片数据','确定',config); }
} else { //非逐层统计时
let newData = this.companyDetails[e.name]
let imgName
if (newData) {
let data = {name:e.name, images:[]}
newData.forEach(element => {
element.propertyInfos.forEach(elements => { if (elements.propertyType==3) {data.images.push(elements)} });
element.propertyInfos.forEach(elements => {
if (elements.propertyName.includes('名称')) {imgName = elements.propertyValue}
if (elements.propertyType==3) {
elements.propertyName = imgName
data.images.push(elements)} });
});
if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData,{width:'1350px',height:'700px',data}); //打开图片弹窗
@ -404,9 +418,14 @@ export class FireFightingDeviceComponent implements OnInit {
let newData = item.buildingEachDetails[e.name]
if (newData) {
let data = {name:e.name, images:[]}
let imgName
for (let key in newData) {
newData[key].forEach(element => {
element.propertyInfos.forEach(elements => { if (elements.propertyType==3) {data.images.push(elements)} });
element.propertyInfos.forEach(elements => {
if (elements.propertyName.includes('名称')) {imgName = elements.propertyValue}
if (elements.propertyType==3) {
elements.propertyName = imgName
data.images.push(elements)} });
});
} //for
if (data.images.length) {
@ -425,10 +444,15 @@ export class FireFightingDeviceComponent implements OnInit {
this.snackBar.open('暂无图片数据','确定',config); }
} else { //非逐层统计时
let newData = item.buildingDetails[e.name]
let imgName
if (newData) {
let data = {name:e.name, images:[]}
newData.forEach(element => {
element.propertyInfos.forEach(elements => { if (elements.propertyType==3) {data.images.push(elements)} });
element.propertyInfos.forEach(elements => {
if (elements.propertyName.includes('名称')) {imgName = elements.propertyValue}
if (elements.propertyType==3)
elements.propertyName = imgName
{data.images.push(elements)} });
});
if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData,{width:'1350px',height:'700px',data}); //打开图片弹窗

Loading…
Cancel
Save