Ver código fonte

统合统计页面开发

maotao 1 mês atrás
pai
commit
cb49b7a6a3

+ 7 - 0
src/app/services/main.service.ts

@@ -1079,4 +1079,11 @@ export class MainService {
1079 1079
 	    headers: this.headers,
1080 1080
 	  });
1081 1081
 	}
1082
+	// 综合统计
1083
+	getReportData(data) {
1084
+	  return this.http.post(host.host + `/itsm/report/index`, data, {
1085
+	    headers: this.headers,
1086
+	  });
1087
+	}
1088
+	
1082 1089
 }

+ 1 - 0
src/app/views/new-statistics/maintenance-statistics/maintenance-statistics.component.less

@@ -60,6 +60,7 @@
60 60
     display: flex;
61 61
     flex: 1;
62 62
     min-height: 0;
63
+		overflow-x: hidden;
63 64
     .secondMenu{
64 65
       width: 175px;
65 66
       height: 100%;

+ 165 - 48
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html

@@ -1,49 +1,166 @@
1
-<div class="searchDataWrap">
2
-  <div class="searchData">
3
-    <div class="searchDataItem">
4
-      <span class="label">建单时间</span>:
5
-      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
-      </nz-range-picker>
7
-    </div>
8
-  </div>
9
-  <div class="operation">
10
-    <button nz-button class="btn default" (click)="search(1)">搜索</button>
11
-    <button nz-button class="btn default ml8" (click)="excelExport()">导出</button>
12
-    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
13
-  </div>
14
-</div>
15
-<nz-table [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
16
-  <thead (nzSortChange)="sort($event)" nzSingleSort>
17
-    <tr>
18
-      <th nzWidth="10%" nzShowSort nzSortKey="startDate" [(nzSort)]="sortCurrent.startDate">时间</th>
19
-      <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
20
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
21
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时间</th>
22
-      <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
23
-      <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
24
-      <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
25
-      <th nzWidth="9%" nzShowSort nzSortKey="workHourPrice" [(nzSort)]="sortCurrent.workHourPrice">工时费用(元)</th>
26
-      <th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用(元)</th>
27
-      <th nzWidth="9%" nzShowSort nzSortKey="negativeNum" [(nzSort)]="sortCurrent.negativeNum">差评单数</th>
28
-      <th nzWidth="9%" nzShowSort nzSortKey="favorableRate" [(nzSort)]="sortCurrent.favorableRate">好评率</th>
29
-    </tr>
30
-  </thead>
31
-  <tbody>
32
-    <tr *ngFor="let data of listOfData; let index = index">
33
-      <td>{{ data.startDate }}</td>
34
-      <td>{{ data.sum }}</td>
35
-      <td>{{ data.avgResponseTime }}</td>
36
-      <td>{{ data.avgResolvedTime }}</td>
37
-      <td>{{ data.resolvedOverNum }}</td>
38
-      <td>{{ data.overTimeNum }}</td>
39
-      <td>{{ data.consumablePrice }}</td>
40
-      <td>{{ data.workHourPrice }}</td>
41
-      <td>{{ data.totalPrice }}</td>
42
-      <td>{{ data.negativeNum }}</td>
43
-      <td>{{ data.favorableRate }}</td>
44
-    </tr>
45
-  </tbody>
46
-</nz-table>
47
-<div>
48
-  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)"></nz-pagination>
1
+<div class="synthesize-box" *ngIf="!isLoading">
2
+	<div class="searchDataWrap">
3
+		<div class="searchData">
4
+			<div class="searchDataItem">
5
+				<span class="label">选择日期</span>:
6
+				<nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
7
+				</nz-range-picker>
8
+			</div>
9
+		</div>
10
+		<div class="operation">
11
+			<button nz-button class="btn default" (click)="search()">搜索</button>
12
+			<button nz-button class="btn default ml8" (click)="search()">重置</button>
13
+		</div>
14
+	</div>
15
+	<div class="top1-statistics">
16
+		<div class="top-list">
17
+			<div class="special-box">
18
+				<div class="num">{{workData.gd_total}}</div>
19
+				<div class="describe">工单总数</div>
20
+			</div>
21
+			<div class="special-box-right">
22
+				<div class="sign-describe">已完成: <span class="sign-num">{{workData.gd_close}}</span></div>
23
+				<div class="sign-describe">待接单: <span class="sign-num">{{workData.gd_todo}}</span></div>
24
+				<div class="sign-describe">处理中: <span class="sign-num">{{workData.gd_doing}}</span></div>
25
+			</div>
26
+		</div>
27
+		<div class="top-list">
28
+			<div class="special-box">
29
+				<div class="num">{{workData.sum_price}}</div>
30
+				<div class="describe">总费用 (元)</div>
31
+			</div>
32
+		</div>
33
+		<div class="top-list">
34
+			<div class="special-box">
35
+				<div class="num">{{workData.gd_postpone}}</div>
36
+				<div class="describe">挂起单数</div>
37
+			</div>
38
+		</div>
39
+		<div class="top-list">
40
+			<div class="special-box">
41
+				<div class="num">{{workData.gd_overtime}}</div>
42
+				<div class="describe">超时单数</div>
43
+			</div>
44
+		</div>
45
+		<div class="top-list">
46
+			<div class="special-box">
47
+				<div class="num">{{workData.gd_degree}}</div>
48
+				<div class="describe">差评单数</div>
49
+			</div>
50
+		</div>
51
+	</div>
52
+	<div class="top2-statistics">
53
+		<div class="statistics width-60 mar-right-8">
54
+			<div class="statistics-box">
55
+				<div class="sign-green"></div>
56
+				<div class="statistics-title">维修处理Top5</div>
57
+				<div class="statistics-select">
58
+					<div class="statistics-select-list" [ngClass]="{'activeClass': activeIndex == 0}" (click)="selectCheck(0)">维修人员</div>
59
+					<div class="statistics-select-list" [ngClass]="{'activeClass': activeIndex == 1}" (click)="selectCheck(1)">维修组</div>
60
+				</div>
61
+				<div class="more" (click)="toPath(1)">更多></div>
62
+			</div>
63
+			<div class="table">
64
+				<div class="td">
65
+					<div class="table-td">排名</div>
66
+					<div class="table-td" *ngIf="activeIndex==0">人员姓名</div>
67
+					<div class="table-td" *ngIf="activeIndex==1">维修组</div>
68
+					<div class="table-td">工单量</div>
69
+					<div class="table-td">平均接单时长</div>
70
+					<div class="table-td">平均处理时长</div>
71
+					<div class="table-td">超时单</div>
72
+				</div>
73
+				<div class="th" *ngFor="let item of maintainData; let index = index;">
74
+					<div class="table-list">
75
+						<img src="../../assets/images/top1.png" alt="" class="img" *ngIf="index==0">
76
+						<img src="../../assets/images/top2.png" alt="" class="img" *ngIf="index==1">
77
+						<img src="../../assets/images/top3.png" alt="" class="img" *ngIf="index==2">
78
+						<span *ngIf="index !=0 && index !=1 && index !=2">{{index+1}}</span>
79
+					</div>
80
+					<div class="table-list">{{item.name}}</div>
81
+					<div class="table-list">{{item.count}}</div>
82
+					<div class="table-list">{{item.avg_handle}}分</div>
83
+					<div class="table-list">{{item.avg_response}}分</div>
84
+					<div class="table-list">{{item.overtime}}</div>
85
+				</div>
86
+			</div>
87
+		</div>
88
+		<div class="statistics width-40">
89
+			<div class="statistics-box">
90
+				<div class="sign-green"></div>
91
+				<div class="statistics-title">报修来源</div>
92
+				<div class="more" (click)="toPath(2)">更多></div>
93
+			</div>
94
+			<div class="echarts-repairs">
95
+			  <div echarts class="echarts" [options]='repairsOptions'></div>
96
+			</div>
97
+		</div>
98
+	</div>
99
+	<div class="top2-statistics">
100
+		<div class="statistics width-49 mar-right-8">
101
+			<div class="statistics-box">
102
+				<div class="sign-green"></div>
103
+				<div class="statistics-title">一级故障现象Top5</div>
104
+				<div class="more" (click)="toPath(3)">更多></div>
105
+			</div>
106
+			<div class="echarts-repairs">
107
+				<div echarts class="echarts" [options]='malfunctionOptions'></div>
108
+			</div>
109
+		</div>
110
+		<div class="statistics width-50">
111
+			<div class="statistics-box">
112
+				<div class="sign-green"></div>
113
+				<div class="statistics-title">楼栋报修Top5</div>
114
+				<div class="more" (click)="toPath(4)">更多></div>
115
+			</div>
116
+			<div class="echarts-repairs">
117
+				<div echarts class="echarts" [options]='buildingOptions'></div>
118
+			</div>
119
+		</div>
120
+	</div>
121
+	<div class="top2-statistics">
122
+		<div class="statistics width-49 mar-right-8">
123
+			<div class="statistics-box">
124
+				<div class="sign-green"></div>
125
+				<div class="statistics-title">科室费用Top5</div>
126
+				<div class="more" (click)="toPath(5)">更多></div>
127
+			</div>
128
+			<div class="table">
129
+				<div class="td">
130
+					<div class="table-td-4">排名</div>
131
+					<div class="table-td-4">科室名称</div>
132
+					<div class="table-td-4">工单量</div>
133
+					<div class="table-td-4">总费用(元)</div>
134
+				</div>
135
+				<div class="th" *ngFor="let item of deptCostData; let index = index;">
136
+					<div class="table-list-4">{{index+1}}</div>
137
+					<div class="table-list-4">{{item.dept}}</div>
138
+					<div class="table-list-4">{{item.sum}}</div>
139
+					<div class="table-list-4">{{item.sum_price}}</div>
140
+				</div>
141
+			</div>
142
+		</div>
143
+		<div class="statistics width-50">
144
+			<div class="statistics-box">
145
+				<div class="sign-green"></div>
146
+				<div class="statistics-title">耗材Top5</div>
147
+				<div class="more" (click)="toPath(6)">更多></div>
148
+			</div>
149
+			<div class="table">
150
+				<div class="td">
151
+					<div class="table-td-4">排名</div>
152
+					<div class="table-td-4">耗材名称</div>
153
+					<div class="table-td-4">使用数量</div>
154
+					<div class="table-td-4">总费用(元)</div>
155
+				</div>
156
+				<div class="th" *ngFor="let item of consumableData; let index = index;">
157
+					<div class="table-list-4">{{index+1}}</div>
158
+					<div class="table-list-4">{{item.name}}({{item.spd_code}})</div>
159
+					<div class="table-list-4">{{item.sum}}</div>
160
+					<div class="table-list-4">{{item.sum_price}}</div>
161
+				</div>
162
+			</div>
163
+		</div>
164
+	</div>
49 165
 </div>
166
+<nz-spin nzSimple *ngIf="isLoading"></nz-spin>

+ 199 - 13
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.less

@@ -5,17 +5,203 @@
5 5
   right: 0;
6 6
   bottom: 0;
7 7
   left: 0;
8
-  .searchDataWrap{
9
-    display: flex;
10
-    align-items: center;
11
-    justify-content: space-between;
12
-    .searchData{
13
-      padding: 16px;
14
-      .searchDataItem{
15
-        .label{
16
-          font-size: 16px;
17
-        }
18
-      }
19
-    }
20
-  }
8
+	.synthesize-box{
9
+		background: #F0F2F5 !important;
10
+		height: calc((100vh - 92px));
11
+		overflow-y: auto;
12
+		overflow-x: hidden;
13
+		.searchDataWrap{
14
+		  display: flex;
15
+		  align-items: center;
16
+		  justify-content: space-between;
17
+			padding-right: 15px;
18
+			background: #fff;
19
+			margin-bottom: 8px;
20
+		  .searchData{
21
+		    padding: 16px;
22
+		    .searchDataItem{
23
+		      .label{
24
+		        font-size: 16px;
25
+		      }
26
+		    }
27
+		  }
28
+		}
29
+		.top1-statistics{
30
+			display: flex;
31
+			background: #fff;
32
+			padding: 10px 0;
33
+			margin-bottom: 8px;
34
+			.top-list{
35
+				display: flex;
36
+				align-items: center;
37
+				justify-content: center;
38
+				width: 20%;
39
+				border-right: 1px solid #D9D9D9;
40
+				&:last-child{
41
+					border-right:none;
42
+				}
43
+				.special-box{
44
+					text-align: center;
45
+					position: relative;
46
+					top: -5px;
47
+					.num{
48
+						font-size: 35px;
49
+						font-weight: 500;
50
+						color: #64BD7B;
51
+					}
52
+					.describe{
53
+						font-size: 14px;
54
+						color: #8F8F8F;
55
+					}
56
+				}
57
+				.special-box-right{
58
+					margin-left: 16px;
59
+					.sign-describe{
60
+						font-size: 12px;
61
+						color: #8F8F8F;
62
+						.sign-num{
63
+							font-size: 14px;
64
+							font-weight: 500;
65
+							color: #000;
66
+						}
67
+					}
68
+				}
69
+			}
70
+		}
71
+		.top2-statistics{
72
+			display: flex;
73
+			// flex-flow: row wrap;
74
+			// justify-content: space-between;
75
+			height: 310px;
76
+			margin-bottom: 8px;
77
+			.mar-right-8{
78
+				margin-right: 8px;
79
+			}
80
+			.statistics{
81
+				padding: 10px;
82
+				background: #fff;
83
+				.statistics-box{
84
+					height: 41px;
85
+					display: flex;
86
+					align-items: center;
87
+					position: relative;
88
+					.sign-green{
89
+						width: 6px;
90
+						height: 6px;
91
+						border-radius: 50%;
92
+						background: #64BD7B;
93
+						margin-right: 5px;
94
+					}
95
+					.statistics-title{
96
+						color: #000;
97
+						font-size: 16px;
98
+						font-weight: 500;
99
+						margin-right: 10px;
100
+					}
101
+					.statistics-select{
102
+						display: flex;
103
+						.statistics-select-list{
104
+							width: 58px;
105
+							height: 23px;
106
+							line-height: 23px;
107
+							text-align: center;
108
+							border-radius: 3px;
109
+							border: 1px solid #E2E2E2;
110
+							font-size: 12px;
111
+							margin-right: 3px;
112
+							cursor: pointer;
113
+						}
114
+						.activeClass{
115
+							color: #64BD7B !important;
116
+							border: 1px solid #64BD7B !important;
117
+							background: #E9F7E9 !important;
118
+						}
119
+					}
120
+					.more{
121
+						position: absolute;
122
+						right: 0;
123
+						cursor: pointer;
124
+					}
125
+				}
126
+				.table{
127
+					width: 100%;
128
+					.td{
129
+						display: flex;
130
+						height: 45px;
131
+						border-bottom: 1px solid #D9D9D9;
132
+						.table-td{
133
+							line-height: 45px;
134
+							text-align: center;
135
+							width: 16.66%;
136
+							color: #000;
137
+						}
138
+						.table-td-4{
139
+							line-height: 45px;
140
+							text-align: center;
141
+							width: 25%;
142
+							color: #000;
143
+						}
144
+					}
145
+					.th{
146
+						display: flex;
147
+						height: 40px;
148
+						border-bottom: 1px solid #D9D9D9;
149
+						.table-list{
150
+							line-height: 40px;
151
+							text-align: center;
152
+							width: 16.66%;
153
+							color: #8F8F8F;
154
+							.img{
155
+								width: 25px;
156
+							}
157
+						}
158
+						.table-list-4{
159
+							line-height: 40px;
160
+							text-align: center;
161
+							width: 25%;
162
+							color: #8F8F8F;
163
+						}
164
+					}
165
+				}
166
+			}
167
+			.width-60{
168
+				width: 60%;
169
+			}
170
+			.width-50{
171
+				width: calc((100% - 8px)/2);
172
+				background: #fff;
173
+				.echarts-repairs{
174
+					.echarts{
175
+						width: 100%;
176
+						height: 260px;
177
+					}
178
+				}
179
+			}
180
+			.width-49{
181
+				width: calc((100% - 8px)/2);
182
+				background: #fff;
183
+				.echarts-repairs{
184
+					.echarts{
185
+						width: 100%;
186
+						height: 260px;
187
+					}
188
+				}
189
+			}
190
+			.width-40{
191
+				width: 40%;
192
+				background: #fff;
193
+				.echarts-repairs{
194
+					.echarts{
195
+						width: 100%;
196
+						height: 260px;
197
+					}
198
+				}
199
+			}
200
+		}
201
+		.top3-statistics{
202
+			// display: flex;
203
+			// height: 310px;
204
+			margin-bottom: 8px;
205
+		}
206
+	}
21 207
 }

+ 338 - 37
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts

@@ -10,17 +10,298 @@ export class SynthesizeStatisticsComponent implements OnInit {
10 10
   constructor(
11 11
     private mainService: MainService,
12 12
   ) {}
13
-
13
+	
14
+	isLoading:Boolean = false;
15
+	workData:any = []; //工单统计
14 16
   listOfData: any[] = []; //表格数据
15 17
   pageIndex: number = 1; //表格当前页码
16 18
   pageSize: number = 10; //表格每页展示条数
17 19
   listLength: number = 10; //表格总数据量
18
-
20
+	activeIndex:any = 0;
21
+	maintainData:any = []; //维修处理数据
22
+	repairsOptions:any={} //报修来源 option
23
+	malfunctionOptions:any={} //一级故障 option
24
+	buildingOptions:any={} //楼栋报修 option
25
+	deptCostData:any = [
26
+		{
27
+			name:'王'
28
+		},
29
+		{
30
+			name:'王'
31
+		},
32
+		{
33
+			name:'王'
34
+		},
35
+		{
36
+			name:'王'
37
+		},
38
+		{
39
+			name:'王'
40
+		}
41
+	] //科室费用
42
+	consumableData:any = [
43
+		{
44
+			name:'王'
45
+		},
46
+		{
47
+			name:'王'
48
+		},
49
+		{
50
+			name:'王'
51
+		},
52
+		{
53
+			name:'王'
54
+		},
55
+		{
56
+			name:'王'
57
+		}
58
+	] //报修耗材
19 59
   ngOnInit() {
20 60
     this.initSessionData();
21 61
     this.search();
22 62
   }
23
-
63
+	
64
+	// 维修处理类型切换
65
+	selectCheck(type){
66
+		this.activeIndex = type
67
+		this.getMaintainData();
68
+	}
69
+	
70
+	// 报修来源
71
+	repairsChart() {
72
+		let postData:any = {
73
+		  startDate: this.dateRange[0],
74
+		  endDate: this.dateRange[1],
75
+			type: 'sourceTop5',
76
+		  hosId: this.hosId,
77
+		  dutyId: this.dutyId,
78
+		  parentDutyId: this.parentDutyId,
79
+		};
80
+		this.mainService
81
+		  .getReportData(postData)
82
+		  .subscribe((result:any) => {
83
+		    let datas = result.data.map(i=>{
84
+					return{
85
+						name:i.name,
86
+						value:i.sum
87
+					}
88
+				});
89
+				this.repairsOptions = {
90
+				  tooltip: {
91
+				    trigger: "item",
92
+				    formatter: "{b}: {c} ({d}%)",
93
+				  },
94
+				  legend: {
95
+				    data: datas,
96
+						left: 'left',
97
+				  },
98
+				  series: [
99
+				    {
100
+				      name: "",
101
+				      type: "pie",
102
+				      radius: ["30%", "50%"],
103
+				      data: datas,
104
+							emphasis: {
105
+								itemStyle: {
106
+									shadowBlur: 10,
107
+									shadowOffsetX: 0,
108
+									shadowColor: 'rgba(0, 0, 0, 0.5)'
109
+								}
110
+							},
111
+							label: {
112
+									show: true,
113
+									formatter: '{b}: {c} {d}%'  
114
+							},
115
+				      itemStyle: {
116
+				        normal: {
117
+				          //每根柱子颜色设置
118
+				          color: function (params) {
119
+				            let colorList = [
120
+				              "#33CC85",
121
+				              "#72C0DD",
122
+				              "#FAC958",
123
+											"#546FC6",
124
+				            ];
125
+				            return colorList[params.dataIndex];
126
+				          },
127
+				        },
128
+				      },
129
+				    },
130
+				  ],
131
+				};
132
+		  });
133
+	}
134
+	
135
+	// 一级故障
136
+	malfunctionChart(){
137
+		let postData:any = {
138
+		  startDate: this.dateRange[0],
139
+		  endDate: this.dateRange[1],
140
+			type: 'firstCategoryTop5',
141
+		  hosId: this.hosId,
142
+		  dutyId: this.dutyId,
143
+		  parentDutyId: this.parentDutyId,
144
+		};
145
+		this.mainService
146
+		  .getReportData(postData)
147
+		  .subscribe((result:any) => {
148
+		    let datas = []
149
+				let title = []
150
+				for(let i of result.data){
151
+					datas.push(i.sum)
152
+					title.push(i.category)
153
+				}
154
+				this.malfunctionOptions = {
155
+					tooltip: {
156
+					    trigger: 'axis',
157
+					    axisPointer: {
158
+					      type: 'shadow'
159
+					    }
160
+					  },
161
+					  grid: {
162
+					    left: '3%',
163
+					    right: '4%',
164
+					    bottom: '3%',
165
+					    containLabel: true
166
+					  },
167
+					  xAxis: [
168
+					    {
169
+					      type: 'category',
170
+					      data: title,
171
+					      axisTick: {
172
+									show:false,
173
+					        alignWithLabel: true
174
+					      }
175
+					    }
176
+					  ],
177
+					  yAxis: [
178
+					    {
179
+					      type: 'value',
180
+								axisLine: {
181
+									show:false
182
+								},
183
+								axisTick:{
184
+									show:false
185
+								}
186
+					    }
187
+					  ],
188
+					  series: [
189
+					    {
190
+					      type: 'bar',
191
+					      barWidth: '30%',
192
+								color: '#FFD68D',
193
+					      data: datas
194
+					    }
195
+					  ]
196
+				}
197
+		  });
198
+	}
199
+	
200
+	// 楼栋报修
201
+	buildingChart(){
202
+		let postData:any = {
203
+		  startDate: this.dateRange[0],
204
+		  endDate: this.dateRange[1],
205
+			type: 'buildingTop5',
206
+		  hosId: this.hosId,
207
+		  dutyId: this.dutyId,
208
+		  parentDutyId: this.parentDutyId,
209
+		};
210
+		this.mainService
211
+		  .getReportData(postData)
212
+		  .subscribe((result:any) => {
213
+		    let datas = []
214
+		    let title = []
215
+		    for(let i of result.data){
216
+		    	datas.push(i.sum)
217
+		    	title.push(i.name)
218
+		    }
219
+		    this.buildingOptions = {
220
+		    	tooltip: {
221
+		    	    trigger: 'axis',
222
+		    	    axisPointer: {
223
+		    	      type: 'shadow'
224
+		    	    }
225
+		    	  },
226
+		    	  grid: {
227
+		    	    left: '3%',
228
+		    	    right: '4%',
229
+		    	    bottom: '3%',
230
+		    	    containLabel: true
231
+		    	  },
232
+		    	  xAxis: [
233
+		    	    {
234
+		    	      type: 'category',
235
+		    	      data: title,
236
+		    	      axisTick: {
237
+		    	  			show:false,
238
+		    	        alignWithLabel: true
239
+		    	      }
240
+		    	    }
241
+		    	  ],
242
+		    	  yAxis: [
243
+		    	    {
244
+		    	      type: 'value',
245
+		    	  		axisLine: {
246
+		    	  			show:false
247
+		    	  		},
248
+		    	  		axisTick:{
249
+		    	  			show:false
250
+		    	  		}
251
+		    	    }
252
+		    	  ],
253
+		    	  series: [
254
+		    	    {
255
+		    	      type: 'bar',
256
+		    	      barWidth: '30%',
257
+		    				color: '#72C0DD',
258
+		    	      data: datas
259
+		    	    }
260
+		    	  ]
261
+		    }
262
+		  });
263
+	}
264
+	
265
+	// 科室费用
266
+	getDeptCostData() {
267
+	  let postData:any = {
268
+	    startDate: this.dateRange[0],
269
+	    endDate: this.dateRange[1],
270
+			type: 'deptTop5',
271
+	    hosId: this.hosId,
272
+	    dutyId: this.dutyId,
273
+	    parentDutyId: this.parentDutyId,
274
+	  };
275
+	  this.mainService
276
+	    .getReportData(postData)
277
+	    .subscribe((result:any) => {
278
+	      this.deptCostData = result.data || [];
279
+	    });
280
+	}
281
+	
282
+	// 耗材
283
+	getConsumableData() {
284
+	  let postData:any = {
285
+	    startDate: this.dateRange[0],
286
+	    endDate: this.dateRange[1],
287
+			type: 'consumableTop5',
288
+	    hosId: this.hosId,
289
+	    dutyId: this.dutyId,
290
+	    parentDutyId: this.parentDutyId,
291
+	  };
292
+	  this.mainService
293
+	    .getReportData(postData)
294
+	    .subscribe((result:any) => {
295
+				this.isLoading = false;
296
+	      this.consumableData = result.data || [];
297
+	    });
298
+	}
299
+	
300
+	// 更多跳转
301
+	toPath(type){
302
+		console.log(type)
303
+	}
304
+	
24 305
   // 初始化缓存数据
25 306
   queryType:any;
26 307
   hosId:any;
@@ -71,9 +352,6 @@ export class SynthesizeStatisticsComponent implements OnInit {
71 352
       dutyId: this.dutyId,
72 353
       parentDutyId: this.parentDutyId,
73 354
     };
74
-    if (field && sort) {
75
-      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
76
-    }
77 355
     this.loading1 = true;
78 356
     this.mainService
79 357
       .postCustom("itsm/report", "incidentWorkOrder", postData)
@@ -83,49 +361,72 @@ export class SynthesizeStatisticsComponent implements OnInit {
83 361
         this.listLength = result.totalCount;
84 362
       });
85 363
   }
86
-
87
-  // 列表排序
88
-  sortCurrent = {};
89
-  sortCurrentKey: string = "";
90
-  sortCurrentValue: string | null = "";
91
-  sort(e) {
92
-    const { key, value } = e;
93
-    this.sortCurrentKey = key;
94
-    this.sortCurrentValue = value;
95
-    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
96
-  }
364
+	
365
+	// 头部工单数据
366
+	getWorkData() {
367
+	  let postData:any = {
368
+	    startDate: this.dateRange[0],
369
+	    endDate: this.dateRange[1],
370
+			type: 'headerCount',
371
+	    hosId: this.hosId,
372
+	    dutyId: this.dutyId,
373
+	    parentDutyId: this.parentDutyId,
374
+	  };
375
+	  this.mainService
376
+	    .getReportData(postData)
377
+	    .subscribe((result:any) => {
378
+	      this.workData = result.data[0] || [];
379
+	    });
380
+	}
381
+	
382
+	// 维修处理
383
+	getMaintainData() {
384
+	  let postData:any = {
385
+	    startDate: this.dateRange[0],
386
+	    endDate: this.dateRange[1],
387
+			type: 'userHandleTop5',
388
+			groupType: this.activeIndex==0?'user':'group',
389
+	    hosId: this.hosId,
390
+	    dutyId: this.dutyId,
391
+	    parentDutyId: this.parentDutyId,
392
+	  };
393
+	  this.mainService
394
+	    .getReportData(postData)
395
+	    .subscribe((result:any) => {
396
+	      this.maintainData = result.data || [];
397
+	    });
398
+	}
97 399
 
98 400
   // 搜索
99
-  search(num?: number) {
100
-    if (num !== undefined) {
101
-      this.getList(num, this.sortCurrentKey, this.sortCurrentValue);
102
-    } else {
103
-      this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
104
-    }
401
+  search() {
402
+		this.isLoading = true
403
+		this.getWorkData();
404
+		this.getMaintainData();
405
+		this.repairsChart();
406
+		this.malfunctionChart();
407
+		this.buildingChart();
408
+		this.getDeptCostData();
409
+		this.getConsumableData();
105 410
   }
106 411
 
107 412
   // 日期选择 日
108 413
   dateRange: any = [format(startOfMonth(addMonths(new Date(), -2)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')]; //发起时间区间 天
109 414
   changeDate(result?): void {
110
-    console.log(this.dateRange);
111
-    console.log(result);
112 415
     result[0] = format(result[0], 'yyyy-MM-dd HH:mm:ss');
113 416
     result[1] = format(result[1], 'yyyy-MM-dd HH:mm:ss');
114 417
     this.dateRange = result;
115
-    this.search();
418
+    // this.search();
419
+		console.log(this.dateRange);
116 420
   }
117 421
 
118 422
   onCalendarChangeDate(dateArr){
119
-    console.log(dateArr)
120
-    if(dateArr.length == 2){
121
-      let dateStart = new Date(dateArr[0]);
122
-      let dateEnd = new Date(dateArr[1]);
123
-      dateStart.setHours(0,0,0);
124
-      dateEnd.setHours(23,59,59);
125
-      this.dateRange = [dateStart,dateEnd];
126
-    }
423
+    // console.log(dateArr)
424
+    // if(dateArr.length == 2){
425
+    //   let dateStart = new Date(dateArr[0]);
426
+    //   let dateEnd = new Date(dateArr[1]);
427
+    //   dateStart.setHours(0,0,0);
428
+    //   dateEnd.setHours(23,59,59);
429
+    //   this.dateRange = [dateStart,dateEnd];
430
+    // }
127 431
   }
128
-
129
-  excelExport(){}
130
-  reset(){}
131 432
 }

+ 2 - 0
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.module.ts

@@ -5,6 +5,7 @@ import { CommonModule } from '@angular/common';
5 5
 import { SynthesizeStatisticsRoutingModule } from './synthesize-statistics-routing.module';
6 6
 import { ShareModule } from 'src/app/share/share.module';
7 7
 import { VirtualScrollerModule } from 'ngx-virtual-scroller';
8
+import { NgxEchartsModule } from 'ngx-echarts';
8 9
 
9 10
 
10 11
 @NgModule({
@@ -16,6 +17,7 @@ import { VirtualScrollerModule } from 'ngx-virtual-scroller';
16 17
     SynthesizeStatisticsRoutingModule,
17 18
     ShareModule,
18 19
     VirtualScrollerModule,
20
+		NgxEchartsModule
19 21
   ]
20 22
 })
21 23
 export class SynthesizeStatisticsModule { }

+ 164 - 3
src/assets/iconfont/demo_index.html

@@ -55,6 +55,48 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon icon_transport">&#xe66c;</span>
59
+                <div class="name">top2</div>
60
+                <div class="code-name">&amp;#xe66c;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon icon_transport">&#xe6b1;</span>
65
+                <div class="name">top1</div>
66
+                <div class="code-name">&amp;#xe6b1;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
70
+              <span class="icon icon_transport">&#xe66e;</span>
71
+                <div class="name">top1-copy</div>
72
+                <div class="code-name">&amp;#xe66e;</div>
73
+              </li>
74
+          
75
+            <li class="dib">
76
+              <span class="icon icon_transport">&#xe66f;</span>
77
+                <div class="name">top3-copy</div>
78
+                <div class="code-name">&amp;#xe66f;</div>
79
+              </li>
80
+          
81
+            <li class="dib">
82
+              <span class="icon icon_transport">&#xe661;</span>
83
+                <div class="name">top1-copy</div>
84
+                <div class="code-name">&amp;#xe661;</div>
85
+              </li>
86
+          
87
+            <li class="dib">
88
+              <span class="icon icon_transport">&#xe667;</span>
89
+                <div class="name">top2-copy</div>
90
+                <div class="code-name">&amp;#xe667;</div>
91
+              </li>
92
+          
93
+            <li class="dib">
94
+              <span class="icon icon_transport">&#xe66a;</span>
95
+                <div class="name">top3-copy</div>
96
+                <div class="code-name">&amp;#xe66a;</div>
97
+              </li>
98
+          
99
+            <li class="dib">
58 100
               <span class="icon icon_transport">&#xe66d;</span>
59 101
                 <div class="name">统计_面性</div>
60 102
                 <div class="code-name">&amp;#xe66d;</div>
@@ -1014,9 +1056,9 @@
1014 1056
 <pre><code class="language-css"
1015 1057
 >@font-face {
1016 1058
   font-family: 'icon_transport';
1017
-  src: url('iconfont.woff2?t=1740018666479') format('woff2'),
1018
-       url('iconfont.woff?t=1740018666479') format('woff'),
1019
-       url('iconfont.ttf?t=1740018666479') format('truetype');
1059
+  src: url('iconfont.woff2?t=1740462451907') format('woff2'),
1060
+       url('iconfont.woff?t=1740462451907') format('woff'),
1061
+       url('iconfont.ttf?t=1740462451907') format('truetype');
1020 1062
 }
1021 1063
 </code></pre>
1022 1064
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -1043,6 +1085,69 @@
1043 1085
         <ul class="icon_lists dib-box">
1044 1086
           
1045 1087
           <li class="dib">
1088
+            <span class="icon icon_transport transport-top1"></span>
1089
+            <div class="name">
1090
+              top2
1091
+            </div>
1092
+            <div class="code-name">.transport-top1
1093
+            </div>
1094
+          </li>
1095
+          
1096
+          <li class="dib">
1097
+            <span class="icon icon_transport transport-top2"></span>
1098
+            <div class="name">
1099
+              top1
1100
+            </div>
1101
+            <div class="code-name">.transport-top2
1102
+            </div>
1103
+          </li>
1104
+          
1105
+          <li class="dib">
1106
+            <span class="icon icon_transport transport-top31"></span>
1107
+            <div class="name">
1108
+              top1-copy
1109
+            </div>
1110
+            <div class="code-name">.transport-top31
1111
+            </div>
1112
+          </li>
1113
+          
1114
+          <li class="dib">
1115
+            <span class="icon icon_transport transport-top5"></span>
1116
+            <div class="name">
1117
+              top3-copy
1118
+            </div>
1119
+            <div class="code-name">.transport-top5
1120
+            </div>
1121
+          </li>
1122
+          
1123
+          <li class="dib">
1124
+            <span class="icon icon_transport transport-top4"></span>
1125
+            <div class="name">
1126
+              top1-copy
1127
+            </div>
1128
+            <div class="code-name">.transport-top4
1129
+            </div>
1130
+          </li>
1131
+          
1132
+          <li class="dib">
1133
+            <span class="icon icon_transport transport-top3"></span>
1134
+            <div class="name">
1135
+              top2-copy
1136
+            </div>
1137
+            <div class="code-name">.transport-top3
1138
+            </div>
1139
+          </li>
1140
+          
1141
+          <li class="dib">
1142
+            <span class="icon icon_transport transport-top"></span>
1143
+            <div class="name">
1144
+              top3-copy
1145
+            </div>
1146
+            <div class="code-name">.transport-top
1147
+            </div>
1148
+          </li>
1149
+          
1150
+          <li class="dib">
1046 1151
             <span class="icon icon_transport transport-tongji-2"></span>
1047 1152
             <div class="name">
1048 1153
               统计_面性
@@ -2484,6 +2589,62 @@
2484 2589
           
2485 2590
             <li class="dib">
2486 2591
                 <svg class="icon svg-icon" aria-hidden="true">
2592
+                  <use xlink:href="#transport-top1"></use>
2593
+                </svg>
2594
+                <div class="name">top2</div>
2595
+                <div class="code-name">#transport-top1</div>
2596
+            </li>
2597
+          
2598
+            <li class="dib">
2599
+                <svg class="icon svg-icon" aria-hidden="true">
2600
+                  <use xlink:href="#transport-top2"></use>
2601
+                </svg>
2602
+                <div class="name">top1</div>
2603
+                <div class="code-name">#transport-top2</div>
2604
+            </li>
2605
+          
2606
+            <li class="dib">
2607
+                <svg class="icon svg-icon" aria-hidden="true">
2608
+                  <use xlink:href="#transport-top31"></use>
2609
+                </svg>
2610
+                <div class="name">top1-copy</div>
2611
+                <div class="code-name">#transport-top31</div>
2612
+            </li>
2613
+          
2614
+            <li class="dib">
2615
+                <svg class="icon svg-icon" aria-hidden="true">
2616
+                  <use xlink:href="#transport-top5"></use>
2617
+                </svg>
2618
+                <div class="name">top3-copy</div>
2619
+                <div class="code-name">#transport-top5</div>
2620
+            </li>
2621
+          
2622
+            <li class="dib">
2623
+                <svg class="icon svg-icon" aria-hidden="true">
2624
+                  <use xlink:href="#transport-top4"></use>
2625
+                </svg>
2626
+                <div class="name">top1-copy</div>
2627
+                <div class="code-name">#transport-top4</div>
2628
+            </li>
2629
+          
2630
+            <li class="dib">
2631
+                <svg class="icon svg-icon" aria-hidden="true">
2632
+                  <use xlink:href="#transport-top3"></use>
2633
+                </svg>
2634
+                <div class="name">top2-copy</div>
2635
+                <div class="code-name">#transport-top3</div>
2636
+            </li>
2637
+          
2638
+            <li class="dib">
2639
+                <svg class="icon svg-icon" aria-hidden="true">
2640
+                  <use xlink:href="#transport-top"></use>
2641
+                </svg>
2642
+                <div class="name">top3-copy</div>
2643
+                <div class="code-name">#transport-top</div>
2644
+            </li>
2645
+          
2646
+            <li class="dib">
2647
+                <svg class="icon svg-icon" aria-hidden="true">
2487 2648
                   <use xlink:href="#transport-tongji-2"></use>
2488 2649
                 </svg>
2489 2650
                 <div class="name">统计_面性</div>

+ 31 - 3
src/assets/iconfont/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "icon_transport"; /* Project id 4543613 */
3
-  src: url('iconfont.woff2?t=1740018666479') format('woff2'),
4
-       url('iconfont.woff?t=1740018666479') format('woff'),
5
-       url('iconfont.ttf?t=1740018666479') format('truetype');
3
+  src: url('iconfont.woff2?t=1740462451907') format('woff2'),
4
+       url('iconfont.woff?t=1740462451907') format('woff'),
5
+       url('iconfont.ttf?t=1740462451907') format('truetype');
6 6
 }
7 7
 
8 8
 .icon_transport {
@@ -13,6 +13,34 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.transport-top1:before {
17
+  content: "\e66c";
18
+}
19
+
20
+.transport-top2:before {
21
+  content: "\e6b1";
22
+}
23
+
24
+.transport-top31:before {
25
+  content: "\e66e";
26
+}
27
+
28
+.transport-top5:before {
29
+  content: "\e66f";
30
+}
31
+
32
+.transport-top4:before {
33
+  content: "\e661";
34
+}
35
+
36
+.transport-top3:before {
37
+  content: "\e667";
38
+}
39
+
40
+.transport-top:before {
41
+  content: "\e66a";
42
+}
43
+
16 44
 .transport-tongji-2:before {
17 45
   content: "\e66d";
18 46
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
src/assets/iconfont/iconfont.js


+ 49 - 0
src/assets/iconfont/iconfont.json

@@ -6,6 +6,55 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "6020437",
10
+      "name": "top2",
11
+      "font_class": "top1",
12
+      "unicode": "e66c",
13
+      "unicode_decimal": 58988
14
+    },
15
+    {
16
+      "icon_id": "10940451",
17
+      "name": "top1",
18
+      "font_class": "top2",
19
+      "unicode": "e6b1",
20
+      "unicode_decimal": 59057
21
+    },
22
+    {
23
+      "icon_id": "36633839",
24
+      "name": "top1-copy",
25
+      "font_class": "top31",
26
+      "unicode": "e66e",
27
+      "unicode_decimal": 58990
28
+    },
29
+    {
30
+      "icon_id": "36633844",
31
+      "name": "top3-copy",
32
+      "font_class": "top5",
33
+      "unicode": "e66f",
34
+      "unicode_decimal": 58991
35
+    },
36
+    {
37
+      "icon_id": "37616593",
38
+      "name": "top1-copy",
39
+      "font_class": "top4",
40
+      "unicode": "e661",
41
+      "unicode_decimal": 58977
42
+    },
43
+    {
44
+      "icon_id": "37616599",
45
+      "name": "top2-copy",
46
+      "font_class": "top3",
47
+      "unicode": "e667",
48
+      "unicode_decimal": 58983
49
+    },
50
+    {
51
+      "icon_id": "40194473",
52
+      "name": "top3-copy",
53
+      "font_class": "top",
54
+      "unicode": "e66a",
55
+      "unicode_decimal": 58986
56
+    },
57
+    {
9 58
       "icon_id": "22892996",
10 59
       "name": "统计_面性",
11 60
       "font_class": "tongji-2",

BIN
src/assets/iconfont/iconfont.ttf


BIN
src/assets/iconfont/iconfont.woff


BIN
src/assets/iconfont/iconfont.woff2


BIN
src/assets/images/top1.png


BIN
src/assets/images/top2.png


BIN
src/assets/images/top3.png