diff --git a/angular.json b/angular.json index 958ef87..5521fa1 100644 --- a/angular.json +++ b/angular.json @@ -36,7 +36,7 @@ "node_modules/echarts/dist/echarts.js", "src/assets/mTokenK1/mToken_K1.js", "./node_modules/swiper/js/swiper.min.js", - "src/assets/echarts/echarts.common.min.js", + //"src/assets/echarts/echarts.common.min.js", "src/assets/chartstheme/chongqing.js", "src/assets/chartstheme/westeros.js", "src/assets/chartstheme/walden.js", diff --git a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.html b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.html index 744683f..600b8ad 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.html +++ b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.html @@ -1,4 +1,15 @@ + -
+
+
+
+
\ No newline at end of file diff --git a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.scss b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.scss index 1bffad0..a627a23 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.scss +++ b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.scss @@ -5,4 +5,19 @@ font-size: 25px; text-align: center; } +} +#indexBzt{ + width: 100%; + height: 93%; + padding-top: 3%; + display: flex; + flex-direction: row; + .pieone{ + width: 50%; + height: 93%; + } + .pietwo{ + width: 50%; + height: 93%; + } } \ No newline at end of file diff --git a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts index 1efe897..746ed24 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts @@ -15,7 +15,8 @@ export class AddUnitOneComponent implements OnInit { ngOnInit(): void { this.setTimeoutObj = window.setTimeout(()=>{ - this.initCharts() + this.initCharts("pieone") + this.initCharts("pietwo") },0) this.echartsData.eventEmit.subscribe((value: any) => { if (value == 'echarts') { @@ -36,16 +37,17 @@ export class AddUnitOneComponent implements OnInit { this.indexBzt.clear() this.indexBzt.dispose() } - + zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] + buildingData=["高层","地下","轨道交通","化工生产","储罐类","厂房","古建筑","商市场","医院","学校","宾馆","娱乐场所","餐饮业","影剧院","展览建筑","隧道"] indexBzt//首页饼状图实例 /* 首页饼状图 */ - initCharts(){ - this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden'); + initCharts(id){ + this.indexBzt = echarts.init(document.getElementById(id),'walden'); let options={ title: { - text: '新增单位统计(8900家)', + text:id=="pieone"? '组织机构统计(8900家)':'建筑类型统计(8900家)', left: 'center', - top: "7%", + top: "5%", textStyle: { fontSize:31 } @@ -53,29 +55,29 @@ export class AddUnitOneComponent implements OnInit { tooltip: { trigger: 'item', formatter: (params)=>{ - return this.echartsData.biaogeTishiZhi(params.name) + return this.echartsData.tableTooltip(id=="pieone"?this.echartsData.buildingType:this.echartsData.tableDataZhi,params.name) }, position:this.echartsData.tableTooltipNoShow2 }, legend: { orient: 'vertical', - right: 150, + right: 0, top:80, textStyle:{ - fontSize:18, + fontSize:14, color:"#000000" }, - data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道'] + data: id=="pieone"?this.zhiNameData:this.buildingData }, series: [ { name: '访问来源', type: 'pie', radius: '60%', - center: ['50%', '53%'], + center: ['45%', '53%'], label:{ show:true, - fontSize:18, + fontSize:14, formatter:'{b}{c}家\n{d|({d}%)}', rich: { d: { @@ -84,7 +86,23 @@ export class AddUnitOneComponent implements OnInit { } }, }, - data: [ + data:id=="pieone"?[ + {value: 500, name: this.zhiNameData[0]}, + {value: 800, name: this.zhiNameData[1]}, + {value: 900, name: this.zhiNameData[2]}, + {value: 800, name: this.zhiNameData[3]}, + {value: 1200, name: this.zhiNameData[4]}, + {value: 1500, name: this.zhiNameData[5]}, + {value: 1400, name: this.zhiNameData[6]}, + {value: 600, name: this.zhiNameData[7]}, + {value: 568, name: this.zhiNameData[8]}, + {value: 888, name: this.zhiNameData[9]}, + {value: 485, name: this.zhiNameData[10]}, + {value: 966, name: this.zhiNameData[11]}, + {value: 789, name: this.zhiNameData[12]}, + {value: 500, name: this.zhiNameData[13]}, + + ]:[ {value: 500, name: '高层'}, {value: 800, name: '地下'}, {value: 900, name: '轨道交通'}, @@ -100,8 +118,7 @@ export class AddUnitOneComponent implements OnInit { {value: 789, name: '餐饮业'}, {value: 500, name: '影剧院'}, {value: 1025, name: '展览建筑'}, - {value: 600, name: '隧道'} - ], + {value: 600, name: '隧道'}], emphasis: { itemStyle: { shadowBlur: 10, @@ -114,6 +131,7 @@ export class AddUnitOneComponent implements OnInit { }; this.indexBzt.on('click', (params) => { this.router.navigateByUrl('/statisticanalysis/addUnit_one/addUnit_two_type'); + id=="pieone"?this.echartsData.zuzhiorBuilding="zhi":this.echartsData.zuzhiorBuilding="building" }); this.indexBzt.setOption(options); } diff --git a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts index 879114a..01ded3e 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts @@ -110,7 +110,7 @@ export class AddUnitThreeBarDetailsComponent implements OnInit { }, xAxis: { type: 'category', - data: this.zhiNameData, + data:this.level=="zhidui"? this.zhiNameData:this.zhongNameData, axisLabel:{ //this.axisLabel, textStyle:{ diff --git a/src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts b/src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts index 04f363f..103c132 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts @@ -171,7 +171,7 @@ export class AddUnitThreeLineDetailsComponent implements OnInit { if (this.detailPlanEchart.containPixel('grid',pointInPixel)) { let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; /*事件处理代码书写位置*/ - this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':this.option.xAxis.data[xIndex],'buildingTpye':this.buildingTypeName}}); + this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':this.serviceData.zuzhiorBuilding=="zhi"? 'zhongdui':'zhidui','time':this.option.xAxis.data[xIndex],'buildingTpye':this.buildingTypeName}}); } }); } diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts index d84f180..7b866bb 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts @@ -117,7 +117,21 @@ export class AddUnitTwoTimeComponent implements OnInit { chartQusj//顶部大图实例 - forArr = [{id:'gaoceng',name:'高层',echart:null}, + forArr =this.serviceData.zuzhiorBuilding=="zhi"? [{id:'gaoceng',name:'浦东支队',echart:null}, + {id:'dixia',name:'黄浦支队',echart:null}, + {id:'guidao',name:'徐汇支队',echart:null}, + {id:'huagong',name:'长宁支队',echart:null}, + {id:'chuguan',name:'静安支队',echart:null}, + {id:'changfang',name:'普陀支队',echart:null}, + {id:'gujianzhu',name:'虹口支队',echart:null}, + {id:'shichang',name:'杨浦支队',echart:null}, + {id:'yiyuan',name:'闵行支队',echart:null}, + {id:'xuexiao',name:'宝山支队',echart:null}, + {id:'binguan',name:'嘉定支队',echart:null}, + {id:'yule',name:'松江支队',echart:null}, + {id:'canyin',name:'金山支队',echart:null}, + {id:'yingyuan',name:'崇明支队',echart:null}]: + [{id:'gaoceng',name:'高层',echart:null}, {id:'dixia',name:'地下',echart:null}, {id:'guidao',name:'轨道交通',echart:null}, {id:'huagong',name:'化工生产',echart:null}, @@ -179,7 +193,7 @@ export class AddUnitTwoTimeComponent implements OnInit { tooltip: { trigger: 'axis', formatter: (params)=>{ - return this.serviceData.tableTooltip(this.serviceData.buildingType,params[0].name) + return this.serviceData.tableTooltip(this.serviceData.zuzhiorBuilding=="zhi"?this.serviceData.tableDataZhi :this.serviceData.buildingType,params[0].name) }, position:this.serviceData.tableTooltipNoShowt }, @@ -340,7 +354,7 @@ export class AddUnitTwoTimeComponent implements OnInit { if(option.series[0].name == "year"){ this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_lineDetails'],{queryParams:{'year':this.date2[xIndex],'buildingType':item.name}}); }else{ - this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':option.xAxis.data[xIndex],'buildingTpye':item.name}}); + this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':this.serviceData.zuzhiorBuilding=="zhi"? 'zhongdui':'zhidui','time':option.xAxis.data[xIndex],'buildingTpye':item.name}}); } } diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts index 3f19eec..58fbedb 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts @@ -115,15 +115,36 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { //气泡提示数据获取 bianli(){ var arrshuzu='['; - for(var i=0;i{ - return this.data.biaogeTishiZhi(params.name) + return this.data.tableTooltip(this.data.zuzhiorBuilding=="zhi"?this.data.buildingType:this.data.tableDataZhi,params.name) }, position: this.data.tableTooltipNoShow2 }, @@ -167,7 +190,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { fontSize:18, color:"#000000" }, - data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道'] + data:this.data.zuzhiorBuilding=="zhi"? this.zhiNameData:this.buildingData }, series: [ { @@ -186,24 +209,39 @@ export class AddUnitTwoTypeStatisticsComponent 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: '餐饮业'}, - {value: 500, name: '影剧院'}, - {value: 1025, name: '展览建筑'}, - {value: 600, name: '隧道'} - ], + data:this.data.zuzhiorBuilding=="zhi"? [ + {value: 500, name: this.zhiNameData[0]}, + {value: 800, name: this.zhiNameData[1]}, + {value: 900, name: this.zhiNameData[2]}, + {value: 800, name: this.zhiNameData[3]}, + {value: 1200, name: this.zhiNameData[4]}, + {value: 1500, name: this.zhiNameData[5]}, + {value: 1400, name: this.zhiNameData[6]}, + {value: 600, name: this.zhiNameData[7]}, + {value: 568, name: this.zhiNameData[8]}, + {value: 888, name: this.zhiNameData[9]}, + {value: 485, name: this.zhiNameData[10]}, + {value: 966, name: this.zhiNameData[11]}, + {value: 789, name: this.zhiNameData[12]}, + {value: 500, name: this.zhiNameData[13]}, + ]:[ + {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: '餐饮业'}, + {value: 500, name: '影剧院'}, + {value: 1025, name: '展览建筑'}, + {value: 600, name: '隧道'} + ], emphasis: { itemStyle: { shadowBlur: 10, @@ -236,7 +274,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { }, xAxis: { type: 'category', - data: this.zhiNameData, + data:this.data.zuzhiorBuilding=="zhi"?this.buildingData: this.zhiNameData, axisLabel: this.axisLabel }, yAxis: { @@ -250,7 +288,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { } }, series: [{ - data: this.zhiNumData, + data: this.data.zuzhiorBuilding=="zhi"?this.buildnumData: this.zhiNumData, type: 'bar', markPoint: { data: this.tiaoshiPao diff --git a/src/app/statistic-analysis/deleteUnit/delete-there-line-details/delete-there-line-details.component.ts b/src/app/statistic-analysis/deleteUnit/delete-there-line-details/delete-there-line-details.component.ts index e314561..e4996cb 100644 --- a/src/app/statistic-analysis/deleteUnit/delete-there-line-details/delete-there-line-details.component.ts +++ b/src/app/statistic-analysis/deleteUnit/delete-there-line-details/delete-there-line-details.component.ts @@ -122,7 +122,7 @@ export class DeleteThereLineDetailsComponent implements OnInit { if(params[0].seriesName == "year"){ return this.serviceData.tableTooltip(this.serviceData.monthTooltip,params[0].name) }else{ - return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name) + return this.serviceData.tableTooltip(this.serviceData.dezhiorBuinding=="zhi"? this.serviceData.tableDataZhi:this.serviceData.buildingType,params[0].name) } }, position:this.serviceData.tableTooltipNoShow2 @@ -187,7 +187,7 @@ export class DeleteThereLineDetailsComponent implements OnInit { if (this.detailPlanEchart.containPixel('grid',pointInPixel)) { let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; /*事件处理代码书写位置*/ - this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.option.xAxis.data[xIndex],'headtext':this.buildingTypeName,'zhong':'1'}}); + this.router.navigate(this.serviceData.dezhiorBuinding=="zhi"?['/statisticanalysis/delete_one/delete_there']:['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':this.option.xAxis.data[xIndex],'headtext':this.buildingTypeName,'zhong':'1'}}); } }); } diff --git a/src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.ts b/src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.ts index 605e19f..946a328 100644 --- a/src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.ts +++ b/src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-02 16:22:35 * @LastEditors: sueRimn - * @LastEditTime: 2020-11-11 10:43:58 + * @LastEditTime: 2020-11-16 09:40:04 */ import { Component, OnInit } from '@angular/core'; import { Router,ActivatedRoute } from '@angular/router'; @@ -204,7 +204,7 @@ export class DeleteThereComponent implements OnInit { if (this.zhutu.containPixel('grid',pointInPixel)) { let xIndex=this.zhutu.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; /*事件处理代码书写位置*/ - this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.option.xAxis.data[xIndex]+this.headtext}}); + this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.option.xAxis.data[xIndex]+headName}}); } }); /* this.zhutu.on('click', (params) => { diff --git a/src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.html b/src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.html index 00852c7..7fc9bee 100644 --- a/src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.html +++ b/src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.html @@ -4,10 +4,15 @@ * @Author: sueRimn * @Date: 2020-09-02 16:21:18 * @LastEditors: sueRimn - * @LastEditTime: 2020-11-04 16:49:27 + * @LastEditTime: 2020-11-14 10:05:27 -->
+
+
+ + +
diff --git a/src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts b/src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts index 85b0744..6dfe07f 100644 --- a/src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts +++ b/src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-02 16:21:18 * @LastEditors: sueRimn - * @LastEditTime: 2020-11-11 10:44:23 + * @LastEditTime: 2020-11-16 16:12:34 */ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; @@ -180,6 +180,15 @@ export class DeleteTwoComponent implements OnInit { this.snackBar.open('请选择正确时间区段','确定',config); } } + + //支队查询 + zhiFind(){ + this.echartsData.dezhiorBuinding="zhi" + } + //建筑类型查询 + buildingFind(){ + this.echartsData.dezhiorBuinding="building" + } /** @@ -229,12 +238,12 @@ export class DeleteTwoComponent implements OnInit { tooltip: { trigger: 'axis', formatter: (params)=>{ - return this.echartsData.biaogeTishiZhi(`${headtext}`) + return this.echartsData.dezhiorBuinding=="zhi"?this.echartsData.tableTooltip(this.echartsData.tableDataZhi,`${headtext}`):this.echartsData.tableTooltip(this.echartsData.buildingType,`${headtext}`) }, /* backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度 borderWidth:'1', borderRadius :'0', */ - //position: this.echartsData.tableTooltipNoShowt + position: this.echartsData.tableTooltipNoShow2 }, xAxis: { type: 'category', @@ -299,7 +308,12 @@ export class DeleteTwoComponent implements OnInit { }else{ /*事件处理代码书写位置*/ //this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}}); - this.router.navigate(['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}}); + if(this.echartsData.dezhiorBuinding=="zhi"){ + this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}}); + }else{ + this.router.navigate(['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}}); + } + } } diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts index fbfca6c..d72d17b 100644 --- a/src/app/statistic-analysis/echarts-data.service.ts +++ b/src/app/statistic-analysis/echarts-data.service.ts @@ -15,6 +15,9 @@ export class EchartsDataService { statefulInspectionName:string; statefulInspectionToggle:boolean = true; // true=显示当前点击柱状图 flase=显示当前点击折现图 + //维护删除 + dezhiorBuinding="zhi" //维护删除页面判断是支队查询还是建筑类型查询 + //计划更新统计 scheduledUpdatesType:number = 0; //已核查/未核查 scheduledUpdatesName:string; @@ -23,6 +26,10 @@ export class EchartsDataService { scheduledUpdatesToggle:number=1 eventEmit = new EventEmitter(); + zhiorBuinding="zhi"//维护更新页面判断是支队查询还是建筑类型查询 + findShow=true //支队查询和建筑类型按钮显隐控制 + //新增判断是组织机构还是建筑类型 + zuzhiorBuilding="zhi"//默认是组织机构(支队) //echarts 悬停 显示表格假数据 //支队提示框 diff --git a/src/app/statistic-analysis/scheduled-updates/publicEcharts.html b/src/app/statistic-analysis/scheduled-updates/publicEcharts.html index 8f49274..e6cacad 100644 --- a/src/app/statistic-analysis/scheduled-updates/publicEcharts.html +++ b/src/app/statistic-analysis/scheduled-updates/publicEcharts.html @@ -4,11 +4,15 @@ * @Author: sueRimn * @Date: 2020-09-05 08:59:24 * @LastEditors: sueRimn - * @LastEditTime: 2020-11-09 15:08:46 + * @LastEditTime: 2020-11-14 14:35:16 -->
+
+ + +

公告:

@@ -18,7 +22,7 @@
- +
diff --git a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html index db41099..d1c0b0b 100644 --- a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html +++ b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html @@ -4,13 +4,13 @@ * @Author: sueRimn * @Date: 2020-11-03 10:19:24 * @LastEditors: sueRimn - * @LastEditTime: 2020-11-11 09:01:21 + * @LastEditTime: 2020-11-14 15:54:22 -->
-
+ +
-
+
-
+
\ No newline at end of file diff --git a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.scss b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.scss index 065d6d9..a700a8f 100644 --- a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.scss +++ b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.scss @@ -9,6 +9,19 @@ height: 100%; } } */ +/* .header{ + display: flex; + flex-direction: row; +} */ +.findCss{ + padding-right: 100px; + button{ + padding-right: 100px; + margin-right: 15px; + width: 88px; + height: 36px; + } +} #center{ overflow: hidden; } @@ -48,7 +61,7 @@ align-items: center; height: 100%; button{ - width: 88px; + width: 132px; height: 36px; } margin-right:15%; @@ -60,6 +73,7 @@ overflow: hidden; display: flex; flex-direction: row; + margin-top: 80px; //justify-content:center; } #pie{ diff --git a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts index df7aa2d..bb1af75 100644 --- a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts +++ b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts @@ -58,7 +58,7 @@ export class ScheduledUpdatesComponent implements OnInit { this.example= echarts.init(document.getElementById(pieid),'walden'); var options={ title: { - text: '计划更新统计(7100家)', + text: pieid=="pie"?'已维护统计(7100家)':'计划维护统计(7100家)', top: "3%", left: 'center', textStyle:{ @@ -68,7 +68,7 @@ export class ScheduledUpdatesComponent implements OnInit { tooltip: { trigger: 'item', formatter: (params)=>{ - return this.echartsData.biaogeTishiZhi(params.name) + return this.echartsData.tableTooltip(this.selectedBtn=="tu"?this.echartsData.tableDataZhi:this.echartsData.buildingType,params.name) }, position:this.echartsData.tableTooltipNoShow2 }, @@ -123,6 +123,7 @@ export class ScheduledUpdatesComponent implements OnInit { }; this.example.setOption(options); this.example.on('click', (params) => { + this.echartsData.findShow=true if(params.name=="维护删除"){this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two');} else{ if(pieid=="pie"){ @@ -199,8 +200,15 @@ export class publicEchartsComponent implements OnInit { //返回 goBack () { - this.echartsData.scheduledUpdatesToggle-- - //console.log(this.echartsData.scheduledUpdatesToggle) + if(this.echartsData.scheduledUpdatesToggle==1||this.echartsData.scheduledUpdatesToggle==-3){ + this.router.navigateByUrl('/statisticanalysis/scheduledUpdates'); + }else{ + this.echartsData.scheduledUpdatesToggle-- + if(this.echartsData.scheduledUpdatesToggle==1||this.echartsData.scheduledUpdatesToggle==-3){ + this.echartsData.findShow=true + //this.router.navigateByUrl('/statisticanalysis/scheduledUpdates'); + } + } } //更多 窗口 @@ -208,6 +216,15 @@ export class publicEchartsComponent implements OnInit { let dialogRef = this.dialog.open(moreTableComponent); } + //支队查询 + zhiFind(){ + this.echartsData.zhiorBuinding="zhi" + } + //建筑类型查询 + buildingFind(){ + this.echartsData.zhiorBuinding="building" + } + } @@ -245,6 +262,32 @@ export class verifiedComponent implements OnInit { qipaotishi xdata=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月','10月','11月','12月'] ydata=[1170, 953, 1144, 799, 789, 773, 660, 998, 790, 1004, 1345, 1245] + //提示框表格 + tableTooltip(dataArr,title:string){ + let data = dataArr + //console.log(data) + var res = '
'+title+'
' + res+='
'; + res+=''; + res+=''; + res+='' + res+='' + res+='' + res+='' + res+=''; + for(var i=0;i' + res+='' + res+='' + res+='' + } + + res+='' + res+='' + res+='
名称数量环比总占比
'+data[i].number+''+data[i].zhanbi+''+data[i].zhanbi+'
总计135619%19%
' + return res + } oneInit () { this.oneEcharts = echarts.init(document.getElementById('center'),'walden'); @@ -273,7 +316,7 @@ export class verifiedComponent implements OnInit { borderWidth:'1', borderRadius :'0', */ formatter: (params)=>{ - return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,params[0].name) + return this.echartsData.zhiorBuinding=="zhi"?this.tableTooltip(this.echartsData.tableDataZhi,params[0].name):this.tableTooltip(this.echartsData.buildingType,params[0].name) }, position:this.echartsData.tableTooltipNoShow2 }, @@ -343,8 +386,10 @@ export class verifiedComponent implements OnInit { /*事件处理代码书写位置*/ this.echartsData.scheduledUpdatesType = 0 //this.echartsData.scheduledUpdatesName = "ff" - this.echartsData.scheduledUpdatesToggle = 2 + this.echartsData.zhiorBuinding=="zhi"?this.echartsData.scheduledUpdatesToggle = 2:this.echartsData.scheduledUpdatesToggle = -2 + //this.echartsData.scheduledUpdatesToggle = 2 this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex] + this.echartsData.findShow=false } }); @@ -607,7 +652,7 @@ export class notVerifiedComponent implements OnInit { } -//核查具体月份组件 +//支队核查具体月份组件 @Component({ selector: 'app-yueDate', templateUrl: './yueDate.html', @@ -632,6 +677,8 @@ export class yueDateComponent implements OnInit { this.oneEcharts.dispose() this.oneEcharts.clear() } + zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] + buildingData=["高层","地下","轨道交通","化工生产","储罐类","厂房","古建筑","商市场","医院","学校","宾馆","娱乐场所","餐饮业","影剧院","展览建筑","隧道"] oneEcharts:any; twoInit () { @@ -664,13 +711,14 @@ export class yueDateComponent implements OnInit { color:'#000000' }, color: "#000", //刻度线标签颜色 + interval: 0 }, //设置坐标轴字体颜色和宽度 axisLine: { lineStyle: {color: "#000",} }, type: 'category', - data: ['浦东支队','黄浦支队','徐汇支队','长宁支队','静安支队','普陀支队','虹口支队','杨浦支队','闵行支队','宝山支队','嘉定支队','崇明支队','金山支队'], + data:this.zhiNameData, axisPointer: {type: 'shadow'} }], yAxis: [ @@ -709,30 +757,66 @@ export class yueDateComponent implements OnInit { name: this.echartsData.zhuXname[1], type: 'bar', stack: '总数', - data: [68, 56, 69, 57, 43, 79, 78, 66, 49, 34, 49, 78, 45], + data: this.echartsData.zhiorBuinding=="zhi"?[68, 56, 69, 57, 23, 79, 78, 66, 49, 34, 49, 78, 45,78]:[68, 56, 69, 57, 43, 79, 78, 66, 49, 34, 49, 78, 45, 49, 78, 45], barWidth :'38', }, { name: this.echartsData.zhuXname[2], type: 'bar', stack: '总数', - data: [39, 3, 4, 7, 3, 2, 3, 4, 29, 40, 40, 2, 4], + data: this.echartsData.zhiorBuinding=="zhi"?[39, 3, 4, 7, 3, 2, 3, 4, 29, 40, 40, 2, 4,2]:[39, 3, 4, 7, 3, 2, 3, 4, 29, 40, 40, 2, 4,40,2,4], itemStyle:{color: '#626c91'} }, { name: this.echartsData.zhuXname[3], type: 'bar', stack: '总数', - data: [48, 2, 3, 3, 4, 3, 2, 26, 4, 3, 3, 24, 14], + data: this.echartsData.zhiorBuinding=="zhi"?[48, 2, 3, 3, 4, 3, 2, 26, 4, 3, 3, 24, 14,24]:[48, 2, 3, 3, 4, 3, 2, 26, 4, 3, 3, 24, 14,3,22,4], itemStyle:{color:'#c4ebad'} }, { name: this.echartsData.zhuXname[0], type: 'line', // yAxisIndex: 1, - data: [49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37], + data: this.echartsData.zhiorBuinding=="zhi"?[49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37,43]:[49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37,41,43,7], itemStyle:{color: '#FFDC35'} }, + { + //name: '与上个月环比', + type: 'line', + // yAxisIndex: 1, + data: [45, 39, 50, 40, 40, 38, 41, 36, 30,32, 36, 38, 30,36], + //itemStyle:{color: '#6be6c1'}, + + }, + { + //name: '警报', + type: 'effectScatter', + //coordinateSystem: 'cartesian2d', + data: [[4,40]], + symbolSize:30, + itemStyle: { + normal: { + color: 'red', + shadowBlur: 10, + shadowColor: '#333' + } + }, + /* showEffectOn: 'render', + rippleEffect: { + brushType: 'stroke' + }, + hoverAnimation: true, + itemStyle: { + normal: { + color: 'red', + shadowBlur: 10, + shadowColor: '#333' + } + }, + zlevel: 1 */ + }, + /* { name: '平均值2倍', type: 'line', @@ -780,6 +864,181 @@ export class yueDateComponent implements OnInit { } +//建筑类型核查具体月份组件 +@Component({ + selector: 'app-yuebuildingDate', + templateUrl: './yuebuildingDate.html', + styleUrls: ['../state/page-two-time/page-two-time.component.scss'] +}) +export class yuebuildingDateComponent implements OnInit { + + constructor(public router: ActivatedRoute,public echartsData:EchartsDataService,public route:Router) { } + + level:string; + ngOnInit(): void { + this.router.queryParams.subscribe(param=>{ + this.level=param.level + }); + + window.setTimeout(()=>{ + this.twoInit() + },0) + } + + ngOnDestroy () { + this.oneEcharts.dispose() + this.oneEcharts.clear() + } + zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] + buildingData=["高层","地下","轨道交通","化工生产","储罐类","厂房","古建筑","商市场","医院","学校","宾馆","娱乐场所","餐饮业","影剧院","展览建筑","隧道"] + + oneEcharts:any; + twoInit () { + this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp'); + var option = { + title: { + text: this.echartsData.scheduledUpdatesXName+'已核查总数:(500)', + top: -4, + left: '35%', + textStyle:{ + color:'#000', + fontSize: 30, + } + }, + //提示框 + tooltip: { + trigger: 'axis', + textStyle:{ + fontSize :18 + } + }, + legend: { + data: this.echartsData.zhuXname, + textStyle: { fontSize :16,color: '#000' } + }, + xAxis: [{ + axisLabel: { + textStyle:{ + fontSize :18, + color:'#000000' + }, + color: "#000", //刻度线标签颜色 + interval: 0 + }, + //设置坐标轴字体颜色和宽度 + axisLine: { + lineStyle: {color: "#000",} + }, + type: 'category', + data:this.buildingData, + axisPointer: {type: 'shadow'} + }], + yAxis: [ + { + //设置坐标轴字体颜色和宽度 + axisLine: { + lineStyle:{ + color:'#000000' + } + }, + type: 'value', + axisLabel: { + textStyle:{ + fontSize :18, + color:'#000000' + }, + color: "#000", //刻度线标签颜色 + formatter: '{value}' + } + }, + // { + // //设置坐标轴字体颜色和宽度 + // axisLine: { + // lineStyle: {color: "#000"}, + // }, + // type: 'value', + // name: '个', + // axisLabel: { + // color: "#000", //刻度线标签颜色 + // formatter: '{value}' + // } + // } + ], + series: [ + { + name: this.echartsData.zhuXname[1], + type: 'bar', + stack: '总数', + data: [68, 56, 69, 57, 43, 79, 78, 66, 49, 34, 49, 78, 45, 49, 78, 45], + barWidth :'38', + }, + { + name: this.echartsData.zhuXname[2], + type: 'bar', + stack: '总数', + data: [39, 3, 4, 7, 3, 2, 3, 4, 29, 40, 40, 2, 4,40,2,4], + itemStyle:{color: '#626c91'} + }, + { + name: this.echartsData.zhuXname[3], + type: 'bar', + stack: '总数', + data:[48, 2, 3, 3, 4, 3, 2, 26, 4, 3, 3, 24, 14,3,22,4], + itemStyle:{color:'#c4ebad'} + }, + { + name: this.echartsData.zhuXname[0], + type: 'line', + // yAxisIndex: 1, + data: [49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37,41,43,7], + itemStyle:{color: '#FFDC35'} + }, + /* { + name: '平均值2倍', + type: 'line', + // yAxisIndex: 1, + data: [98, 90, 106, 94, 98, 86, 96, 82, 76, 78, 82, 86, 74], + itemStyle:{color: '#6be6c1'} + }, + { + name: '平均值3倍', + type: 'line', + // yAxisIndex: 1, + data: [143, 135, 159, 143, 127, 144, 144, 123, 114, 117, 124, 129, 111], + itemStyle:{color: '#999'} + }, */ + ] + }; + this.oneEcharts.setOption(option); + /* this.items[index].echart.on('click', (params) => { + let xIndex=this.items[index].echart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; + this.echartsData.scheduledUpdatesType = 0 + this.echartsData.scheduledUpdatesName = this.months[index] + this.echartsData.scheduledUpdatesToggle = false + this.echartsData.scheduledUpdatesXName=params.name + console.log(this.echartsData.scheduledUpdatesXName) + }); */ + this.oneEcharts.getZr().on('click', (params) => { + + const pointInPixel= [params.offsetX, params.offsetY]; + if (this.oneEcharts.containPixel('grid',pointInPixel)) { + let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; + /*事件处理代码书写位置*/ + this.echartsData.scheduledUpdatesType = 0 + //console.log(option.xAxis[0].data[xIndex]) + this.echartsData.scheduledUpdatesXName+= option.xAxis[0].data[xIndex] + this.echartsData.scheduledUpdatesToggle = 2 + //this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex] + } + + }); + + + } + + + +} //echarts详情组件 @Component({ @@ -801,6 +1060,8 @@ export class detailedInformationComponent implements OnInit { this.example.dispose() this.example.clear() } + zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] + buildingData=["高层","地下","轨道交通","化工生产","储罐类","厂房","古建筑","商市场","医院","学校","宾馆","娱乐场所","餐饮业","影剧院","展览建筑","隧道"] example:any; oneInit () { @@ -890,6 +1151,41 @@ export class detailedInformationComponent implements OnInit { data: [49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37], itemStyle:{color: '#FFDC35'} }, + { + name: '与上个月环比', + type: 'line', + // yAxisIndex: 1, + data: [40, 30, 40, 30, 40, 20, 15, 5, 10,15, 6, 15, 12], + //itemStyle:{color: '#6be6c1'}, + + }, + { + name: '警报', + type: 'effectScatter', + //coordinateSystem: 'cartesian2d', + data: [40, 30, 40, 30, 40, 20, 15, 5, 10,15, 6, 15, 12], //2d坐标系 + symbolSize:30, + itemStyle: { + normal: { + color: 'red', + shadowBlur: 10, + shadowColor: '#333' + } + }, + /* showEffectOn: 'render', + rippleEffect: { + brushType: 'stroke' + }, + hoverAnimation: true, + itemStyle: { + normal: { + color: 'red', + shadowBlur: 10, + shadowColor: '#333' + } + }, + zlevel: 1 */ + }, /* { name: '平均值2倍', type: 'line', diff --git a/src/app/statistic-analysis/scheduled-updates/verified.html b/src/app/statistic-analysis/scheduled-updates/verified.html index 57e6bb7..e03ee90 100644 --- a/src/app/statistic-analysis/scheduled-updates/verified.html +++ b/src/app/statistic-analysis/scheduled-updates/verified.html @@ -4,11 +4,12 @@ * @Author: sueRimn * @Date: 2020-09-05 08:59:24 * @LastEditors: sueRimn - * @LastEditTime: 2020-11-09 14:54:39 + * @LastEditTime: 2020-11-14 15:06:08 --> -
+ +
+
\ No newline at end of file diff --git a/src/app/statistic-analysis/statistic-analysis.module.ts b/src/app/statistic-analysis/statistic-analysis.module.ts index 661662a..c80a769 100644 --- a/src/app/statistic-analysis/statistic-analysis.module.ts +++ b/src/app/statistic-analysis/statistic-analysis.module.ts @@ -53,7 +53,7 @@ import { DeleteThereComponent } from './deleteUnit/delete-there/delete-there.com //import { DeleteThereLineDetailsComponent } from './deleteUnit/delete-there-line-details/delete-there-line-details.component'; import { DeleteFourComponent } from './deleteUnit/delete-four/delete-four.component'; import { BuildingTypeOneComponent } from './buildingType/building-type-one/building-type-one.component'; -import { ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,indexConditionComponent } from './scheduled-updates/scheduled-updates.component'; +import { ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,indexConditionComponent,yuebuildingDateComponent } from './scheduled-updates/scheduled-updates.component'; import { BuildingTypeTwoForwardComponent } from './buildingType/building-type-two-forward/building-type-two-forward.component'; import { BuildingTypeTwoReverseComponent } from './buildingType/building-type-two-reverse/building-type-two-reverse.component'; import { BuildingTypeThreeDetailsComponent } from './buildingType/building-type-three-details/building-type-three-details.component'; @@ -72,7 +72,7 @@ import { DeleteTwoNewaddComponent } from './deleteUnit/delete-two-newadd/delete- @NgModule({ - declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent], + declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent], imports: [ CommonModule, StatisticAnalysisRoutingModule,