diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts index 0c01465..40594af 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts @@ -735,7 +735,7 @@ export class AddPlanone { onlineedit:boolean = false //在线编辑 website:boolean = false //网页地址 next(formdata){ - // console.log(formdata.value.firstCtrltwo) + //console.log(formdata.value.firstCtrlthree) //console.log(this.file) this.psw=false this.selectedPLanName = formdata.value.firstCtrlone @@ -772,7 +772,7 @@ export class AddPlanone { this.psw=false } closediv(){ - console.log(this.file) + //console.log(this.file) if(this.file!=undefined){ this.cancel(); } @@ -852,6 +852,7 @@ export class AddPlanone { url: this.webaddress, attachmentUrls: null } + //console.log(body) this.http.post("/api/PlanComponents",body,{params:{ companyId : this.data.companyId }}).subscribe(data=>{ @@ -928,6 +929,7 @@ export class AddPlanone { url: this.webaddress, attachmentUrls: null } + //console.log(body) this.http.post("/api/PlanComponents2D",body,{params:{ companyId : this.data.companyId }}).subscribe(data=>{ diff --git a/src/app/plan-management/entry-plan/entry-plan.component.ts b/src/app/plan-management/entry-plan/entry-plan.component.ts index 807af6f..a5f720a 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.ts +++ b/src/app/plan-management/entry-plan/entry-plan.component.ts @@ -168,13 +168,14 @@ export class EntryPlanComponent implements OnInit { style.width = (width/zong)*100 +'%'; return style } + level ngOnInit(): void { this.getunitdata(); this.getOrganizations(); this.getUnittype(); this.getAllPlanInfo(); - let level = sessionStorage.getItem("level"); - if(level == "0"){//如果是总队 + this.level = sessionStorage.getItem("level"); + if(this.level == "0"){//如果是总队 this.preparelevels = [ {name:"总队",value:"1"}, {name:"支队",value:"2"}, @@ -182,20 +183,20 @@ export class EntryPlanComponent implements OnInit { {name:"中队",value:"8"} ] } - if(level == "1"){//如果是支队 + if(this.level == "1"){//如果是支队 this.preparelevels = [ {name:"支队",value:"2"}, {name:"大队",value:"4"}, {name:"中队",value:"8"} ] } - if(level == "2"){//如果是大队 + if(this.level == "2"){//如果是大队 this.preparelevels = [ {name:"大队",value:"4"}, {name:"中队",value:"8"} ] } - if(level == "3"){//如果是中队 + if(this.level == "3"){//如果是中队 this.preparelevels = [ {name:"中队",value:"8"} ] @@ -316,12 +317,13 @@ export class EntryPlanComponent implements OnInit { }) } - + operation=true //查看预案按钮跳转 routerTo(element){ // console.log(element) + this.level=='0'?this.operation=false:true sessionStorage.setItem("companyName",element.company.name) - window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=true&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`); + window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`); } //查询 onSubmit (value) { diff --git a/src/app/plan-management/meet-plan/meet-plan.component.html b/src/app/plan-management/meet-plan/meet-plan.component.html index ec3c598..9f5133c 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.html +++ b/src/app/plan-management/meet-plan/meet-plan.component.html @@ -83,7 +83,7 @@
- +
diff --git a/src/app/plan-management/meet-plan/meet-plan.component.ts b/src/app/plan-management/meet-plan/meet-plan.component.ts index c8b0e74..9ce00bb 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/src/app/plan-management/meet-plan/meet-plan.component.ts @@ -20,8 +20,8 @@ export class MeetPlanComponent implements OnInit { constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { } ngOnInit(): void { - let level = sessionStorage.getItem("level"); - if(level == "0"){//如果是总队 + this.levels = sessionStorage.getItem("level"); + if(this.level == "0"){//如果是总队 this.preparelevels = [ {name:"总队",value:"1"}, {name:"支队",value:"2"}, @@ -29,26 +29,27 @@ export class MeetPlanComponent implements OnInit { {name:"中队",value:"8"} ] } - if(level == "1"){//如果是支队 + if(this.levels == "1"){//如果是支队 this.preparelevels = [ {name:"支队",value:"2"}, {name:"大队",value:"4"}, {name:"中队",value:"8"} ] } - if(level == "2"){//如果是大队 + if(this.levels == "2"){//如果是大队 this.preparelevels = [ {name:"大队",value:"4"}, {name:"中队",value:"8"} ] } - if(level == "3"){//如果是中队 + if(this.levels == "3"){//如果是中队 this.preparelevels = [ {name:"中队",value:"8"} ] } this.getAlltabledate() } + levels preparelevels:any plcheck:boolean //编制级别勾选框 diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html index c39cebf..5b93f9e 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html +++ b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 14:15:10 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-27 16:55:08 + * @LastEditTime: 2021-02-05 15:09:48 -->
@@ -83,7 +83,7 @@
- +
diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts index a55c5f8..329757d 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts +++ b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 14:15:10 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-04 10:01:46 + * @LastEditTime: 2021-02-05 14:52:32 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -33,8 +33,8 @@ export class OnetwoEntryPlanComponent implements OnInit { constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { } ngOnInit(): void { - let level = sessionStorage.getItem("level"); - if(level == "0"){//如果是总队 + this.levels = sessionStorage.getItem("level"); + if(this.levels == "0"){//如果是总队 this.preparelevels = [ {name:"总队",value:"1"}, {name:"支队",value:"2"}, @@ -42,20 +42,20 @@ export class OnetwoEntryPlanComponent implements OnInit { {name:"中队",value:"8"} ] } - if(level == "1"){//如果是支队 + if(this.levels == "1"){//如果是支队 this.preparelevels = [ {name:"支队",value:"2"}, {name:"大队",value:"4"}, {name:"中队",value:"8"} ] } - if(level == "2"){//如果是大队 + if(this.levels == "2"){//如果是大队 this.preparelevels = [ {name:"大队",value:"4"}, {name:"中队",value:"8"} ] } - if(level == "3"){//如果是中队 + if(this.levels == "3"){//如果是中队 this.preparelevels = [ {name:"中队",value:"8"} ] @@ -64,6 +64,7 @@ export class OnetwoEntryPlanComponent implements OnInit { this.getAlltabledate() } + levels url preparelevels:any plcheck:boolean //编制级别勾选框 diff --git a/src/app/plan-management/type-plan/type-plan.component.html b/src/app/plan-management/type-plan/type-plan.component.html index fc943e2..d389f5a 100644 --- a/src/app/plan-management/type-plan/type-plan.component.html +++ b/src/app/plan-management/type-plan/type-plan.component.html @@ -62,7 +62,7 @@
- +
diff --git a/src/app/plan-management/type-plan/type-plan.component.ts b/src/app/plan-management/type-plan/type-plan.component.ts index 12b36b7..d9c58d4 100644 --- a/src/app/plan-management/type-plan/type-plan.component.ts +++ b/src/app/plan-management/type-plan/type-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-06 09:47:43 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-04 10:40:16 + * @LastEditTime: 2021-02-05 14:43:41 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -29,8 +29,8 @@ export class TypePlanComponent implements OnInit { constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { } ngOnInit(): void { - let level = sessionStorage.getItem("level"); - if(level == "0"){//如果是总队 + this.level = sessionStorage.getItem("level"); + if(this.level == "0"){//如果是总队 this.preparelevels = [ {name:"总队",value:"1"}, {name:"支队",value:"2"}, @@ -38,27 +38,28 @@ export class TypePlanComponent implements OnInit { {name:"中队",value:"8"} ] } - if(level == "1"){//如果是支队 + if(this.level == "1"){//如果是支队 this.preparelevels = [ {name:"支队",value:"2"}, {name:"大队",value:"4"}, {name:"中队",value:"8"} ] } - if(level == "2"){//如果是大队 + if(this.level == "2"){//如果是大队 this.preparelevels = [ {name:"大队",value:"4"}, {name:"中队",value:"8"} ] } - if(level == "3"){//如果是中队 + if(this.level == "3"){//如果是中队 this.preparelevels = [ {name:"中队",value:"8"} ] } this.getAlltabledate() } - + + level preparelevels:any plcheck:boolean //编制级别勾选框 displayedColumns: string[] = ['unitname','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation']; diff --git a/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts b/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts index ab131e5..ed4270d 100644 --- a/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts +++ b/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; +import { HttpClient } from '@angular/common/http' import {EchartsDataService,} from '../../echarts-data.service' declare var echarts: any; @Component({ @@ -9,7 +10,7 @@ declare var echarts: any; }) export class BuildingTypeOneComponent implements OnInit { - constructor(private router: Router,public echartsData:EchartsDataService) { } + constructor(private http:HttpClient,private router: Router,public echartsData:EchartsDataService) { } ngOnInit(): void { window.setTimeout(()=>{ @@ -22,11 +23,23 @@ export class BuildingTypeOneComponent implements OnInit { } /* 首页饼状图 */ indexBzt + lengthdata=[]//提示数据 + count=0//总数 + indexData=[]//所有数据 initCharts(){ - this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden'); + this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{ + for(var i=0;i{return {name: v.buildingTypeName,value:v.count}}) + console.log(this.indexData) + this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden'); let options={ title: { - text: '建筑类型统计(8900家)', + text: `建筑类型统计(${this.count}家)`, left: 'center', top: "7%", textStyle: { @@ -48,7 +61,7 @@ export class BuildingTypeOneComponent implements OnInit { fontSize:18, color:"#000000" }, - data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道'] + data: this.lengthdata }, series: [ { @@ -67,24 +80,24 @@ export class BuildingTypeOneComponent implements OnInit { } }, }, - data: [ - {value: 500, name: '高层'}, - {value: 800, name: '地下'}, - {value: 900, name: '轨道交通'}, - {value: 800, name: '化工生产'}, - {value: 1200, name: '储罐类'}, - {value: 1500, name: '厂房'}, - {value: 1400, name: '古建筑'}, - {value: 600, name: '商市场'}, - {value: 568, name: '医院'}, - {value: 888, name: '学校'}, - {value: 485, name: '宾馆'}, - {value: 966, name: '娱乐场所'}, - {value: 789, name: '餐饮业'}, + data:/* [ + {value: this.indexData[0].count, name: this.indexData[0].buildingTypeName}, + {value: this.indexData[1].count, name: this.indexData[1].buildingTypeName}, + {value: this.indexData[2].count, name: this.indexData[2].buildingTypeName}, + {value: this.indexData[3].count, name: this.indexData[3].buildingTypeName}, + {value: this.indexData[4].count, name: this.indexData[4].buildingTypeName}, + {value: this.indexData[5].count, name: this.indexData[5].buildingTypeName}, + {value: this.indexData[6].count, name: this.indexData[6].buildingTypeName}, + {value: this.indexData[7].count, name: this.indexData[7].buildingTypeName}, + {value: this.indexData[8].count, name: this.indexData[8].buildingTypeName}, + {value: this.indexData[9].count, name: this.indexData[9].buildingTypeName}, + {value: this.indexData[10].count, name: this.indexData[0].buildingTypeName}, + {value: this.indexData[0].count, name: this.indexData[0].buildingTypeName}, + {value: this.indexData[0].count, name: this.indexData[0].buildingTypeName}, {value: 500, name: '影剧院'}, {value: 1025, name: '展览建筑'}, - {value: 600, name: '隧道'} - ], + {value: 600, name: '隧道'} + ] */this.indexData, emphasis: { itemStyle: { shadowBlur: 10, @@ -99,6 +112,9 @@ export class BuildingTypeOneComponent implements OnInit { this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'],{queryParams:{'level':params.name}}); }); this.indexBzt.setOption(options); + }) + + } biaogeTishi(biaotou:string){ var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},' diff --git a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts index 9b2f0bc..3d7e65e 100644 --- a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts +++ b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import {EchartsDataService} from '../../echarts-data.service'; +import { HttpClient } from '@angular/common/http' declare var echarts: any; @Component({ selector: 'app-building-type-two-reverse', @@ -9,7 +10,7 @@ declare var echarts: any; }) export class BuildingTypeTwoReverseComponent implements OnInit { - constructor(private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { } + constructor(private http:HttpClient,private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { } forward(){ this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_forward']) @@ -149,6 +150,7 @@ export class BuildingTypeTwoReverseComponent implements OnInit { /* 顶部饼状图 */ indexBzt initCharts(){ + this.indexBzt = echarts.init(document.getElementById('pie'),'walden'); let options={ title: { @@ -227,71 +229,86 @@ export class BuildingTypeTwoReverseComponent implements OnInit { this.indexBzt.setOption(options); } //柱状图 + lengthdata=[]//提示数据 + count=0//总数 + indexData=[]//所有数据 barEcharts(){ - this.forArr.forEach(item=>{ - let _this = this - item.echart = echarts.init(document.getElementById('gaoceng'),'walden'); - let option = { - title: { - text: this.headname+':总数(1024)', - left: "center", - top: "15", - //bottom: '80', - textStyle: { - fontSize: 30 - } - }, - xAxis: { - type: 'category', - data: this.zhiNameData, - axisLabel:{ - //this.axisLabel, - interval: 0, - textStyle:{ - fontSize :18, - color:'#000000' - } - + this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{ + for(var i=0;i{return {name: v.buildingTypeName,value:v.count}}) + console.log(data) + this.forArr.forEach(item=>{ + let _this = this + item.echart = echarts.init(document.getElementById('gaoceng'),'walden'); + let option = { + title: { + text: this.headname+':总数(1024)', + left: "center", + top: "15", + //bottom: '80', + textStyle: { + fontSize: 30 } - }, - yAxis: { - type: 'value', - axisLabel:{ - //this.axisLabel, - textStyle:{ - fontSize :16, - color:'#000000' + }, + xAxis: { + type: 'category', + data: this.zhiNameData, + axisLabel:{ + //this.axisLabel, + interval: 0, + textStyle:{ + fontSize :18, + color:'#000000' + } + } - - } - }, - tooltip: { - trigger: 'item', - formatter: (params)=>{ - return this.tableTooltip(this.tableDataZhong,params.name) }, - position: this.data.tableTooltipNoShow2 - }, - series: [{ - data: this.zhiNumData, - type: 'bar', - markPoint: { - data: this.tiaoshiPao + yAxis: { + type: 'value', + axisLabel:{ + //this.axisLabel, + textStyle:{ + fontSize :16, + color:'#000000' + } + + } }, - //showBackground: true, - backgroundStyle: { - color: 'rgba(220, 220, 220, 0.8)' + tooltip: { + trigger: 'item', + formatter: (params)=>{ + return this.tableTooltip(this.tableDataZhong,params.name) }, - barWidth :'38', - //label: this.topTextlabel - }] - }; - item.echart.setOption(option); - item.echart.on('click', (params) => { - this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':params.name,'buildingTypeName':this.headname}}) - }); + position: this.data.tableTooltipNoShow2 + }, + series: [{ + data: this.zhiNumData, + type: 'bar', + markPoint: { + data: this.tiaoshiPao + }, + //showBackground: true, + backgroundStyle: { + color: 'rgba(220, 220, 220, 0.8)' + }, + barWidth :'38', + //label: this.topTextlabel + }] + }; + item.echart.setOption(option); + item.echart.on('click', (params) => { + this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':params.name,'buildingTypeName':this.headname}}) + }); + }) }) + } + //提示框表格 tableTooltip(dataArr,title:string){ let data = dataArr diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts index d72d17b..2ff0fcf 100644 --- a/src/app/statistic-analysis/echarts-data.service.ts +++ b/src/app/statistic-analysis/echarts-data.service.ts @@ -1,11 +1,17 @@ import { Injectable, EventEmitter} from '@angular/core'; import { Observable, ReplaySubject } from 'rxjs'; +import { HttpClient } from '@angular/common/http' @Injectable({ providedIn: 'root' }) export class EchartsDataService { - constructor() { } + constructor(private http:HttpClient) { } + echartsApi(){ + this.allEcharts=this.http.get("/api/StatisticsAnalysis") + //return this.allEcharts.data + } + allEcharts //计划首页 tableShow=false//控制首页表格显隐 buildingName="" //建筑类型