|
|
@ -18,8 +18,8 @@ export class ScheduledUpdatesComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
window.setTimeout(()=>{ |
|
|
|
window.setTimeout(()=>{ |
|
|
|
this.initCharts("pie") |
|
|
|
this.getechartsdata() |
|
|
|
this.initCharts("pieTwo") |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -52,13 +52,40 @@ export class ScheduledUpdatesComponent implements OnInit { |
|
|
|
this.echartsData.buildingName=this.chaxun |
|
|
|
this.echartsData.buildingName=this.chaxun |
|
|
|
this.echartsData.tableShow=true |
|
|
|
this.echartsData.tableShow=true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//获取后端数据
|
|
|
|
|
|
|
|
async getechartsdata(){ |
|
|
|
|
|
|
|
if(this.dwOryuan=='danwei'){ |
|
|
|
|
|
|
|
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/Maintenance`) |
|
|
|
|
|
|
|
this.tabledata2=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata2) |
|
|
|
|
|
|
|
this.initCharts("pieTwo") |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
await this.echartsData.getData(null,`/api/StatisticsAnalysis/Plans/Maintained`) |
|
|
|
|
|
|
|
this.tabledata1=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata1) |
|
|
|
|
|
|
|
this.initCharts("pie") |
|
|
|
|
|
|
|
await this.echartsData.getData(null,`/api/StatisticsAnalysis/Plans/Maintenance`) |
|
|
|
|
|
|
|
this.tabledata2=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata2) |
|
|
|
|
|
|
|
this.initCharts("pieTwo") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
/* 首页饼状图 */ |
|
|
|
/* 首页饼状图 */ |
|
|
|
|
|
|
|
tabledata1 |
|
|
|
|
|
|
|
tabledata2 |
|
|
|
initCharts(pieid){ |
|
|
|
initCharts(pieid){ |
|
|
|
this.example= echarts.init(document.getElementById(pieid),'walden'); |
|
|
|
this.example= echarts.init(document.getElementById(pieid),'walden'); |
|
|
|
var options={ |
|
|
|
var options={ |
|
|
|
title: { |
|
|
|
title: { |
|
|
|
text: pieid=="pie"?'已维护统计(0家)':'计划维护统计(0家)', |
|
|
|
text: pieid=="pie"?`已维护统计(${this.tabledata1[0].totalCount}家)`:`计划维护统计(${this.tabledata2[0].totalCount}家)`, |
|
|
|
top: "3%", |
|
|
|
top: "3%", |
|
|
|
left: 'center', |
|
|
|
left: 'center', |
|
|
|
textStyle:{ |
|
|
|
textStyle:{ |
|
|
@ -68,7 +95,8 @@ export class ScheduledUpdatesComponent implements OnInit { |
|
|
|
tooltip: { |
|
|
|
tooltip: { |
|
|
|
trigger: 'item', |
|
|
|
trigger: 'item', |
|
|
|
formatter: (params)=>{ |
|
|
|
formatter: (params)=>{ |
|
|
|
return this.echartsData.tableTooltip(this.selectedBtn=="tu"?this.echartsData.tableDataZhi:this.echartsData.buildingType,params.name) |
|
|
|
return this.weihu(params.data) |
|
|
|
|
|
|
|
//return this.echartsData.tableTooltip(this.selectedBtn=="tu"?this.echartsData.tableDataZhi:this.echartsData.buildingType,params.name)
|
|
|
|
}, |
|
|
|
}, |
|
|
|
position:this.echartsData.tableTooltipNoShow2 |
|
|
|
position:this.echartsData.tableTooltipNoShow2 |
|
|
|
}, |
|
|
|
}, |
|
|
@ -103,13 +131,13 @@ export class ScheduledUpdatesComponent implements OnInit { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}}, |
|
|
|
}}, |
|
|
|
data:pieid=="pie"? [ |
|
|
|
data:pieid=="pie"? [ |
|
|
|
{value: 0, name: '维护无需修改'}, |
|
|
|
{value: this.tabledata1[0].preservedCount.totalCount, name: '维护无需修改'}, |
|
|
|
{value: 0, name: '维护修改',itemStyle:{color:'#02A7F0'}}, |
|
|
|
{value: this.tabledata1[0].updatedCount.totalCount, name: '维护修改',itemStyle:{color:'#02A7F0'}}, |
|
|
|
{value: 0, name: '维护删除',itemStyle:{color:'#87cebb'}}, |
|
|
|
{value: this.tabledata1[0].deletedCount.totalCount, name: '维护删除',itemStyle:{color:'#87cebb'}}, |
|
|
|
]:[ |
|
|
|
]:[ |
|
|
|
{value: 0, name: '未维护'}, |
|
|
|
{value: this.tabledata2[0].unMaintainCount.totalCount, name: '未维护'}, |
|
|
|
{value: 0, name: '维护通过审核',itemStyle:{color:'#02A7F0'}}, |
|
|
|
{value: this.tabledata2[0].maintainedCount.totalCount, name: '维护通过审核',itemStyle:{color:'#02A7F0'}}, |
|
|
|
{value: 0, name: '维护中',itemStyle:{color:'#87cebb'}}, |
|
|
|
{value: this.tabledata2[0].maintainingCount.totalCount, name: '维护中',itemStyle:{color:'#87cebb'}}, |
|
|
|
], |
|
|
|
], |
|
|
|
emphasis: { |
|
|
|
emphasis: { |
|
|
|
itemStyle: { |
|
|
|
itemStyle: { |
|
|
@ -124,18 +152,17 @@ export class ScheduledUpdatesComponent implements OnInit { |
|
|
|
this.example.setOption(options); |
|
|
|
this.example.setOption(options); |
|
|
|
this.example.on('click', (params) => { |
|
|
|
this.example.on('click', (params) => { |
|
|
|
this.echartsData.findShow=true |
|
|
|
this.echartsData.findShow=true |
|
|
|
if(params.name=="维护删除"){this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two');} |
|
|
|
//if(params.name=="维护删除"){this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_two?dwOryuan=${this.dwOryuan}&type=3`);}
|
|
|
|
else{ |
|
|
|
|
|
|
|
if(pieid=="pie"){ |
|
|
|
if(pieid=="pie"){ |
|
|
|
this.echartsData.scheduledUpdatesToggle = 1 |
|
|
|
this.echartsData.scheduledUpdatesToggle = 1 |
|
|
|
this.echartsData.zhuXname=["平均值","维护无需修改","维护修改","维护删除"] |
|
|
|
//this.echartsData.zhuXname=["平均值","维护无需修改","维护修改","维护删除"]
|
|
|
|
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts'); |
|
|
|
this.router.navigateByUrl(`/statisticanalysis/scheduledUpdates/PublicEcharts?type=${params.data.name=='维护修改'?2:params.data.name=='维护无需修改'?1:3}&dwOryuan=${this.dwOryuan}&pieid=pie`); |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"] |
|
|
|
//this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"]
|
|
|
|
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
|
|
|
|
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
|
|
|
|
if(this.echartsData.level=='0'){ |
|
|
|
/* if(this.echartsData.level=='0'){ |
|
|
|
//总队跳转
|
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 2 |
|
|
|
this.echartsData.scheduledUpdatesToggle = 2 |
|
|
|
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts'); |
|
|
|
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts'); |
|
|
|
this.echartsData.findShow=false |
|
|
|
this.echartsData.findShow=false |
|
|
@ -143,15 +170,79 @@ export class ScheduledUpdatesComponent implements OnInit { |
|
|
|
this.echartsData.scheduledUpdatesToggle = 3 |
|
|
|
this.echartsData.scheduledUpdatesToggle = 3 |
|
|
|
this.echartsData.findShow=false |
|
|
|
this.echartsData.findShow=false |
|
|
|
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts'); |
|
|
|
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts'); |
|
|
|
} |
|
|
|
} */ |
|
|
|
|
|
|
|
this.echartsData.zhiorBuinding='zhi' |
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 2 |
|
|
|
|
|
|
|
this.router.navigateByUrl(`/statisticanalysis/scheduledUpdates/PublicEcharts?pieid=pieTwo&type=${params.data.name=='维护通过审核'?2:params.data.name=='未维护'?1:3}&dwOryuan=${this.dwOryuan}`); |
|
|
|
|
|
|
|
this.echartsData.findShow=false |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//console.log(this.echartsData.scheduledUpdatesToggle)
|
|
|
|
//console.log(this.echartsData.scheduledUpdatesToggle)
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
dwOryuan='danwei' |
|
|
|
|
|
|
|
//点击单位按钮
|
|
|
|
|
|
|
|
danweiClick(){ |
|
|
|
|
|
|
|
this.dwOryuan='danwei' |
|
|
|
|
|
|
|
this.example.clear() |
|
|
|
|
|
|
|
this.example.dispose() |
|
|
|
|
|
|
|
this.getechartsdata() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//点击预案按钮
|
|
|
|
|
|
|
|
yuanClick(){ |
|
|
|
|
|
|
|
this.dwOryuan='yuan' |
|
|
|
|
|
|
|
this.example.clear() |
|
|
|
|
|
|
|
this.example.dispose() |
|
|
|
|
|
|
|
this.getechartsdata() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//维护更新提示框
|
|
|
|
|
|
|
|
tishiData |
|
|
|
|
|
|
|
res |
|
|
|
|
|
|
|
weihu(datas){ |
|
|
|
|
|
|
|
if(datas.name=='维护删除'){ |
|
|
|
|
|
|
|
this.tishiData=this.tabledata1[0].deletedCount.organizationCounts |
|
|
|
|
|
|
|
}else if(datas.name=='维护无需修改'){ |
|
|
|
|
|
|
|
this.tishiData=this.tabledata1[0].preservedCount.organizationCounts |
|
|
|
|
|
|
|
}else if(datas.name=='维护修改'){ |
|
|
|
|
|
|
|
this.tishiData=this.tabledata1[0].updatedCount.organizationCounts |
|
|
|
|
|
|
|
}else if(datas.name=='维护中'){ |
|
|
|
|
|
|
|
this.tishiData=this.tabledata2[0].maintainingCount.organizationCounts |
|
|
|
|
|
|
|
}else if(datas.name=='未维护'){ |
|
|
|
|
|
|
|
this.tishiData=this.tabledata2[0].unMaintainCount.organizationCounts |
|
|
|
|
|
|
|
}else if(datas.name=='维护通过审核'){ |
|
|
|
|
|
|
|
this.tishiData=this.tabledata2[0].maintainedCount.organizationCounts |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var countall=0//总计
|
|
|
|
|
|
|
|
var countbi=0//站比
|
|
|
|
|
|
|
|
var allCountbi=0//总站比
|
|
|
|
|
|
|
|
for(var i=0;i<this.tishiData.length;i++){ |
|
|
|
|
|
|
|
countall+=this.tishiData[i].count |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>' |
|
|
|
|
|
|
|
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
|
|
|
|
|
|
|
this.res+='<thead style="font-size:18px;"><tr>'; |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;width:30%;">名称</td>'; |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;width:30%;">数量</td>' |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;width:30%;">总占比</td>' |
|
|
|
|
|
|
|
this.res+='</tr></thead>' |
|
|
|
|
|
|
|
this.res+='<tbody>'; |
|
|
|
|
|
|
|
for(var i=0;i<this.tishiData.length;i++){ |
|
|
|
|
|
|
|
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00 |
|
|
|
|
|
|
|
allCountbi=allCountbi+countbi |
|
|
|
|
|
|
|
this.res+='<tr>' |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>' |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>' |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.res+='</tbody>' |
|
|
|
|
|
|
|
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">100%</td></tfoot>' |
|
|
|
|
|
|
|
this.res+='</table></div></div>' |
|
|
|
|
|
|
|
return this.res |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//首页条件查询
|
|
|
|
//首页条件查询
|
|
|
@ -222,22 +313,22 @@ export class publicEchartsComponent implements OnInit { |
|
|
|
changeTime(e){ |
|
|
|
changeTime(e){ |
|
|
|
console.log(e) |
|
|
|
console.log(e) |
|
|
|
//this.echartsData.selectType=0
|
|
|
|
//this.echartsData.selectType=0
|
|
|
|
this.verifieds.changeTime(e.value) |
|
|
|
this.verifieds.changeTime(e.value,this.selectOneYear,this.selectStartMonth,this.selectTwoYear,this.selectEndMonth) |
|
|
|
} |
|
|
|
} |
|
|
|
//按月查询
|
|
|
|
//按月查询
|
|
|
|
monthSubmit (e) { |
|
|
|
monthSubmit (e) { |
|
|
|
|
|
|
|
console.log(this.echartsData.dateYear) |
|
|
|
if (e.selectTwoYear > e.selectOneYear) { |
|
|
|
if (e.selectTwoYear > e.selectOneYear) { |
|
|
|
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 |
|
|
|
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 |
|
|
|
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 |
|
|
|
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 |
|
|
|
// console.log(startTime)
|
|
|
|
this.verifieds.getechartsdata(this.echartsData.dateYear,e.selectStartMonth,this.echartsData.dateYear,e.selectEndMonth) |
|
|
|
// console.log(endTime)
|
|
|
|
|
|
|
|
} else if (e.selectTwoYear === e.selectOneYear) { |
|
|
|
} else if (e.selectTwoYear === e.selectOneYear) { |
|
|
|
if(e.selectEndMonth >= e.selectStartMonth) { |
|
|
|
if(e.selectEndMonth >= e.selectStartMonth) { |
|
|
|
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 |
|
|
|
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 |
|
|
|
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 |
|
|
|
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 |
|
|
|
// console.log(startTime)
|
|
|
|
// console.log(startTime)
|
|
|
|
// console.log(endTime)
|
|
|
|
// console.log(endTime)
|
|
|
|
|
|
|
|
this.verifieds.getechartsdata(this.echartsData.dateYear,e.selectStartMonth,this.echartsData.dateYear,e.selectEndMonth) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -251,9 +342,6 @@ export class publicEchartsComponent implements OnInit { |
|
|
|
this.snackBar.open('请选择正确时间区段','确定',config); |
|
|
|
this.snackBar.open('请选择正确时间区段','确定',config); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selectStartYear:any = (new Date()).getFullYear() //开始年份
|
|
|
|
selectStartYear:any = (new Date()).getFullYear() //开始年份
|
|
|
|
selectEndYear:any = (new Date()).getFullYear() //结束年份
|
|
|
|
selectEndYear:any = (new Date()).getFullYear() //结束年份
|
|
|
|
|
|
|
|
|
|
|
@ -262,6 +350,9 @@ export class publicEchartsComponent implements OnInit { |
|
|
|
if (e.selectEndYear >= e.selectStartYear) { |
|
|
|
if (e.selectEndYear >= e.selectStartYear) { |
|
|
|
let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 |
|
|
|
let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 |
|
|
|
let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 |
|
|
|
let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 |
|
|
|
|
|
|
|
e.selectStartYear+='-01' |
|
|
|
|
|
|
|
e.selectEndYear+='-12' |
|
|
|
|
|
|
|
this.verifieds.getechartsdata(e.selectStartYear,e.selectStartMonth,e.selectEndYear,e.selectEndMonth) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
@ -298,7 +389,13 @@ export class publicEchartsComponent implements OnInit { |
|
|
|
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates');
|
|
|
|
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates');
|
|
|
|
} |
|
|
|
} |
|
|
|
} */ |
|
|
|
} */ |
|
|
|
window.history.go(-1) |
|
|
|
if(this.verifieds.pieid=='pie'&& this.echartsData.scheduledUpdatesToggle>1){ |
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle-- |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates'); |
|
|
|
|
|
|
|
//window.history.go(-1)
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//更多 窗口
|
|
|
|
//更多 窗口
|
|
|
@ -308,11 +405,17 @@ export class publicEchartsComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
//支队查询
|
|
|
|
//支队查询
|
|
|
|
zhiFind(){ |
|
|
|
zhiFind(){ |
|
|
|
|
|
|
|
this.verifieds.oneEcharts.clear() |
|
|
|
|
|
|
|
this.verifieds.oneEcharts.dispose() |
|
|
|
this.echartsData.zhiorBuinding="zhi" |
|
|
|
this.echartsData.zhiorBuinding="zhi" |
|
|
|
|
|
|
|
this.verifieds.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12') |
|
|
|
} |
|
|
|
} |
|
|
|
//建筑类型查询
|
|
|
|
//建筑类型查询
|
|
|
|
buildingFind(){ |
|
|
|
buildingFind(){ |
|
|
|
|
|
|
|
this.verifieds.oneEcharts.clear() |
|
|
|
|
|
|
|
this.verifieds.oneEcharts.dispose() |
|
|
|
this.echartsData.zhiorBuinding="building" |
|
|
|
this.echartsData.zhiorBuinding="building" |
|
|
|
|
|
|
|
this.verifieds.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -329,34 +432,40 @@ export class publicEchartsComponent implements OnInit { |
|
|
|
}) |
|
|
|
}) |
|
|
|
export class verifiedComponent implements OnInit { |
|
|
|
export class verifiedComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
constructor(private router: Router,public echartsData:EchartsDataService,public snackBar: MatSnackBar) { } |
|
|
|
constructor(private router: Router,public echartsData:EchartsDataService,public snackBar: MatSnackBar, private route: ActivatedRoute) { } |
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
window.setTimeout(()=>{ |
|
|
|
window.setTimeout(()=>{ |
|
|
|
this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydatayue,this.xdatayue) |
|
|
|
if(this.echartsData.scheduledUpdatesToggle==1){ |
|
|
|
this.oneInit(this.xdatayue,this.ydatayue) |
|
|
|
this.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12') |
|
|
|
//this.twoInit()
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
},0) |
|
|
|
},0) |
|
|
|
|
|
|
|
console.log(this.echartsData.scheduledUpdatesToggle) |
|
|
|
|
|
|
|
this.pieid=this.route.snapshot.queryParams.pieid |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* ngOnDestroy () { |
|
|
|
ngOnDestroy () { |
|
|
|
this.oneEcharts.dispose() |
|
|
|
//this.oneEcharts.dispose()
|
|
|
|
this.oneEcharts.clear() |
|
|
|
//this.oneEcharts.clear()
|
|
|
|
this.items.forEach((element,index) => { |
|
|
|
} |
|
|
|
element.echart.dispose() |
|
|
|
pieid=this.route.snapshot.queryParams.pieid |
|
|
|
element.echart.clear() |
|
|
|
//TimeType=0//按月查询还是按年查询
|
|
|
|
}); |
|
|
|
async changeTime (e,selectOneYear,nselectStartMoth,selectTwoYear,selectEndMonth){ |
|
|
|
} */ |
|
|
|
console.log(e) |
|
|
|
async changeTime (e){ |
|
|
|
|
|
|
|
this.oneEcharts.clear() |
|
|
|
this.oneEcharts.clear() |
|
|
|
this.oneEcharts.dispose() |
|
|
|
this.oneEcharts.dispose() |
|
|
|
this.qipaotishi='' |
|
|
|
this.qipaotishi='' |
|
|
|
if(e=='year'){ |
|
|
|
if(e=='year'){ |
|
|
|
this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydataYear,this.xdataYear) |
|
|
|
this.echartsData.TimeType=1 |
|
|
|
this.oneInit(this.xdataYear,this.ydataYear) |
|
|
|
this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydatayue,this.xdatayue) |
|
|
|
|
|
|
|
selectOneYear=selectOneYear+'-01' |
|
|
|
|
|
|
|
selectTwoYear+='-12' |
|
|
|
|
|
|
|
this.getechartsdata(selectOneYear,nselectStartMoth,selectTwoYear,selectEndMonth) |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
|
|
|
|
this.echartsData.TimeType=0 |
|
|
|
this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydatayue,this.xdatayue) |
|
|
|
this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydatayue,this.xdatayue) |
|
|
|
this.oneInit(this.xdatayue,this.ydatayue) |
|
|
|
this.getechartsdata(selectOneYear,nselectStartMoth,selectTwoYear,selectEndMonth) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -366,34 +475,81 @@ export class verifiedComponent implements OnInit { |
|
|
|
ydatayue=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
|
|
|
ydatayue=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
|
|
|
xdataYear=['2020','2021'] |
|
|
|
xdataYear=['2020','2021'] |
|
|
|
ydataYear=['0','0'] |
|
|
|
ydataYear=['0','0'] |
|
|
|
|
|
|
|
//获取后端数据
|
|
|
|
|
|
|
|
tabledata |
|
|
|
|
|
|
|
async getechartsdata(selectStartYear,selectStartMonth,selectEndYear,selectEndMonth){ |
|
|
|
|
|
|
|
let Parameters={ |
|
|
|
|
|
|
|
MaintainedState:this.route.snapshot.queryParams.type, |
|
|
|
|
|
|
|
TimeType:this.echartsData.TimeType, |
|
|
|
|
|
|
|
TimeStart:this.echartsData.TimeType==0?selectStartYear+'-'+selectStartMonth:this.echartsData.dateYear+'-'+selectStartMonth, |
|
|
|
|
|
|
|
TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:this.echartsData.dateYear+'-'+selectEndMonth, |
|
|
|
|
|
|
|
//OrganizationId
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(this.echartsData.zhiorBuinding) |
|
|
|
|
|
|
|
if(this.echartsData.zhiorBuinding=="zhi"){ |
|
|
|
|
|
|
|
await this.echartsData.getData(Parameters,this.route.snapshot.queryParams.dwOryuan=='danwei'?
|
|
|
|
|
|
|
|
`/api/StatisticsAnalysis/Companies/Maintained/OrganizationTrend`:`/api/StatisticsAnalysis/Plans/Maintained/OrganizationTrend`) |
|
|
|
|
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata) |
|
|
|
|
|
|
|
this.xdatayue=[] |
|
|
|
|
|
|
|
this.ydatayue=[] |
|
|
|
|
|
|
|
this.tabledata[0].items.forEach(element => { |
|
|
|
|
|
|
|
this.xdatayue.push(element.date) |
|
|
|
|
|
|
|
this.ydatayue.push(element.count) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
await this.echartsData.getData(Parameters,this.route.snapshot.queryParams.dwOryuan=='danwei'? |
|
|
|
|
|
|
|
`/api/StatisticsAnalysis/Companies/Maintained/BuildingTypeTrend`:`/api/StatisticsAnalysis/Plans/Maintained/BuildingTypeTrend`) |
|
|
|
|
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata) |
|
|
|
|
|
|
|
this.xdatayue=[] |
|
|
|
|
|
|
|
this.ydatayue=[] |
|
|
|
|
|
|
|
this.tabledata[0].items.forEach(element => { |
|
|
|
|
|
|
|
this.xdatayue.push(element.date) |
|
|
|
|
|
|
|
this.ydatayue.push(element.count) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.oneInit(this.xdatayue,this.ydatayue) |
|
|
|
|
|
|
|
} |
|
|
|
//提示框表格
|
|
|
|
//提示框表格
|
|
|
|
tableTooltip(dataArr,title:string){ |
|
|
|
tishiData |
|
|
|
let data = dataArr |
|
|
|
res |
|
|
|
//console.log(data)
|
|
|
|
tableTooltip(datas){ |
|
|
|
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:26px;text-align: center;display:block;">'+title+'</span></div>' |
|
|
|
this.tishiData=this.tabledata[0].items[0].organizations |
|
|
|
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
|
|
|
var countall=0//总计
|
|
|
|
res+='<thead><tr>'; |
|
|
|
var countbi=0//站比
|
|
|
|
res+='<td style="text-align:center;width:25%;">名称</td>'; |
|
|
|
var allCountbi=0//总站比
|
|
|
|
res+='<td style="text-align:center;width:25%;">数量</td>' |
|
|
|
for(var i=0;i<this.tishiData.length;i++){ |
|
|
|
res+='<td style="text-align:center;width:25%;">环比</td>' |
|
|
|
countall+=this.tishiData[i].count |
|
|
|
res+='<td style="text-align:center;width:25%;">总占比</td>' |
|
|
|
|
|
|
|
res+='</tr></thead>' |
|
|
|
|
|
|
|
res+='<tbody>'; |
|
|
|
|
|
|
|
for(var i=0;i<data.length;i++){ |
|
|
|
|
|
|
|
res+='<tr>' |
|
|
|
|
|
|
|
res+='<td style="text-align:center;">'+data[i].name+'</td>' |
|
|
|
|
|
|
|
res+='<td style="text-align:center;">'+data[i].number+'</td>' |
|
|
|
|
|
|
|
res+='<td style="text-align:center;">'+data[i].zhanbi+'</td>' |
|
|
|
|
|
|
|
res+='<td style="text-align:center;">'+data[i].zhanbi+'</td></tr>' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas[0].axisValue+'</span></div>' |
|
|
|
res+='</tbody>' |
|
|
|
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
|
|
|
res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">1356</td><td style="text-align:center;">19%</td><td style="text-align:center;">19%</td></tfoot>' |
|
|
|
this.res+='<thead style="font-size:18px;"><tr>'; |
|
|
|
res+='</table></div></div>' |
|
|
|
this.res+='<td style="text-align:center;width:30%;">名称</td>'; |
|
|
|
return res |
|
|
|
this.res+='<td style="text-align:center;width:30%;">数量</td>' |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;width:30%;">总占比</td>' |
|
|
|
|
|
|
|
this.res+='</tr></thead>' |
|
|
|
|
|
|
|
this.res+='<tbody>'; |
|
|
|
|
|
|
|
for(var i=0;i<this.tishiData.length;i++){ |
|
|
|
|
|
|
|
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00 |
|
|
|
|
|
|
|
allCountbi=allCountbi+countbi |
|
|
|
|
|
|
|
this.res+='<tr>' |
|
|
|
|
|
|
|
if(this.echartsData.zhiorBuinding=='zhi'){ |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;">'+ this.tishiData[i].organizationName+'</td>' |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;">'+ this.tishiData[i].buildingTypeName+'</td>' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>' |
|
|
|
|
|
|
|
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.res+='</tbody>' |
|
|
|
|
|
|
|
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">100%</td></tfoot>' |
|
|
|
|
|
|
|
this.res+='</table></div></div>' |
|
|
|
|
|
|
|
return this.res |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//图形数据
|
|
|
|
oneInit (xdata,ydata) { |
|
|
|
oneInit (xdata,ydata) { |
|
|
|
|
|
|
|
|
|
|
|
this.oneEcharts = echarts.init(document.getElementById('center'),'walden'); |
|
|
|
this.oneEcharts = echarts.init(document.getElementById('center'),'walden'); |
|
|
|
var option = { |
|
|
|
var option = { |
|
|
|
grid: { |
|
|
|
grid: { |
|
|
@ -404,7 +560,7 @@ export class verifiedComponent implements OnInit { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 标题
|
|
|
|
// 标题
|
|
|
|
title: { |
|
|
|
title: { |
|
|
|
text: '已核查'+'总数:(0)', |
|
|
|
text: `已核查 总数:(${this.tabledata[0].totalCount})`, |
|
|
|
top: -4, |
|
|
|
top: -4, |
|
|
|
left: 'center', |
|
|
|
left: 'center', |
|
|
|
textStyle:{ |
|
|
|
textStyle:{ |
|
|
@ -420,7 +576,8 @@ export class verifiedComponent implements OnInit { |
|
|
|
borderWidth:'1', |
|
|
|
borderWidth:'1', |
|
|
|
borderRadius :'0', */ |
|
|
|
borderRadius :'0', */ |
|
|
|
formatter: (params)=>{ |
|
|
|
formatter: (params)=>{ |
|
|
|
return this.echartsData.zhiorBuinding=="zhi"?this.echartsData.tableTooltip(this.echartsData.tableDataZhi,params[0].name):this.echartsData.tableTooltip(this.echartsData.buildingType,params[0].name) |
|
|
|
return this.tableTooltip(params) |
|
|
|
|
|
|
|
//return this.echartsData.zhiorBuinding=="zhi"?this.echartsData.tableTooltip(this.echartsData.tableDataZhi,params[0].name):this.echartsData.tableTooltip(this.echartsData.buildingType,params[0].name)
|
|
|
|
}, |
|
|
|
}, |
|
|
|
position:this.echartsData.tableTooltipNoShow2 |
|
|
|
position:this.echartsData.tableTooltipNoShow2 |
|
|
|
}, |
|
|
|
}, |
|
|
@ -490,15 +647,19 @@ export class verifiedComponent implements OnInit { |
|
|
|
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
/*事件处理代码书写位置*/ |
|
|
|
/*事件处理代码书写位置*/ |
|
|
|
this.echartsData.scheduledUpdatesType = 0 |
|
|
|
this.echartsData.scheduledUpdatesType = 0 |
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 2 |
|
|
|
//this.echartsData.scheduledUpdatesName = "ff"
|
|
|
|
//this.echartsData.scheduledUpdatesName = "ff"
|
|
|
|
this.echartsData.zhiorBuinding!="zhi"?this.echartsData.scheduledUpdatesToggle = -2:this.echartsData.level=='0'? this.echartsData.scheduledUpdatesToggle = 2:this.echartsData.level=='1'?this.echartsData.scheduledUpdatesToggle = 3:'' |
|
|
|
//this.echartsData.zhiorBuinding!="zhi"?this.echartsData.scheduledUpdatesToggle = -2:this.echartsData.level=='0'? this.echartsData.scheduledUpdatesToggle = 2:this.echartsData.level=='1'?this.echartsData.scheduledUpdatesToggle = 3:''
|
|
|
|
if(this.echartsData.zhiorBuinding!="zhi"){ |
|
|
|
if(this.echartsData.zhiorBuinding!="zhi"){ |
|
|
|
this.echartsData.findShow=false |
|
|
|
this.echartsData.findShow=false |
|
|
|
this.echartsData.scheduledUpdatesToggle = -2 |
|
|
|
//this.echartsData.scheduledUpdatesToggle = -2
|
|
|
|
if(this.echartsData.level=='0'){ |
|
|
|
|
|
|
|
|
|
|
|
if(this.echartsData.level=='0'&&this.tabledata[0].items[xIndex].organizations.length>=1){ |
|
|
|
this.echartsData.scheduledUpdatesToggle = 2 |
|
|
|
this.echartsData.scheduledUpdatesToggle = 2 |
|
|
|
}else if(this.echartsData.level=='1'){ |
|
|
|
//this.echartsData.time=xIndex
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 3 |
|
|
|
//this.router.navigateByUrl(`/statisticanalysis/scheduledUpdates/PublicEcharts?type=${this.route.snapshot.queryParams.type}&TimeType=${this.TimeType}`);
|
|
|
|
|
|
|
|
}else if(this.echartsData.level=='1' &&this.tabledata[0].items[xIndex].organizations.length>=1){ |
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 2//原来是3
|
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.echartsData.findShow=true |
|
|
|
this.echartsData.findShow=true |
|
|
@ -519,141 +680,13 @@ export class verifiedComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
this.oneEcharts.setOption(option); |
|
|
|
this.oneEcharts.setOption(option); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
months:any = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'] |
|
|
|
months:any = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'] |
|
|
|
echartIds:any = ['one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve'] |
|
|
|
echartIds:any = ['one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve'] |
|
|
|
items:any = [{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null}] |
|
|
|
items:any = [{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null},{echart:null}] |
|
|
|
|
|
|
|
|
|
|
|
twoInit () { |
|
|
|
|
|
|
|
this.months.forEach((element,index) => { |
|
|
|
|
|
|
|
this.items[index].echart = echarts.init(document.getElementById(this.echartIds[index]), 'skinUpp'); |
|
|
|
|
|
|
|
var option = { |
|
|
|
|
|
|
|
title: { |
|
|
|
|
|
|
|
text: element+'总数:(500)', |
|
|
|
|
|
|
|
top: -4, |
|
|
|
|
|
|
|
left: '35%', |
|
|
|
|
|
|
|
textStyle:{ |
|
|
|
|
|
|
|
color:'#000', |
|
|
|
|
|
|
|
fontSize: 30, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//提示框
|
|
|
|
|
|
|
|
tooltip: { |
|
|
|
|
|
|
|
trigger: 'axis', |
|
|
|
|
|
|
|
textStyle:{ |
|
|
|
|
|
|
|
fontSize :18 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
legend: { |
|
|
|
|
|
|
|
data: ['平均值','平均值2倍','平均值3倍', '已核查无需修改', '已核查修改中', '已核查提交审核'], |
|
|
|
|
|
|
|
textStyle: { fontSize :16,color: '#000' } |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
xAxis: [{ |
|
|
|
|
|
|
|
axisLabel: { |
|
|
|
|
|
|
|
textStyle:{ |
|
|
|
|
|
|
|
fontSize :18, |
|
|
|
|
|
|
|
color:'#000000' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
color: "#000", //刻度线标签颜色
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//设置坐标轴字体颜色和宽度
|
|
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
|
|
lineStyle: {color: "#000",} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
type: 'category', |
|
|
|
|
|
|
|
data: ['浦东支队','黄浦支队','徐汇支队','长宁支队','静安支队','普陀支队','虹口支队','杨浦支队','闵行支队','宝山支队','嘉定支队','崇明支队','金山支队'], |
|
|
|
|
|
|
|
axisPointer: {type: 'shadow'} |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
yAxis: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//设置坐标轴字体颜色和宽度
|
|
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
|
|
lineStyle:{ |
|
|
|
|
|
|
|
color:'#000000' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
type: 'value', |
|
|
|
|
|
|
|
axisLabel: { |
|
|
|
|
|
|
|
textStyle:{ |
|
|
|
|
|
|
|
fontSize :18, |
|
|
|
|
|
|
|
color:'#000000' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
color: "#000", //刻度线标签颜色
|
|
|
|
|
|
|
|
formatter: '{value}' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// //设置坐标轴字体颜色和宽度
|
|
|
|
|
|
|
|
// axisLine: {
|
|
|
|
|
|
|
|
// lineStyle: {color: "#000"},
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// type: 'value',
|
|
|
|
|
|
|
|
// name: '个',
|
|
|
|
|
|
|
|
// axisLabel: {
|
|
|
|
|
|
|
|
// color: "#000", //刻度线标签颜色
|
|
|
|
|
|
|
|
// formatter: '{value}'
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
series: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '已核查无需修改', |
|
|
|
|
|
|
|
type: 'bar', |
|
|
|
|
|
|
|
stack: '总数', |
|
|
|
|
|
|
|
data: [68, 56, 69, 57, 43, 79, 78, 66, 49, 34, 49, 78, 45], |
|
|
|
|
|
|
|
barWidth :'38', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '已核查修改中', |
|
|
|
|
|
|
|
type: 'bar', |
|
|
|
|
|
|
|
stack: '总数', |
|
|
|
|
|
|
|
data: [39, 3, 4, 7, 3, 2, 3, 4, 29, 40, 40, 2, 4], |
|
|
|
|
|
|
|
itemStyle:{color: '#626c91'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '已核查提交审核', |
|
|
|
|
|
|
|
type: 'bar', |
|
|
|
|
|
|
|
stack: '总数', |
|
|
|
|
|
|
|
data: [48, 2, 3, 3, 4, 3, 2, 26, 4, 3, 3, 24, 14], |
|
|
|
|
|
|
|
itemStyle:{color:'#c4ebad'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '平均值', |
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
|
|
|
data: [49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37], |
|
|
|
|
|
|
|
itemStyle:{color: '#FFDC35'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '平均值2倍', |
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
|
|
|
data: [98, 90, 106, 94, 98, 86, 96, 82, 76, 78, 82, 86, 74], |
|
|
|
|
|
|
|
itemStyle:{color: '#6be6c1'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '平均值3倍', |
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
|
|
|
data: [143, 135, 159, 143, 127, 144, 144, 123, 114, 117, 124, 129, 111], |
|
|
|
|
|
|
|
itemStyle:{color: '#999'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
this.items[index].echart.setOption(option); |
|
|
|
|
|
|
|
this.items[index].echart.on('click', (params) => { |
|
|
|
|
|
|
|
let xIndex=this.items[index].echart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesType = 0 |
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesName = this.months[index] |
|
|
|
|
|
|
|
//this.echartsData.scheduledUpdatesToggle = false
|
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesXName=params.name |
|
|
|
|
|
|
|
//console.log(this.echartsData.scheduledUpdatesXName)
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -792,12 +825,14 @@ export class yueDateComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
level:string; |
|
|
|
level:string; |
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
//console.log(this.echartsData.scheduledUpdatesToggle)
|
|
|
|
this.router.queryParams.subscribe(param=>{ |
|
|
|
this.router.queryParams.subscribe(param=>{ |
|
|
|
this.level=param.level |
|
|
|
this.level=param.level |
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
window.setTimeout(()=>{ |
|
|
|
this.twoInit() |
|
|
|
this.getechartsdata() |
|
|
|
|
|
|
|
|
|
|
|
},0) |
|
|
|
},0) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -805,15 +840,98 @@ export class yueDateComponent implements OnInit { |
|
|
|
this.oneEcharts.dispose() |
|
|
|
this.oneEcharts.dispose() |
|
|
|
this.oneEcharts.clear() |
|
|
|
this.oneEcharts.clear() |
|
|
|
} |
|
|
|
} |
|
|
|
zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] |
|
|
|
zhiNameData = [] |
|
|
|
buildingData=["高层","地下","轨道交通","化工生产","储罐类","厂房","古建筑","商市场","医院","学校","宾馆","娱乐场所","餐饮业","影剧院","展览建筑","隧道"] |
|
|
|
//buildingData=["高层","地下","轨道交通","化工生产","储罐类","厂房","古建筑","商市场","医院","学校","宾馆","娱乐场所","餐饮业","影剧院","展览建筑","隧道"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取后端数据
|
|
|
|
|
|
|
|
tabledata |
|
|
|
|
|
|
|
organizationId=[] |
|
|
|
|
|
|
|
ynum=[] |
|
|
|
|
|
|
|
OrganizationIds=''//点击的组织
|
|
|
|
|
|
|
|
async getechartsdata(){ |
|
|
|
|
|
|
|
if(this.router.snapshot.queryParams.pieid!='pieTwo'){ |
|
|
|
|
|
|
|
let Parameters={ |
|
|
|
|
|
|
|
MaintainedState:this.router.snapshot.queryParams.type, |
|
|
|
|
|
|
|
TimeType:this.echartsData.TimeType, |
|
|
|
|
|
|
|
TimeStart:this.echartsData.scheduledUpdatesXName+'-01', |
|
|
|
|
|
|
|
TimeEnd:this.echartsData.scheduledUpdatesXName+'-12', |
|
|
|
|
|
|
|
OrganizationId:this.OrganizationIds |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//console.log(this.echartsData.zhiorBuinding)
|
|
|
|
|
|
|
|
await this.echartsData.getData(Parameters,this.echartsData.zhiorBuinding=='zhi'? `/api/StatisticsAnalysis/Companies/Maintained/OrganizationTrend`:`/api/StatisticsAnalysis/Companies/Maintained/BuildingTypeTrend`) |
|
|
|
|
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata) |
|
|
|
|
|
|
|
this.zhiNameData=[] |
|
|
|
|
|
|
|
this.ynum=[] |
|
|
|
|
|
|
|
this.organizationId=[] |
|
|
|
|
|
|
|
this.tabledata[0].items[0].organizations.forEach(element => { |
|
|
|
|
|
|
|
this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName) |
|
|
|
|
|
|
|
this.ynum.push(element.count) |
|
|
|
|
|
|
|
this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId) |
|
|
|
|
|
|
|
//this.ydatayue.push(element.count)
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.ynum,this.zhiNameData) |
|
|
|
|
|
|
|
this.twoInit() |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
let Parameters={ |
|
|
|
|
|
|
|
MaintenanceState:this.router.snapshot.queryParams.type, |
|
|
|
|
|
|
|
//TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:selectEndYear,
|
|
|
|
|
|
|
|
OrganizationId:this.OrganizationIds |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
await this.echartsData.getData(Parameters,this.echartsData.zhiorBuinding=='zhi'? `/api/StatisticsAnalysis/Companies/Maintenance`:`/api/StatisticsAnalysis/Plans/Maintenance`) |
|
|
|
|
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata) |
|
|
|
|
|
|
|
this.zhiNameData=[] |
|
|
|
|
|
|
|
this.ynum=[] |
|
|
|
|
|
|
|
this.organizationId=[] |
|
|
|
|
|
|
|
if(this.router.snapshot.queryParams.type=='1'){ |
|
|
|
|
|
|
|
this.tabledata[0].unMaintainCount.organizationCounts.forEach(element => { |
|
|
|
|
|
|
|
this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName) |
|
|
|
|
|
|
|
this.ynum.push(element.count) |
|
|
|
|
|
|
|
this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId) |
|
|
|
|
|
|
|
//this.ydatayue.push(element.count)
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}else if(this.router.snapshot.queryParams.type=='2'){ |
|
|
|
|
|
|
|
this.tabledata[0].maintainedCount.organizationCounts.forEach(element => { |
|
|
|
|
|
|
|
this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName) |
|
|
|
|
|
|
|
this.ynum.push(element.count) |
|
|
|
|
|
|
|
this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId) |
|
|
|
|
|
|
|
//this.ydatayue.push(element.count)
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}else if(this.router.snapshot.queryParams.type=='3'){ |
|
|
|
|
|
|
|
this.tabledata[0].maintainingCount.organizationCounts.forEach(element => { |
|
|
|
|
|
|
|
this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName) |
|
|
|
|
|
|
|
this.ynum.push(element.count) |
|
|
|
|
|
|
|
this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId) |
|
|
|
|
|
|
|
//this.ydatayue.push(element.count)
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.ynum,this.zhiNameData) |
|
|
|
|
|
|
|
this.twoInit() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
tiaoshiPao:any |
|
|
|
|
|
|
|
//气泡提示数据获取
|
|
|
|
|
|
|
|
bianli(){ |
|
|
|
|
|
|
|
var arrshuzu='['; |
|
|
|
|
|
|
|
for(var i=0;i<this.ynum.length;i++){ |
|
|
|
|
|
|
|
arrshuzu+='{"value":'+this.ynum[i]+',"coord":['+i+','+this.ynum[i]+'],"name":'+'"'+this.zhiNameData[i]+'"'+'},' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arrshuzu=arrshuzu.substring(0,arrshuzu.length-1) |
|
|
|
|
|
|
|
arrshuzu+=']' |
|
|
|
|
|
|
|
this.tiaoshiPao=JSON.parse(arrshuzu) |
|
|
|
|
|
|
|
//return tishiPao
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
oneEcharts:any; |
|
|
|
oneEcharts:any; |
|
|
|
twoInit () { |
|
|
|
twoInit () { |
|
|
|
this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp'); |
|
|
|
this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp'); |
|
|
|
var option = { |
|
|
|
var option = { |
|
|
|
title: { |
|
|
|
title: { |
|
|
|
text: this.echartsData.scheduledUpdatesXName+'已核查总数:(0)', |
|
|
|
text:this.router.snapshot.queryParams.pieid=='pieTwo'?'': this.echartsData.scheduledUpdatesXName+`已核查总数:(${this.tabledata[0].totalCount})`, |
|
|
|
top: -4, |
|
|
|
top: -4, |
|
|
|
left: '35%', |
|
|
|
left: '35%', |
|
|
|
textStyle:{ |
|
|
|
textStyle:{ |
|
|
@ -821,19 +939,39 @@ export class yueDateComponent implements OnInit { |
|
|
|
fontSize: 30, |
|
|
|
fontSize: 30, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
grid: { |
|
|
|
|
|
|
|
containLabel:true, |
|
|
|
|
|
|
|
top:80, |
|
|
|
|
|
|
|
// top: 10
|
|
|
|
|
|
|
|
}, |
|
|
|
//提示框
|
|
|
|
//提示框
|
|
|
|
tooltip: { |
|
|
|
tooltip: { |
|
|
|
trigger: 'axis', |
|
|
|
trigger: 'axis', |
|
|
|
textStyle:{ |
|
|
|
textStyle:{ |
|
|
|
fontSize :18 |
|
|
|
fontSize :18 |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
formatter: (params)=>{ |
|
|
|
|
|
|
|
console.log(params) |
|
|
|
|
|
|
|
if(params[0].axisValue.indexOf('救援站')==-1){ |
|
|
|
|
|
|
|
if(this.router.snapshot.queryParams.pieid=='pieTwo'){ |
|
|
|
|
|
|
|
return this.echartsData.zhiorBuinding=='zhi'? this.echartsData.weihuTooltipRight(params,this.router.snapshot.queryParams.type):'' |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
return this.echartsData.zhiorBuinding=='zhi'? this.echartsData.weihuTooltip(params):'' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//return this.echartsData.zhiorBuinding=="zhi"?this.echartsData.tableTooltip(this.echartsData.tableDataZhi,params[0].name):this.echartsData.tableTooltip(this.echartsData.buildingType,params[0].name)
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
position:this.echartsData.tableTooltipNoShow2 |
|
|
|
}, |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
legend: { |
|
|
|
right:10, |
|
|
|
right:10, |
|
|
|
data: this.echartsData.zhuXname, |
|
|
|
data: this.echartsData.zhuXname, |
|
|
|
textStyle: { fontSize :16,color: '#000' } |
|
|
|
textStyle: { fontSize :16,color: '#000' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
xAxis: [{ |
|
|
|
xAxis: { |
|
|
|
|
|
|
|
id:this.organizationId, |
|
|
|
axisLabel: { |
|
|
|
axisLabel: { |
|
|
|
textStyle:{ |
|
|
|
textStyle:{ |
|
|
|
fontSize :18, |
|
|
|
fontSize :18, |
|
|
@ -849,8 +987,8 @@ export class yueDateComponent implements OnInit { |
|
|
|
type: 'category', |
|
|
|
type: 'category', |
|
|
|
data:this.zhiNameData, |
|
|
|
data:this.zhiNameData, |
|
|
|
axisPointer: {type: 'shadow'} |
|
|
|
axisPointer: {type: 'shadow'} |
|
|
|
}], |
|
|
|
}, |
|
|
|
yAxis: [ |
|
|
|
yAxis:
|
|
|
|
{ |
|
|
|
{ |
|
|
|
//设置坐标轴字体颜色和宽度
|
|
|
|
//设置坐标轴字体颜色和宽度
|
|
|
|
axisLine: {
|
|
|
|
axisLine: {
|
|
|
@ -880,74 +1018,23 @@ export class yueDateComponent implements OnInit { |
|
|
|
// formatter: '{value}'
|
|
|
|
// formatter: '{value}'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
], |
|
|
|
|
|
|
|
series: [ |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: this.echartsData.zhuXname[1], |
|
|
|
//name: this.echartsData.zhuXname[1],
|
|
|
|
type: 'bar', |
|
|
|
type: 'bar', |
|
|
|
stack: '总数', |
|
|
|
//stack: '总数',
|
|
|
|
data: this.echartsData.zhiorBuinding=="zhi"?[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0]:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
|
|
|
data: this.ynum, |
|
|
|
barWidth :'38', |
|
|
|
barWidth :'38', |
|
|
|
|
|
|
|
backgroundStyle: { |
|
|
|
|
|
|
|
color: 'rgba(220, 220, 220, 0.8)' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
markPoint: { |
|
|
|
name: this.echartsData.zhuXname[2], |
|
|
|
data: this.tiaoshiPao |
|
|
|
type: 'bar', |
|
|
|
}, |
|
|
|
stack: '总数', |
|
|
|
|
|
|
|
data: this.echartsData.zhiorBuinding=="zhi"?[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0]:[0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0, 0, 0,0,0,0], |
|
|
|
|
|
|
|
itemStyle:{color: '#626c91'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: this.echartsData.zhuXname[3], |
|
|
|
|
|
|
|
type: 'bar', |
|
|
|
|
|
|
|
stack: '总数', |
|
|
|
|
|
|
|
data: this.echartsData.zhiorBuinding=="zhi"?[0, 0, 0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0]:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0], |
|
|
|
|
|
|
|
itemStyle:{color:'#c4ebad'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: this.echartsData.zhuXname[0], |
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
|
|
|
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0], |
|
|
|
|
|
|
|
itemStyle:{color: '#FFDC35'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//name: '与上个月环比',
|
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
|
|
|
data: [0, 0, 0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0,0], |
|
|
|
|
|
|
|
//itemStyle:{color: '#6be6c1'},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
/* { |
|
|
|
|
|
|
|
//name: '警报',
|
|
|
|
|
|
|
|
type: 'effectScatter', |
|
|
|
|
|
|
|
//coordinateSystem: 'cartesian2d',
|
|
|
|
|
|
|
|
data: [[0,0]],
|
|
|
|
|
|
|
|
symbolSize:30, |
|
|
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
|
|
normal: { |
|
|
|
|
|
|
|
color: 'red', |
|
|
|
|
|
|
|
shadowBlur: 10, |
|
|
|
|
|
|
|
shadowColor: '#333' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* { |
|
|
|
|
|
|
|
name: '平均值2倍', |
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
|
|
|
data: [98, 90, 106, 94, 98, 86, 96, 82, 76, 78, 82, 86, 74], |
|
|
|
|
|
|
|
itemStyle:{color: '#6be6c1'} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '平均值3倍', |
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
|
|
|
data: [143, 135, 159, 143, 127, 144, 144, 123, 114, 117, 124, 129, 111], |
|
|
|
|
|
|
|
itemStyle:{color: '#999'} |
|
|
|
|
|
|
|
}, */ |
|
|
|
|
|
|
|
] |
|
|
|
] |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.oneEcharts.setOption(option); |
|
|
|
this.oneEcharts.setOption(option); |
|
|
@ -965,11 +1052,33 @@ export class yueDateComponent implements OnInit { |
|
|
|
if (this.oneEcharts.containPixel('grid',pointInPixel)) { |
|
|
|
if (this.oneEcharts.containPixel('grid',pointInPixel)) { |
|
|
|
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
/*事件处理代码书写位置*/ |
|
|
|
/*事件处理代码书写位置*/ |
|
|
|
this.echartsData.scheduledUpdatesType = 0 |
|
|
|
if(this.echartsData.zhiorBuinding=='zhi'&&this.router.snapshot.queryParams.pieid=='pie'){ |
|
|
|
//console.log(option.xAxis)
|
|
|
|
this.OrganizationIds=option.xAxis.id[xIndex] |
|
|
|
this.echartsData.scheduledUpdatesName = option.xAxis[0].data[xIndex] |
|
|
|
this.getechartsdata() |
|
|
|
this.echartsData.scheduledUpdatesToggle = 3 |
|
|
|
if(this.tabledata[0].items.length>=1){ |
|
|
|
//this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex]
|
|
|
|
this.oneEcharts.dispose() |
|
|
|
|
|
|
|
this.oneEcharts.clear() |
|
|
|
|
|
|
|
//this.getechartsdata()
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* this.echartsData.scheduledUpdatesType = 0 |
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesName = option.xAxis.data[xIndex] |
|
|
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 3 |
|
|
|
|
|
|
|
console.log(option.xAxis.id[xIndex]) */ |
|
|
|
|
|
|
|
}else if(this.echartsData.zhiorBuinding=='zhi'&&this.router.snapshot.queryParams.pieid=='pieTwo'){ |
|
|
|
|
|
|
|
this.OrganizationIds=option.xAxis.id[xIndex] |
|
|
|
|
|
|
|
//console.log(xIndex,option.xAxis.id[xIndex],this.organizationId)
|
|
|
|
|
|
|
|
this.getechartsdata() |
|
|
|
|
|
|
|
if((this.router.snapshot.queryParams.type=='1'&&this.tabledata[0].unMaintainCount.organizationCounts.length>=1) |
|
|
|
|
|
|
|
||(this.router.snapshot.queryParams.type=='2'&&this.tabledata[0].maintainedCount.organizationCounts.length>=1) |
|
|
|
|
|
|
|
||(this.router.snapshot.queryParams.type=='3'&&this.tabledata[0].maintainingCount.organizationCounts.length>=1)){ |
|
|
|
|
|
|
|
this.oneEcharts.dispose() |
|
|
|
|
|
|
|
this.oneEcharts.clear() |
|
|
|
|
|
|
|
//this.getechartsdata()
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
@ -1009,6 +1118,41 @@ export class yuebuildingDateComponent implements OnInit { |
|
|
|
zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] |
|
|
|
zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] |
|
|
|
buildingData=["高层","地下","轨道交通","化工生产","储罐类","厂房","古建筑","商市场","医院","学校","宾馆","娱乐场所","餐饮业","影剧院","展览建筑","隧道"] |
|
|
|
buildingData=["高层","地下","轨道交通","化工生产","储罐类","厂房","古建筑","商市场","医院","学校","宾馆","娱乐场所","餐饮业","影剧院","展览建筑","隧道"] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取后端数据
|
|
|
|
|
|
|
|
tabledata |
|
|
|
|
|
|
|
async getechartsdata(selectStartYear,selectStartMonth,selectEndYear,selectEndMonth){ |
|
|
|
|
|
|
|
let Parameters={ |
|
|
|
|
|
|
|
MaintainedState:this.router.snapshot.queryParams.type, |
|
|
|
|
|
|
|
TimeType:this.echartsData.TimeType, |
|
|
|
|
|
|
|
TimeStart:this.echartsData.scheduledUpdatesXName, |
|
|
|
|
|
|
|
//TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:selectEndYear,
|
|
|
|
|
|
|
|
//OrganizationId
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(this.echartsData.zhiorBuinding) |
|
|
|
|
|
|
|
if(this.echartsData.zhiorBuinding=="zhi"){ |
|
|
|
|
|
|
|
await this.echartsData.getData(Parameters,`/api/StatisticsAnalysis/Companies/Maintained/OrganizationTrend`) |
|
|
|
|
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata) |
|
|
|
|
|
|
|
this.zhiNameData=[] |
|
|
|
|
|
|
|
/* this.ydatayue=[] |
|
|
|
|
|
|
|
this.tabledata[0].items.forEach(element => { |
|
|
|
|
|
|
|
this.zhiNameData.push(element.date) |
|
|
|
|
|
|
|
this.ydatayue.push(element.count) |
|
|
|
|
|
|
|
}); */ |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
await this.echartsData.getData(Parameters,`/api/StatisticsAnalysis/Companies/Maintained/BuildingTypeTrend`) |
|
|
|
|
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
|
|
|
console.log(this.tabledata) |
|
|
|
|
|
|
|
/* this.xdatayue=[] |
|
|
|
|
|
|
|
this.ydatayue=[] |
|
|
|
|
|
|
|
this.tabledata[0].items.forEach(element => { |
|
|
|
|
|
|
|
this.xdatayue.push(element.date) |
|
|
|
|
|
|
|
this.ydatayue.push(element.count) |
|
|
|
|
|
|
|
}); */ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//this.oneInit(this.xdatayue,this.ydatayue)
|
|
|
|
|
|
|
|
} |
|
|
|
oneEcharts:any; |
|
|
|
oneEcharts:any; |
|
|
|
twoInit () { |
|
|
|
twoInit () { |
|
|
|
this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp'); |
|
|
|
this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp'); |
|
|
|