邵佳豪 4 years ago
parent
commit
742863bc65
  1. 6
      src/app/statistic-analysis/deleteUnit/delete-four/delete-four.component.html
  2. 19
      src/app/statistic-analysis/deleteUnit/delete-four/delete-four.component.ts
  3. 4
      src/app/statistic-analysis/deleteUnit/delete-one/delete-one.component.html
  4. 31
      src/app/statistic-analysis/deleteUnit/delete-one/delete-one.component.ts
  5. 9
      src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.html
  6. 4
      src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.scss
  7. 60
      src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.ts
  8. 106
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.html
  9. 58
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.scss
  10. 170
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts
  11. 19
      src/app/statistic-analysis/echarts-data.service.ts
  12. 57
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
  13. 102
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts
  14. 6
      src/app/statistic-analysis/statistic-analysis-routing.module.ts

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

@ -4,8 +4,12 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-02 16:22:58 * @Date: 2020-09-02 16:22:58
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-05 08:48:27 * @LastEditTime: 2020-09-05 14:52:26
--> -->
<div style="height: 100px; width: 100%; padding-right: 20px;">
<button mat-raised-button (click)='goBack()' style="float: right;">返回</button>
</div>
<div class="detailBox"> <div class="detailBox">
<div id="detailBox"> <div id="detailBox">

19
src/app/statistic-analysis/deleteUnit/delete-four/delete-four.component.ts

@ -1,6 +1,16 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-09-02 16:22:58
* @LastEditors: sueRimn
* @LastEditTime: 2020-09-05 14:53:43
*/
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service' import {EchartsDataService} from '../../echarts-data.service';
import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar';
import { DateAdapter } from '@angular/material/core';
declare var echarts: any; declare var echarts: any;
@Component({ @Component({
@ -10,7 +20,7 @@ declare var echarts: any;
}) })
export class DeleteFourComponent implements OnInit { export class DeleteFourComponent implements OnInit {
constructor(public route: ActivatedRoute,public data: EchartsDataService) { } constructor(public route: ActivatedRoute,public data: EchartsDataService,public snackBar: MatSnackBar,private adapter: DateAdapter<any>) { }
zhongNameData = ["浦东中队","黄埔中队","徐汇中队","长宁中队","静安中队","普陀中队","虹口中队","杨浦中队","闵行中队","宝山中队","嘉定中队"] zhongNameData = ["浦东中队","黄埔中队","徐汇中队","长宁中队","静安中队","普陀中队","虹口中队","杨浦中队","闵行中队","宝山中队","嘉定中队"]
zhongNumData = [200,190,180,170,160,150,140,130,120,110,100] zhongNumData = [200,190,180,170,160,150,140,130,120,110,100]
@ -19,6 +29,11 @@ export class DeleteFourComponent implements OnInit {
this.detailEcharts() this.detailEcharts()
}) })
} }
//返回
goBack () {
history.go(-1)
this.data.statefulInspectionToggle = true
}
detailEcharts(){ detailEcharts(){
var detailPlanEchart = echarts.init(document.getElementById('detailBox')); var detailPlanEchart = echarts.init(document.getElementById('detailBox'));

4
src/app/statistic-analysis/deleteUnit/delete-one/delete-one.component.html

@ -4,6 +4,6 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-02 16:15:53 * @Date: 2020-09-02 16:15:53
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-02 16:27:59 * @LastEditTime: 2020-09-05 11:28:26
--> -->
<div id="indexBzt" style="width: 100%;height: 100%;"></div> <div id="indexBzt" style="width: 100%;height: 780PX;"></div>

31
src/app/statistic-analysis/deleteUnit/delete-one/delete-one.component.ts

@ -10,6 +10,8 @@ declare var echarts: any;
export class DeleteOneComponent implements OnInit { export class DeleteOneComponent implements OnInit {
options:any; options:any;
indexBzt//echarts实例
constructor(private router: Router) { } constructor(private router: Router) { }
ngOnInit() { ngOnInit() {
@ -17,19 +19,24 @@ export class DeleteOneComponent implements OnInit {
this.initCharts() this.initCharts()
},0) },0)
} }
ngOnDestroy():void{
this.indexBzt.clear()
this.indexBzt.dispose()
}
/* 首页饼状图 */ /* 首页饼状图 */
initCharts(){ initCharts(){
//console.log(document.getElementById('indexBzt')) //console.log(document.getElementById('indexBzt'))
var ec = echarts as any; var ec = echarts as any;
var indexBzt = ec.init(document.getElementById('indexBzt')); this.indexBzt = ec.init(document.getElementById('indexBzt'));
var options={ var options={
title: { title: {
text: '删除单位统计(8900家)', text: '删除单位统计(8900家)',
//subtext: '纯属虚构', //subtext: '纯属虚构',
padding:[120,100], //padding:[120,100],
left: 'center', left: 'center',
top: "7%",
textStyle:{ textStyle:{
fontSize:38 fontSize:38
} }
@ -52,9 +59,9 @@ export class DeleteOneComponent implements OnInit {
//padding:20, //padding:20,
itemWidth:60, itemWidth:60,
itemHeight:25, itemHeight:25,
textStyle:{ /* textStyle:{
fontSize:28 fontSize:28
}, }, */
data: ['高层', '地下', '轨道交通', '化工生产', '储罐类', '厂房', '古建筑', '商市场', '医院', '学校', '宾馆', '娱乐场所', '餐饮业', '影剧院', '展览建筑', '隧道'] data: ['高层', '地下', '轨道交通', '化工生产', '储罐类', '厂房', '古建筑', '商市场', '医院', '学校', '宾馆', '娱乐场所', '餐饮业', '影剧院', '展览建筑', '隧道']
}, },
series: [ series: [
@ -64,12 +71,14 @@ export class DeleteOneComponent implements OnInit {
radius: '65%', radius: '65%',
center: ['50%', '60%'], center: ['50%', '60%'],
label:{ label:{
normal:{
show:true, show:true,
position: 'inner', fontSize:13,
fontSize:18, formatter:'{b}{c}家\n{d|({d}%)}',
formatter:'{c} ({d}%)' rich: {
} d: {
align: 'center',
}
},
}, },
data: [ data: [
@ -100,10 +109,10 @@ export class DeleteOneComponent implements OnInit {
} }
] ]
}; };
indexBzt.on('click', (params) => { this.indexBzt.on('click', (params) => {
this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two'); this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two');
}); });
indexBzt.setOption(options); this.indexBzt.setOption(options);
} }
/** /**
* @name: * @name:

9
src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.html

@ -4,10 +4,10 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-02 16:22:35 * @Date: 2020-09-02 16:22:35
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-04 16:19:53 * @LastEditTime: 2020-09-05 15:10:46
--> -->
<div class="head"> <div class="head">
<select style="width: 80px;height: 50px; margin-left: 200px;"> <select style="width: 80px;height: 50px; margin-left: 400px;margin-top: 20px;">
<option value ="2020">2020</option> <option value ="2020">2020</option>
</select> </select>
<select style="width: 80px;height: 50px; margin-left: 50px;" > <select style="width: 80px;height: 50px; margin-left: 50px;" >
@ -19,8 +19,11 @@
<option value ="1">6</option> <option value ="1">6</option>
<option value ="1">7</option> <option value ="1">7</option>
<option value ="1">8</option> <option value ="1">8</option>
<option value ="1" selected>9</option>
</select> </select>
<button class="chaxun">查询</button>
<button type="submit" mat-raised-button color="primary" style="margin-left: 50px;">查询</button>
<button mat-raised-button (click)='goBack()' style="margin-left: 50px;">返回</button>
</div> </div>
<div id="zhidui" class="zhu"></div> <div id="zhidui" class="zhu"></div>

4
src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.scss

@ -6,10 +6,6 @@
background-color:white ; background-color:white ;
} }
.chaxun{ .chaxun{
background-color: #008CBA;
color: white;
border-radius:5px;
font-size: 16px;
margin-left: 50px; margin-left: 50px;
padding: 15px 32px; padding: 15px 32px;
} }

60
src/app/statistic-analysis/deleteUnit/delete-there/delete-there.component.ts

@ -4,11 +4,13 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-02 16:22:35 * @Date: 2020-09-02 16:22:35
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-05 08:58:18 * @LastEditTime: 2020-09-05 14:43:05
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router'; import { Router,ActivatedRoute } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service' import {EchartsDataService} from '../../echarts-data.service';
import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar';
import { DateAdapter } from '@angular/material/core';
declare var echarts: any; declare var echarts: any;
@Component({ @Component({
@ -18,7 +20,12 @@ declare var echarts: any;
}) })
export class DeleteThereComponent implements OnInit { export class DeleteThereComponent implements OnInit {
constructor(private router: Router,private activatedRoute: ActivatedRoute,public echartsData:EchartsDataService) { } constructor(private router: Router,private activatedRoute: ActivatedRoute,public echartsData:EchartsDataService,public snackBar: MatSnackBar,private adapter: DateAdapter<any>) { }
zhutu//echarts实例
ngOnDestroy():void{
this.zhutu.clear()
this.zhutu.dispose()
}
ngOnInit(): void { ngOnInit(): void {
let headtext:string; let headtext:string;
@ -31,15 +38,46 @@ export class DeleteThereComponent implements OnInit {
//console.log(datayuex) //console.log(datayuex)
}); });
window.setTimeout(()=>{ window.setTimeout(()=>{
this.zhuzhuangtu(headName) this.zhuzhuangtu(this.echartsData.statefulInspectionName)
},0) },0)
} }
zhiNameData = ["浦东支队","黄埔支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] zhiNameData = ["浦东支队","黄埔支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"]
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70] zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70]
//返回
goBack () {
history.go(-1)
this.echartsData.statefulInspectionToggle = true
}
axisLabel = {
interval: 0,
formatter:function(value)
{
var ret = "";//拼接加\n返回的类目项
var maxLength = 2;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于3,
{
for (var i = 0; i < rowN; i++) {
var temp = "";//每次截取的字符串
var start = i * maxLength;//开始截取的位置
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
temp = value.substring(start, end) + "\n";
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
}//echarts两个字换行
/* 柱状图 */ /* 柱状图 */
zhuzhuangtu(headName:string){ zhuzhuangtu(headName:string){
var ec = echarts as any; var ec = echarts as any;
var zhutu = ec.init(document.getElementById('zhidui')); this.zhutu = ec.init(document.getElementById('zhidui'));
var option = { var option = {
title: { title: {
text: `${headName}`, text: `${headName}`,
@ -49,14 +87,14 @@ export class DeleteThereComponent implements OnInit {
fontSize: 23 fontSize: 23
} }
}, },
grid: { /* grid: {
left: '5%', left: '5%',
bottom:'35%' bottom:'35%'
}, }, */
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.zhiNameData, data: this.zhiNameData,
//axisLabel: this.axisLabel axisLabel: this.axisLabel
}, },
yAxis: { yAxis: {
type: 'value' type: 'value'
@ -81,15 +119,15 @@ export class DeleteThereComponent implements OnInit {
//label: this.topTextlabel //label: this.topTextlabel
}] }]
}; };
zhutu.on('click', (params) => { this.zhutu.on('click', (params) => {
console.log(params) console.log(params)
this.echartsData.statefulInspectionName =params.name; this.echartsData.statefulInspectionName =params.name;
this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_four`); this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_four`);
}); });
zhutu.setOption(option); this.zhutu.setOption(option);
} }
/* 鼠标悬停提示 */
tableTooltip2(biaotou:string){ tableTooltip2(biaotou:string){
var shuju='[{"name":"浦东中队","number":"156","zhanbi":"3%"},{"name":"黄埔中队","number":"144","zhanbi":"2.8%"},' var shuju='[{"name":"浦东中队","number":"156","zhanbi":"3%"},{"name":"黄埔中队","number":"144","zhanbi":"2.8%"},'
shuju+='{"name":"徐汇中队","number":"133","zhanbi":"2.1%"},{"name":"长宁中队","number":"122","zhanbi":"1.6%"},' shuju+='{"name":"徐汇中队","number":"133","zhanbi":"2.1%"},{"name":"长宁中队","number":"122","zhanbi":"1.6%"},'

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

@ -4,50 +4,74 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-02 16:21:18 * @Date: 2020-09-02 16:21:18
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-04 15:36:05 * @LastEditTime: 2020-09-05 09:57:47
--> -->
<body> <body>
<div style="position: fixed; " class="daohang"> <div class="header">
<label><input name="riqi" type="radio" value="" style="margin-left: 20px;" (click)='anyue()'/></label>
<label><input name="riqi" type="radio" value="" (click)='annian()'/></label> <div class="queryField" *ngIf=" echartsData.statefulInspectionToggle">
<select style="width: 80px;height: 50px; margin-left: 100px;"> <mat-radio-group [(ngModel)]="selectType">
<option value ="2020">2020</option> <mat-radio-button value="month"></mat-radio-button>
</select> <mat-radio-button value="year" style="margin-left: 10px;"></mat-radio-button>
<div id="yue1"> </mat-radio-group>
<select style="width: 80px;height: 50px; margin-left: 50px;" > </div>
<option value ="1">1</option>
<option value ="1">2</option> <div class="queryField" *ngIf="selectType=='month' && echartsData.statefulInspectionToggle">
<option value ="1">3</option> <form #form="ngForm" (ngSubmit)="monthSubmit(form.value)">
<option value ="1">4</option> <span>开始年份:</span>
<option value ="1">5</option> <mat-form-field>
<option value ="1">6</option> <mat-select [(ngModel)]="selectOneYear" name='selectOneYear'>
<option value ="1">7</option> <mat-option *ngFor="let item of years" [value]="item">{{item}}</mat-option>
<option value ="1">8</option> </mat-select>
</select> </mat-form-field>
</div> <span>开始月份:</span>
<select style="width: 80px;height: 50px; margin-left: 100px;"> <mat-form-field>
<option value ="2020">2020</option> <mat-select [(ngModel)]="selectStartMonth" name='selectStartMonth'>
</select> <mat-option *ngFor="let item of selectMonth" [value]="item">{{item}}</mat-option>
<div id="yue2"> </mat-select>
<select style="width: 80px;height: 50px; margin-left: 50px;" > </mat-form-field>
<option value ="1">1</option> <span>结束年份:</span>
<option value ="1">2</option> <mat-form-field>
<option value ="1">3</option> <mat-select [(ngModel)]="selectTwoYear" name='selectTwoYear'>
<option value ="1">4</option> <mat-option *ngFor="let item of years" [value]="item">{{item}}</mat-option>
<option value ="1">5</option> </mat-select>
<option value ="1">6</option> </mat-form-field>
<option value ="1">7</option> <span>结束月份:</span>
<option value ="1">8</option> <mat-form-field>
</select> <mat-select [(ngModel)]="selectEndMonth" name='selectEndMonth'>
</div> <mat-option *ngFor="let item of selectMonth" [value]="item">{{item}}</mat-option>
<button class="chaxun" >查询</button> </mat-select>
<!-- <button type="button" class="button" style="margin-left: 500px;">按区间查询</button> </mat-form-field>
<button type="button" class="button" style="margin-left: 10px;" >年查询</button> --> <button type="submit" mat-raised-button color="primary">查询</button>
</form>
</div>
</div>
<div class="head" id="head"></div> <div class="queryField" *ngIf="selectType=='year' && echartsData.statefulInspectionToggle">
<form #form2="ngForm" (ngSubmit)="yearSubmit(form2.value)">
<span>开始年份:</span>
<mat-form-field>
<mat-select [(ngModel)]="selectStartYear" name='selectStartYear'>
<mat-option *ngFor="let item of years" [value]="item">{{item}}</mat-option>
</mat-select>
</mat-form-field>
<span>结束年份:</span>
<mat-form-field>
<mat-select [(ngModel)]="selectEndYear" name='selectEndYear'>
<mat-option *ngFor="let item of years" [value]="item">{{item}}</mat-option>
</mat-select>
</mat-form-field>
<button type="submit" mat-raised-button color="primary">查询</button>
</form>
</div>
<!-- <div class="fixedCss">
<button mat-raised-button (click)='goBack()' *ngIf="!echartsData.statefulInspectionToggle">返回</button>
</div> -->
</div>
<div class="heads" id="heads"></div>
<section class="mainbox"> <section class="mainbox">
<div class="column"> <div class="column">
<div class="panel bar" id="leftOne"> <div class="panel bar" id="leftOne">

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

@ -1,30 +1,46 @@
body{ body{
overflow:auto; overflow:auto;
} }
.daohang{ //头部搜索栏
display: flex; .header {
z-index: 5; border-bottom: 1px solid #999;
border-bottom:2px solid #d4dde4; height: 70px;
width: 100%; min-height: 70px;
height: 180px; box-sizing: border-box;
background-color:white ; 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;
}
}
/* .fixedCss{
position: fixed;
top: 81px;
right: 32px;
} */
} }
.chaxun{ /* 最上面的折线图 */
background-color: #008CBA; .heads{
color: white;
border-radius:5px;
//font-size: 16px;
margin-left: 50px;
}
.head{
text-align:center; text-align:center;
margin:0 auto; margin:0 auto;
width: 900px; width: 800px;
height: 400px; height: 450px;
padding-top: 250px; padding-top: 50px;
} }
/* 其余折线图 */
.mainbox { .mainbox {
margin-top: 100px;
//padding-top: 50px;
padding-bottom: 50px; padding-bottom: 50px;
min-width: 1024px; min-width: 1024px;
max-width: 1920px; max-width: 1920px;
@ -37,10 +53,12 @@ body{
} }
.panel { .panel {
position: relative; position: relative;
height: 400px; height: 330px;
border: 1px solid rgba(25, 186, 139, 0.17); width:780px;
//border: 1px solid rgba(25, 186, 139, 0.17);
padding: 0 0.1875rem 0.5rem; padding: 0 0.1875rem 0.5rem;
margin-bottom: 0.1875rem; margin-bottom: 0.1875rem;
margin-top: 80px;
&::before { &::before {
position: absolute; position: absolute;
top: 0; top: 0;

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

@ -4,12 +4,14 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-02 16:21:18 * @Date: 2020-09-02 16:21:18
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-04 16:58:01 * @LastEditTime: 2020-09-05 15:09:27
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MatDatepickerInputEvent } from '@angular/material/datepicker'; import { MatDatepickerInputEvent } from '@angular/material/datepicker';
import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar';
import { DateAdapter } from '@angular/material/core';
import {EchartsDataService} from '../../echarts-data.service'
declare var echarts: any; declare var echarts: any;
@Component({ @Component({
@ -19,16 +21,21 @@ declare var echarts: any;
}) })
export class DeleteTwoComponent implements OnInit { export class DeleteTwoComponent implements OnInit {
options:any; options:any;
datayuex=['一月', '二月', '三月', '四月', '五月', '六月', '七月','八月']; datayuex=['一月', '二月', '三月', '四月', '五月', '六月', '七月','八月','九月'];
datayuey=[210, 160, 150, 140, 130, 120, 110,120]; datayuey=[210, 160, 150, 140, 130, 120, 110,120,150];
datanianx=[2019,2020,2021]; datanianx=[2019,2020];
dataniany=[201,174] dataniany=[201,174]
constructor(private router: Router,public snackBar: MatSnackBar) { } constructor(private router: Router,public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { }
/* @ViewChild('appEcharts')appEcharts :echartsComponent; //
@ViewChild('pageTwoName')pageTwoName :PageTwoNameComponent; //父组件中获得子组件的引用 */
ngOnInit(): void { ngOnInit(): void {
this.dateInit()
window.setTimeout(()=>{ window.setTimeout(()=>{
this.headZhexian('head','删除数量总统计',this.datayuex,this.datayuey) console.log(this.selectType)
this.headZhexian('heads','删除数量总统计',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('leftTwo','轨道交通',this.datayuex,this.datayuey)
this.headZhexian('leftThere','储罐类',this.datayuex,this.datayuey) this.headZhexian('leftThere','储罐类',this.datayuex,this.datayuey)
@ -37,15 +44,48 @@ export class DeleteTwoComponent implements OnInit {
this.headZhexian('rightTwo','化工生产',this.datayuex,this.datayuey) this.headZhexian('rightTwo','化工生产',this.datayuex,this.datayuey)
this.headZhexian('rightThree','厂房',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)
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)
} */
},0) },0)
} }
/* 按月点击事件 */ ngOnDestroy():void{
anyue(){ this.headZx.clear()
var anyue1 = document.getElementById('yue1'); this.headZx.dispose()
anyue1.style.display='block'; }
var anyue2 = document.getElementById('yue2');
anyue2.style.display='block'; selectType:string = 'month'; //选择当前的 查询类型 按月/年
this.headZhexian('head','删除数量总统计',this.datayuex,this.datayuey) headZx//echarts实例
//查询数据
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() //开始年份
selectTwoYear:any = (new Date()).getFullYear() //结束年份
selectStartMonth:any = 1 //开始月份
selectEndMonth:any = (new Date()).getMonth()+1 //结束月份
//按月查询
monthSubmit (e) {
this.headZhexian('heads','删除数量总统计',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('leftTwo','轨道交通',this.datayuex,this.datayuey)
this.headZhexian('leftThere','储罐类',this.datayuex,this.datayuey) this.headZhexian('leftThere','储罐类',this.datayuex,this.datayuey)
@ -54,14 +94,39 @@ export class DeleteTwoComponent implements OnInit {
this.headZhexian('rightTwo','化工生产',this.datayuex,this.datayuey) this.headZhexian('rightTwo','化工生产',this.datayuex,this.datayuey)
this.headZhexian('rightThree','厂房',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
console.log(startTime)
console.log(endTime)
} else if (e.selectTwoYear === e.selectOneYear) {
if(e.selectEndMonth >= e.selectStartMonth) {
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
console.log(startTime)
console.log(endTime)
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择正确时间区段','确定',config);
}
}else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择正确时间区段','确定',config);
}
} }
/* 按年点击事件 */
annian(){
var anyue1 = document.getElementById('yue1');
anyue1.style.display='none'; selectStartYear:any = (new Date()).getFullYear() //开始年份
var anyue2 = document.getElementById('yue2'); selectEndYear:any = (new Date()).getFullYear() //结束年份
anyue2.style.display='none'; //按年查询
this.headZhexian('head','删除数量总统计',this.datanianx,this.dataniany) yearSubmit (e) {
console.log(this.selectType)
this.headZhexian('heads','删除数量总统计',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('leftTwo','轨道交通',this.datanianx,this.dataniany)
this.headZhexian('leftThere','储罐类',this.datanianx,this.dataniany) this.headZhexian('leftThere','储罐类',this.datanianx,this.dataniany)
@ -69,23 +134,57 @@ export class DeleteTwoComponent implements OnInit {
this.headZhexian('rightOne','地下',this.datanianx,this.dataniany) this.headZhexian('rightOne','地下',this.datanianx,this.dataniany)
this.headZhexian('rightTwo','化工生产',this.datanianx,this.dataniany) this.headZhexian('rightTwo','化工生产',this.datanianx,this.dataniany)
this.headZhexian('rightThree','厂房',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
console.log(startTime)
console.log(endTime)
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择正确时间区段','确定',config);
}
} }
/* 折线图 */ /**
* @name: 线
* @test: test font
* @msg:
* @param {divid(div),headtext()}
* @return {type}
*/
headZhexian(divid:string,headtext:string,datayuex,datayuey){ headZhexian(divid:string,headtext:string,datayuex,datayuey){
var dianji:boolean=headtext=="删除数量总统计" ? false:true;
var ec = echarts as any; var ec = echarts as any;
var headZx = ec.init(document.getElementById(`${divid}`)); this.headZx = ec.init(document.getElementById(`${divid}`),'skinUpp');
var options = { var options = {
grid: {
top: 50,
left:40,
right: 20,
bottom: 20,
},
// 标题
title: { title: {
text: `${headtext}`, text: `${headtext}`,
left:350, left:'center',
top: -4,
//副标题文本样式
 subtextStyle:{
color:'#999',
fontWeight:'bold',
},
textStyle:{ textStyle:{
fontSize:28 //文字颜色
color:'#000',
fontSize: 22,
} }
}, },
//提示框
tooltip: { tooltip: {
trigger: 'item', trigger: 'axis',
formatter: (params)=>{ formatter: (params)=>{
return this.biaogeTishi(`${headtext}`) return this.biaogeTishi(`${headtext}`)
} , } ,
@ -95,7 +194,7 @@ export class DeleteTwoComponent implements OnInit {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap:false, boundaryGap:true,
data: datayuex, data: datayuex,
axisLabel: { axisLabel: {
color: "#000", //刻度线标签颜色 color: "#000", //刻度线标签颜色
@ -128,9 +227,10 @@ export class DeleteTwoComponent implements OnInit {
series: [{ series: [{
data: datayuey, data: datayuey,
type: 'line', type: 'line',
lineStyle:{ clickable:false,
/* lineStyle:{
color:'#1369bf' color:'#1369bf'
}, }, */
/* markLine: { /* markLine: {
symbol: ['none', 'none'], symbol: ['none', 'none'],
label: {show: false}, label: {show: false},
@ -150,11 +250,15 @@ export class DeleteTwoComponent implements OnInit {
}, */ }, */
}] }]
}; };
headZx.on('click', (params) => { this.headZx.on('click', (params) => {
console.log(params) console.log(params)
this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_there/${headtext}/${params.name}`); if(`${headtext}`!=="删除数量总统计"){
this.echartsData.statefulInspectionName =params.name+headtext;
this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_there`);
}
}); });
headZx.setOption(options); this.headZx.setOption(options);
} }
/** /**
* @name: * @name:

19
src/app/statistic-analysis/echarts-data.service.ts

@ -18,6 +18,7 @@ export class EchartsDataService {
//echarts 悬停 显示表格假数据
//支队提示框 //支队提示框
tableDataZhi = [ tableDataZhi = [
{name:"浦东支队",number:"156",zhanbi:"3%"}, {name:"浦东支队",number:"156",zhanbi:"3%"},
@ -94,6 +95,16 @@ export class EchartsDataService {
{name:"十二月",number:"122",zhanbi:"1.6%"}, {name:"十二月",number:"122",zhanbi:"1.6%"},
{name:"总计",number:"984",zhanbi:"20%"} {name:"总计",number:"984",zhanbi:"20%"}
] ]
//预案提示框
planData = [
{name:"预案新增",number:"156",zhanbi:"19%"},
{name:"预案审核通过",number:"144",zhanbi:"21%"},
{name:"预案编制",number:"133",zhanbi:"20%"},
{name:"预案审核退回",number:"122",zhanbi:"17%"},
{name:"预案审核中",number:"120",zhanbi:"23%"},
{name:"总计",number:"561",zhanbi:"100%"},
]
//提示框表格 //提示框表格
tableTooltip(dataArr,title:string){ tableTooltip(dataArr,title:string){
let data = dataArr let data = dataArr
@ -113,10 +124,10 @@ export class EchartsDataService {
} }
res+='</tbody>' 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>' res+='</table></div></div>'
return res return res
} }
//如果提示框显示不开 //如果提示框显示不开
tableTooltipNoShow(point, params, dom, rect, size) { tableTooltipNoShow(point, params, dom, rect, size) {
// 鼠标坐标和提示框位置的参考坐标系是:以外层div的左上角那一点为原点,x轴向右,y轴向下 // 鼠标坐标和提示框位置的参考坐标系是:以外层div的左上角那一点为原点,x轴向右,y轴向下
@ -189,12 +200,11 @@ export class EchartsDataService {
} else { // 上边放得下 } else { // 上边放得下
y = pointY - boxHeight; y = pointY - boxHeight;
} }
console.log(pointX,pointY)
return [x, y]; return [x, y];
} }
//用法: //用法:
// tooltip: { // tooltip: {
// trigger: 'axis', // trigger: 'axis',
// backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度 // backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
@ -205,4 +215,7 @@ export class EchartsDataService {
// }, // },
// position:this.serviceData.tableTooltipNoShow // position:this.serviceData.tableTooltipNoShow
// } // }
} }

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

@ -11,7 +11,7 @@ declare var echarts: any;
}) })
export class ScheduledUpdatesComponent implements OnInit { export class ScheduledUpdatesComponent implements OnInit {
constructor(private router: Router) { } constructor(private router: Router,public echartsData:EchartsDataService) { }
ngOnInit(): void { ngOnInit(): void {
window.setTimeout(()=>{ window.setTimeout(()=>{
@ -19,9 +19,15 @@ export class ScheduledUpdatesComponent implements OnInit {
}) })
} }
ngOnDestroy () {
this.example.clear()
this.example.dispose()
}
example:any;
/* 首页饼状图 */ /* 首页饼状图 */
initCharts(){ initCharts(){
var indexBzt = echarts.init(document.getElementById('center')); this.example= echarts.init(document.getElementById('center'));
var options={ var options={
title: { title: {
text: '计划更新统计(7100家)', text: '计划更新统计(7100家)',
@ -33,12 +39,13 @@ export class ScheduledUpdatesComponent implements OnInit {
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: (params)=>{
// return this.biaogeTishi(params.name)
} ,
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度 backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1', borderWidth:'1',
borderRadius :'0' borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,params.name)
},
position:this.echartsData.tableTooltipNoShow
}, },
legend: { legend: {
orient: 'vertical', orient: 'vertical',
@ -78,8 +85,8 @@ export class ScheduledUpdatesComponent implements OnInit {
}] }]
}; };
indexBzt.setOption(options); this.example.setOption(options);
indexBzt.on('click', (params) => { this.example.on('click', (params) => {
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts'); this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
}); });
} }
@ -98,7 +105,7 @@ export class publicEchartsComponent implements OnInit {
constructor(private router: Router,public echartsData:EchartsDataService,public dialog: MatDialog,) { } constructor(private router: Router,public echartsData:EchartsDataService,public dialog: MatDialog,) { }
ngOnInit(): void { ngOnInit(): void {
this.echartsData.scheduledUpdatesToggle = true
} }
isToggle:boolean = true; // 已核查/未核查 isToggle:boolean = true; // 已核查/未核查
@ -149,8 +156,10 @@ export class verifiedComponent implements OnInit {
} }
ngOnDestroy () { ngOnDestroy () {
this.oneEcharts.dispose()
this.oneEcharts.clear() this.oneEcharts.clear()
this.items.forEach((element,index) => { this.items.forEach((element,index) => {
element.echart.dispose()
element.echart.clear() element.echart.clear()
}); });
} }
@ -179,6 +188,13 @@ export class verifiedComponent implements OnInit {
//提示框 //提示框
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1',
borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,params[0].name)
},
position:this.echartsData.tableTooltipNoShow
}, },
// x轴 // x轴
xAxis: { xAxis: {
@ -363,6 +379,7 @@ export class notVerifiedComponent implements OnInit {
} }
ngOnDestroy () { ngOnDestroy () {
this.oneEcharts.dispose()
this.oneEcharts.clear() this.oneEcharts.clear()
} }
@ -382,9 +399,13 @@ export class notVerifiedComponent implements OnInit {
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
type: 'shadow' borderWidth:'1',
} borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'未核查')
},
position:this.echartsData.tableTooltipNoShow
}, },
legend: { legend: {
data: ['剩余未核查','总数'], data: ['剩余未核查','总数'],
@ -470,8 +491,14 @@ export class detailedInformationComponent implements OnInit {
},0) },0)
} }
ngOnDestroy () {
this.example.dispose()
this.example.clear()
}
example:any;
oneInit () { oneInit () {
let echart = echarts.init(document.getElementById('center'), 'skinUpp'); this.example = echarts.init(document.getElementById('center'), 'skinUpp');
if (this.echartsData.scheduledUpdatesType ===0) { //已核查 if (this.echartsData.scheduledUpdatesType ===0) { //已核查
var option = { var option = {
title: { title: {
@ -560,7 +587,7 @@ export class detailedInformationComponent implements OnInit {
}, },
] ]
}; };
echart.setOption(option); this.example.setOption(option);
} else { //未核查 } else { //未核查
var options = { var options = {
title: { title: {
@ -631,7 +658,7 @@ export class detailedInformationComponent implements OnInit {
}, },
] ]
}; };
echart.setOption(options); this.example.setOption(options);
} }
} }

102
src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

@ -20,6 +20,7 @@ export class PageTwoTimeComponent implements OnInit {
@ViewChild('pageTwoName')pageTwoName :PageTwoNameComponent; //父组件中获得子组件的引用 @ViewChild('pageTwoName')pageTwoName :PageTwoNameComponent; //父组件中获得子组件的引用
ngOnInit(): void { ngOnInit(): void {
this.echartsData.statefulInspectionToggle = true
this.dateInit() this.dateInit()
} }
@ -129,11 +130,25 @@ export class echartsComponent implements OnInit {
this.sixInit() this.sixInit()
},0) },0)
} }
ngOnDestroy () {
this.oneExample.clear()
this.oneExample.dispose()
this.twoExample.clear()
this.twoExample.dispose()
this.threeExample.clear()
this.threeExample.dispose()
this.fourExample.clear()
this.fourExample.dispose()
this.fiveExample.clear()
this.fiveExample.dispose()
this.sixExample.clear()
this.sixExample.dispose()
}
oneExample:any;
oneInit () { oneInit () {
var chartQusj = echarts.init(document.getElementById('one'), 'skinUpp'); this.oneExample = echarts.init(document.getElementById('one'), 'skinUpp');
var option = { var option = {
grid: { grid: {
top: 50, top: 50,
@ -141,6 +156,15 @@ export class echartsComponent implements OnInit {
right: 20, right: 20,
bottom: 20, bottom: 20,
}, },
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1',
borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.planData,params[0].name)
},
},
// 标题 // 标题
title: { title: {
text: '预案统计状态', text: '预案统计状态',
@ -158,10 +182,6 @@ export class echartsComponent implements OnInit {
fontSize: 22, fontSize: 22,
} }
}, },
//提示框
tooltip: {
trigger: 'axis',
},
// x轴 // x轴
xAxis: { xAxis: {
type: 'category', type: 'category',
@ -205,12 +225,13 @@ export class echartsComponent implements OnInit {
} }
], ],
}; };
chartQusj.setOption(option); this.oneExample.setOption(option);
} }
twoExample:any;
twoInit () { twoInit () {
let that = this let that = this
var chartQusj = echarts.init(document.getElementById('two'), 'skinUpp'); this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp');
var option = { var option = {
grid: { grid: {
top: 50, top: 50,
@ -228,9 +249,14 @@ export class echartsComponent implements OnInit {
color:'#000', color:'#000',
} }
}, },
//提示框
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1',
borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案新增')
}
}, },
// x轴 // x轴
xAxis: { xAxis: {
@ -275,16 +301,17 @@ export class echartsComponent implements OnInit {
} }
], ],
}; };
chartQusj.setOption(option); this.twoExample.setOption(option);
chartQusj.on('click', function (params) { this.twoExample.on('click', function (params) {
that.echartsData.statefulInspectionName = '预案新增' that.echartsData.statefulInspectionName = '预案新增'
that.echartsData.statefulInspectionToggle = false that.echartsData.statefulInspectionToggle = false
}); });
} }
threeExample:any;
threeInit () { threeInit () {
let that = this let that = this
var chartQusj = echarts.init(document.getElementById('three'), 'skinUpp'); this.threeExample = echarts.init(document.getElementById('three'), 'skinUpp');
var option = { var option = {
grid: { grid: {
top: 50, top: 50,
@ -305,6 +332,12 @@ export class echartsComponent implements OnInit {
//提示框 //提示框
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1',
borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案审核通过')
}
}, },
// x轴 // x轴
xAxis: { xAxis: {
@ -349,16 +382,17 @@ export class echartsComponent implements OnInit {
} }
], ],
}; };
chartQusj.setOption(option); this.threeExample.setOption(option);
chartQusj.on('click', function (params) { this.threeExample.on('click', function (params) {
that.echartsData.statefulInspectionName = '预案审核通过' that.echartsData.statefulInspectionName = '预案审核通过'
that.echartsData.statefulInspectionToggle = false that.echartsData.statefulInspectionToggle = false
}); });
} }
fourExample:any;
fourInit () { fourInit () {
let that = this let that = this
var chartQusj = echarts.init(document.getElementById('four'), 'skinUpp'); this.fourExample = echarts.init(document.getElementById('four'), 'skinUpp');
var option = { var option = {
grid: { grid: {
top: 50, top: 50,
@ -379,6 +413,12 @@ export class echartsComponent implements OnInit {
//提示框 //提示框
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1',
borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案编制')
}
}, },
// x轴 // x轴
xAxis: { xAxis: {
@ -423,16 +463,17 @@ export class echartsComponent implements OnInit {
} }
], ],
}; };
chartQusj.setOption(option); this.fourExample.setOption(option);
chartQusj.on('click', function (params) { this.fourExample.on('click', function (params) {
that.echartsData.statefulInspectionName = '预案编制' that.echartsData.statefulInspectionName = '预案编制'
that.echartsData.statefulInspectionToggle = false that.echartsData.statefulInspectionToggle = false
}); });
} }
fiveExample:any;
fiveInit () { fiveInit () {
let that = this let that = this
var chartQusj = echarts.init(document.getElementById('five'), 'skinUpp'); this.fiveExample = echarts.init(document.getElementById('five'), 'skinUpp');
var option = { var option = {
grid: { grid: {
top: 50, top: 50,
@ -453,6 +494,12 @@ export class echartsComponent implements OnInit {
//提示框 //提示框
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1',
borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案审核退回')
}
}, },
// x轴 // x轴
xAxis: { xAxis: {
@ -497,16 +544,17 @@ export class echartsComponent implements OnInit {
} }
], ],
}; };
chartQusj.setOption(option); this.fiveExample.setOption(option);
chartQusj.on('click', function (params) { this.fiveExample.on('click', function (params) {
that.echartsData.statefulInspectionName = '预案审核退回' that.echartsData.statefulInspectionName = '预案审核退回'
that.echartsData.statefulInspectionToggle = false that.echartsData.statefulInspectionToggle = false
}); });
} }
sixExample:any;
sixInit () { sixInit () {
let that = this let that = this
var chartQusj = echarts.init(document.getElementById('six'), 'skinUpp'); this.sixExample = echarts.init(document.getElementById('six'), 'skinUpp');
var option = { var option = {
grid: { grid: {
top: 50, top: 50,
@ -527,6 +575,12 @@ export class echartsComponent implements OnInit {
//提示框 //提示框
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1',
borderRadius :'0',
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案审核中')
}
}, },
// x轴 // x轴
xAxis: { xAxis: {
@ -571,8 +625,8 @@ export class echartsComponent implements OnInit {
} }
], ],
}; };
chartQusj.setOption(option); this.sixExample.setOption(option);
chartQusj.on('click', function (params) { this.sixExample.on('click', function (params) {
that.echartsData.statefulInspectionName = '预案审核中' that.echartsData.statefulInspectionName = '预案审核中'
that.echartsData.statefulInspectionToggle = false that.echartsData.statefulInspectionToggle = false
}); });

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-02 16:57:00 * @Date: 2020-09-02 16:57:00
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-04 15:55:53 * @LastEditTime: 2020-09-05 13:51:54
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
@ -17,6 +17,7 @@ import { DeleteTwoComponent } from './deleteUnit/delete-two/delete-two.component
import { DeleteThereComponent } from './deleteUnit/delete-there/delete-there.component'; import { DeleteThereComponent } from './deleteUnit/delete-there/delete-there.component';
import { DeleteFourComponent } from './deleteUnit/delete-four/delete-four.component'; import { DeleteFourComponent } from './deleteUnit/delete-four/delete-four.component';
import { BuildingTypeOneComponent } from './buildingType/building-type-one/building-type-one.component'; import { BuildingTypeOneComponent } from './buildingType/building-type-one/building-type-one.component';
import { from } from 'rxjs';
import {ScheduledUpdatesComponent,publicEchartsComponent} from './scheduled-updates/scheduled-updates.component' import {ScheduledUpdatesComponent,publicEchartsComponent} from './scheduled-updates/scheduled-updates.component'
import { BuildingTypeTwoForwardComponent } from './buildingType/building-type-two-forward/building-type-two-forward.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 { BuildingTypeTwoReverseComponent } from './buildingType/building-type-two-reverse/building-type-two-reverse.component';
@ -35,9 +36,10 @@ const routes: Routes = [
{ path: 'statePageTwo_time', component: PageTwoTimeComponent}, { path: 'statePageTwo_time', component: PageTwoTimeComponent},
{ path: 'delete_one', component: DeleteOneComponent}, { path: 'delete_one', component: DeleteOneComponent},
{ path: 'delete_one/delete_two', component: DeleteTwoComponent}, { path: 'delete_one/delete_two', component: DeleteTwoComponent},
{ path: 'delete_one/delete_there/:headtext/:datayuex', component: DeleteThereComponent}, { path: 'delete_one/delete_there', component: DeleteThereComponent},
{ path: 'delete_one/delete_four', component: DeleteFourComponent}, { path: 'delete_one/delete_four', component: DeleteFourComponent},
{ path: 'buildingType_one', component: BuildingTypeOneComponent}, { path: 'buildingType_one', component: BuildingTypeOneComponent},
//{ path: 'delete_one/deleteUnit_two_type', component: DeleteTwoComponent}
{ path: 'delete_two', component: DeleteTwoComponent}, { path: 'delete_two', component: DeleteTwoComponent},
{ path: 'delete_there', component: DeleteThereComponent}, { path: 'delete_there', component: DeleteThereComponent},
{ path: 'delete_four', component: DeleteFourComponent}, { path: 'delete_four', component: DeleteFourComponent},

Loading…
Cancel
Save