Browse Source

[完善]完善建筑类型判断

develop
邵佳豪 4 years ago
parent
commit
c052e707e7
  1. 4
      src/app/ui/basicinfo/basicinfo.component.html
  2. 24
      src/app/ui/basicinfo/basicinfo.component.ts

4
src/app/ui/basicinfo/basicinfo.component.html

@ -402,7 +402,7 @@
</td>
</ng-container>
<ng-container matColumnDef="tankid">
<th mat-header-cell *matHeaderCellDef>编号<span style="color: red;">*</span></th>
<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
@ -649,7 +649,7 @@
<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>
编号<span style="color: red;">*</span></th>
罐编号<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

24
src/app/ui/basicinfo/basicinfo.component.ts

@ -481,7 +481,7 @@ export class BasicinfoComponent implements OnInit {
data[0].buildtype = n.name
data[0].tongyong = true
data[0].index = x.index
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形式
@ -562,7 +562,7 @@ export class BasicinfoComponent implements OnInit {
})
data[0].bigfor = bigfor
}
if(data[0].buildtype == "加油站"){
if(data[0].buildtype.indexOf('加油') != -1){
data[0].tongyong = false
data[0].jiayou = true
@ -667,7 +667,7 @@ export class BasicinfoComponent implements OnInit {
data[0].buildtype = n.buildingTypes[0].name
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
@ -741,7 +741,7 @@ export class BasicinfoComponent implements OnInit {
})
data[0].bigfor = bigfor
}
if(data[0].buildtype == "加油站"){
if(data[0].buildtype.indexOf('加油') != -1){
data[0].tongyong = false
data[0].jiayou = true
@ -1005,14 +1005,13 @@ export class BasicinfoComponent implements OnInit {
}
}
})
console.log(789,data[0])
data[0].buildingtypeId = n.buildingTypes[0].id
data[0].buildtype = n.buildingTypes[0].name
data[0].name = n.name
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 //如果是石油化工则启用石油化工的模板
@ -1087,7 +1086,7 @@ export class BasicinfoComponent implements OnInit {
data[0].bigfor = bigfor
}
if(data[0].buildtype == "加油站"){
if(data[0].buildtype.indexOf('加油') != -1){
data[0].tongyong = false
data[0].jiayou = true
@ -1120,9 +1119,8 @@ export class BasicinfoComponent implements OnInit {
})
data[0].bigfor = bigfor
}
if(data[0].buildtype == "地铁类"){
if(data[0].buildtype.indexOf('地铁') != -1){
data[0].tongyong = true
// data[0].ditie = true
}
yyy = data[0]
resolve(yyy)
@ -1608,7 +1606,7 @@ export class BasicinfoComponent implements OnInit {
}
if(item.buildtype != "石油化工类" && item.buildtype != "地铁类" && item.buildtype != "加油站"){
if(item.buildtype.indexOf('化工') == -1 && item.buildtype != "地铁类" && item.buildtype.indexOf('储罐') == -1 && item.buildtype.indexOf('加油') == -1){
this.houses[key].buildingBasicGroups[0].propertyInfos.forEach(item => {
@ -1658,7 +1656,7 @@ export class BasicinfoComponent implements OnInit {
})
}
}
if(item.buildtype == "石油化工类"){
if(item.buildtype.indexOf('化工') != -1 || item.buildtype.indexOf('储罐') != -1){
let buildType = item.buildtype
let bodyObj = _.cloneDeep(item)
delete bodyObj.name
@ -2532,7 +2530,7 @@ export class BasicinfoComponent implements OnInit {
this.snackBar.open('请检查输入数据是否有误','确定',config);
})
}
if(item.buildtype == "加油站"){
if(item.buildtype.indexOf('加油') != -1){
let buildType = item.buildtype
let bodyObj = _.cloneDeep(item)
delete bodyObj.name
@ -2855,7 +2853,7 @@ export class BasicinfoComponent implements OnInit {
this.snackBar.open('请检查输入数据是否有误','确定',config);
})
}
if(item.buildtype == "地铁类"){
if(item.buildtype.indexOf('地铁') != -1){
let newObj = _.cloneDeep(item)
delete newObj.username
delete newObj.name

Loading…
Cancel
Save