Browse Source

[完善]增加石油化工模板判别范围

dev
邵佳豪 4 years ago
parent
commit
d69dd80dc0
  1. 10
      src/app/key-unit/basicinfo-look/basicinfo.component.ts
  2. 10
      src/app/key-unit/basicinfo/basicinfo.component.ts

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

@ -383,7 +383,7 @@ export class BasicinfoLookComponent implements OnInit {
data[0].buildtype = n.name
data[0].tongyong = true
data[0].index = x.index
if(data[0].buildtype == "石油化工类"){
if(data[0].buildtype == "石油化工类" || data[0].buildtype.indexOf("化工") != -1 ){
data[0].tongyong = false
data[0].isshiyou = true
this.deviceinfodata = data[0].buildingBasicGroups[1].propertyInfos //存储装置信息的初始数据,需要转换成datasource形式
@ -545,7 +545,7 @@ export class BasicinfoLookComponent implements OnInit {
data[0].tongyong = true
data[0].index = index
if(data[0].buildtype == "石油化工"){
if(data[0].buildtype.indexOf("储罐") != -1 || data[0].buildtype.indexOf("化工") != -1 ){
data[0].tongyong = false
data[0].isshiyou = true
let noemptydeviceArr = data[0].buildingBasicGroups[1].propertyInfos
@ -804,7 +804,7 @@ export class BasicinfoLookComponent implements OnInit {
data[0].username = n.name
data[0].tongyong = true
data[0].index = this.houses.length //////////////////
if(data[0].buildtype == "石油化工"){
if(data[0].buildtype.indexOf("储罐") != -1 || data[0].buildtype.indexOf("化工") != -1 ){
data[0].tongyong = false
data[0].isshiyou = true //如果是石油化工则启用石油化工的模板
this.deviceinfodata = data[0].buildingBasicGroups[1].propertyInfos //存储装置信息表格的初始数据,需要转换成datasource形式
@ -1360,7 +1360,7 @@ export class BasicinfoLookComponent implements OnInit {
}
if(item.buildtype != "石油化工类" && item.buildtype != "地铁类"){
if(item.buildtype.indexOf("储罐") == -1 && item.buildtype != "地铁类" && item.buildtype.indexOf("化工") == -1 ){
// console.log(this.houses[key])
// console.log(value)
this.houses[key].buildingBasicGroups[0].propertyInfos.forEach(item => {
@ -1411,7 +1411,7 @@ export class BasicinfoLookComponent implements OnInit {
})
}
}
if(item.buildtype == "石油化工"){
if(item.buildtype.indexOf("储罐") != -1 || item.buildtype.indexOf("化工") != -1 ){
// console.log(888,item)
let bodyObj = _.cloneDeep(item)
delete bodyObj.name

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

@ -469,7 +469,7 @@ export class BasicinfoComponent implements OnInit {
data[0].buildtype = n.name
data[0].tongyong = true
data[0].index = x.index
if(data[0].buildtype == "石油化工类" || data[0].buildtype == "化工生产"){
if(data[0].buildtype.indexOf('化工') != -1 || data[0].buildtype.indexOf('储罐') != -1){
data[0].tongyong = false
data[0].isshiyou = true
this.deviceinfodata = data[0].buildingBasicGroups[1].propertyInfos //存储装置信息的初始数据,需要转换成datasource形式
@ -631,7 +631,7 @@ export class BasicinfoComponent implements OnInit {
data[0].tongyong = true
data[0].index = index
if(data[0].buildtype == "石油化工类" || data[0].buildtype == "化工生产"){
if(data[0].buildtype.indexOf('化工') != -1 || data[0].buildtype.indexOf('储罐') != -1){
data[0].tongyong = false
data[0].isshiyou = true
let noemptydeviceArr = data[0].buildingBasicGroups[1].propertyInfos
@ -890,7 +890,7 @@ export class BasicinfoComponent implements OnInit {
data[0].username = n.name
data[0].tongyong = true
data[0].index = this.houses.length //////////////////
if(data[0].buildtype == "石油化工类" || data[0].buildtype == "化工生产"){
if(data[0].buildtype.indexOf('化工') != -1 || data[0].buildtype.indexOf('储罐') != -1){
data[0].tongyong = false
data[0].isshiyou = true //如果是石油化工则启用石油化工的模板
this.deviceinfodata = data[0].buildingBasicGroups[1].propertyInfos //存储装置信息表格的初始数据,需要转换成datasource形式
@ -1470,7 +1470,7 @@ export class BasicinfoComponent implements OnInit {
}
if(item.buildtype != "石油化工类" && item.buildtype != "地铁类" && item.buildtype != "化工生产"){
if(item.buildtype.indexOf('化工') == -1 && item.buildtype != "地铁类" && item.buildtype.indexOf('储罐') == -1){
// console.log(this.houses[key])
// console.log(value)
this.houses[key].buildingBasicGroups[0].propertyInfos.forEach(item => {
@ -1522,7 +1522,7 @@ export class BasicinfoComponent implements OnInit {
})
}
}
if(item.buildtype == "石油化工类" || item.buildtype == "化工生产"){
if(item.buildtype.indexOf('化工') != -1 || item.buildtype.indexOf('储罐') != -1){
// console.log(888,item)
let bodyObj = _.cloneDeep(item)
delete bodyObj.name

Loading…
Cancel
Save