|
|
|
@ -18,8 +18,8 @@ export class ScheduledUpdatesComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.initCharts("pie") |
|
|
|
|
this.initCharts("pieTwo") |
|
|
|
|
this.getechartsdata() |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -52,13 +52,25 @@ export class ScheduledUpdatesComponent implements OnInit {
|
|
|
|
|
this.echartsData.buildingName=this.chaxun |
|
|
|
|
this.echartsData.tableShow=true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
async getechartsdata(){ |
|
|
|
|
await this.echartsData.getData(null,`/api/StatisticsAnalysis/Companies/Maintained`) |
|
|
|
|
this.tabledata1=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
console.log(this.tabledata1) |
|
|
|
|
this.initCharts("pie") |
|
|
|
|
await this.echartsData.getData(null,`/api/StatisticsAnalysis/Companies/Maintaining`) |
|
|
|
|
this.tabledata2=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
console.log(this.tabledata2) |
|
|
|
|
this.initCharts("pieTwo") |
|
|
|
|
} |
|
|
|
|
/* 首页饼状图 */ |
|
|
|
|
tabledata1 |
|
|
|
|
tabledata2 |
|
|
|
|
initCharts(pieid){ |
|
|
|
|
this.example= echarts.init(document.getElementById(pieid),'walden'); |
|
|
|
|
var options={ |
|
|
|
|
title: { |
|
|
|
|
text: pieid=="pie"?'已维护统计(0家)':'计划维护统计(0家)', |
|
|
|
|
text: pieid=="pie"?`已维护统计(${this.tabledata1[0].totalCount}家)`:`计划维护统计(${this.tabledata2[0].totalCount}家)`, |
|
|
|
|
top: "3%", |
|
|
|
|
left: 'center', |
|
|
|
|
textStyle:{ |
|
|
|
@ -103,13 +115,13 @@ export class ScheduledUpdatesComponent implements OnInit {
|
|
|
|
|
}, |
|
|
|
|
}}, |
|
|
|
|
data:pieid=="pie"? [ |
|
|
|
|
{value: 0, name: '维护无需修改'}, |
|
|
|
|
{value: 0, name: '维护修改',itemStyle:{color:'#02A7F0'}}, |
|
|
|
|
{value: 0, name: '维护删除',itemStyle:{color:'#87cebb'}}, |
|
|
|
|
{value: this.tabledata1[0].preservedCount.totalCount, name: '维护无需修改'}, |
|
|
|
|
{value: this.tabledata1[0].updatedCount.totalCount, name: '维护修改',itemStyle:{color:'#02A7F0'}}, |
|
|
|
|
{value: this.tabledata1[0].deletedCount.totalCount, name: '维护删除',itemStyle:{color:'#87cebb'}}, |
|
|
|
|
]:[ |
|
|
|
|
{value: 0, name: '未维护'}, |
|
|
|
|
{value: 0, name: '维护通过审核',itemStyle:{color:'#02A7F0'}}, |
|
|
|
|
{value: 0, name: '维护中',itemStyle:{color:'#87cebb'}}, |
|
|
|
|
{value: this.tabledata2[0].unMaintainCount.totalCount, name: '未维护'}, |
|
|
|
|
{value: this.tabledata2[0].maintainedCount.totalCount, name: '维护通过审核',itemStyle:{color:'#02A7F0'}}, |
|
|
|
|
{value: this.tabledata2[0].maintainingCount.totalCount, name: '维护中',itemStyle:{color:'#87cebb'}}, |
|
|
|
|
], |
|
|
|
|
emphasis: { |
|
|
|
|
itemStyle: { |
|
|
|
@ -150,8 +162,15 @@ export class ScheduledUpdatesComponent implements OnInit {
|
|
|
|
|
//console.log(this.echartsData.scheduledUpdatesToggle)
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dwOryuan='danwei' |
|
|
|
|
//点击单位按钮
|
|
|
|
|
danweiClick(){ |
|
|
|
|
this.dwOryuan='danwei' |
|
|
|
|
} |
|
|
|
|
//点击预案按钮
|
|
|
|
|
yuanClick(){ |
|
|
|
|
this.dwOryuan='yuan' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//首页条件查询
|
|
|
|
|