Browse Source

[统计分析]删除模块和计划模块合并

dev
chenjingyu 4 years ago
parent
commit
2c7891417e
  1. 14
      src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.html
  2. 76
      src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.scss
  3. 25
      src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.spec.ts
  4. 223
      src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.ts
  5. 6
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.html
  6. 12
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.scss
  7. 32
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts
  8. 29
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html
  9. 53
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.scss
  10. 219
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
  11. 8
      src/app/statistic-analysis/scheduled-updates/verified.html
  12. 9
      src/app/statistic-analysis/scheduled-updates/yueDate.html
  13. 8
      src/app/statistic-analysis/statistic-analysis-routing.module.ts
  14. 5
      src/app/statistic-analysis/statistic-analysis.module.ts

14
src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.html

@ -0,0 +1,14 @@
<div class="box">
<div class="header">
<div class="btnbox">
<button mat-stroked-button (click)="goBack()">返回</button>
</div>
</div>
<div class="echartsbox">
<div id="barEchart">
</div>
</div>
</div>

76
src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.scss

@ -0,0 +1,76 @@
.box{
width: 100%;
height: 92%;
display: flex;
flex-direction: column;
overflow: hidden;
//position: relative;
.echartsbox{
width: 100%;
height: 100%;
// overflow: auto;
}
#Line{
width: 50%;
height: 420px;
margin: 50px auto;
}
}
.publicCss{
height: 350px;
width: 50%;
display: inline-block;
box-sizing: border-box;
padding: 20px;
}
//头部搜索栏
.header {
border-bottom: 1px solid #999;
height: 80px;
min-height: 81px;;
box-sizing: border-box;
// padding: 0 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
justify-content:center;
.queryField {
margin: 0 10px;
font-size: 14px;
.mat-form-field {
width: 130px;
max-height: 50px;;
margin: 0 15px 0 10px;
}
}
.btnbox{
height: 80px;
display: flex;
flex-direction:column;
justify-content: space-around;
position: fixed;
top: 64px;
right: 4%;
width: 88px;
button{
width: 88px;
height: 36px;
}
}
}
.echartsbox{
width: 100%;
height: 100%;
overflow: auto;
#barEchart{
width: 80%;
height: 550px;
//position: absolute;
left: 50%;
top: 45%;
transform: translate(-50%,-50%);
}
}

25
src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DeleteTwoNewaddComponent } from './delete-two-newadd.component';
describe('DeleteTwoNewaddComponent', () => {
let component: DeleteTwoNewaddComponent;
let fixture: ComponentFixture<DeleteTwoNewaddComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DeleteTwoNewaddComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DeleteTwoNewaddComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

223
src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.ts

@ -0,0 +1,223 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { ActivatedRoute } from '@angular/router';
import { EchartsDataService } from '../../echarts-data.service';
declare var echarts: any;
@Component({
selector: 'app-delete-two-newadd',
templateUrl: './delete-two-newadd.component.html',
styleUrls: ['./delete-two-newadd.component.scss']
})
export class DeleteTwoNewaddComponent implements OnInit {
constructor(private router: Router,public dialog: MatDialog,public snackBar: MatSnackBar,private serviceData: EchartsDataService,public route: ActivatedRoute) { }
year:String
buildingTypeName:String
level:String
setTimeoutObj//延时器需要清除
ngOnInit(): void {
this.dateInit ()
this.bianli()
this.route.queryParams.subscribe(params => {
this.year = params['level'];
this.buildingTypeName = params['headtext'];
});
this.setTimeoutObj = window.setTimeout(()=>{
this.detailEcharts()
})
}
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
this.detailPlanEchart.clear()
this.detailPlanEchart.dispose()
}
selectType:string = 'month'; //选择当前的 查询类型 按月/年
//查询数据
years:any = []
selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12]
//日期初始化
dateInit () {
let date = (new Date()).getFullYear()
for (let i=date; i>=date-10;i--) {
this.years.unshift(i)
}
}
selectOneYear:any = (new Date()).getFullYear() //开始年份
selectStartMonth:any = 1 //开始月份
Submit (e) {
}
selectStartYear:any = (new Date()).getFullYear() //开始年份
topTextlabel = {
show: true, // 开启显示
position: 'top', // 在上方显示
distance: 10, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
verticalAlign: 'middle',
textStyle: { // 数值样式
color: 'black',
fontSize: 12
}
}//柱状图数值顶部显示
zhongNameData = ["浦东中队","黄埔中队","徐汇中队","长宁中队","静安中队","普陀中队","虹口中队","杨浦中队","闵行中队","宝山中队","嘉定中队"]
zhongNumData = [200,190,180,170,160,150,140,130,120,110,100]
zhiNameData = ["浦东支队","黄埔支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队"]
zhiNumData = [300,290,280,270,260,250,240,230,220,210,200]
tiaoshiPao:any
//气泡提示数据获取
bianli(){
var arrshuzu='[';
for(var i=0;i<this.dateNum.length;i++){
arrshuzu+='{"value":'+this.dateNum[i]+',"coord":['+i+','+this.dateNum[i]+'],"name":'+'"'+this.date[i]+'"'+'},'
}
arrshuzu=arrshuzu.substring(0,arrshuzu.length-1)
arrshuzu+=']'
this.tiaoshiPao=JSON.parse(arrshuzu)
console.log(this.tiaoshiPao)
//return tishiPao
}
//返回
goBack () {
history.go(-1)
//this.echartsData.statefulInspectionToggle = true
}
detailPlanEchart
option
date = ['高层', '轨道交通', '储罐类', '古建筑', '地下', '化工生产', '厂房', '商市场']
dateNum = [270, 253, 244, 199, 189, 173, 160, 198]
detailEcharts(){
this.detailPlanEchart = echarts.init(document.getElementById('barEchart'), 'skinUpp');
this.option = {
grid: {
top: 90,
left:40,
right: 20,
//bottom: 20,
},
// 标题
title: {
text: this.buildingTypeName + '(' + this.year + ')',
top: -4,
left: 'center',
textStyle:{
//文字颜色
color:'#000',
fontSize: 30
}
},
//提示框
tooltip: {
trigger: 'axis',
formatter: (params)=>{
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)
}
},
position:this.serviceData.tableTooltipNoShow2
},
// x轴
xAxis: {
type: 'category',
data: this.date,
axisLabel: {
color: "#000", //刻度线标签颜色
textStyle:{
fontSize :18,
color:'#000000'
}
},
//设置坐标轴字体颜色和宽度
axisLine: {
lineStyle: {
color: "#000",
},
},
splitLine: {//分割线配置
show:true,
lineStyle: {
color: '#999',
}
}
},
// y轴
yAxis: {
type: 'value',
name: '个',
axisLabel: {
//color: "#000", //刻度线标签颜色
textStyle:{
fontSize :18,
color:'#000000'
}
},
//设置坐标轴字体颜色和宽度
axisLine: {
lineStyle: {
color: "#000",
}
}
},
// 数据
series: [{
name: 'xxx',
type: 'line',
markPoint: {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
data: this.dateNum,
}
],
};
this.detailPlanEchart.setOption(this.option);
this.detailPlanEchart.getZr().on('click',params=>{
const pointInPixel= [params.offsetX, params.offsetY];
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'}});
}
});
}
//返回按钮
backBtn(){
window.history.go(-1)
}
tableTooltip(params:any){
var data = [
{name:params.name,number:params.value,zhanbi:(params.value/1340 * 100).toFixed(2) + "%"}
]
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+params.name+'</span></div>'
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
res+='<thead style="font-size:18px;"><tr>';
res+='<td style="text-align:center;width:30%;">名称</td>';
res+='<td style="text-align:center;width:30%;">数量</td>'
res+='<td style="text-align:center;width:30%;">总占比</td>'
res+='</tr></thead>'
res+='<tbody>';
for(var i=0;i<data.length;i++){
res+='<tr>'
res+='<td style="text-align:center;">'+data[i].name+'</td>'
res+='<td style="text-align:center;">'+data[i].number+'</td>'
res+='<td style="text-align:center;">'+data[i].zhanbi+'</td></tr>'
}
res+='</tbody>'
// res+='<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>'
res+='</table></div></div>'
return res
}
}

6
src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-02 16:21:18
* @LastEditors: sueRimn
* @LastEditTime: 2020-09-08 15:18:57
* @LastEditTime: 2020-11-04 16:49:27
-->
<div class="box">
<div class="header">
@ -73,7 +73,7 @@
<div id="Line">
</div>
<div>
<!-- <div>
<div class="publicCss" id="leftOne"></div>
<div class="publicCss" id="leftTwo"></div>
<div class="publicCss" id="leftThere"></div>
@ -82,7 +82,7 @@
<div class="publicCss" id="rightTwo"></div>
<div class="publicCss" id="rightThree"></div>
<div class="publicCss" id="rightFour"></div>
</div>
</div> -->
</div>
</div>

12
src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.scss

@ -8,21 +8,21 @@
.echartsbox{
width: 100%;
height: 100%;
overflow: auto;
//overflow: auto;
}
#Line{
width: 50%;
height: 420px;
margin: 50px auto;
width: 80%;
height: 600px;
margin: 80px auto;
}
}
.publicCss{
/* .publicCss{
height: 350px;
width: 50%;
display: inline-block;
box-sizing: border-box;
padding: 20px;
}
} */
//头部搜索栏
.header {

32
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-09-16 14:28:19
* @LastEditTime: 2020-11-05 08:59:05
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
@ -39,14 +39,14 @@ export class DeleteTwoComponent implements OnInit {
window.setTimeout(()=>{
this.headZhexian('Line','删除数量总统计',this.datayuex,this.datayuey)
this.headZhexian('leftOne','高层',this.datayuex,this.datayuey)
/* this.headZhexian('leftOne','',this.datayuex,this.datayuey)
this.headZhexian('leftTwo','轨道交通',this.datayuex,this.datayuey)
this.headZhexian('leftThere','储罐类',this.datayuex,this.datayuey)
this.headZhexian('leftFour','古建筑',this.datayuex,this.datayuey)
this.headZhexian('rightOne','地下',this.datayuex,this.datayuey)
this.headZhexian('rightTwo','化工生产',this.datayuex,this.datayuey)
this.headZhexian('rightThree','厂房',this.datayuex,this.datayuey)
this.headZhexian('rightFour','商市场',this.datayuex,this.datayuey)
this.headZhexian('rightFour','商市场',this.datayuex,this.datayuey) */
/* else if(this.selectType=='year'){
this.headZhexian('heads','删除数量总统计',this.datanianx,this.dataniany)
@ -95,26 +95,26 @@ export class DeleteTwoComponent implements OnInit {
this.tiaoshiPao=null
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
this.headZhexian('Line','删除数量总统计',this.datayuex,this.datayuey)
this.headZhexian('leftOne','高层',this.datayuex,this.datayuey)
/* this.headZhexian('leftOne','',this.datayuex,this.datayuey)
this.headZhexian('leftTwo','轨道交通',this.datayuex,this.datayuey)
this.headZhexian('leftThere','储罐类',this.datayuex,this.datayuey)
this.headZhexian('leftFour','古建筑',this.datayuex,this.datayuey)
this.headZhexian('rightOne','地下',this.datayuex,this.datayuey)
this.headZhexian('rightTwo','化工生产',this.datayuex,this.datayuey)
this.headZhexian('rightThree','厂房',this.datayuex,this.datayuey)
this.headZhexian('rightFour','商市场',this.datayuex,this.datayuey)
this.headZhexian('rightFour','商市场',this.datayuex,this.datayuey) */
}
//按月查询
monthSubmit (e) {
this.headZhexian('Line','删除数量总统计',this.datayuex,this.datayuey)
this.headZhexian('leftOne','高层',this.datayuex,this.datayuey)
/* this.headZhexian('leftOne','',this.datayuex,this.datayuey)
this.headZhexian('leftTwo','轨道交通',this.datayuex,this.datayuey)
this.headZhexian('leftThere','储罐类',this.datayuex,this.datayuey)
this.headZhexian('leftFour','古建筑',this.datayuex,this.datayuey)
this.headZhexian('rightOne','地下',this.datayuex,this.datayuey)
this.headZhexian('rightTwo','化工生产',this.datayuex,this.datayuey)
this.headZhexian('rightThree','厂房',this.datayuex,this.datayuey)
this.headZhexian('rightFour','商市场',this.datayuex,this.datayuey)
this.headZhexian('rightFour','商市场',this.datayuex,this.datayuey) */
if (e.selectTwoYear > e.selectOneYear) {
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
@ -149,27 +149,27 @@ export class DeleteTwoComponent implements OnInit {
this.tiaoshiPao=null
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataniany,this.datanianx)
this.headZhexian('Line','删除数量总统计',this.datanianx,this.dataniany)
this.headZhexian('leftOne','高层',this.datanianx,this.dataniany)
/* this.headZhexian('leftOne','',this.datanianx,this.dataniany)
this.headZhexian('leftTwo','轨道交通',this.datanianx,this.dataniany)
this.headZhexian('leftThere','储罐类',this.datanianx,this.dataniany)
this.headZhexian('leftFour','古建筑',this.datanianx,this.dataniany)
this.headZhexian('rightOne','地下',this.datanianx,this.dataniany)
this.headZhexian('rightTwo','化工生产',this.datanianx,this.dataniany)
this.headZhexian('rightThree','厂房',this.datanianx,this.dataniany)
this.headZhexian('rightFour','商市场',this.datanianx,this.dataniany)
this.headZhexian('rightFour','商市场',this.datanianx,this.dataniany) */
}
//按年查询
yearSubmit (e) {
console.log(this.selectType)
this.headZhexian('Line','删除数量总统计',this.datanianx,this.dataniany)
this.headZhexian('leftOne','高层',this.datanianx,this.dataniany)
/* this.headZhexian('leftOne','',this.datanianx,this.dataniany)
this.headZhexian('leftTwo','轨道交通',this.datanianx,this.dataniany)
this.headZhexian('leftThere','储罐类',this.datanianx,this.dataniany)
this.headZhexian('leftFour','古建筑',this.datanianx,this.dataniany)
this.headZhexian('rightOne','地下',this.datanianx,this.dataniany)
this.headZhexian('rightTwo','化工生产',this.datanianx,this.dataniany)
this.headZhexian('rightThree','厂房',this.datanianx,this.dataniany)
this.headZhexian('rightFour','商市场',this.datanianx,this.dataniany)
this.headZhexian('rightFour','商市场',this.datanianx,this.dataniany) */
if (e.selectEndYear >= e.selectStartYear) {
let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
@ -234,7 +234,7 @@ export class DeleteTwoComponent implements OnInit {
/* backgroundColor:'rgba(255,255,255,1)',//rgba调节背景颜色与透明度
borderWidth:'1',
borderRadius :'0', */
position:divid=='Line'? this.echartsData.tableTooltipNoShowt:false
//position: this.echartsData.tableTooltipNoShowt
},
xAxis: {
type: 'category',
@ -280,7 +280,6 @@ export class DeleteTwoComponent implements OnInit {
data: datayuey,
type: 'line',
markPoint: {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
@ -289,7 +288,6 @@ export class DeleteTwoComponent implements OnInit {
};
this.headZx.getZr().on('click', (params) => {
// console.log(params.name)
if(`${headtext}`!=="删除数量总统计"){
/* this.echartsData.statefulInspectionName =params.name+headtext;
this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_there`); */
const pointInPixel= [params.offsetX, params.offsetY];
@ -297,13 +295,15 @@ export class DeleteTwoComponent implements OnInit {
let xIndex=this.headZx.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
if(this.options.xAxis.data[xIndex]=='2019'||this.options.xAxis.data[xIndex]=='2020'){
this.router.navigate(['/statisticanalysis/delete_thereLineDetails'],{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}});
}else{
/*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
//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}});
}
}
}
});
this.headZx.setOption(this.options);
}

29
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html

@ -1,3 +1,28 @@
<div class="content">
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-11-03 10:19:24
* @LastEditors: sueRimn
* @LastEditTime: 2020-11-05 09:01:41
-->
<!-- <div class="content">
<div class="center" id="center"></div>
</div>
</div> -->
<div class="box">
<div class="topbox">
<div class="btnbox">
<button mat-stroked-button >条件查询</button>
<button mat-stroked-button [ngClass]="{'selectedBtn': true}"style="margin-right: 20px;">图形查询</button>
</div>
</div>
<div class="echartsbox">
<div id="pie">
</div>
<div id="pieTwo"></div>
</div>
</div>

53
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.scss

@ -1,4 +1,4 @@
.content {
/* .content {
width: 100%;
height: 93%;
overflow: hidden;
@ -8,6 +8,57 @@
width: 100%;
height: 100%;
}
} */
#center{
overflow: hidden;
}
.box{
width: 100%;
height: 92%;
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
.topbox{
width: 100%;
height: 80px;
border-bottom: 1px gray solid;
.btnbox{
display: flex;
flex-direction:row-reverse;
float: right;
justify-content: center;
align-items: center;
height: 100%;
button{
width: 88px;
height: 36px;
}
margin-right:4%;
}
}
.echartsbox{
width: 100%;
height: 100%;
overflow: auto;
display: flex;
//justify-content:center;
}
#pie{
width: 100%;
height: 93%;
flex-direction: row
}
#pieTwo{
width: 100%;
height: 93%;
flex-direction: row
}
}
.selectedBtn{
background-color: #2196f3;
color: white;
}

219
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts

@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ActivatedRoute } from '@angular/router';
import {EchartsDataService} from '../echarts-data.service'
import { MatDialog } from '@angular/material/dialog';
declare var echarts: any;
@ -15,7 +16,8 @@ export class ScheduledUpdatesComponent implements OnInit {
ngOnInit(): void {
window.setTimeout(()=>{
this.initCharts()
this.initCharts("pie")
this.initCharts("pieTwo")
})
}
@ -26,15 +28,15 @@ export class ScheduledUpdatesComponent implements OnInit {
example:any;
/* 首页饼状图 */
initCharts(){
this.example= echarts.init(document.getElementById('center'),'walden');
initCharts(pieid){
this.example= echarts.init(document.getElementById(pieid),'walden');
var options={
title: {
text: '计划更新统计(7100家)',
top: "7%",
top: "3%",
left: 'center',
textStyle:{
fontSize:31
fontSize:28
}
},
tooltip: {
@ -54,7 +56,7 @@ export class ScheduledUpdatesComponent implements OnInit {
fontSize:18,
color:"#000000"
},
data: ['已核查无需修改', '已核查修改中', '已核查提交审核', '未核查']
data:pieid=="pie"? ['维护无需修改', '维护修改', '维护删除']:['未维护', '维护通过审核', '维护中']
},
series: [{
name: '访问来源',
@ -65,7 +67,7 @@ export class ScheduledUpdatesComponent implements OnInit {
normal:{
show:true,
// position: 'inner',
fontSize:18,
fontSize:16,
formatter:'{b} {c}家\n{d|({d}%)}',
rich: {
d: {
@ -74,11 +76,15 @@ export class ScheduledUpdatesComponent implements OnInit {
}
},
}},
data: [
{value: 2000, name: '已核查无需修改'},
{value: 2500, name: '已核查修改中',itemStyle:{color:'#02A7F0'}},
{value: 1900, name: '已核查提交审核',itemStyle:{color:'#87cebb'}},
{value: 700, name: '未核查'},],
data:pieid=="pie"? [
{value: 2000, name: '维护无需修改'},
{value: 2500, name: '维护修改',itemStyle:{color:'#02A7F0'}},
{value: 1900, name: '维护删除',itemStyle:{color:'#87cebb'}},
]:[
{value: 2000, name: '未维护'},
{value: 2500, name: '维护通过审核',itemStyle:{color:'#02A7F0'}},
{value: 1900, name: '维护中',itemStyle:{color:'#87cebb'}},
],
emphasis: {
itemStyle: {
shadowBlur: 10,
@ -91,7 +97,8 @@ export class ScheduledUpdatesComponent implements OnInit {
};
this.example.setOption(options);
this.example.on('click', (params) => {
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
if(params.name=="维护删除"){this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two');}
else{this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');}
});
}
@ -116,8 +123,8 @@ export class publicEchartsComponent implements OnInit {
//已核查
verified () {
this.isToggle = true
this.echartsData.scheduledUpdatesToggle = true
this.isToggle = false
this.echartsData.scheduledUpdatesToggle = false
}
//未核查
@ -156,24 +163,25 @@ export class verifiedComponent implements OnInit {
window.setTimeout(()=>{
this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydata,this.xdata)
this.oneInit()
this.twoInit()
//this.twoInit()
},0)
}
ngOnDestroy () {
/* ngOnDestroy () {
this.oneEcharts.dispose()
this.oneEcharts.clear()
this.items.forEach((element,index) => {
element.echart.dispose()
element.echart.clear()
});
}
} */
oneEcharts:any;
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]
oneInit () {
this.oneEcharts = echarts.init(document.getElementById('center'),'walden');
var option = {
grid: {
@ -202,7 +210,7 @@ export class verifiedComponent implements OnInit {
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,params[0].name)
},
position:this.echartsData.tableTooltipNoShow
position:this.echartsData.tableTooltipNoShow2
},
// x轴
xAxis: {
@ -257,6 +265,23 @@ export class verifiedComponent implements OnInit {
}
],
};
this.oneEcharts.getZr().on('click', (params) => {
// console.log(params.name)
/* this.echartsData.statefulInspectionName =params.name+headtext;
this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_there`); */
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.scheduledUpdatesToggle = false
this.router.navigate(['/statisticanalysis/scheduledUpdates/yueDate'],{queryParams:{'level':option.xAxis.data[xIndex]}});
//this.router.navigate(['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
/*事件处理代码书写位置*/
//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':option.xAxis.data[xIndex]}});
}
});
this.oneEcharts.setOption(option);
}
@ -516,7 +541,163 @@ export class notVerifiedComponent implements OnInit {
}
//核查具体月份组件
@Component({
selector: 'app-yueDate',
templateUrl: './yueDate.html',
styleUrls: ['../state/page-two-time/page-two-time.component.scss']
})
export class yueDateComponent implements OnInit {
constructor(public router: ActivatedRoute,public echartsData:EchartsDataService) { }
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()
}
oneEcharts:any;
twoInit () {
this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp');
var option = {
title: {
text: this.level+'总数:(500)',
top: -4,
left: '35%',
textStyle:{
color:'#000',
fontSize: 30,
}
},
//提示框
tooltip: {
trigger: 'axis',
textStyle:{
fontSize :18
}
},
legend: {
data: ['平均值','平均值2倍','平均值3倍', '已核查无需修改', '已核查修改中', '已核查提交审核'],
textStyle: { fontSize :16,color: '#000' }
},
xAxis: [{
axisLabel: {
textStyle:{
fontSize :18,
color:'#000000'
},
color: "#000", //刻度线标签颜色
},
//设置坐标轴字体颜色和宽度
axisLine: {
lineStyle: {color: "#000",}
},
type: 'category',
data: ['浦东支队','黄浦支队','徐汇支队','长宁支队','静安支队','普陀支队','虹口支队','杨浦支队','闵行支队','宝山支队','嘉定支队','崇明支队','金山支队'],
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: '已核查无需修改',
type: 'bar',
stack: '总数',
data: [68, 56, 69, 57, 43, 79, 78, 66, 49, 34, 49, 78, 45],
barWidth :'38',
},
{
name: '已核查修改中',
type: 'bar',
stack: '总数',
data: [39, 3, 4, 7, 3, 2, 3, 4, 29, 40, 40, 2, 4],
itemStyle:{color: '#626c91'}
},
{
name: '已核查提交审核',
type: 'bar',
stack: '总数',
data: [48, 2, 3, 3, 4, 3, 2, 26, 4, 3, 3, 24, 14],
itemStyle:{color:'#c4ebad'}
},
{
name: '平均值',
type: 'line',
// yAxisIndex: 1,
data: [49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37],
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)
}); */
}
}
//echarts详情组件

8
src/app/statistic-analysis/scheduled-updates/verified.html

@ -4,12 +4,12 @@
* @Author: sueRimn
* @Date: 2020-09-05 08:59:24
* @LastEditors: sueRimn
* @LastEditTime: 2020-09-09 16:19:16
* @LastEditTime: 2020-11-05 10:58:28
-->
<app-detailedInformation *ngIf="!echartsData.scheduledUpdatesToggle"></app-detailedInformation>
<div [hidden]="!echartsData.scheduledUpdatesToggle">
<div style="height: 450px;width: 50%;margin: 0 auto; padding-top: 50px;" id="center"></div>
<div class="publicOneLineCss" id="one" style="margin-top: 50px;"></div>
<div style="height: 550px;width: 80%;margin: 0 auto; padding-top: 150px;" id="center"></div>
<!-- <div class="publicOneLineCss" id="one" style="margin-top: 50px;"></div>
<div class="publicOneLineCss" id="two"></div>
<div class="publicOneLineCss" id="three"></div>
<div class="publicOneLineCss" id="four"></div>
@ -20,5 +20,5 @@
<div class="publicOneLineCss" id="nine"></div>
<div class="publicOneLineCss" id="ten"></div>
<div class="publicOneLineCss" id="eleven"></div>
<div class="publicOneLineCss" id="twelve"></div>
<div class="publicOneLineCss" id="twelve"></div> -->
</div>

9
src/app/statistic-analysis/scheduled-updates/yueDate.html

@ -0,0 +1,9 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-11-05 10:30:56
* @LastEditors: sueRimn
* @LastEditTime: 2020-11-05 11:20:11
-->
<div style="height: 550px;width: 80%;margin: 0 auto; padding-top: 150px;" id="center"></div>

8
src/app/statistic-analysis/statistic-analysis-routing.module.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-02 16:57:00
* @LastEditors: sueRimn
* @LastEditTime: 2020-09-17 14:05:07
* @LastEditTime: 2020-11-05 11:07:16
*/
import { Component, NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
@ -16,6 +16,7 @@ import { PageThereComponent} from './state/page-there/page-there.component';
import { PageThereYearComponent} from './state/page-there-year/page-there-year.component'
import { DeleteOneComponent } from './deleteUnit/delete-one/delete-one.component';
import { DeleteTwoComponent } from './deleteUnit/delete-two/delete-two.component';
import {DeleteTwoNewaddComponent}from './deleteUnit/delete-two-newadd/delete-two-newadd.component'
import { DeleteThereComponent } from './deleteUnit/delete-there/delete-there.component';
import { DeleteThereLineDetailsComponent } from './deleteUnit/delete-there-line-details/delete-there-line-details.component';
import { DeleteFourComponent } from './deleteUnit/delete-four/delete-four.component';
@ -31,6 +32,8 @@ import { AddUnitTwoTimeComponent } from './addUnit/add-unit-two-time/add-unit-tw
import { AddUnitThreeLineDetailsComponent } from './addUnit/add-unit-three-line-details/add-unit-three-line-details.component';
import { AddUnitThreeBarDetailsComponent } from './addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component';
import { HomeComponent } from './home/home.component';
import { yueDateComponent }from './scheduled-updates/scheduled-updates.component'
import { from } from 'rxjs';
const routes: Routes = [
@ -45,6 +48,7 @@ const routes: Routes = [
{ path: 'delete_one/delete_four', component: DeleteFourComponent},
{ path: 'buildingType_one', component: BuildingTypeOneComponent},
{ path: 'delete_two', component: DeleteTwoComponent},
{ path: 'delete_two_newadd', component: DeleteTwoNewaddComponent},
{ path: 'delete_there', component: DeleteThereComponent},
{ path: 'delete_thereLineDetails', component: DeleteThereLineDetailsComponent},
{ path: 'delete_four', component: DeleteFourComponent},
@ -59,7 +63,7 @@ const routes: Routes = [
{ path: 'addUnit_one/addUnit_two_time/three_lineDetails', component: AddUnitThreeLineDetailsComponent},
{ path: 'addUnit_one/addUnit_two_time/three_barDetails', component: AddUnitThreeBarDetailsComponent},
{ path: 'scheduledUpdates', component: ScheduledUpdatesComponent},
{ path: 'scheduledUpdates', component: ScheduledUpdatesComponent},
{ path: 'scheduledUpdates/yueDate', component: yueDateComponent},
{ path: 'scheduledUpdates/PublicEcharts', component: publicEchartsComponent},
{ path: 'home', component: HomeComponent}
];

5
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 } from './scheduled-updates/scheduled-updates.component';
import { ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent } 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';
@ -67,11 +67,12 @@ import { HomeComponent } from './home/home.component';
import { DeleteThereLineDetailsComponent } from './deleteUnit/delete-there-line-details/delete-there-line-details.component';
import { PageThereComponent } from './state/page-there/page-there.component';
import { PageThereYearComponent } from './state/page-there-year/page-there-year.component';
import { DeleteTwoNewaddComponent } from './deleteUnit/delete-two-newadd/delete-two-newadd.component';
@NgModule({
declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent],
declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent],
imports: [
CommonModule,
StatisticAnalysisRoutingModule,

Loading…
Cancel
Save