|
|
@ -59,10 +59,30 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
selected = new FormControl(0); //选项卡实例
|
|
|
|
selected = new FormControl(0); //选项卡实例
|
|
|
|
//判断选了哪一个
|
|
|
|
//判断选了哪一个
|
|
|
|
selectedIndexChange(e) { |
|
|
|
selectedIndexChange(e) { |
|
|
|
|
|
|
|
this.orRecord = [] |
|
|
|
|
|
|
|
|
|
|
|
this.selected.setValue(e) |
|
|
|
this.selected.setValue(e) |
|
|
|
this.preparelevels = Number(e) |
|
|
|
this.preparelevels = Number(e) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.preparelevels == 0) { |
|
|
|
|
|
|
|
this.js = this.organizationName |
|
|
|
|
|
|
|
this.jsId = this.organizationId |
|
|
|
|
|
|
|
this.jscheck = true |
|
|
|
|
|
|
|
this.unittype = [] |
|
|
|
|
|
|
|
this.allunittype.forEach(element => { |
|
|
|
|
|
|
|
this.unittype.push(element.id) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.preparelevel = [1] |
|
|
|
|
|
|
|
this.dwaddtime = '2020-01-01'//单位查询开始时间
|
|
|
|
|
|
|
|
this.dwendtime = this.getNowFormatDate()//单位结束时间
|
|
|
|
|
|
|
|
} else if (this.preparelevels == 1) { |
|
|
|
|
|
|
|
this.yuanjs = this.organizationName |
|
|
|
|
|
|
|
this.yuanjsId = this.organizationId |
|
|
|
|
|
|
|
this.yuanaddtime = '2020-01-01'//预案查询开始时间
|
|
|
|
|
|
|
|
this.yuanendtime = this.getNowFormatDate()//预案查询结束时间
|
|
|
|
|
|
|
|
this.yuanjscheck = true |
|
|
|
|
|
|
|
this.reservePlanType = ['1', '2', '4', '16'] |
|
|
|
|
|
|
|
this.planCategory = ['1', '2', '3', '4', '5'] |
|
|
|
|
|
|
|
} |
|
|
|
this.getAllPlanInfo() |
|
|
|
this.getAllPlanInfo() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -413,6 +433,7 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
//重置
|
|
|
|
//重置
|
|
|
|
reset() { |
|
|
|
reset() { |
|
|
|
|
|
|
|
this.orRecord = [] |
|
|
|
if (this.preparelevels == 0) { |
|
|
|
if (this.preparelevels == 0) { |
|
|
|
this.js = this.organizationName |
|
|
|
this.js = this.organizationName |
|
|
|
this.jsId = this.organizationId |
|
|
|
this.jsId = this.organizationId |
|
|
@ -437,27 +458,66 @@ export class CombinedQueryComponent implements OnInit { |
|
|
|
this.getAllPlanInfo(); |
|
|
|
this.getAllPlanInfo(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
orRecord = [] |
|
|
|
//进入下一层
|
|
|
|
//进入下一层
|
|
|
|
clicktd(key, element) { |
|
|
|
clicktd(key, element) { |
|
|
|
// console.log(key)
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
// console.log(element)
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
// console.log(this.allorganizations)
|
|
|
|
config.duration = 3000 |
|
|
|
if (key == 0) { |
|
|
|
if (key == 0) { |
|
|
|
|
|
|
|
let clickOr |
|
|
|
this.allorganizations.forEach(item => { |
|
|
|
this.allorganizations.forEach(item => { |
|
|
|
if (element === item.name) { |
|
|
|
if (element === item.name) { |
|
|
|
if (this.preparelevels == 0) { |
|
|
|
clickOr = item |
|
|
|
this.js = element |
|
|
|
|
|
|
|
this.jsId = item.id |
|
|
|
|
|
|
|
} else if (this.preparelevels == 1) { |
|
|
|
|
|
|
|
this.yuanjs = element |
|
|
|
|
|
|
|
this.yuanjsId = item.id |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.getAllPlanInfo(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// console.log(clickOr)
|
|
|
|
|
|
|
|
if (this.preparelevels == 0) { |
|
|
|
|
|
|
|
if (element == this.js) { |
|
|
|
|
|
|
|
this.snackBar.open('已在当前查询的消防救援站下,无法下钻', '确定', config); |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (this.preparelevels == 1) { |
|
|
|
|
|
|
|
if (element == this.yuanjs) { |
|
|
|
|
|
|
|
this.snackBar.open('已在当前查询的消防救援站下,无法下钻', '确定', config); |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (clickOr.children.length == 0 && this.excelData.length == 1) { |
|
|
|
|
|
|
|
this.snackBar.open('无下级消防救援站,无法下钻', '确定', config); |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//记录点击过的消防救援站
|
|
|
|
|
|
|
|
this.orRecord.push({ name: this.js, id: this.jsId }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.preparelevels == 0) { |
|
|
|
|
|
|
|
this.js = element |
|
|
|
|
|
|
|
this.jsId = clickOr.id |
|
|
|
|
|
|
|
} else if (this.preparelevels == 1) { |
|
|
|
|
|
|
|
this.yuanjs = element |
|
|
|
|
|
|
|
this.yuanjsId = clickOr.id |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(this.orRecord) |
|
|
|
|
|
|
|
this.getAllPlanInfo(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
goBack() { |
|
|
|
|
|
|
|
if (this.preparelevels == 0) { |
|
|
|
|
|
|
|
this.js = this.orRecord[this.orRecord.length - 1].name |
|
|
|
|
|
|
|
this.jsId = this.orRecord[this.orRecord.length - 1].id |
|
|
|
|
|
|
|
} else if (this.preparelevels == 1) { |
|
|
|
|
|
|
|
this.yuanjs = this.orRecord[this.orRecord.length - 1].name |
|
|
|
|
|
|
|
this.yuanjsId = this.orRecord[this.orRecord.length - 1].id |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.orRecord.pop(); |
|
|
|
|
|
|
|
console.log(this.orRecord) |
|
|
|
|
|
|
|
this.getAllPlanInfo(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
exal() { |
|
|
|
exal() { |
|
|
|