|
|
|
@ -153,17 +153,25 @@ export class FireFightingDeviceComponent implements OnInit {
|
|
|
|
|
data.forEach(item => { |
|
|
|
|
let tableMsg = {name:item.name, header:[], body:[]} |
|
|
|
|
item.assets[0].propertyInfos.forEach(element => { //表头
|
|
|
|
|
if (element.propertyType!=3) {tableMsg.header.push(element.propertyName)} |
|
|
|
|
if (element.propertyType!=3) { |
|
|
|
|
let unit = element.physicalUnit? '('+ element.physicalUnit +')' : '' //单位
|
|
|
|
|
tableMsg.header.push(element.propertyName+unit)} |
|
|
|
|
}); |
|
|
|
|
item.assets.forEach(element => { //表格内容
|
|
|
|
|
let everyBody = {} |
|
|
|
|
element.propertyInfos.forEach((elements,index) => { |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName!='图片' && elements.propertyType!=6) { everyBody[elements.propertyName] = elements.propertyValue+elements.physicalUnit } |
|
|
|
|
if (elements.propertyType==6) { everyBody[elements.propertyName] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName!='图片' && elements.propertyType!=6) {
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue } |
|
|
|
|
if (elements.propertyType==6) {
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName=='图片') {
|
|
|
|
|
let imgLength = [] |
|
|
|
|
element.propertyInfos.find(item=>{ if(item.propertyType==3){imgLength.push(item)} }) |
|
|
|
|
everyBody[elements.propertyName] = imgLength.length+elements.physicalUnit }
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = String(imgLength.length) }
|
|
|
|
|
|
|
|
|
|
}); //propertyInfos
|
|
|
|
|
tableMsg.body.push(everyBody) |
|
|
|
|
}); //assets
|
|
|
|
@ -177,17 +185,25 @@ export class FireFightingDeviceComponent implements OnInit {
|
|
|
|
|
e.header = [] |
|
|
|
|
e.body = [] |
|
|
|
|
data[0].propertyInfos.forEach(element => { //表头
|
|
|
|
|
if (element.propertyType!=3) {e.header.push(element.propertyName)} |
|
|
|
|
if (element.propertyType!=3) { |
|
|
|
|
let unit = element.physicalUnit? '('+ element.physicalUnit +')' : '' //单位
|
|
|
|
|
e.header.push(element.propertyName+unit)} |
|
|
|
|
}); |
|
|
|
|
data.forEach(element => { //表格内容
|
|
|
|
|
let everyBody = {} |
|
|
|
|
element.propertyInfos.forEach((elements,index) => { |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName!='图片' && elements.propertyType!=6) { everyBody[elements.propertyName] = elements.propertyValue+elements.physicalUnit } |
|
|
|
|
if (elements.propertyType==6) { everyBody[elements.propertyName] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName!='图片' && elements.propertyType!=6) {
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue } |
|
|
|
|
if (elements.propertyType==6) {
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName=='图片') {
|
|
|
|
|
let imgLength = [] |
|
|
|
|
element.propertyInfos.find(item=>{ if(item.propertyType==3){imgLength.push(item)} }) |
|
|
|
|
everyBody[elements.propertyName] = imgLength.length+elements.physicalUnit } |
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = String(imgLength.length) } |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
e.body.push(everyBody) |
|
|
|
|
}); |
|
|
|
@ -320,17 +336,25 @@ export class FireFightingDeviceComponent implements OnInit {
|
|
|
|
|
data.forEach(item => { |
|
|
|
|
let tableMsg = {name:item.name, header:[], body:[]} |
|
|
|
|
item.assets[0].propertyInfos.forEach(element => { //表头
|
|
|
|
|
if (element.propertyType!=3) {tableMsg.header.push(element.propertyName)} |
|
|
|
|
if (element.propertyType!=3) { |
|
|
|
|
let unit = element.physicalUnit? '('+ element.physicalUnit +')' : '' //单位
|
|
|
|
|
tableMsg.header.push(element.propertyName+unit)} |
|
|
|
|
}); |
|
|
|
|
item.assets.forEach(element => { //表格内容
|
|
|
|
|
let everyBody = {} |
|
|
|
|
element.propertyInfos.forEach((elements,index) => { |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName!='图片' && elements.propertyType!=6) { everyBody[elements.propertyName] = elements.propertyValue+elements.physicalUnit } |
|
|
|
|
if (elements.propertyType==6) { everyBody[elements.propertyName] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName!='图片' && elements.propertyType!=6) {
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue } |
|
|
|
|
if (elements.propertyType==6) {
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName=='图片') {
|
|
|
|
|
let imgLength = [] |
|
|
|
|
element.propertyInfos.find(item=>{ if(item.propertyType==3){imgLength.push(item)} }) |
|
|
|
|
everyBody[elements.propertyName] = imgLength.length+elements.physicalUnit }
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = String(imgLength.length) } |
|
|
|
|
|
|
|
|
|
}); //propertyInfos
|
|
|
|
|
tableMsg.body.push(everyBody) |
|
|
|
|
}); //assets
|
|
|
|
@ -344,17 +368,25 @@ export class FireFightingDeviceComponent implements OnInit {
|
|
|
|
|
e.header = [] |
|
|
|
|
e.body = [] |
|
|
|
|
data[0].propertyInfos.forEach(element => { //表头
|
|
|
|
|
if (element.propertyType!=3) {e.header.push(element.propertyName)} |
|
|
|
|
if (element.propertyType!=3) { |
|
|
|
|
let unit = element.physicalUnit? '('+ element.physicalUnit +')' : '' //单位
|
|
|
|
|
e.header.push(element.propertyName+unit)} |
|
|
|
|
}); |
|
|
|
|
data.forEach(element => { //表格内容
|
|
|
|
|
let everyBody = {} |
|
|
|
|
element.propertyInfos.forEach((elements,index) => { |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName!='图片' && elements.propertyType!=6) { everyBody[elements.propertyName] = elements.propertyValue+elements.physicalUnit } |
|
|
|
|
if (elements.propertyType==6) { everyBody[elements.propertyName] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName!='图片' && elements.propertyType!=6) {
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue } |
|
|
|
|
if (elements.propertyType==6) {
|
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
|
if (elements.propertyType!=3 && elements.propertyName=='图片') {
|
|
|
|
|
let imgLength = [] |
|
|
|
|
element.propertyInfos.find(item=>{ if(item.propertyType==3){imgLength.push(item)} }) |
|
|
|
|
everyBody[elements.propertyName] = imgLength.length+elements.physicalUnit } |
|
|
|
|
let unit = elements.physicalUnit? '('+ elements.physicalUnit +')' : '' //单位
|
|
|
|
|
everyBody[elements.propertyName+unit] = String(imgLength.length) } |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
e.body.push(everyBody) |
|
|
|
|
}); |
|
|
|
|