|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: sueRimn |
|
|
|
|
* @Date: 2020-09-01 15:24:39 |
|
|
|
|
* @LastEditors: sueRimn |
|
|
|
|
* @LastEditTime: 2021-07-14 14:31:47 |
|
|
|
|
* @LastEditTime: 2021-07-21 08:54:04 |
|
|
|
|
*/ |
|
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
|
import { Router } from '@angular/router'; |
|
|
|
@ -93,13 +93,13 @@ export class PageOneComponent implements OnInit {
|
|
|
|
|
}else{ |
|
|
|
|
this.tabledata[0].planTypeStatistics.planTypes.forEach((value,index,array) => { |
|
|
|
|
if(array[index].planTypeName=='Plan2D'){ |
|
|
|
|
this.planTypeStatisticsdata.push({name:'二维预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1}) |
|
|
|
|
this.planTypeStatisticsdata.push({name:'二维预案',value:array[index].count,planStatusName:array[index].planTypeName,type:1}) |
|
|
|
|
}else if(array[index].planTypeName=='Plan3D'){ |
|
|
|
|
this.planTypeStatisticsdata.push({name:'三维预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2}) |
|
|
|
|
this.planTypeStatisticsdata.push({name:'三维预案',value:array[index].count,planStatusName:array[index].planTypeName,type:2}) |
|
|
|
|
}else if(array[index].planTypeName=='Other'){ |
|
|
|
|
this.planTypeStatisticsdata.push({name:'其它预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3}) |
|
|
|
|
this.planTypeStatisticsdata.push({name:'其它预案',value:array[index].count,planStatusName:array[index].planTypeName,type:3}) |
|
|
|
|
}else if(array[index].planTypeName=='PlanText'){ |
|
|
|
|
this.planTypeStatisticsdata.push({name:'文本预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4}) |
|
|
|
|
this.planTypeStatisticsdata.push({name:'文本预案',value:array[index].count,planStatusName:array[index].planTypeName,type:4}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -135,7 +135,7 @@ export class PageOneComponent implements OnInit {
|
|
|
|
|
tooltip: { |
|
|
|
|
trigger: 'item', |
|
|
|
|
formatter: (params)=>{ |
|
|
|
|
this.echartsData.biaogeTishiyuan(params.data,tid) |
|
|
|
|
this.echartsData.biaogeTishiyuan(params.data,tid,this.pieonetype) |
|
|
|
|
return this.echartsData.res |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -185,30 +185,58 @@ export class PageOneComponent implements OnInit {
|
|
|
|
|
this.indexBzt.on('click', (params) => { |
|
|
|
|
// console.log(params)
|
|
|
|
|
if(tid=='pieone'){ |
|
|
|
|
for(var i=0;i<this.tabledata[0].planCategoryStatistics.planCategories.length;i++){ |
|
|
|
|
if(this.tabledata[0].planCategoryStatistics.planCategories[i].planCategoryName==params.data.planStatusName){ |
|
|
|
|
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.length>0){ |
|
|
|
|
this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.forEach((element,index,array) => { |
|
|
|
|
if(array[index].organizationId==this.orid){ |
|
|
|
|
array.splice(index,1) |
|
|
|
|
} |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
if(array.length>0){ |
|
|
|
|
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pieone'}}); |
|
|
|
|
if(this.pieonetype){ |
|
|
|
|
for(var i=0;i<this.tabledata[0].planCategoryStatistics.planCategories.length;i++){ |
|
|
|
|
if(this.tabledata[0].planCategoryStatistics.planCategories[i].planCategoryName==params.data.planStatusName){ |
|
|
|
|
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.length>0){ |
|
|
|
|
this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.forEach((element,index,array) => { |
|
|
|
|
if(array[index].organizationId==this.orid){ |
|
|
|
|
array.splice(index,1) |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type,'tid':'pieone'}}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
if(array.length>0){ |
|
|
|
|
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else if(this.echartsData.level=='3'){ |
|
|
|
|
//中队跳转
|
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if(this.echartsData.level=='3'){ |
|
|
|
|
//中队跳转
|
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type,'tid':'pieone'}}); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
for(var i=0;i<this.tabledata[0].planTypeStatistics.planTypes.length;i++){ |
|
|
|
|
if(this.tabledata[0].planTypeStatistics.planTypes[i].planTypeName==params.data.planStatusName){ |
|
|
|
|
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.length>0){ |
|
|
|
|
this.tabledata[0].planTypeStatistics.planTypes[i].organizations.forEach((element,index,array) => { |
|
|
|
|
if(array[index].organizationId==this.orid){ |
|
|
|
|
array.splice(index,1) |
|
|
|
|
} |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
if(array.length>0){ |
|
|
|
|
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else if(this.echartsData.level=='3'){ |
|
|
|
|
//中队跳转
|
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
for(var i=0;i<this.tabledata[0].planStatusStatistics.planStatuses.length;i++){ |
|
|
|
|
if(this.tabledata[0].planStatusStatistics.planStatuses[i].planStatusName==params.data.planStatusName){ |
|
|
|
@ -222,7 +250,7 @@ export class PageOneComponent implements OnInit {
|
|
|
|
|
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pietwo'}}); |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); |
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
@ -230,7 +258,7 @@ export class PageOneComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
else if(this.echartsData.level=='3'){ |
|
|
|
|
//中队跳转
|
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); |
|
|
|
|
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|