diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.html b/src/app/statistic-analysis/combined-query/combined-query.component.html
index 8560622..30db40c 100644
--- a/src/app/statistic-analysis/combined-query/combined-query.component.html
+++ b/src/app/statistic-analysis/combined-query/combined-query.component.html
@@ -1,164 +1,123 @@
-
+
-
-
+
+
+
+
+
-
-
-
-
- 组织名称 |
+
+
+ {{item}} |
{{element.name}} |
-
-
- 单位类型 |
- {{element.creatorName}} |
-
-
- 预案级别 |
- {{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案':
- element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}}
- |
-
-
+
+
+
+
diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts
index 64c28e4..5a37e7e 100644
--- a/src/app/statistic-analysis/combined-query/combined-query.component.ts
+++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts
@@ -54,14 +54,14 @@ export class CombinedQueryComponent implements OnInit {
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
myControl = new FormControl();
hasChild = (_: number, node: any) => node.expandable;
- displayedColumns: string[] = ['planname', 'addpeople', 'level'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation'
+ displayedColumns: string[] = ['组织名称', 'addpeople', 'level'];//, 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation'
allorganizations: any //所有组织机构
allunittype: any //所有单位类型
tabledataSource: any //表格数据
url
findTj=0//查询条件
- preparelevels: any
+ preparelevels:Number=0
pcMore//pc更多
pcput = false//pc收起
pcfind//pc查询
@@ -80,9 +80,35 @@ export class CombinedQueryComponent implements OnInit {
}
allPlanInfo: any //存储所有预案信息
- //获得所有预案信息
+ lable=['单位查询','预案查询']
+ selected = new FormControl(0); //选项卡实例
+ //判断选了哪一个
+ selectedIndexChange(e){
+ this.selected.setValue(e)
+ console.log(e)
+ this.preparelevels=Number(e)
+ }
+ //获得所有预案或单位信息
getAllPlanInfo() {
-
+ let paramsdata:any={
+ QueryMode:this.preparelevels,
+ OrganizationId:this.jsId||'',
+ HasChildren:this.jscheck||'',
+ TimeIntervalStart:this.addtime||'',
+ TimeIntervalEnd:this.endtime||'',
+ BuildingTypeIds:this.unittype||'',
+ }
+ this.http.get("/api/StatisticsAnalysis/ReportTable", { params: paramsdata }).subscribe((data: any) => {
+ console.log(data)
+ this.tabledataSource=data
+ if(this.preparelevels==0){
+ this.tabledataSource.forEach(element => {
+ this.displayedColumns.push(element)
+ });
+ }
+
+ }
+ )
}
colorRgb(sColor) {
@@ -287,6 +313,12 @@ export class CombinedQueryComponent implements OnInit {
}
//查询
onSubmit(e) {
+ let config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ if(this,this.endtime {
+ // // 文件名中有中文 则对文件名进行转码
+ const link = document.createElement('a');
+ const blob = new Blob([data], {type: 'application/vnd.ms-excel'});
+ link.setAttribute('href', window.URL.createObjectURL(blob));
+ link.setAttribute('download', '报表统计'+'.xls');
+ link.style.visibility = 'hidden';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ })
+ }
+
+
+
}