Browse Source

[新增]大队统计

非煤矿山灾害智能感知和预警系统
邵佳豪 3 years ago
parent
commit
04d162a62b
  1. 87
      src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html
  2. 6
      src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss
  3. 45
      src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
  4. 2
      src/app/home/task/station-task-apply/station-task-apply.component.ts
  5. 2
      src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
  6. 2
      src/app/home/task/zhi-indicators/zhi-indicators.component.ts

87
src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html

@ -40,7 +40,7 @@
<span>完成率</span>
<span>{{item.percentage}}%</span>
</p>
<nz-progress style="width: 100%;" [nzPercent]="item.percentage" nzStrokeColor="#42B983"
<nz-progress style="width: 100%;" [nzPercent]="item.percentage" nzStrokeColor="#87D068"
[nzShowInfo]="false"></nz-progress>
</div>
</div>
@ -150,43 +150,46 @@
<div class="aaa">
<div class="title">
任务总数
<span
style="font-weight: 18;font-size: 26px;margin-left: 10px;">{{countStat.statistics1.num}}</span>
</div>
<div class="details">
<div class="detailsname">
完成
<!-- <span style="font-weight: 18;font-size: 26px;margin-left: 10px;">15</span> -->
</div>
<span class="progresssquare">
<!-- <span>完成率</span> -->
<nz-progress nzStrokeLinecap="square" style="width: 70%;margin-bottom: 3px;"
[nzPercent]="75" nzStrokeColor="#42B983" [nzShowInfo]="false" [nzStrokeWidth]="18">
[nzPercent]="countStat.statistics1.percentageComplete" nzStrokeColor="#87D068"
[nzShowInfo]="false" [nzStrokeWidth]="18">
</nz-progress>
<span>75%</span>
<span>{{countStat.statistics1.percentageComplete}}%</span>
</span>
</div>
</div>
<div class="percentage">
<nz-progress [nzWidth]="80" nz-tooltip nzType="circle" [nzPercent]="70" nzStrokeLinecap="square"
[nzShowInfo]="false" [nzSuccessPercent]="40"></nz-progress>
<nz-progress [nzWidth]="80" nz-tooltip nzType="circle"
[nzPercent]="countStat.statistics1.item1+countStat.statistics1.item2"
nzStrokeLinecap="square" [nzShowInfo]="false"
[nzSuccessPercent]="countStat.statistics1.item1"></nz-progress>
<div class="typebox">
<div class="type">
<div class="tips" style="background: #42B983;"></div>
<div class="tips" style="background: #87D068;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">上级指派</span><span>46%</span></div>
style="margin-right: 5px;">上级指派</span><span>{{countStat.statistics1.item1}}%</span>
</div>
</div>
<div class="type">
<div class="tips" style="background: #1890FF;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">自主任务</span><span>46%</span></div>
style="margin-right: 5px;">自主任务</span><span>{{countStat.statistics1.item2}}%</span>
</div>
</div>
<div class="type">
<div class="tips" style="background: #fff;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">申领任务</span><span>46%</span></div>
style="margin-right: 5px;">申领任务</span><span>{{countStat.statistics1.item3}}%</span>
</div>
</div>
</div>
</div>
@ -195,6 +198,8 @@
<div class="aaa">
<div class="title">
消防救援任务总数
<span
style="font-weight: 18;font-size: 26px;margin-left: 10px;">{{countStat.statistics2.num}}</span>
</div>
<div class="details">
<div class="detailsname">
@ -204,31 +209,37 @@
<span class="progresssquare">
<!-- <span>完成率</span> -->
<nz-progress nzStrokeLinecap="square" style="width: 70%;margin-bottom: 3px;"
[nzPercent]="75" nzStrokeColor="#42B983" [nzShowInfo]="false" [nzStrokeWidth]="18">
[nzPercent]="countStat.statistics2.percentageComplete" nzStrokeColor="#87D068"
[nzShowInfo]="false" [nzStrokeWidth]="18">
</nz-progress>
<span>75%</span>
<span>{{countStat.statistics2.percentageComplete}}%</span>
</span>
</div>
</div>
<div class="percentage">
<nz-progress [nzWidth]="80" nz-tooltip nzType="circle" [nzPercent]="70" nzStrokeColor="#42B983"
nzStrokeLinecap="square" [nzShowInfo]="false"></nz-progress>
<nz-progress [nzWidth]="80" nz-tooltip nzType="circle"
[nzPercent]="countStat.statistics2.item1+countStat.statistics2.item2"
nzStrokeColor="#3658c8" nzStrokeLinecap="square" [nzShowInfo]="false"
[nzSuccessPercent]="countStat.statistics2.item1"></nz-progress>
<div class="typebox">
<div class="type">
<div class="tips" style="background: #42B983;"></div>
<div class="tips" style="background: #87D068;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">上级指派</span><span>46%</span></div>
style="margin-right: 5px;">上级指派</span><span>{{countStat.statistics2.item1}}%</span>
</div>
</div>
<div class="type">
<div class="tips" style="background: #1890FF;"></div>
<div class="tips" style="background: #3658c8;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">自主任务</span><span>46%</span></div>
style="margin-right: 5px;">自主任务</span><span>{{countStat.statistics2.item2}}%</span>
</div>
</div>
<div class="type">
<div class="tips" style="background: #fff;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">申领任务</span><span>46%</span></div>
style="margin-right: 5px;">申领任务</span><span>{{countStat.statistics2.item3}}%</span>
</div>
</div>
</div>
</div>
@ -237,6 +248,8 @@
<div class="aaa">
<div class="title">
检查员任务总数
<span
style="font-weight: 18;font-size: 26px;margin-left: 10px;">{{countStat.statistics3.num}}</span>
</div>
<div class="details">
<div class="detailsname">
@ -246,31 +259,37 @@
<span class="progresssquare">
<!-- <span>完成率</span> -->
<nz-progress nzStrokeLinecap="square" style="width: 70%;margin-bottom: 3px;"
[nzPercent]="75" nzStrokeColor="#E6D91D" [nzShowInfo]="false" [nzStrokeWidth]="18">
[nzPercent]="countStat.statistics3.percentageComplete" nzStrokeColor="#E6D91D"
[nzShowInfo]="false" [nzStrokeWidth]="18">
</nz-progress>
<span>75%</span>
<span>{{countStat.statistics3.percentageComplete}}%</span>
</span>
</div>
</div>
<div class="percentage">
<nz-progress [nzWidth]="80" nz-tooltip nzType="circle" [nzPercent]="50" nzStrokeColor="#E6D91D"
[nzShowInfo]="false"></nz-progress>
<nz-progress [nzWidth]="80" nz-tooltip nzType="circle"
[nzPercent]="countStat.statistics3.item1+countStat.statistics3.item2"
nzStrokeColor="#E6D91D" [nzShowInfo]="false"
[nzSuccessPercent]="countStat.statistics3.item1"></nz-progress>
<div class="typebox">
<div class="type">
<div class="tips" style="background: #42B983;"></div>
<div class="tips" style="background: #87D068;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">上级指派</span><span>46%</span></div>
style="margin-right: 5px;">上级指派</span><span>{{countStat.statistics3.item1}}%</span>
</div>
</div>
<div class="type">
<div class="tips" style="background: #1890FF;"></div>
<div class="tips" style="background: #E6D91D;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">自主任务</span><span>46%</span></div>
style="margin-right: 5px;">自主任务</span><span>{{countStat.statistics3.item2}}%</span>
</div>
</div>
<div class="type">
<div class="tips" style="background: #fff;"></div>
<div style="font-size: 13px;"><span
style="margin-right: 5px;">申领任务</span><span>46%</span></div>
style="margin-right: 5px;">申领任务</span><span>{{countStat.statistics3.item3}}%</span>
</div>
</div>
</div>
</div>
@ -298,7 +317,7 @@
</span>
<div style="width: 72%;" class="progress progresssquare">
<span>完成进度</span>
<nz-progress nzStrokeLinecap="square" [nzStrokeWidth]="16" nzStrokeColor="#42B983"
<nz-progress nzStrokeLinecap="square" [nzStrokeWidth]="16" nzStrokeColor="#87D068"
[nzPercent]="element.percentage"></nz-progress>
</div>
<!-- <button nz-button nzType="primary">任务下派</button> -->
@ -320,7 +339,7 @@
<span class="boldspan">{{item.inspected}}</span>
</div>
<div class="num">
<div class="round" style="background: #42B983;"></div>
<div class="round" style="background: #87D068;"></div>
<span class="word">已完成</span>
<span class="boldspan">{{item.finished}}</span>
</div>

6
src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss

@ -359,7 +359,7 @@
justify-content: space-between;
.deploycontentitem {
width: 32%;
width: 33%;
height: 110px;
background: linear-gradient(180deg, #7AA3FC 0%, #2C4DC0 100%);
box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
@ -380,6 +380,8 @@
.title {
text-align: left;
display: flex;
align-items: center;
}
.details {
@ -454,7 +456,7 @@
.deploycontentitem:nth-child(3) {
background: linear-gradient(180deg, #73D9AA 0%, #42B983 100%);
background: linear-gradient(180deg, #9ef3cc 0%, #42B983 100%);
}
}
}

45
src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts

@ -20,13 +20,14 @@ export class DaMonthlyTaskOverviewComponent implements OnInit {
this.getHigherTasks()
this.getTaskList()
this.getAllStation()
this.getCountStat()
}
selectYear(e) {
this.selectedYear = e
console.log('年', e)
this.getHigherTasks()
this.getTaskList()
this.getAllStation()
this.getCountStat()
}
months = [
{ id: 1, name: '1月', isable: true },
@ -59,6 +60,9 @@ export class DaMonthlyTaskOverviewComponent implements OnInit {
this.getSupervisor('main')
this.getSupervisor('assisted')
//统计信息
this.getCountStat()
//本级部署
this.getAllStation()
}
@ -263,6 +267,45 @@ export class DaMonthlyTaskOverviewComponent implements OnInit {
//获得统计信息
countStat: any = {
statistics1: {
num: 0, percentageComplete: 0, item1: 0, item2: 0, item3: 0
},
statistics2: {
num: 0, percentageComplete: 0, item1: 0, item2: 0, item3: 0
},
statistics3: {
num: 0, percentageComplete: 0, item1: 0, item2: 0, item3: 0
}
}
getCountStat() {
function integer(num) {
return Math.round(num * 100) || 0
}
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
this.http.get('/api/PlanTasks/GetCountStat').subscribe(data => {
console.log('统计信息', data)
this.countStat = {
statistics1: {
num: data['任务总数']['总数'], percentageComplete: integer(data['任务总数']['已完成'] / data['任务总数']['总数']), item1: integer(data['任务总数']['上级指派'] / data['任务总数']['总数']), item2: integer(data['任务总数']['自主任务'] / data['任务总数']['总数']), item3: integer(data['任务总数']['申领任务'] / data['任务总数']['总数'])
},
statistics2: {
num: data['消防救援任务总数']['总数'], percentageComplete: integer(data['任务总数']['已完成'] / data['任务总数']['总数']), item1: integer(data['消防救援任务总数']['上级指派'] / data['消防救援任务总数']['总数']), item2: integer(data['消防救援任务总数']['自主任务'] / data['消防救援任务总数']['总数']), item3: integer(data['消防救援任务总数']['申领任务'] / data['消防救援任务总数']['总数'])
},
statistics3: {
num: data['检查员任务总数']['总数'], percentageComplete: integer(data['任务总数']['已完成'] / data['任务总数']['总数']), item1: integer(data['检查员任务总数']['上级指派'] / data['检查员任务总数']['总数']), item2: integer(data['检查员任务总数']['自主任务'] / data['检查员任务总数']['总数']), item3: integer(data['检查员任务总数']['申领任务'] / data['检查员任务总数']['总数'])
}
}
})
}
//本级部署打开关闭

2
src/app/home/task/station-task-apply/station-task-apply.component.ts

@ -280,7 +280,9 @@ export class StationTaskApplyComponent implements OnInit {
console.log(instance.validateForm.value)
if (instance.validateForm.valid) {
await new Promise((resolve, reject) => {
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
let body = {
month: selectedTime,
taskName: instance.validateForm.value.taskname,
taskType: instance.validateForm.value.taskname,
companyId: instance.validateForm.value.unitname,

2
src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts

@ -476,7 +476,9 @@ export class StationWeeklyPlanComponent implements OnInit {
console.log(instance.validateForm.value)
if (instance.validateForm.valid) {
await new Promise((resolve, reject) => {
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
let body = {
month: selectedTime,
taskName: instance.validateForm.value.taskname,
taskType: instance.validateForm.value.taskname,
companyId: instance.validateForm.value.unitname.id,

2
src/app/home/task/zhi-indicators/zhi-indicators.component.ts

@ -455,8 +455,10 @@ export class ZhiIndicatorsComponent implements OnInit {
let arr = [...data.search1Value, ...data.search2Value]
let arrSet = [...new Set(arr)]
data.isLoading = true
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
this.http.post(`/api/PlanTasks/Many`, null, {
params: {
month: selectedTime,
companyIds: arrSet,
taskType: type
}

Loading…
Cancel
Save