邵佳豪 4 years ago
parent
commit
98f2bb5250
  1. 6
      src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts
  2. 4
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss
  3. 6
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  4. 4
      src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts
  5. 6
      src/app/statistic-analysis/state/page-there/page-there.component.ts
  6. 7
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss
  7. 6
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
  8. 44
      src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts

6
src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts

@ -111,7 +111,7 @@ export class AddUnitOneComponent implements OnInit {
bottom: 90, bottom: 90,
left: 'center', left: 'center',
textStyle:{ textStyle:{
fontSize:12, fontSize:14,
color:"#000000" color:"#000000"
}, },
data: tid=="pieone"?this.lengthOrData:this.lengthBuildData data: tid=="pieone"?this.lengthOrData:this.lengthBuildData
@ -126,12 +126,12 @@ export class AddUnitOneComponent implements OnInit {
left:30, left:30,
label:{ label:{
show:true, show:true,
fontSize:14, fontSize:16,
formatter:'{b}\n{c}家{d|({d}%)}', formatter:'{b}\n{c}家{d|({d}%)}',
rich: { rich: {
d: { d: {
align: 'center', align: 'center',
fontSize:18 fontSize:16
} }
}, },
}, },

4
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss

@ -38,8 +38,8 @@
.publicCss{ .publicCss{
width: 100%; width: 100%;
@media screen and (max-device-width:1400px){ @media screen and (max-device-width:1400px){
height: 500px; height: 600px;
top: 55%; top: 60%;
} }
@media screen and (min-device-width:1400px){ @media screen and (min-device-width:1400px){
height: 550px; height: 550px;

6
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts

@ -372,7 +372,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
title: { title: {
text: this.headname+`:总数(${this.tabledata[0].totalCount}`, text: this.headname+`:总数(${this.tabledata[0].totalCount}`,
left: "center", left: "center",
top: "0", top: -4,
//bottom: '80%', //bottom: '80%',
textStyle: { textStyle: {
fontSize: 30 fontSize: 30
@ -380,8 +380,8 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
}, },
grid: { grid: {
containLabel:true, containLabel:true,
top:this.padHw?60:90, top:90,
bottom: 30 // top: 10
}, },
xAxis: { xAxis: {
id:this.zhiorbuild=="zhi"?this.buildingTypeId:this.organizationId, id:this.zhiorbuild=="zhi"?this.buildingTypeId:this.organizationId,

4
src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts

@ -119,13 +119,13 @@ export class PageThereYearComponent implements OnInit {
this.detailPlanEchart = echarts.init(document.getElementById('barEchart'), 'skinUpp'); this.detailPlanEchart = echarts.init(document.getElementById('barEchart'), 'skinUpp');
this.option = { this.option = {
grid: { grid: {
top: 90, top: 110,
}, },
// 标题 // 标题
title: { title: {
text: `${this.year}${this.buildingTypeName}`, text: `${this.year}${this.buildingTypeName}`,
top: -4, //top: -14,
left: 'center', left: 'center',
textStyle:{ textStyle:{
//文字颜色 //文字颜色

6
src/app/statistic-analysis/state/page-there/page-there.component.ts

@ -32,6 +32,10 @@ export class PageThereComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
location.reload();
}
if(window.matchMedia("(max-width: 1400px)").matches){ if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true this.padHw=true
//this.padjt= //this.padjt=
@ -165,7 +169,7 @@ export class PageThereComponent implements OnInit {
this.zhutu = ec.init(document.getElementById('zhidui'),'walden'); this.zhutu = ec.init(document.getElementById('zhidui'),'walden');
this.option = { this.option = {
title: { title: {
text: headName, text: headName+`总数(${this.tabledata[0].totalCount})`,
left: "center", left: "center",
top:0, top:0,
//bottom: "540", //bottom: "540",

7
src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss

@ -21,15 +21,16 @@
overflow: auto; overflow: auto;
#pie{ #pie{
width: 100%; width: 100%;
height: 550px;
@media screen and (max-device-width:1400px){ @media screen and (max-device-width:1400px){
height: 450px; top: 65%;
} }
@media screen and (min-device-width:1400px){ @media screen and (min-device-width:1400px){
height: 550px; top: 55%;
} }
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 55%;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
} }
} }

6
src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts

@ -113,6 +113,7 @@ export class PageTwoNameComponent implements OnInit {
addEchart addEchart
tabledata tabledata
organizationId=[] organizationId=[]
//预案新增统计 //预案新增统计
planAdd () { planAdd () {
let _this = this let _this = this
@ -127,6 +128,7 @@ export class PageTwoNameComponent implements OnInit {
} }
}, },
grid: { grid: {
containLabel:true,
top:this.padHw?100: 80, top:this.padHw?100: 80,
//bottom: 10 //bottom: 10
}, },
@ -134,15 +136,13 @@ export class PageTwoNameComponent implements OnInit {
id:this.organizationId, id:this.organizationId,
type: 'category', type: 'category',
data: this.zhiNameData, data: this.zhiNameData,
axisLabel:{ axisLabel:this.padHw?this.axisLabel:{
//this.axisLabel, //this.axisLabel,
textStyle:{ textStyle:{
fontSize :16, fontSize :16,
color:'#000000' color:'#000000'
}, },
interval: 0, interval: 0,
}, },
}, },
yAxis: { yAxis: {

44
src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-05 13:50:45 * @Date: 2020-09-05 13:50:45
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-03-31 16:32:39 * @LastEditTime: 2021-04-07 10:51:10
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
@ -28,11 +28,18 @@ export class PageZhongDuiDetailsComponent implements OnInit {
lastid lastid
tabledata tabledata
organizationId=[] organizationId=[]
padHw
ngOnInit(): void { ngOnInit(): void {
if(sessionStorage.getItem('refresh') === 'true') { if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh'); sessionStorage.removeItem('refresh');
location.reload(); location.reload();
} }
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
//this.padjt=
}else{
this.padHw=false
}
let level:string; let level:string;
this.route.queryParams.subscribe(param=>{ this.route.queryParams.subscribe(param=>{
//this.headtext=param.headtext //this.headtext=param.headtext
@ -73,12 +80,42 @@ export class PageZhongDuiDetailsComponent implements OnInit {
//this.echartsData.statefulInspectionToggle = true //this.echartsData.statefulInspectionToggle = true
} }
axisLabel = {
interval: 0,
//rotate:-30,
textStyle:{
fontSize :15,
color:'#000000'
},
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两个字换行
detailPlanEchart detailPlanEchart
detailEcharts(){ detailEcharts(){
this.detailPlanEchart = echarts.init(document.getElementById('detailBox'),'walden'); this.detailPlanEchart = echarts.init(document.getElementById('detailBox'),'walden');
var option = { var option = {
title: { title: {
text: this.headName, text: this.headName+`总数(${this.tabledata[0].totalCount})`,
left: "center", left: "center",
top: "0", top: "0",
textStyle: { textStyle: {
@ -86,6 +123,7 @@ export class PageZhongDuiDetailsComponent implements OnInit {
} }
}, },
grid: { grid: {
containLabel:true,
top: 110, top: 110,
//bottom: 10 //bottom: 10
}, },
@ -93,7 +131,7 @@ export class PageZhongDuiDetailsComponent implements OnInit {
id:this.organizationId, id:this.organizationId,
type: 'category', type: 'category',
data: this.zhongNameData, data: this.zhongNameData,
axisLabel:{ axisLabel:this.padHw?this.axisLabel: {
//this.axisLabel, //this.axisLabel,
interval: 0, interval: 0,
textStyle:{ textStyle:{

Loading…
Cancel
Save