|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
|
declare var AMap: any; |
|
|
|
|
declare var AMapUI: any; |
|
|
|
@ -9,12 +10,12 @@ import * as echarts from 'echarts';
|
|
|
|
|
}) |
|
|
|
|
export class HomeComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor() { } |
|
|
|
|
constructor(private http: HttpClient) { } |
|
|
|
|
taskNumCharts |
|
|
|
|
taskNumChartsOption = { |
|
|
|
|
title: [ |
|
|
|
|
{ |
|
|
|
|
text: `{val|100}\n{name|单位总数}`, |
|
|
|
|
text: `{val|195}\n{name|任务总数}`, |
|
|
|
|
top: 'center', |
|
|
|
|
left: '61%', |
|
|
|
|
textStyle: { |
|
|
|
@ -77,9 +78,9 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
show: false |
|
|
|
|
}, |
|
|
|
|
data: [ |
|
|
|
|
{ value: 48, name: '上级派发任务' }, |
|
|
|
|
{ value: 20, name: '自主任务' }, |
|
|
|
|
{ value: 32, name: '协助任务' } |
|
|
|
|
{ value: 37, name: '上级派发任务' }, |
|
|
|
|
{ value: 56, name: '自主任务' }, |
|
|
|
|
{ value: 102, name: '协助任务' } |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
@ -123,7 +124,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
}, |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
data: [20, 16, 30, 20, 60, 80, 55, 90, 60, 70, 50, 20], |
|
|
|
|
data: [8, 7, 8, 6, 11, 16, 18, 10, 14, 10, 9, 5], |
|
|
|
|
type: 'line', |
|
|
|
|
showSymbol: false,//去除面积图节点圆
|
|
|
|
|
smooth: true,//面积图改成弧形状
|
|
|
|
@ -144,7 +145,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
completionOfTaskPieOption = { |
|
|
|
|
title: [ |
|
|
|
|
{ |
|
|
|
|
text: `{val|260}\n{name|任务总数}`, |
|
|
|
|
text: `{val|195}\n{name|任务总数}`, |
|
|
|
|
top: 'center', |
|
|
|
|
left: '26%', |
|
|
|
|
textStyle: { |
|
|
|
@ -207,8 +208,8 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
show: false |
|
|
|
|
}, |
|
|
|
|
data: [ |
|
|
|
|
{ value: 180, name: '已完成' }, |
|
|
|
|
{ value: 80, name: '未完成' } |
|
|
|
|
{ value: 157, name: '已完成' }, |
|
|
|
|
{ value: 38, name: '未完成' } |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
@ -305,7 +306,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
emphasis: { |
|
|
|
|
focus: 'series' |
|
|
|
|
}, |
|
|
|
|
data: [20, 20, 30, 10, 20, 30, 40, 50, 50, 40, 20, 30, 40] |
|
|
|
|
data: [8, 17, 10, 14, 8, 16, 10, 11, 10, 15, 9, 10, 18] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '未完成', |
|
|
|
@ -318,7 +319,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
emphasis: { |
|
|
|
|
focus: 'series' |
|
|
|
|
}, |
|
|
|
|
data: [30, 10, 20, 10, 20, 30, 40, 30, 50, 40, 20, 10, 30] |
|
|
|
|
data: [3, 2, 1, 5, 3, 3, 4, 5, 2, 3, 4, 2, 2] |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}; |
|
|
|
@ -333,9 +334,17 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
this.disqualificationUnitCharts = echarts.init(document.getElementById('disqualificationUnit'), null, { devicePixelRatio: 2 }); |
|
|
|
|
this.completionOfTaskPie = echarts.init(document.getElementById('completionOfTask1'), null, { devicePixelRatio: 2 }); |
|
|
|
|
this.completionOfTaskBar = echarts.init(document.getElementById('completionOfTask2'), null, { devicePixelRatio: 2 }); |
|
|
|
|
|
|
|
|
|
this.getData() |
|
|
|
|
this.echartsSetData() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获得统计数据
|
|
|
|
|
getData() { |
|
|
|
|
this.http.get('/api/PlanTasks/Dashboard').subscribe((data: any) => { |
|
|
|
|
console.log('统计数据', data) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echartsSetData() { |
|
|
|
|
this.taskNumCharts && this.taskNumCharts.setOption(this.taskNumChartsOption); |
|
|
|
@ -345,36 +354,46 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
assistTaskRankingData = [ |
|
|
|
|
{ name: '济南市消防救援支队', num: 120, url: "../../../../assets/statistic-analysis/one.png" }, |
|
|
|
|
{ name: '历下区大队', num: 100, url: "../../../../assets/statistic-analysis/two.png" }, |
|
|
|
|
{ name: '南部山区大队', num: 80, url: "../../../../assets/statistic-analysis/three.png" }, |
|
|
|
|
{ name: '市中区大队', num: 60, url: "../../../../assets/statistic-analysis/four.png" }, |
|
|
|
|
{ name: '天桥区大队', num: 40, url: "../../../../assets/statistic-analysis/five.png" } |
|
|
|
|
{ name: '济南市消防救援支队', num: 28, url: "../../../../assets/statistic-analysis/one.png" }, |
|
|
|
|
{ name: '历下区大队', num: 25, url: "../../../../assets/statistic-analysis/two.png" }, |
|
|
|
|
{ name: '南部山区大队', num: 18, url: "../../../../assets/statistic-analysis/three.png" }, |
|
|
|
|
{ name: '市中区大队', num: 16, url: "../../../../assets/statistic-analysis/four.png" }, |
|
|
|
|
{ name: '天桥区大队', num: 15, url: "../../../../assets/statistic-analysis/five.png" } |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
rankingList1 = [ |
|
|
|
|
{ name: '济南市消防救援支队', num: 80, type: "up" }, |
|
|
|
|
{ name: '历下区大队', num: 75, type: "down" }, |
|
|
|
|
{ name: '南部山区大队', num: 75, type: "up" }, |
|
|
|
|
{ name: '市中区大队', num: 75, type: "up" }, |
|
|
|
|
{ name: '槐荫区大队', num: 70, type: "up" }, |
|
|
|
|
{ name: '天桥区大队', num: 60, type: "up" } |
|
|
|
|
{ name: '济南市消防救援支队', num: 80, type: "up", changeNum: 1 }, |
|
|
|
|
{ name: '历下区大队', num: 75, type: "down", changeNum: 1 }, |
|
|
|
|
{ name: '南部山区大队', num: 75, type: "up", changeNum: 2 }, |
|
|
|
|
{ name: '市中区大队', num: 75, type: "up", changeNum: 1 }, |
|
|
|
|
{ name: '槐荫区大队', num: 70, type: "up", changeNum: 3 }, |
|
|
|
|
{ name: '天桥区大队', num: 60, type: "up", changeNum: 1 } |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rankingList2 = [ |
|
|
|
|
{ name: '长清区大队', num: 120, type: "up" }, |
|
|
|
|
{ name: '章丘区大队', num: 100, type: "down" }, |
|
|
|
|
{ name: '平阴县消防救援大队', num: 95, type: "down" }, |
|
|
|
|
{ name: '商河县消防救援大队', num: 90, type: "up" }, |
|
|
|
|
{ name: '济阳县消防救援大队', num: 40, type: "up" }, |
|
|
|
|
{ name: '莱芜区消防救援大队', num: 35, type: "up" } |
|
|
|
|
{ name: '历下区大队', num: 100, type: "up", changeNum: 2 }, |
|
|
|
|
{ name: '高新技术产业开发区大队', num: 90, type: "down", changeNum: 1 }, |
|
|
|
|
{ name: '槐荫区大队', num: 88, type: "down", changeNum: 1 }, |
|
|
|
|
{ name: '天桥区大队', num: 80, type: "up", changeNum: 2 }, |
|
|
|
|
{ name: '历城区大队', num: 70, type: "up", changeNum: 1 }, |
|
|
|
|
{ name: '长清区大队', num: 53, type: "up", changeNum: 2 }, |
|
|
|
|
{ name: '南部山区大队', num: 80, type: "up", changeNum: 1 }, |
|
|
|
|
{ name: '章丘区大队', num: 70, type: "up", changeNum: 1 }, |
|
|
|
|
{ name: '平阴县大队', num: 53, type: "down", changeNum: 1 }, |
|
|
|
|
{ name: '济阳区大队', num: 80, type: "up", changeNum: 1 }, |
|
|
|
|
{ name: '市中区大队', num: 70, type: "down", changeNum: 2 }, |
|
|
|
|
{ name: '商河县大队', num: 53, type: "down", changeNum: 3 }, |
|
|
|
|
{ name: '莱芜区大队', num: 80, type: "down", changeNum: 1 }, |
|
|
|
|
{ name: '钢城区大队', num: 70, type: "up", changeNum: 3 }, |
|
|
|
|
{ name: '起步区大队', num: 50, type: "down", changeNum: 2 }, |
|
|
|
|
{ name: '特勤大队', num: 50, type: "up", changeNum: 2 }, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
maocard = [ |
|
|
|
|
{ name: "重点单位数量", num: 72674, url: '../../../../assets/statistic-analysis/unit.png' }, |
|
|
|
|
{ name: "不合格单位数量", num: 674, url: '../../../../assets/statistic-analysis/ununit.png' }, |
|
|
|
|
{ name: "协作任务数量", num: 32260, url: '../../../../assets/statistic-analysis/task.png' } |
|
|
|
|
{ name: "重点单位数量", num: 19273, url: '../../../../assets/statistic-analysis/unit.png' }, |
|
|
|
|
{ name: "不合格单位数量", num: 121, url: '../../../../assets/statistic-analysis/ununit.png' }, |
|
|
|
|
{ name: "协作任务数量", num: 102, url: '../../../../assets/statistic-analysis/task.png' } |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|