Browse Source

[合并] 合并代码

master
陈鹏飞 4 years ago
parent
commit
5e61d96d1c
  1. 8
      src/app/statistic-analysis/deleteUnit/delete-one/delete-one.component.ts
  2. 3
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts
  3. 21
      src/app/statistic-analysis/home/home.component.html
  4. 5
      src/app/statistic-analysis/home/home.component.scss
  5. 334
      src/app/statistic-analysis/home/home.component.ts
  6. 27
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
  7. 26
      src/app/statistic-analysis/state/page-one/page-one.component.ts

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

@ -33,12 +33,10 @@ export class DeleteOneComponent implements OnInit {
var options={
title: {
text: '删除单位统计(8900家)',
//subtext: '纯属虚构',
//padding:[120,100],
left: 'center',
top: "7%",
textStyle:{
fontSize:38
fontSize:31
}
},
tooltip: {
@ -57,8 +55,8 @@ export class DeleteOneComponent implements OnInit {
right: 150,
top:80,
//padding:20,
itemWidth:60,
itemHeight:25,
// itemWidth:60,
// itemHeight:25,
/* textStyle:{
fontSize:28
}, */

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

@ -138,8 +138,6 @@ export class DeleteTwoComponent implements OnInit {
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';
@ -251,7 +249,6 @@ export class DeleteTwoComponent implements OnInit {
}]
};
this.headZx.on('click', (params) => {
console.log(params)
if(`${headtext}`!=="删除数量总统计"){
this.echartsData.statefulInspectionName =params.name+headtext;
this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_there`);

21
src/app/statistic-analysis/home/home.component.html

@ -54,21 +54,18 @@
<div class="number-box">
<div class="number-tit" style="color: white;">预案编制总量</div>
<ul class="count-number">
<li class="count-num-item"><span class="num">0</span></li>
<li class="count-num-item"><span class="num">2</span></li>
<li class="count-num-item"><span class="num">2</span></li>
<li class="count-num-item"><span class="num">6</span></li>
<li class="count-num-item"><span class="num">7</span></li>
<li class="count-num-item"><span class="num">8</span></li>
<li class="count-num-item" *ngFor="let item of planNum">
<span class="num">{{item}}</span>
</li>
</ul>
</div>
<div class="number-item">
<div class="item-tit">重点单位总量</div>
<div class="item-txt" id="number01">8036</div>
<div class="item-txt" id="number01">{{keyUnitNum}}</div>
</div>
<div class="number-item">
<div class="item-tit">数据采集总量</div>
<div class="item-txt" id="number02">6578</div>
<div class="item-txt" id="number02">{{dataGetNum}}</div>
</div>
</div>
<!-- 图表 -->
@ -85,19 +82,19 @@
<div class="total-box">
<div class="total-item" (click)="threePlan()">
<div class="total-name">三维预案总数</div>
<div class="total-num">4374</div>
<div class="total-num">{{threePlanNum}}</div>
</div>
<div class="total-item" (click)="twoPlan()">
<div class="total-name">二维预案总数</div>
<div class="total-num">9693</div>
<div class="total-num">{{twoPlanNum}}</div>
</div>
<div class="total-item" (click)="cardPlan()">
<div class="total-name">卡片预案总数</div>
<div class="total-num">6403</div>
<div class="total-num">{{cardPlanNum}}</div>
</div>
<div class="total-item" (click)="otherPlan()">
<div class="total-name">其他预案总数</div>
<div class="total-num">2208</div>
<div class="total-num">{{otherPlanNum}}</div>
</div>
</div>
</div>

5
src/app/statistic-analysis/home/home.component.scss

@ -19,8 +19,3 @@
height: 25px!important;
line-height: 25px!important;
}
#chartZdgzqy{
div{
height: 298px!important;
}
}

334
src/app/statistic-analysis/home/home.component.ts

@ -133,7 +133,6 @@ export class HomeComponent implements OnInit {
let props = feature.properties;
adcode = props.adcode
// console.log(props)
let fillColor2
if(props.level == 'city'){
fillColor2 = null
@ -183,26 +182,17 @@ export class HomeComponent implements OnInit {
this.map.setFitView(districtExplorer.getAllFeaturePolygons());
});
// this.chartQusj.setOption(this.chartQusjOption2);
// this.chartYadwlx.setOption(this.chartYadwlxOption2);
// if(sessionStorage.getItem("realName") == "上海总队"){
// this.chartYapyph.setOption(this.chartYapyphOption4);
// }else{
// this.chartYapyph.setOption(this.chartYapyphOption2);
// }
// this.chartYapyph.setOption(this.chartYapyphOption2);
// this.chartYalxtj.setOption(this.chartYalxtjOption2);
// console.log(props)
//同时设置地图中心点和缩放级别
// this.map.setZoomAndCenter(9.4, props.center);
// this.map.setBounds(areaNode.getBounds(), null, null, true);
// this.router.navigate([`/home/detail`],{queryParams:{'code':props.adcode,'level':props.level}})
// this.mapInit ()
// this.keyUnitNum = '666'
// this.dataNum = '456'
// this.planNum = '2,678'
this.planState.setOption(this.planStateOptionsZhong);
this.chartDwsjcj.setOption(this.chartDwsjcjOptionsZhong);
this.chartZdgzqy.setOption(this.chartZdgzqyOptionsZhong);
this.planNum = ["0","0","3","1","6","5"]
this.keyUnitNum = 666
this.dataGetNum = 456
this.threePlanNum = "867"
this.twoPlanNum = "485"
this.cardPlanNum = "756"
this.otherPlanNum = "658"
});
districtExplorer.on('outsideClick', (e) => {
@ -255,50 +245,46 @@ export class HomeComponent implements OnInit {
// 更新地图视野以适合区划面
this.map.setFitView(districtExplorer.getAllFeaturePolygons());
});
// this.chartQusj.setOption(this.chartQusjOption);
// this.chartYadwlx.setOption(this.chartYadwlxOption);
// if(sessionStorage.getItem("realName") == "上海总队"){
// this.chartYapyph.setOption(this.chartYapyphOption3);
// }else{
// this.chartYapyph.setOption(this.chartYapyphOption);
// }
// // this.chartYapyph.setOption(this.chartYapyphOption);
// this.chartYalxtj.setOption(this.chartYalxtjOption);
// this.keyUnitNum = '8,036'
// this.dataNum = '6,578'
// this.planNum = '22,678'
this.planState.setOption(this.planStateOptionsZhi);
this.chartDwsjcj.setOption(this.chartDwsjcjOptionsZhi);
this.chartZdgzqy.setOption(this.chartZdgzqyOptionsZhi);
this.planNum = ["0","2","2","6","7","8"]
this.keyUnitNum = 8036
this.dataGetNum = 6578
this.threePlanNum = "4374"
this.twoPlanNum = "9693"
this.cardPlanNum = "6403"
this.otherPlanNum = "2208"
})
});
}
planNum = ["0","2","2","6","7","8"]
keyUnitNum = 8036
dataGetNum = 6578
threePlanNum = "4374"
twoPlanNum = "9693"
cardPlanNum = "6403"
otherPlanNum = "2208"
ngAfterViewInit(): void {
}
planState
//预案状态统计
unitType () {
this.planState = echarts.init(document.getElementById('chartHynyxf'), 'skinUpp');
var options={
planStateOptionsZhi = {
title: {
text: '预案状态统计(7005份)',
left: 'center',
// top:-3
// textStyle:{
// fontSize:38
// }
},
tooltip: {
trigger: 'item',
formatter: '{b} : {c} ({d}%)'
},
// legend: {
// orient: 'vertical',
// top:20,
// data: ['预案新增', '预案审核通过', '预案编制', '预案审核退回', '预案审核中']
// },
series: [
{
name: '访问来源',
@ -332,7 +318,53 @@ export class HomeComponent implements OnInit {
}
]
};
this.planState.setOption(options);
planStateOptionsZhong = {
title: {
text: '预案状态统计(895份)',
left: 'center',
},
tooltip: {
trigger: 'item',
formatter: '{b} : {c} ({d}%)'
},
series: [
{
name: '访问来源',
type: 'pie',
radius: '65%',
center: ['50%', '67%'],
label:{
show:true,
formatter:'{b}\n{d|{c}份}',
rich: {
d: {
align: 'center',
}
},
},
data: [
{value: 200, name: '预案新增'},
{value: 234, name: '预案审核通过',itemStyle:{color:'#02A7F0'}},
{value: 165, name: '预案编制'},
{value: 189, name: '预案审核退回'},
{value: 211, name: '预案审核中'}
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
//预案状态统计
unitType () {
this.planState = echarts.init(document.getElementById('chartHynyxf'), 'skinUpp');
this.planState.setOption(this.planStateOptionsZhi);
this.planState.on("click",(params) => {
this.router.navigate(['/statisticanalysis/statePageOne'])
})
@ -340,9 +372,7 @@ export class HomeComponent implements OnInit {
//新增、删除单位统计
chartDwsjcj
unitData () {
this.chartDwsjcj = echarts.init(document.getElementById('chartDwsjcj'), 'skinUpp');
var option = {
chartDwsjcjOptionsZhi = {
color: ['#FB33C2', '#00CFF0', '#2C3DE0'],
// 标题
title: {
@ -463,12 +493,130 @@ export class HomeComponent implements OnInit {
}
],
};
if(sessionStorage.getItem("realName") == "上海总队"){
option.xAxis.data = ['上海总队','浦东支队','黄浦支队','徐汇支队','长宁支队','静安支队','普陀支队','虹口支队','杨浦支队','闵行支队','宝山支队','青浦支队','松江支队','金山支队','崇明支队','滨海支队']
}else{
option.xAxis.data = ['渝北区消防救援支队', '黔江区消防救援支队', '大渡口区消防救援支队', '南岸区消防救援支队', '北培区消防救援支队', '渝中区消防救援支队', '万州区消防救援支队', '涪陵区消防救援支队', '江北区消防救援支队', '九龙仓区消防救援支队', '沙坪坝区消防救援支队', '九龙坡区消防救援支队', '长寿区消防救援支队', '巴南区消防救援支队', '江津区消防救援支队', '合川区消防救援支队', '南川区消防救援支队']
chartDwsjcjOptionsZhong = {
color: ['#FB33C2', '#00CFF0', '#2C3DE0'],
// 标题
title: {
text: '新增、删除单位统计',
left: 0,
top: 0,
},
grid: {
left: 30,
right: 0,
},
//图例
legend: {
top: 0,
data: ['新增单位', '删除单位', ],
icon: 'circle',
itemGap: 20,
},
//提示框
tooltip: {
trigger: 'axis',
},
// x轴
xAxis: {
type: 'category',
data: [],
axisLabel: {
interval: 0,
formatter:function(value){
var ret = "";//拼接加\n返回的类目项
var maxLength = 5;//每项显示文字个数
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;
}
} //function
}
},
// y轴
yAxis: {
type: 'value',
splitLine: {
show: true,
lineStyle: {
color: 'rgba(255,255,255,.4)'
}
},
},
// 数据
series: [
{
name: '新增单位',
type: 'bar',
data: [88, 45, 95, 105, 75, 89, 69, 110, 96, 90, 80, 78, 94, 102, 94, 86, 77, ],
label: {
show: false,
position: "top",
formatter: '{c}',
color: "#fff",
},
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(254,51,194,1)' // 0% 处的颜色
}, {
offset: 1,
color: 'rgba(254,51,194,.5)' // 100% 处的颜色
}],
global: false // 缺省为 false
}
}
}, {
name: '删除单位',
type: 'bar',
data: [35, 33, 27, 30, 35, 36, 28, 32, 36, 22, 19, 28, 34, 36, 37, 30, 29, ],
label: {
show: false,
position: "top",
formatter: '{c}',
color: "#fff",
},
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(0,220,254,1)' // 0% 处的颜色
}, {
offset: 1,
color: 'rgba(1,104,191,1)' // 100% 处的颜色
}],
globalCoord: false // 缺省为 false
},
}
this.chartDwsjcj.setOption(option);
}
],
};
unitData () {
this.chartDwsjcj = echarts.init(document.getElementById('chartDwsjcj'), 'skinUpp');
this.chartDwsjcj.setOption(this.chartDwsjcjOptionsZhi);
this.chartDwsjcj.on("click",(params) => {
if(params.seriesName == "新增单位"){
this.router.navigate(['/statisticanalysis/addUnit_one'])
@ -479,10 +627,7 @@ export class HomeComponent implements OnInit {
}
chartZdgzqy
//建筑类型统计
keyUnit () {
this.chartZdgzqy = echarts.init(document.getElementById('chartZdgzqy'), 'skinUpp');
let options={
chartZdgzqyOptionsZhi = {
title: {
text: '建筑类型统计(8900家)',
left: 'center',
@ -545,7 +690,74 @@ export class HomeComponent implements OnInit {
}
]
};
this.chartZdgzqy.setOption(options);
chartZdgzqyOptionsZhong = {
title: {
text: '建筑类型统计(1015家)',
left: 'center',
top: -3,
// textStyle: {
// fontSize:31
// }
},
tooltip: {
trigger: 'item',
formatter: '{b} : {c}家 ({d}%)'
},
// legend: {
// orient: 'vertical',
// right: 150,
// top:80,
// data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道']
// },
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '60%'],
label:{
show:true,
// fontSize:13,
formatter:'{b}{c}家',
rich: {
d: {
align: 'center',
}
},
},
data: [
{value: 123, name: '高层'},
{value: 105, name: '地下'},
{value: 95, name: '轨道交通'},
{value: 96, name: '化工生产'},
{value: 89, name: '储罐类'},
{value: 111, name: '厂房'},
{value: 95, name: '古建筑'},
{value: 94, name: '商市场'},
{value: 85, name: '医院'},
{value: 83, name: '学校'},
{value: 81, name: '宾馆'},
{value: 79, name: '娱乐场所'},
{value: 82, name: '餐饮业'},
{value: 97, name: '影剧院'},
{value: 82, name: '展览建筑'},
{value: 72, name: '隧道'}
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
//建筑类型统计
keyUnit () {
this.chartZdgzqy = echarts.init(document.getElementById('chartZdgzqy'), 'skinUpp');
this.chartZdgzqy.setOption(this.chartZdgzqyOptionsZhi);
this.chartZdgzqy.on("click",(params) => {
this.router.navigate(['/statisticanalysis/buildingType_one'])
})

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

@ -31,10 +31,10 @@ export class ScheduledUpdatesComponent implements OnInit {
var options={
title: {
text: '计划更新统计(7100家)',
padding:[80,100],
top: "7%",
left: 'center',
textStyle:{
fontSize:34
fontSize:31
}
},
tooltip: {
@ -51,24 +51,29 @@ export class ScheduledUpdatesComponent implements OnInit {
orient: 'vertical',
right: 150,
top:80,
itemWidth:60,
itemHeight:25,
textStyle:{
fontSize:28
},
// itemWidth:60,
// itemHeight:25,
// textStyle:{
// fontSize:28
// },
data: ['已核查无需修改', '已核查修改中', '已核查提交审核', '未核查']
},
series: [{
name: '访问来源',
type: 'pie',
radius: '65%',
radius: '60%',
center: ['50%', '60%'],
label:{
normal:{
show:true,
position: 'inner',
fontSize:18,
formatter:'{d}% ({c}家)'
// position: 'inner',
// fontSize:18,
formatter:'{b} {c}家\n{d|({d}%)}',
rich: {
d: {
align: 'center',
}
},
}},
data: [
{value: 2000, name: '已核查无需修改'},

26
src/app/statistic-analysis/state/page-one/page-one.component.ts

@ -39,11 +39,10 @@ export class PageOneComponent implements OnInit {
var options={
title: {
text: '预案状态统计(7005家)',
//subtext: '纯属虚构',
padding:[80,100],
top: "7%",
left: 'center',
textStyle:{
fontSize:38
fontSize:31
}
},
tooltip: {
@ -62,10 +61,10 @@ export class PageOneComponent implements OnInit {
right: 150,
top:80,
//padding:20,
itemWidth:60,
itemHeight:25,
// itemWidth:60,
// itemHeight:25,
textStyle:{
fontSize:28
// fontSize:28
},
data: ['预案新增', '预案审核通过', '预案编制', '预案审核退回', '预案审核中']
},
@ -73,15 +72,20 @@ export class PageOneComponent implements OnInit {
{
name: '访问来源',
type: 'pie',
radius: '65%',
center: ['50%', '60%'],
radius: '60%',
center: ['50%', '50%'],
label:{
normal:{
show:true,
position: 'inner',
fontSize:18,
formatter:'{c} ({d}%)'
// position: 'inner',
// fontSize:18,
formatter:'{b} {c}\n{d|({d}%)}'
},
rich: {
d: {
align: 'center',
}
},
},
data: [

Loading…
Cancel
Save