浏览代码

统计优化2

maotao 1 月之前
父节点
当前提交
77d34448d4

+ 52 - 50
src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.html

@@ -31,56 +31,58 @@
31 31
   <span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
32 32
 	<span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
33 33
 </div>
34
-<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
35
-  <thead (nzSortChange)="sort($event)" nzSingleSort>
36
-    <tr>
37
-			<th nzWidth="9%" *ngIf="parent==1">父级科室(编码)</th>
38
-      <th nzWidth="9%">科室(编码)</th>
39
-      <th nzWidth="9%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
41
-      <th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
42
-			<th nzWidth="9%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
43
-      <th nzWidth="9%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
44
-      <th nzWidth="9%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
45
-      <th nzWidth="9%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
46
-      <th nzWidth="9%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
47
-      <th nzWidth="9%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
48
-    </tr>
49
-  </thead>
50
-  <tbody>
51
-    <tr *ngFor="let data of listOfData">
52
-			<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
53
-      <td>{{ data.name }}</td>
54
-      <td>{{ data.totalCount }}</td>
55
-      <td>{{ data.totalGrade }}</td>
56
-			<td>{{ data.totalPrice }}</td>
57
-      <td>{{ data.response_time_num }}</td>
58
-      <td>{{ data.execution_time_num }}</td>
59
-      <td>{{ data.aveper }}</td>
60
-      <td>{{ data.total_time }}</td>
61
-      <td>{{ data.five_count }}</td>
62
-      <td>{{ data.special_close }}</td>
63
-    </tr>
64
-  </tbody>
65
-  <ng-template #footerTpl>
66
-    <table class="footTable">
67
-      <tr *ngFor="let data of listOfDataEnd">
68
-				<td style="width: 9%" *ngIf="parent==1">{{ data.parentName }}</td>
69
-				<td style="width: 9%" *ngIf="parent==0">{{ data.name }}</td>
70
-				<td style="width: 9%" *ngIf="parent==1"></td>
71
-        <td style="width: 9%">{{ data.totalCount }}</td>
72
-        <td style="width: 9%">{{ data.totalGrade }}</td>
73
-				<td style="width: 9%">{{ data.totalPrice }}</td>
74
-        <td style="width: 9%">{{ data.response_time_num }}</td>
75
-        <td style="width: 9%">{{ data.execution_time_num }}</td>
76
-        <td style="width: 9%">{{ data.aveper }}</td>
77
-        <td style="width: 9%">{{ data.total_time }}</td>
78
-        <td style="width: 9%">{{ data.five_count }}</td>
79
-        <td style="width: 9%">{{ data.special_close }}</td>
80
-      </tr>
81
-    </table>
82
-  </ng-template>
83
-</nz-table>
34
+<div class="tableWrap">
35
+	<nz-table class="table" [ngStyle]="{ width: widthValue + 'px' }" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzWidthConfig]="widthConfig" [nzFooter]="footerTpl">
36
+		<thead (nzSortChange)="sort($event)" nzSingleSort>
37
+			<tr>
38
+				<th rowspan="2" *ngIf="parent==1">父级科室(编码)</th>
39
+				<th rowspan="2">科室(编码)</th>
40
+				<th rowspan="2" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
41
+				<th rowspan="2" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
42
+				<th rowspan="2" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
43
+				<th rowspan="2" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
44
+				<th rowspan="2" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
45
+				<th rowspan="2" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
46
+				<th rowspan="2" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
47
+				<th rowspan="2" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
48
+				<th rowspan="2" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
49
+			</tr>
50
+		</thead>
51
+		<tbody>
52
+			<tr *ngFor="let data of listOfData">
53
+				<td class="width150" *ngIf="parent==1">{{ data.parentName || '无' }}</td>
54
+				<td>{{ data.name }}</td>
55
+				<td>{{ data.totalCount }}</td>
56
+				<td>{{ data.totalGrade }}</td>
57
+				<td>{{ data.totalPrice }}</td>
58
+				<td>{{ data.response_time_num }}</td>
59
+				<td>{{ data.execution_time_num }}</td>
60
+				<td>{{ data.aveper }}</td>
61
+				<td>{{ data.total_time }}</td>
62
+				<td>{{ data.five_count }}</td>
63
+				<td>{{ data.special_close }}</td>
64
+			</tr>
65
+		</tbody>
66
+		<ng-template #footerTpl>
67
+			<table class="footTable">
68
+				<tr *ngFor="let data of listOfDataEnd">
69
+					<td class="width150" *ngIf="parent==1">{{ data.parentName }}</td>
70
+					<td class="width150" *ngIf="parent==0">{{ data.name }}</td>
71
+					<td class="width150" *ngIf="parent==1"></td>
72
+					<td>{{ data.totalCount }}</td>
73
+					<td>{{ data.totalGrade }}</td>
74
+					<td>{{ data.totalPrice }}</td>
75
+					<td>{{ data.response_time_num }}</td>
76
+					<td>{{ data.execution_time_num }}</td>
77
+					<td>{{ data.aveper }}</td>
78
+					<td>{{ data.total_time }}</td>
79
+					<td>{{ data.five_count }}</td>
80
+					<td>{{ data.special_close }}</td>
81
+				</tr>
82
+			</table>
83
+		</ng-template>
84
+	</nz-table>
85
+</div>
84 86
 <div class="pagination">
85 87
   <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
86 88
   <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>

+ 16 - 1
src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.less

@@ -53,7 +53,22 @@
53 53
   .table{
54 54
     margin: 0 8px;
55 55
   }
56
-
56
+	
57
+	.tableWrap{
58
+	  margin: 0 8px;
59
+	  overflow-x: auto;
60
+	  .footTable, tbody{
61
+	    td{
62
+	      width: 100px;
63
+	      max-width: 100px;
64
+	      &.width150{
65
+	        width: 150px;
66
+	        max-width: 150px;
67
+	      }
68
+	    }
69
+	  }
70
+	}
71
+	
57 72
   .moreFilter{
58 73
     margin-bottom: 16px;
59 74
     span{

+ 9 - 0
src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.ts

@@ -113,6 +113,8 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
113 113
 
114 114
   // 表格数据
115 115
   loading1 = false;
116
+	widthValue:any;
117
+	widthConfig:any = [];
116 118
   getList(num?: number, field?: string, sort?: string) {
117 119
     if (num !== undefined) {
118 120
       this.pageIndex = num;
@@ -134,6 +136,13 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
134 136
     if (field && sort) {
135 137
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
136 138
     }
139
+		if(this.parent==1){
140
+			this.widthConfig = new Array(11).fill('100px').map((v, i) => { return (i == 0 || i == 1 && this.parent==1) || (i == 0 && this.parent==0) ? '150px' : '100px' });;
141
+			this.widthValue = 11 * 100 + 300 * 1 + 20
142
+		}else{
143
+			this.widthConfig = new Array(10).fill('100px').map((v, i) => { return (i == 0 || i == 1 && this.parent==1) || (i == 0 && this.parent==0) ? '150px' : '100px' });;
144
+			this.widthValue = 10 * 100 + 162 * 1 + 20
145
+		}
137 146
     this.loading1 = true;
138 147
     this.mainService
139 148
       .postCustom("itsm/report", "deptTransOrderQc", postData)

+ 21 - 21
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.html

@@ -34,16 +34,16 @@
34 34
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
35 35
   <thead (nzSortChange)="sort($event)" nzSingleSort>
36 36
     <tr>
37
-			<th nzWidth="10%" *ngIf="parent==1">父级科室(编码)</th>
38
-      <th nzWidth="10%">科室(编码)</th>
39
-      <th nzWidth="10%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
40
-      <th nzWidth="10%" nzShowSort nzSortKey="evaCount" [(nzSort)]="sortCurrent.evaCount">评价总工单数</th>
41
-      <th nzWidth="10%" nzShowSort nzSortKey="eva1" [(nzSort)]="sortCurrent.eva1">一星评价数</th>
42
-      <th nzWidth="10%" nzShowSort nzSortKey="eva2" [(nzSort)]="sortCurrent.eva2">二星评价数</th>
43
-      <th nzWidth="10%" nzShowSort nzSortKey="eva3" [(nzSort)]="sortCurrent.eva3">三星评价数</th>
44
-      <th nzWidth="10%" nzShowSort nzSortKey="eva4" [(nzSort)]="sortCurrent.eva4">四星评价数</th>
45
-      <th nzWidth="10%" nzShowSort nzSortKey="eva5" [(nzSort)]="sortCurrent.eva5">五星评价数</th>
46
-      <th nzWidth="10%" nzShowSort nzSortKey="avgCount" [(nzSort)]="sortCurrent.avgCount">平均总星级</th>
37
+			<th [nzWidth]="widthStyle" *ngIf="parent==1">父级科室(编码)</th>
38
+      <th [nzWidth]="widthStyle">科室(编码)</th>
39
+      <th [nzWidth]="widthThStyle" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
40
+      <th [nzWidth]="widthThStyle" nzShowSort nzSortKey="evaCount" [(nzSort)]="sortCurrent.evaCount">评价总工单数</th>
41
+      <th [nzWidth]="widthThStyle" nzShowSort nzSortKey="eva1" [(nzSort)]="sortCurrent.eva1">一星评价数</th>
42
+      <th [nzWidth]="widthThStyle" nzShowSort nzSortKey="eva2" [(nzSort)]="sortCurrent.eva2">二星评价数</th>
43
+      <th [nzWidth]="widthThStyle" nzShowSort nzSortKey="eva3" [(nzSort)]="sortCurrent.eva3">三星评价数</th>
44
+      <th [nzWidth]="widthThStyle" nzShowSort nzSortKey="eva4" [(nzSort)]="sortCurrent.eva4">四星评价数</th>
45
+      <th [nzWidth]="widthThStyle" nzShowSort nzSortKey="eva5" [(nzSort)]="sortCurrent.eva5">五星评价数</th>
46
+      <th [nzWidth]="widthThStyle" nzShowSort nzSortKey="avgCount" [(nzSort)]="sortCurrent.avgCount">平均总星级</th>
47 47
     </tr>
48 48
   </thead>
49 49
   <tbody>
@@ -63,17 +63,17 @@
63 63
   <ng-template #footerTpl>
64 64
     <table class="footTable">
65 65
       <tr *ngFor="let data of listOfDataEnd">
66
-				<td style="width: 10%" *ngIf="parent==1">{{ data.parentName }}</td>
67
-				<td style="width: 10%" *ngIf="parent==0">{{ data.name }}</td>
68
-				<td style="width: 10%" *ngIf="parent==1"></td>
69
-        <td style="width: 10%">{{ data.totalCount }}</td>
70
-        <td style="width: 10%">{{ data.evaCount }}</td>
71
-        <td style="width: 10%">{{ data.eva1 }}</td>
72
-        <td style="width: 10%">{{ data.eva2 }}</td>
73
-        <td style="width: 10%">{{ data.eva3 }}</td>
74
-        <td style="width: 10%">{{ data.eva4 }}</td>
75
-        <td style="width: 10%">{{ data.eva5 }}</td>
76
-        <td style="width: 10%">{{ data.avgCount }}</td>
66
+				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==1">{{ data.parentName }}</td>
67
+				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==0">{{ data.name }}</td>
68
+				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==1"></td>
69
+        <td [ngStyle]="{width: widthThStyle}">{{ data.totalCount }}</td>
70
+        <td [ngStyle]="{width: widthThStyle}">{{ data.evaCount }}</td>
71
+        <td [ngStyle]="{width: widthThStyle}">{{ data.eva1 }}</td>
72
+        <td [ngStyle]="{width: widthThStyle}">{{ data.eva2 }}</td>
73
+        <td [ngStyle]="{width: widthThStyle}">{{ data.eva3 }}</td>
74
+        <td [ngStyle]="{width: widthThStyle}">{{ data.eva4 }}</td>
75
+        <td [ngStyle]="{width: widthThStyle}">{{ data.eva5 }}</td>
76
+        <td [ngStyle]="{width: widthThStyle}">{{ data.avgCount }}</td>
77 77
       </tr>
78 78
     </table>
79 79
   </ng-template>

+ 16 - 1
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.less

@@ -53,7 +53,22 @@
53 53
   .table{
54 54
     margin: 0 8px;
55 55
   }
56
-
56
+	
57
+	.tableWrap{
58
+	  margin: 0 8px;
59
+	  overflow-x: auto;
60
+	  .footTable, tbody{
61
+	    td{
62
+	      width: 100px;
63
+	      max-width: 100px;
64
+	      &.width150{
65
+	        width: 150px;
66
+	        max-width: 150px;
67
+	      }
68
+	    }
69
+	  }
70
+	}
71
+	
57 72
   .moreFilter{
58 73
     margin-bottom: 16px;
59 74
     span{

+ 9 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts

@@ -113,6 +113,8 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
113 113
 
114 114
   // 表格数据
115 115
   loading1 = false;
116
+	widthStyle:any;
117
+	widthThStyle:any;
116 118
   getList(num?: number, field?: string, sort?: string) {
117 119
     if (num !== undefined) {
118 120
       this.pageIndex = num;
@@ -134,6 +136,13 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
134 136
     if (field && sort) {
135 137
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
136 138
     }
139
+		if(this.parent==1){
140
+			this.widthThStyle = '9%'
141
+			this.widthStyle = '14%'
142
+		}else{
143
+			this.widthThStyle = '10%'
144
+			this.widthStyle = '20%'
145
+		}
137 146
     this.loading1 = true;
138 147
     this.mainService
139 148
       .postCustom("itsm/report", "deptDegreeTransOrder", postData)

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts

@@ -148,7 +148,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
148 148
 		}else{
149 149
 			this.widthConfig = new Array(10).fill('100px').map((v, i) => { return (i == 0 || i == 1 && this.parent==1) || (i == 0 && this.parent==0) ? '150px' : '100px' });;
150 150
 			this.widthStyle = '20%'
151
-			this.widthValue = 10 * 100 + 149 * 1 + 20
151
+			this.widthValue = 10 * 100 + 162 * 1 + 20
152 152
 		}
153 153
     this.loading1 = true;
154 154
     this.mainService