|
|
|
@ -172,7 +172,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
title: [ |
|
|
|
|
{ |
|
|
|
|
text: `{val|0}\n{name|任务总数}`, |
|
|
|
|
top: 'center', |
|
|
|
|
top: '42%', |
|
|
|
|
left: '26%', |
|
|
|
|
textStyle: { |
|
|
|
|
rich: { |
|
|
|
@ -223,7 +223,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
{ |
|
|
|
|
type: 'pie', |
|
|
|
|
radius: ['50%', '65%'], |
|
|
|
|
center: ['35%', '50%'], |
|
|
|
|
center: ['35%', '55%'], |
|
|
|
|
avoidLabelOverlap: false, |
|
|
|
|
label: { |
|
|
|
|
show: false, |
|
|
|
@ -422,7 +422,6 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
if (taskBar[handleIndex].organization.level == 'battalion') { |
|
|
|
|
//点击大队
|
|
|
|
|
this.leveldata = taskBar[handleIndex].organization; |
|
|
|
|
this.completionOfTaskBar.clear(); |
|
|
|
|
this.getData_taskStatByOrg(taskBar[handleIndex].organization.id).then( |
|
|
|
|
(data) => { |
|
|
|
|
this.echartsSetData_taskStatByOrg(); |
|
|
|
@ -459,7 +458,6 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
goback() { |
|
|
|
|
this.completionOfTaskBar.clear(); |
|
|
|
|
this.getData_taskStatByOrg(this.leveldata.parentId).then((data) => { |
|
|
|
|
this.echartsSetData_taskStatByOrg(); |
|
|
|
|
this.leveldata = null; |
|
|
|
@ -611,10 +609,13 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
async getData_taskStatByOrg(orid) { |
|
|
|
|
this.isLoading2 = true; |
|
|
|
|
return new Promise<void>((resolve, reject) => { |
|
|
|
|
let arr = this.textbox.filter((item) => item.isSelected); |
|
|
|
|
let creationTypes = arr.map((v) => taskName[v.name]); |
|
|
|
|
this.http |
|
|
|
|
.get('/api/PlanTasks/Dashboard_TaskStatByOrg', { |
|
|
|
|
params: { |
|
|
|
|
organizaionId: orid, |
|
|
|
|
creationTypes: creationTypes, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
.subscribe((data: any) => { |
|
|
|
@ -626,7 +627,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
top1_1_leftNum = 188; //任务总数
|
|
|
|
|
top1_1_leftNum = 0; //任务总数
|
|
|
|
|
|
|
|
|
|
buhegedata = { |
|
|
|
|
badCount: 0, |
|
|
|
@ -729,6 +730,8 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echartsSetData_taskStatByOrg() { |
|
|
|
|
this.completionOfTaskPie.clear(); |
|
|
|
|
this.completionOfTaskBar.clear(); |
|
|
|
|
//任务完成情况两个echarts
|
|
|
|
|
let task = this.statisticalData_taskStatByOrg; |
|
|
|
|
this.completionOfTaskPieOption.title[0].text = `{val|${task['总数']}}\n{name|任务总数}`; |
|
|
|
@ -865,4 +868,28 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
textbox = [ |
|
|
|
|
{ name: '上级派发任务', isSelected: true }, |
|
|
|
|
{ name: '自主任务', isSelected: true }, |
|
|
|
|
{ name: '协助任务', isSelected: true }, |
|
|
|
|
]; |
|
|
|
|
clickText(item) { |
|
|
|
|
item.isSelected = !item.isSelected; |
|
|
|
|
|
|
|
|
|
console.log(this.leveldata); |
|
|
|
|
let id; |
|
|
|
|
this.leveldata |
|
|
|
|
? (id = this.leveldata.id) |
|
|
|
|
: (id = JSON.parse(sessionStorage.getItem('userData')).organizationId); |
|
|
|
|
this.getData_taskStatByOrg(id).then((data) => { |
|
|
|
|
this.echartsSetData_taskStatByOrg(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
enum taskName { |
|
|
|
|
'上级派发任务' = '上级指派', |
|
|
|
|
'自主任务' = '自主任务', |
|
|
|
|
'协助任务' = '申领任务', |
|
|
|
|
} |
|
|
|
|