Kaynağa Gözat

Merge branch 'vue_statistics_branch' of http://git.shengws.com/csx/Vue_New into vue_statistics_branch

XMLWAN 4 yıl önce
ebeveyn
işleme
9aaaac9e81

+ 2 - 1
src/xt_pages/qcd/components/LineChart.vue Dosyayı Görüntüle

@@ -247,7 +247,8 @@ export default {
247 247
         //   }
248 248
         // ],
249 249
         legend: this.chartOptions.legend,
250
-        series: this.chartOptions.series
250
+        series: this.chartOptions.series,
251
+        dataZoom: this.chartOptions.dataZoom,
251 252
       });
252 253
     },
253 254
     initChart() {

+ 14 - 11
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressure.vue Dosyayı Görüntüle

@@ -89,7 +89,7 @@
89 89
             </div>
90 90
             <div class="tableTitle">统计表</div>
91 91
             <div>
92
-              <el-table :data="tableData" style="width: 100%" :height="tableHeight" >
92
+              <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
93 93
                 <el-table-column fixed label="日期" align="center">
94 94
                   <template slot-scope="scope">
95 95
                     {{scope.row.schedule_date | parseTime("{y}-{m}-{d}") }}
@@ -114,15 +114,15 @@
114 114
                   </template>
115 115
                 </el-table-column>
116 116
 
117
-                <el-table-column label="透析中最低血压" align="center">
117
+                <el-table-column width="130" label="透析中最低血压" align="center">
118 118
                   <template slot-scope="scope">
119
-                    <div v-if="scope.row.min_monitor.systolic_blood_pressure">{{ scope.row.min_monitor.systolic_blood_pressure}} /{{ scope.row.min_monitor.diastolic_blood_pressure}}</div>
119
+                    <div v-if="scope.row.min_monitor.diastolic_blood_pressure">{{ scope.row.min_monitor.diastolic_blood_pressure}}</div>
120 120
                   </template>
121 121
                 </el-table-column>
122 122
 
123
-                <el-table-column label="透析中最高血压" align="center">
123
+                <el-table-column width="130" label="透析中最高血压" align="center">
124 124
                   <template slot-scope="scope">
125
-                    <div v-if="scope.row.max_monitor.systolic_blood_pressure">{{ scope.row.max_monitor.systolic_blood_pressure}} /{{ scope.row.max_monitor.diastolic_blood_pressure}}</div>
125
+                    <div v-if="scope.row.max_monitor.systolic_blood_pressure">{{ scope.row.max_monitor.systolic_blood_pressure}}</div>
126 126
 
127 127
 
128 128
                   </template>
@@ -592,13 +592,16 @@
592 592
 <style lang="scss">
593 593
   .page_process {
594 594
 
595
-  .el-button--medium {
596
-    padding: 10px 8px;
597
-  }
595
+    .el-button--medium {
596
+      padding: 10px 8px;
597
+    }
598 598
 
599
-  .el-form-item {
600
-    margin-bottom: 0;
601
-  }
599
+    .el-form-item {
600
+      margin-bottom: 0;
601
+    }
602
+    ::-webkit-scrollbar{
603
+      height: 15px !important;
604
+    }
602 605
 
603 606
   }
604 607
 </style>

+ 35 - 3
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails.vue Dosyayı Görüntüle

@@ -2,6 +2,7 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-button type="primary" @click="$router.back(-1)">返回</el-button>
5 6
     </div>
6 7
     <div class="app-container">
7 8
       <div class="page_bloodPressureDetails">
@@ -92,7 +93,7 @@
92 93
             </div>
93 94
             <div class="tableTitle">统计表</div>
94 95
             <div>
95
-              <el-table :data="tableData" style="width: 100%" :height="tableHeight" >
96
+              <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
96 97
                 <el-table-column fixed label="日期" align="center">
97 98
                   <template slot-scope="scope">
98 99
                     {{scope.row.schedule_date | parseTime("{y}-{m}-{d}") }}
@@ -107,13 +108,13 @@
107 108
 
108 109
                 <el-table-column label="透析中最低血压" align="center">
109 110
                   <template slot-scope="scope">
110
-                    <div v-if="scope.row.min_monitor.systolic_blood_pressure">{{ scope.row.min_monitor.systolic_blood_pressure}} /{{ scope.row.min_monitor.diastolic_blood_pressure}}</div>
111
+                    <div v-if="scope.row.min_monitor.diastolic_blood_pressure">{{ scope.row.min_monitor.diastolic_blood_pressure}}</div>
111 112
                   </template>
112 113
                 </el-table-column>
113 114
 
114 115
                 <el-table-column label="透析中最高血压" align="center">
115 116
                   <template slot-scope="scope">
116
-                    <div v-if="scope.row.max_monitor.systolic_blood_pressure">{{ scope.row.max_monitor.systolic_blood_pressure}} /{{ scope.row.max_monitor.diastolic_blood_pressure}}</div>
117
+                    <div v-if="scope.row.max_monitor.systolic_blood_pressure">{{ scope.row.max_monitor.systolic_blood_pressure}}</div>
117 118
 
118 119
 
119 120
                   </template>
@@ -260,6 +261,24 @@ export default {
260 261
               }
261 262
             }
262 263
           }
264
+        ],
265
+        dataZoom: [
266
+          {
267
+            // Y轴固定,让内容滚动
268
+            type: 'slider',
269
+            show: false,
270
+            xAxisIndex: [0],
271
+            start: 1,
272
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
273
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
274
+          },
275
+          {
276
+            type: 'inside',
277
+            xAxisIndex: [0],
278
+            start: 1,
279
+            end: 20,
280
+            zoomLock: true // 锁定区域禁止缩放
281
+          }
263 282
         ]
264 283
       },
265 284
     };
@@ -352,6 +371,7 @@ export default {
352 371
               this.chart.series[0].data.push(resp.data.data[i].systolic_blood_pressure)
353 372
               this.chart.series[1].data.push(resp.data.data[i].diastolic_blood_pressure)
354 373
             }
374
+            this.getArrLength(this.chart.xAxis.data)
355 375
           } else {
356 376
           }
357 377
         })
@@ -403,6 +423,15 @@ export default {
403 423
     },
404 424
     clickQuality(index) {
405 425
       this.quality = index;
426
+    },
427
+    getArrLength(result){
428
+      if(result.length > 10){
429
+        var dataZoom_end = (10/result.length)*100;
430
+        this.chart.dataZoom[0].end = dataZoom_end
431
+      }else{
432
+        var dataZoom_end = 100;
433
+        this.chart.dataZoom[0].end = dataZoom_end
434
+      }
406 435
     }
407 436
   },created() {
408 437
     var date = new Date()
@@ -444,5 +473,8 @@ export default {
444 473
   .el-form-item {
445 474
     margin-bottom: 0;
446 475
   }
476
+  ::-webkit-scrollbar{
477
+    height: 15px !important;
478
+  }
447 479
 }
448 480
 </style>

+ 6 - 9
src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue Dosyayı Görüntüle

@@ -72,10 +72,8 @@
72 72
     </div>
73 73
     <div class="tableTitle">统计表</div>
74 74
     <div>
75
-      <el-table :data="tableData" style="width: 100%" :height="tableHeight">
76
-
77
-
78
-        <el-table-column fixed label="姓名" align="center">
75
+      <el-table :data="tableData" style="width: 100%" border>
76
+        <el-table-column label="姓名" align="center">
79 77
           <template slot-scope="scope">
80 78
             {{scope.row.patient.name}}
81 79
           </template>
@@ -92,12 +90,12 @@
92 90
 
93 91
         <el-table-column :label="item_name" align="center">
94 92
           <template slot-scope="scope">
95
-            {{getValue(scope.row)}}
93
+            <span v-html="getValue(scope.row)"></span>
96 94
 
97 95
           </template>
98 96
         </el-table-column>
99 97
 
100
-        <el-table-column fixed="right" label="趋势" align="center">
98
+        <el-table-column label="趋势" align="center">
101 99
           <template slot-scope="scope">
102 100
             <el-button
103 101
               @click.native.prevent="jumpDetail(scope.row)"
@@ -261,9 +259,9 @@
261 259
             let min_range_value = this.range_value_columns[2]
262 260
             let arr = min_range_value.split("~")
263 261
             if (parseFloat(row.inspect_value) > arr[1]) {
264
-              return row.inspect_value + "↑"
262
+              return row.inspect_value + "<span style='color:#F56C6C;margin-left:5px;'></span>"
265 263
             } else if (parseFloat(row.inspect_value) < arr[0]) {
266
-              return row.inspect_value + "↓"
264
+              return row.inspect_value + "<span style='color:#5B98FF;margin-left:5px;'></span>"
267 265
             } else {
268 266
               return row.inspect_value
269 267
             }
@@ -491,7 +489,6 @@
491 489
       }
492 490
     },
493 491
     created() {
494
-      this.tableHeight = (document.documentElement.clientHeight - 44) + 'px'
495 492
       var date = new Date()
496 493
       var year = date.getFullYear() //获取完整的年份(4位)
497 494
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)

+ 28 - 0
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue Dosyayı Görüntüle

@@ -352,6 +352,24 @@
352 352
                 }
353 353
               }
354 354
             }
355
+          ],
356
+          dataZoom: [
357
+            {
358
+              // Y轴固定,让内容滚动
359
+              type: 'slider',
360
+              show: false,
361
+              xAxisIndex: [0],
362
+              start: 1,
363
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
364
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
365
+            },
366
+            {
367
+              type: 'inside',
368
+              xAxisIndex: [0],
369
+              start: 1,
370
+              end: 20,
371
+              zoomLock: true // 锁定区域禁止缩放
372
+            }
355 373
           ]
356 374
         }
357 375
 
@@ -606,6 +624,7 @@
606 624
                 this.options2.xAxis.data.push(resp.data.data[i].date)
607 625
                 this.options2.series[0].data.push(resp.data.data[i].value)
608 626
               }
627
+              this.getArrLength(this.options2.xAxis.data)
609 628
 
610 629
             } else {
611 630
 
@@ -619,6 +638,15 @@
619 638
         // 把时间日期转成时间戳
620 639
         return new Date(time).getTime() / 1000;
621 640
       },
641
+      getArrLength(result){
642
+        if(result.length > 10){
643
+          var dataZoom_end = (10/result.length)*100;
644
+          this.options2.dataZoom[0].end = dataZoom_end
645
+        }else{
646
+          var dataZoom_end = 100;
647
+          this.options2.dataZoom[0].end = dataZoom_end
648
+        }
649
+      }
622 650
 
623 651
     }, created() {
624 652
       var date = new Date()

+ 32 - 4
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue Dosyayı Görüntüle

@@ -81,15 +81,15 @@
81 81
               </el-table-column>
82 82
             </el-table>
83 83
           </div>
84
-          <div style="padding-left:10px;flex:1">
84
+          <div style="padding-left:10px;flex:1;width:0;">
85 85
             <div class="tableTitle">指标趋势</div>
86 86
             <div>
87 87
               <line-chart :options="chart"></line-chart>
88 88
             </div>
89 89
             <div class="tableTitle">统计表</div>
90 90
             <div>
91
-              <el-table :data="tableData" style="width: 100%"  v-loading="loading">
92
-                <el-table-column fixed label="监测时间" align="center">
91
+              <el-table :data="tableData" style="width: 100%"  v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
92
+                <el-table-column fixed width="100" label="监测时间" align="center">
93 93
                   <template slot-scope="scope">
94 94
                     <!--{{getTime(scope.row.operate_time)}}-->
95 95
                     {{scope.row.operate_time | parseTime("{y}-{m}-{d} {h}:{i}") }}
@@ -154,7 +154,7 @@
154 154
                 </el-table-column>
155 155
 
156 156
 
157
-                <el-table-column label="透析液温度" align="center">
157
+                <el-table-column width="110" label="透析液温度" align="center">
158 158
                   <template slot-scope="scope">
159 159
                     {{ scope.row.dialysate_temperature?scope.row.dialysate_temperature:''}}
160 160
                   </template>
@@ -396,6 +396,24 @@
396 396
                 }
397 397
               }
398 398
             }
399
+          ],
400
+          dataZoom: [
401
+            {
402
+              // Y轴固定,让内容滚动
403
+              type: 'slider',
404
+              show: false,
405
+              xAxisIndex: [0],
406
+              start: 1,
407
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
408
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
409
+            },
410
+            {
411
+              type: 'inside',
412
+              xAxisIndex: [0],
413
+              start: 1,
414
+              end: 20,
415
+              zoomLock: true // 锁定区域禁止缩放
416
+            }
399 417
           ]
400 418
         }
401 419
 
@@ -517,6 +535,7 @@
517 535
                   this.chart.xAxis.data.push(resp.data.data[i].date)
518 536
                   this.chart.series[0].data.push(resp.data.data[i].value)
519 537
                 }
538
+                this.getArrLength(this.chart.xAxis.data)
520 539
             } else {
521 540
             }
522 541
           })
@@ -571,6 +590,15 @@
571 590
             }
572 591
           }
573 592
         })
593
+      },
594
+      getArrLength(result){
595
+        if(result.length > 10){
596
+          var dataZoom_end = (10/result.length)*100;
597
+          this.chart.dataZoom[0].end = dataZoom_end
598
+        }else{
599
+          var dataZoom_end = 100;
600
+          this.chart.dataZoom[0].end = dataZoom_end
601
+        }
574 602
       }
575 603
     }, created() {
576 604
       var date = new Date()

+ 1 - 1
src/xt_pages/qcd/indicatorControlAnalysis/patientInspectionDetail.vue Dosyayı Görüntüle

@@ -243,7 +243,7 @@
243 243
         },
244 244
         stateType: 1,
245 245
         month: [
246
-          { value: 1, label: '月', state: 1 },
246
+          { value: 1, label: '近一个月', state: 1 },
247 247
           { value: 2, label: '近三个月', state: 2 },
248 248
           { value: 3, label: '近半年', state: 3 },
249 249
           { value: 4, label: '近一年', state: 4 },

+ 70 - 27
src/xt_pages/qcd/indicatorControlAnalysis/process.vue Dosyayı Görüntüle

@@ -83,7 +83,7 @@
83 83
               </el-table-column>
84 84
             </el-table>
85 85
           </div>
86
-          <div style="padding-left:10px;flex:1">
86
+          <div style="padding-left:10px;flex:1;width:0;">
87 87
             <div class="tableTitle">指标趋势</div>
88 88
             <div>
89 89
               <line-chart :options="chart"
@@ -93,8 +93,8 @@
93 93
             </div>
94 94
             <div class="tableTitle">统计表</div>
95 95
             <div>
96
-              <el-table :data="tableData" v-loading="loading">
97
-                <el-table-column fixed label="透析日期" align="center">
96
+              <el-table :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
97
+                <el-table-column fixed width="110" label="透析日期" align="center">
98 98
                   <template slot-scope="scope">
99 99
                     {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
100 100
                     <!--{{getTime(scope.row.schedule_date)}}-->
@@ -107,19 +107,19 @@
107 107
                   </template>
108 108
                 </el-table-column>
109 109
 
110
-                <el-table-column label="透析机号" align="center">
110
+                <el-table-column width="100" label="透析机号" align="center">
111 111
                   <template slot-scope="scope">
112 112
                     {{scope.row.device_number.number}}
113 113
                   </template>
114 114
                 </el-table-column>
115 115
 
116
-                <el-table-column label="干体重" align="center">
116
+                <el-table-column width="100" label="干体重" align="center">
117 117
                   <template slot-scope="scope">
118 118
                     {{scope.row.predialysis_evaluation.dry_weight?scope.row.predialysis_evaluation.dry_weight:''}}
119 119
                   </template>
120 120
                 </el-table-column>
121 121
 
122
-                <el-table-column label="透前体重" align="center">
122
+                <el-table-column width="100" label="透前体重" align="center">
123 123
                   <template slot-scope="scope">
124 124
                     {{
125 125
                     scope.row.predialysis_evaluation.weight_before?scope.row.predialysis_evaluation.weight_before:''}}
@@ -127,7 +127,7 @@
127 127
                   </template>
128 128
                 </el-table-column>
129 129
 
130
-                <el-table-column label="透后体重" align="center">
130
+                <el-table-column width="100" label="透后体重" align="center">
131 131
                   <template slot-scope="scope">
132 132
                     {{ scope.row.assessment_after_dislysis.weight_after ?
133 133
                     scope.row.assessment_after_dislysis.weight_after :''}}
@@ -135,7 +135,7 @@
135 135
                   </template>
136 136
                 </el-table-column>
137 137
 
138
-                <el-table-column label="目标超滤量" align="center">
138
+                <el-table-column width="110" label="目标超滤量" align="center">
139 139
                   <template slot-scope="scope">
140 140
                     {{ scope.row.prescription.target_ultrafiltration ? scope.row.prescription.target_ultrafiltration :
141 141
                     ''}}
@@ -143,7 +143,7 @@
143 143
                   </template>
144 144
                 </el-table-column>
145 145
 
146
-                <el-table-column label="实际超滤量" align="center">
146
+                <el-table-column width="110" label="实际超滤量" align="center">
147 147
                   <template slot-scope="scope">
148 148
                     {{ scope.row.assessment_after_dislysis.actual_ultrafiltration ?
149 149
                     scope.row.assessment_after_dislysis.actual_ultrafiltration :''}}
@@ -152,7 +152,7 @@
152 152
                 </el-table-column>
153 153
 
154 154
 
155
-                <el-table-column label="透前血压" align="center">
155
+                <el-table-column width="100" label="透前血压" align="center">
156 156
                   <template slot-scope="scope">
157 157
                     <div
158 158
                       v-if="scope.row.predialysis_evaluation.systolic_blood_pressure && scope.row.predialysis_evaluation.diastolic_blood_pressure">
@@ -164,7 +164,7 @@
164 164
                   </template>
165 165
                 </el-table-column>
166 166
 
167
-                <el-table-column label="透后血压" align="center">
167
+                <el-table-column width="100" label="透后血压" align="center">
168 168
                   <template slot-scope="scope">
169 169
                     <div
170 170
                       v-if="scope.row.assessment_after_dislysis.systolic_blood_pressure&&scope.row.assessment_after_dislysis.diastolic_blood_pressure">
@@ -177,7 +177,7 @@
177 177
                 </el-table-column>
178 178
 
179 179
 
180
-                <el-table-column label="透前脉率" align="center">
180
+                <el-table-column width="100" label="透前脉率" align="center">
181 181
                   <template slot-scope="scope">
182 182
                     {{
183 183
                     scope.row.predialysis_evaluation.pulse_frequency?scope.row.predialysis_evaluation.pulse_frequency:''}}
@@ -185,7 +185,7 @@
185 185
                   </template>
186 186
                 </el-table-column>
187 187
 
188
-                <el-table-column label="透后脉率" align="center">
188
+                <el-table-column width="100" label="透后脉率" align="center">
189 189
                   <template slot-scope="scope">
190 190
                     {{
191 191
                     scope.row.assessment_after_dislysis.pulse_frequency?scope.row.assessment_after_dislysis.pulse_frequency:''}}
@@ -194,21 +194,21 @@
194 194
                 </el-table-column>
195 195
 
196 196
 
197
-                <el-table-column label="透析模式" align="center">
197
+                <el-table-column width="100" label="透析模式" align="center">
198 198
                   <template slot-scope="scope">
199 199
                     {{ getModeName(scope.row.prescription.mode_id)}}
200 200
                   </template>
201 201
                 </el-table-column>
202 202
 
203 203
 
204
-                <el-table-column label="透析器" align="center">
204
+                <el-table-column width="100" label="透析器" align="center">
205 205
                   <template slot-scope="scope">
206 206
                     {{ scope.row.prescription.dialyzer_perfusion_apparatus}}
207 207
                   </template>
208 208
                 </el-table-column>
209 209
 
210 210
 
211
-                <el-table-column label="钾" align="center">
211
+                <el-table-column width="100" label="钾" align="center">
212 212
                   <template slot-scope="scope">
213 213
                     {{ scope.row.prescription.kalium?scope.row.prescription.kalium:''}}
214 214
 
@@ -216,7 +216,7 @@
216 216
                 </el-table-column>
217 217
 
218 218
 
219
-                <el-table-column label="钠" align="center">
219
+                <el-table-column width="100" label="钠" align="center">
220 220
                   <template slot-scope="scope">
221 221
                     {{ scope.row.prescription.sodium?scope.row.prescription.sodium:''}}
222 222
 
@@ -224,7 +224,7 @@
224 224
                 </el-table-column>
225 225
 
226 226
 
227
-                <el-table-column label="钙" align="center">
227
+                <el-table-column width="100" label="钙" align="center">
228 228
                   <template slot-scope="scope">
229 229
                     {{ scope.row.prescription.calcium?scope.row.prescription.calcium:''}}
230 230
 
@@ -232,7 +232,7 @@
232 232
                 </el-table-column>
233 233
 
234 234
 
235
-                <el-table-column label="透析时长" align="center">
235
+                <el-table-column width="110" label="透析时长" align="center">
236 236
                   <template slot-scope="scope">
237 237
                     {{
238 238
                     scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
@@ -242,14 +242,14 @@
242 242
 
243 243
                 </el-table-column>
244 244
 
245
-                <el-table-column label="血管通路" align="center">
245
+                <el-table-column width="100" label="血管通路" align="center">
246 246
                   <template slot-scope="scope">
247 247
                     {{ QueryOperaById(scope.row.predialysis_evaluation.blood_access_part_opera_id)}}
248 248
                   </template>
249 249
                 </el-table-column>
250 250
 
251 251
 
252
-                <el-table-column label="抗凝剂" align="center">
252
+                <el-table-column width="110" label="抗凝剂" align="center">
253 253
                   <template slot-scope="scope">
254 254
                     {{GetAnticoagulantById( scope.row.prescription.anticoagulant)}}
255 255
                   </template>
@@ -419,6 +419,24 @@
419 419
                 }
420 420
               }
421 421
             }
422
+          ],
423
+          dataZoom: [
424
+            {
425
+              // Y轴固定,让内容滚动
426
+              type: 'slider',
427
+              show: false,
428
+              xAxisIndex: [0],
429
+              start: 1,
430
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
431
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
432
+            },
433
+            {
434
+              type: 'inside',
435
+              xAxisIndex: [0],
436
+              start: 1,
437
+              end: 20,
438
+              zoomLock: true // 锁定区域禁止缩放
439
+            }
422 440
           ]
423 441
         },
424 442
         bar: {
@@ -626,6 +644,7 @@
626 644
                   this.chart.xAxis.data.push(resp.data.data[i].date)
627 645
                   this.chart.series[0].data.push(resp.data.data[i].value)
628 646
                 }
647
+                this.getArrLength(this.chart.xAxis.data,1)
629 648
               } else {
630 649
 
631 650
                 for (let i = 0; i < resp.data.data.length; i++) {
@@ -634,6 +653,7 @@
634 653
                   this.percent.push(resp.data.data[i].ratio)
635 654
 
636 655
                 }
656
+                this.getArrLength(this.bar.xAxis.data,2)
637 657
               }
638 658
             } else {
639 659
             }
@@ -692,6 +712,26 @@
692 712
           }
693 713
         })
694 714
 
715
+      },
716
+      getArrLength(result,type){
717
+        if(type == 1){
718
+          if(result.length > 10){
719
+            var dataZoom_end = (10/result.length)*100;
720
+            this.chart.dataZoom[0].end = dataZoom_end
721
+          }else{
722
+            var dataZoom_end = 100;
723
+            this.chart.dataZoom[0].end = dataZoom_end
724
+          }
725
+        }else if(type == 2){
726
+          if(result.length > 10){
727
+            var dataZoom_end = (10/result.length)*100;
728
+            this.bar.dataZoom[0].end = dataZoom_end
729
+          }else{
730
+            var dataZoom_end = 100;
731
+            this.bar.dataZoom[0].end = dataZoom_end
732
+          }
733
+        }
734
+        
695 735
       }
696 736
     }, created() {
697 737
       var date = new Date()
@@ -723,13 +763,16 @@
723 763
 <style lang="scss">
724 764
   .page_process {
725 765
 
726
-  .el-button--medium {
727
-    padding: 10px 8px;
728
-  }
766
+    .el-button--medium {
767
+      padding: 10px 8px;
768
+    }
729 769
 
730
-  .el-form-item {
731
-    margin-bottom: 0;
732
-  }
770
+    .el-form-item {
771
+      margin-bottom: 0;
772
+    }
773
+    ::-webkit-scrollbar{
774
+      height: 15px !important;
775
+    }
733 776
 
734 777
   }
735 778
 </style>

+ 4 - 1
src/xt_pages/qcd/indicatorControlAnalysis/weight.vue Dosyayı Görüntüle

@@ -90,7 +90,7 @@
90 90
             <div class="tableTitle">统计表</div>
91 91
             <div>
92 92
 
93
-              <el-table :data="tableData" style="width: 100%" :height="tableHeight" >
93
+              <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94 94
                 <el-table-column fixed label="日期" align="center">
95 95
                   <template slot-scope="scope">
96 96
                     {{scope.row.assessment_date | parseTime("{y}-{m}-{d}") }}
@@ -605,6 +605,9 @@
605 605
   .el-form-item {
606 606
     margin-bottom: 0;
607 607
   }
608
+  ::-webkit-scrollbar{
609
+    height: 15px !important;
610
+  }
608 611
 
609 612
   }
610 613
 </style>

+ 33 - 1
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue Dosyayı Görüntüle

@@ -2,6 +2,7 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-button type="primary" @click="$router.back(-1)">返回</el-button>
5 6
     </div>
6 7
     <div class="app-container">
7 8
       <div class="page_weightDetails">
@@ -94,7 +95,7 @@
94 95
             </div>
95 96
             <div class="tableTitle">统计表</div>
96 97
             <div>
97
-              <el-table :data="tableData" style="width: 100%" :height="tableHeight" >
98
+              <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
98 99
                 <el-table-column fixed label="日期" align="center">
99 100
                   <template slot-scope="scope">
100 101
                     {{scope.row.assessment_date | parseTime("{y}-{m}-{d}") }}
@@ -263,6 +264,24 @@ export default {
263 264
               }
264 265
             }
265 266
           },
267
+        ],
268
+        dataZoom: [
269
+          {
270
+            // Y轴固定,让内容滚动
271
+            type: 'slider',
272
+            show: false,
273
+            xAxisIndex: [0],
274
+            start: 1,
275
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
276
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
277
+          },
278
+          {
279
+            type: 'inside',
280
+            xAxisIndex: [0],
281
+            start: 1,
282
+            end: 20,
283
+            zoomLock: true // 锁定区域禁止缩放
284
+          }
266 285
         ]
267 286
       },
268 287
     };
@@ -358,6 +377,7 @@ export default {
358 377
               this.chart.xAxis.data.push(resp.data.data[i].date)
359 378
               this.chart.series[0].data.push(parseFloat(resp.data.data[i].value).toFixed(1))
360 379
             }
380
+            this.getArrLength(this.chart.xAxis.data)
361 381
           } else {
362 382
           }
363 383
         })
@@ -404,6 +424,15 @@ export default {
404 424
         }
405 425
       })
406 426
     },
427
+    getArrLength(result){
428
+      if(result.length > 10){
429
+        var dataZoom_end = (10/result.length)*100;
430
+        this.chart.dataZoom[0].end = dataZoom_end
431
+      }else{
432
+        var dataZoom_end = 100;
433
+        this.chart.dataZoom[0].end = dataZoom_end
434
+      }
435
+    }
407 436
   },created() {
408 437
     var date = new Date()
409 438
     var year = date.getFullYear() //获取完整的年份(4位)
@@ -444,5 +473,8 @@ export default {
444 473
   .el-form-item {
445 474
     margin-bottom: 0;
446 475
   }
476
+  ::-webkit-scrollbar{
477
+    height: 15px !important;
478
+  }
447 479
 }
448 480
 </style>

+ 35 - 8
src/xt_pages/qcd/officesControlAnalysis/time.vue Dosyayı Görüntüle

@@ -270,6 +270,24 @@ export default {
270 270
             }
271 271
           }
272 272
         ],
273
+        dataZoom: [
274
+          {
275
+            // Y轴固定,让内容滚动
276
+            type: 'slider',
277
+            show: false,
278
+            xAxisIndex: [0],
279
+            start: 1,
280
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
281
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
282
+          },
283
+          {
284
+            type: 'inside',
285
+            xAxisIndex: [0],
286
+            start: 1,
287
+            end: 20,
288
+            zoomLock: true // 锁定区域禁止缩放
289
+          }
290
+        ]
273 291
       }
274 292
     };
275 293
   },
@@ -314,7 +332,7 @@ export default {
314 332
         this.getlist()
315 333
       }
316 334
     },
317
-     getTimestamp(time) {
335
+    getTimestamp(time) {
318 336
       // 把时间日期转成时间戳
319 337
       return new Date(time).getTime() / 1000;
320 338
     },
@@ -612,18 +630,18 @@ export default {
612 630
             }
613 631
             this.chart.series[0].data = this.modesData.series
614 632
             this.chart.xAxis.data = this.modesData.xAxis
615
-    
633
+            this.getArrLength(this.chart.xAxis.data)
616 634
 
617 635
           
618 636
          }
619 637
       })
620 638
     },
621
-   compare(property){
622
-        return function(a,b){
623
-            var value1 = a[property];
624
-            var value2 = b[property];
625
-            return value1 - value2;
626
-        }
639
+    compare(property){
640
+      return function(a,b){
641
+          var value1 = a[property];
642
+          var value2 = b[property];
643
+          return value1 - value2;
644
+      }
627 645
     },
628 646
     arrayDate(array1,array2){
629 647
         var array1 = array1;
@@ -647,6 +665,15 @@ export default {
647 665
         }
648 666
         return result;
649 667
     },
668
+    getArrLength(result){
669
+      if(result.length > 10){
670
+        var dataZoom_end = (10/result.length)*100;
671
+        this.chart.dataZoom[0].end = dataZoom_end
672
+      }else{
673
+        var dataZoom_end = 100;
674
+        this.chart.dataZoom[0].end = dataZoom_end
675
+      }
676
+    }
650 677
   },
651 678
   created(){
652 679
      //获取指标正常范围值

+ 4 - 0
src/xt_pages/qcd/patientComplianceDetails.vue Dosyayı Görüntüle

@@ -2,6 +2,7 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-button type="primary" @click="$router.back(-1)">返回</el-button>
5 6
     </div>
6 7
     <div class="app-container">
7 8
       <div class="page_patientComplianceDetails">
@@ -530,5 +531,8 @@ export default {
530 531
   .el-form-item {
531 532
     margin-bottom: 0;
532 533
   }
534
+  ::-webkit-scrollbar{
535
+    height: 15px !important;
536
+  }
533 537
 }
534 538
 </style>

+ 15 - 7
src/xt_pages/qcd/patientControlAnalysis.vue Dosyayı Görüntüle

@@ -75,8 +75,8 @@
75 75
         </div>
76 76
         <div>
77 77
           <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
78
-            <el-table-column fixed prop="name" label="姓名" width="120"></el-table-column>
79
-            <el-table-column   label="透析号" width="150">
78
+            <el-table-column fixed prop="name" label="姓名" width="100"></el-table-column>
79
+            <el-table-column label="透析号" width="80">
80 80
               <template slot-scope="scope">
81 81
                   <!-- {{getDialysisNo(scope.row.name)}} -->
82 82
                   {{scope.row.dialysis_no}}
@@ -86,15 +86,19 @@
86 86
               :label="modeItem.item_name"
87 87
               property="number"
88 88
               align="center"
89
-              min-width="100"
89
+              min-width="120"
90 90
               v-for="(modeItem, index) in normData"
91 91
               :key="index"
92 92
             >
93 93
             <template slot-scope="scope">
94
-                 <span v-if="scope.row.data[modeItem.item_name].inspect_value == ''">0</span>
95
-                 <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) < parseInt(scope.row.data[modeItem.item_name].range_min))">{{scope.row.data[modeItem.item_name].inspect_value}}↓</span>
96
-                <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) > parseInt(scope.row.data[modeItem.item_name].range_max))">{{scope.row.data[modeItem.item_name].inspect_value}}↑</span>
97
-                <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) >= parseInt(scope.row.data[modeItem.item_name].range_min))&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) <= parseInt(scope.row.data[modeItem.item_name].range_max)) ">{{scope.row.data[modeItem.item_name].inspect_value}}</span>
94
+              <span v-if="scope.row.data[modeItem.item_name].inspect_value == ''">0</span>
95
+              <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) < parseInt(scope.row.data[modeItem.item_name].range_min))">
96
+                <span >{{scope.row.data[modeItem.item_name].inspect_value}}</span><span style="color:#5B98FF;margin-left:5px;">↓</span>
97
+              </span>
98
+              <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) > parseInt(scope.row.data[modeItem.item_name].range_max))">
99
+                <span>{{scope.row.data[modeItem.item_name].inspect_value}}</span><span style="color:#F56C6C;margin-left:5px;">↑</span>
100
+              </span>
101
+              <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) >= parseInt(scope.row.data[modeItem.item_name].range_min))&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) <= parseInt(scope.row.data[modeItem.item_name].range_max)) ">{{scope.row.data[modeItem.item_name].inspect_value}}</span>
98 102
             </template>
99 103
         </el-table-column>
100 104
             <el-table-column fixed="right" label="操作" width="100">
@@ -774,6 +778,7 @@ export default {
774 778
     font-size: 13px;
775 779
   }
776 780
 }
781
+
777 782
 </style>
778 783
 
779 784
 <style lang="scss">
@@ -784,5 +789,8 @@ export default {
784 789
   .cell {
785 790
     text-align: center;
786 791
   }
792
+  ::-webkit-scrollbar{
793
+    height: 15px !important;
794
+  }
787 795
 }
788 796
 </style>

+ 5 - 2
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue Dosyayı Görüntüle

@@ -65,7 +65,7 @@
65 65
           </el-table-column>
66 66
         </el-table>
67 67
       </div>
68
-      <div style="padding-left:10px;flex:1">
68
+      <div style="padding-left:10px;flex:1;width:0">
69 69
         <div class="tableTitle">统计表</div>
70 70
         <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
71 71
           <el-table-column prop="name" label="姓名" fixed>
@@ -75,7 +75,7 @@
75 75
           :label="modeItem.project_name+'('+modeItem.inspection_frequency+'天)'"
76 76
           property="number"
77 77
           align="center"
78
-          min-width="100"
78
+          min-width="110"
79 79
           v-for="(modeItem, index) in tableName"
80 80
           :key="index"
81 81
         >
@@ -383,5 +383,8 @@ export default {
383 383
   .cell {
384 384
     text-align: center;
385 385
   }
386
+  ::-webkit-scrollbar{
387
+    height: 15px !important;
388
+  }
386 389
 }
387 390
 </style>

+ 120 - 94
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue Dosyayı Görüntüle

@@ -60,7 +60,6 @@
60 60
           :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
61 61
           highlight-current-row
62 62
           @current-change="handleChange"
63
-          ref="tableinfo"
64 63
           >
65 64
            <el-table-column prop="dialysis_no" label="透析号" width="80">
66 65
             <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
@@ -182,6 +181,24 @@ export default {
182 181
               }
183 182
             }
184 183
           }
184
+        ],
185
+        dataZoom: [
186
+          {
187
+            // Y轴固定,让内容滚动
188
+            type: 'slider',
189
+            show: false,
190
+            xAxisIndex: [0],
191
+            start: 1,
192
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
193
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
194
+          },
195
+          {
196
+            type: 'inside',
197
+            xAxisIndex: [0],
198
+            start: 1,
199
+            end: 20,
200
+            zoomLock: true // 锁定区域禁止缩放
201
+          }
185 202
         ]
186 203
       },
187 204
       pickerOptions: {
@@ -196,7 +213,6 @@ export default {
196 213
       },
197 214
       obj:[],
198 215
       patient_id:0,
199
-      patientid:0,
200 216
     };
201 217
   },
202 218
   methods: {
@@ -218,92 +234,91 @@ export default {
218 234
       } else {
219 235
       }
220 236
     },
221
-   getTimestamp(time) {
237
+    getTimestamp(time) {
222 238
       // 把时间日期转成时间戳
223 239
       return new Date(time).getTime() / 1000;
224 240
     },
225 241
     getCurrentOrgPatients(){
226 242
       getCurrentOrgPatients().then(response=>{
227
-        var patients = response.data.data.patients
228
-        this.patientsData = patients
229
-        this.$refs.tableinfo.setCurrentRow(this.patientsData[0])
230
-        this.getInspectionTotalCount(this.patientsData[0].id)
243
+         var patients = response.data.data.patients
244
+         this.patientsData = patients
231 245
       })
232 246
     },
233
-    getInspectionTotalCount(id){
234
-          this.modesData.series = []
235
-          this.modesData.xAxis = []
236
-      getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time,id).then(response=>{
237
-          if(response.data.state === 1){
238
-            var Inspection = response.data.data.Inspection
239
-     
240
-            this.tableData = Inspection
241
-          
242
-            var counts = response.data.data.counts
243
-           
244
-            var arr = []
245
-            for(let i=0;i<Inspection.length;i++){
246
-               for(let j=0;j<counts.length;j++){
247
-                 if(Inspection[i].inspection_major == counts[j].ProjectId){
248
-                   arr.push(counts[j])
249
-                 }
250
-               }
247
+    getInspectionTotalCount(){
248
+      this.modesData.series = []
249
+      this.modesData.xAxis = []
250
+      getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time).then(response=>{
251
+        if(response.data.state === 1){
252
+          var Inspection = response.data.data.Inspection
253
+    
254
+          this.tableData = Inspection
255
+        
256
+          var counts = response.data.data.counts
257
+        
258
+          var arr = []
259
+          for(let i=0;i<Inspection.length;i++){
260
+            for(let j=0;j<counts.length;j++){
261
+              if(Inspection[i].inspection_major == counts[j].ProjectId){
262
+                arr.push(counts[j])
263
+              }
251 264
             }
265
+          }
266
+        
267
+          var arrtwo =  this.arrayDate(counts,this.normData)
252 268
           
253
-           var arrtwo =  this.arrayDate(counts,this.normData)
254
-            
255
-            var hash = {};
256
-            var i = 0;
257
-            var res = [];
258
-            arr.forEach(function(item) {
259
-             var ProjectName = item.ProjectName;
260
-             hash[ProjectName] ? res[hash[ProjectName] - 1].Count.push(item.Count) : hash[ProjectName] = ++i && res.push({
261
-                 Count: [item.Count],
262
-                 ProjectName: ProjectName,
263
-                 ProjectId: item.ProjectId,
264
-                 Sort:item.Sort,
265
-             })
266
-            });
267
-            
268
-            res.map(item => {
269
-             item.Count = eval(item.Count.join('+'))
270
-            })
271
-           
272
-            let arr1 = []
273
-            this.tableData.map(it => {
274
-              arr1.push(it.project_name)
269
+          var hash = {};
270
+          var i = 0;
271
+          var res = [];
272
+          arr.forEach(function(item) {
273
+            var ProjectName = item.ProjectName;
274
+            hash[ProjectName] ? res[hash[ProjectName] - 1].Count.push(item.Count) : hash[ProjectName] = ++i && res.push({
275
+                Count: [item.Count],
276
+                ProjectName: ProjectName,
277
+                ProjectId: item.ProjectId,
278
+                Sort:item.Sort,
275 279
             })
280
+          });
281
+          
282
+          res.map(item => {
283
+            item.Count = eval(item.Count.join('+'))
284
+          })
285
+          
286
+          let arr1 = []
287
+          this.tableData.map(it => {
288
+            arr1.push(it.project_name)
289
+          })
276 290
 
277
-            arr1.forEach((item,index)=>{
278
-              if(!(res[index] && item ==res[index].ProjectName)){
279
-                res.splice(index,0,{Count:0, ProjectName: item, Sort: index+1})
280
-              }
281
-            })
282
-            res.map(item => {
283
-              this.modesData.series.push(parseInt(item.Count));
284
-            })
285
-            for (const key in this.tableData) {
286
-              this.modesData.xAxis.push(this.tableData[key].project_name);
287
-               let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
288
-               let day = parseInt(time / (1000 * 60 * 60 * 24))
289
-              this.obj.push(Math.round(day / this.tableData[key].inspection_frequency))
291
+          arr1.forEach((item,index)=>{
292
+            if(!(res[index] && item ==res[index].ProjectName)){
293
+              res.splice(index,0,{Count:0, ProjectName: item, Sort: index+1})
290 294
             }
291
-            
292
-            this.chart.series[0].data = this.modesData.series
293
-            this.chart.xAxis.data = this.modesData.xAxis
295
+          })
296
+          res.map(item => {
297
+            this.modesData.series.push(parseInt(item.Count));
298
+          })
299
+          console.log("this=====",this.tableData)
300
+          for (const key in this.tableData) {
301
+            this.modesData.xAxis.push(this.tableData[key].project_name);
302
+            let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
303
+            let day = parseInt(time / (1000 * 60 * 60 * 24))
304
+            this.obj.push(Math.round(day / this.tableData[key].inspection_frequency))
294 305
           }
306
+          
307
+          this.chart.series[0].data = this.modesData.series
308
+          this.chart.xAxis.data = this.modesData.xAxis
309
+          this.getArrLength(this.chart.xAxis.data)
310
+        }
295 311
       })
296 312
     },
297 313
 
298 314
     //获取单个病人数据
299 315
     handleChange(val){
300
-      this.patientid = val.id
301 316
       this.modesData.series = []
302 317
       this.modesData.xAxis = []
303
-     getInspectionDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
318
+       getInspectionDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
304 319
           if(response.data.state === 1){
305 320
             var patientdetail = response.data.data.patientdetail
306
-            // console.log("patientdetail",patientdetail)
321
+            console.log("patientdetail",patientdetail)
307 322
             var arr=[]
308 323
             for(let i=0;i<this.tableData.length;i++){
309 324
               for(let j=0;j<patientdetail.length;j++){
@@ -315,8 +330,8 @@ export default {
315 330
             
316 331
            let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
317 332
            let day = parseInt(time / (1000 * 60 * 60 * 24))
318
-          //  console.log("arr",arr)
319
-          //  console.log("tabledata",this.tableData)
333
+           console.log("arr",arr)
334
+           console.log("tabledata",this.tableData)
320 335
             for (const key in this.tableData) {
321 336
               this.modesData.xAxis.push(this.tableData[key].project_name);
322 337
               if (key in arr) {
@@ -330,6 +345,7 @@ export default {
330 345
             }
331 346
             this.chart.series[0].data = this.modesData.series
332 347
             this.chart.xAxis.data = this.modesData.xAxis
348
+            this.getArrLength(this.chart.xAxis.data)
333 349
           }
334 350
        })
335 351
     },
@@ -341,7 +357,7 @@ export default {
341 357
       getSearchPatientInfo(this.patient_id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
342 358
          if(response.data.state  === 1){
343 359
            var PatientsInfo = response.data.data.PatientsInfo
344
-          //  console.log("patientsInfo",PatientsInfo)
360
+           console.log("patientsInfo",PatientsInfo)
345 361
            var arr = []
346 362
            for(let i=0;i<this.tableData.length;i++){
347 363
              for(let j=0;j<PatientsInfo.length;j++){
@@ -366,6 +382,7 @@ export default {
366 382
             }
367 383
             this.chart.series[0].data = this.modesData.series
368 384
             this.chart.xAxis.data = this.modesData.xAxis
385
+            this.getArrLength(this.chart.xAxis.data)
369 386
          }
370 387
       })
371 388
     },
@@ -391,28 +408,37 @@ export default {
391 408
         }
392 409
         return result;
393 410
     },
394
-     querySearchAsync(keyword, cb) {
395
-        let key = ''
396
-        if (keyword != undefined) {
397
-          key = keyword
411
+    querySearchAsync(keyword, cb) {
412
+      let key = ''
413
+      if (keyword != undefined) {
414
+        key = keyword
415
+      }
416
+      let searchArray = []
417
+      PostSearch(key).then(response => {
418
+        if (response.data.state == 1) {
419
+            searchArray = response.data.data.patient
420
+            console.log("searchArray",searchArray)
421
+          cb(searchArray)
422
+        } else {
423
+          cb([])
398 424
         }
399
-        let searchArray = []
400
-        PostSearch(key).then(response => {
401
-          if (response.data.state == 1) {
402
-             searchArray = response.data.data.patient
403
-            //  console.log("searchArray",searchArray)
404
-            cb(searchArray)
405
-          } else {
406
-            cb([])
407
-          }
408
-        })
409
-      },
410
-   handleSelect(val) {
411
-        console.log("val",val)
412
-        this.listQuery.search = val.name
413
-        this.patient_id = val.id
414
-        this.onSearch()
415
-      },
425
+      })
426
+    },
427
+    handleSelect(val) {
428
+      console.log("val",val)
429
+      this.listQuery.search = val.name
430
+      this.patient_id = val.id
431
+      this.onSearch()
432
+    },
433
+    getArrLength(result){
434
+      if(result.length > 10){
435
+        var dataZoom_end = (10/result.length)*100;
436
+        this.chart.dataZoom[0].end = dataZoom_end
437
+      }else{
438
+        var dataZoom_end = 100;
439
+        this.chart.dataZoom[0].end = dataZoom_end
440
+      }
441
+    }
416 442
   },
417 443
   created(){
418 444
     var nowDate = new Date();
@@ -436,10 +462,10 @@ export default {
436 462
       "-" +
437 463
       (nowDay < 10 ? "0" + nowDay : nowDay);
438 464
 
439
-   //获取该机构下的所有患者
440
-     this.getCurrentOrgPatients()
441
-  //  //获取检验检查项目
442
-  //   this.getInspectionTotalCount()
465
+    //获取该机构下的所有患者
466
+    this.getCurrentOrgPatients()
467
+    //获取检验检查项目
468
+    this.getInspectionTotalCount()
443 469
   }
444 470
 };
445 471
 </script>

+ 29 - 1
src/xt_pages/qcd/workAnalysis/doctor.vue Dosyayı Görüntüle

@@ -69,7 +69,7 @@
69 69
         </div>
70 70
         <div class="tableTitle">统计表</div>
71 71
         <div>
72
-          <el-table :data="tableData" style="width: 100%" :height="tableHeight">
72
+          <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
73 73
             <el-table-column fixed label="姓名" align="center">
74 74
               <template slot-scope="scope">
75 75
                 {{scope.row.user_name}}
@@ -251,6 +251,24 @@ export default {
251 251
               }
252 252
             }
253 253
           }
254
+        ],
255
+        dataZoom: [
256
+          {
257
+            // Y轴固定,让内容滚动
258
+            type: 'slider',
259
+            show: false,
260
+            xAxisIndex: [0],
261
+            start: 1,
262
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
263
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
264
+          },
265
+          {
266
+            type: 'inside',
267
+            xAxisIndex: [0],
268
+            start: 1,
269
+            end: 20,
270
+            zoomLock: true // 锁定区域禁止缩放
271
+          }
254 272
         ]
255 273
       }
256 274
     };
@@ -358,6 +376,7 @@ export default {
358 376
 
359 377
               }
360 378
             }
379
+            this.getArrLength(this.bar.xAxis.data)
361 380
           } else {
362 381
           }
363 382
         })
@@ -381,6 +400,15 @@ export default {
381 400
       if (this.activeName == "second") {
382 401
         this.$router.push({ path: "/qcd/workAnalysis/nurse" });
383 402
       }
403
+    },
404
+    getArrLength(result){
405
+      if(result.length > 10){
406
+        var dataZoom_end = (10/result.length)*100;
407
+        this.bar.dataZoom[0].end = dataZoom_end
408
+      }else{
409
+        var dataZoom_end = 100;
410
+        this.bar.dataZoom[0].end = dataZoom_end
411
+      }
384 412
     }
385 413
   },created(){
386 414
     var date = new Date()

+ 34 - 24
src/xt_pages/qcd/workAnalysis/nurse.vue Dosyayı Görüntüle

@@ -112,7 +112,7 @@
112 112
 
113 113
 
114 114
           <!--</el-table>-->
115
-          <el-table :data="tableData" style="width: 100%" :height="tableHeight" >
115
+          <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
116 116
             <el-table-column fixed label="姓名" align="center">
117 117
               <template slot-scope="scope">
118 118
                 {{scope.row.user_name}}
@@ -127,13 +127,6 @@
127 127
               </template>
128 128
             </el-table-column>
129 129
 
130
-            <el-table-column label="换药" align="center">
131
-              <template slot-scope="scope">
132
-                {{scope.row.change_medicine_count?scope.row.change_medicine_count:''}}
133
-
134
-                <!--{{// scope.row.patient.lapseto == 1 ? '留治':'转出'}}-->
135
-              </template>
136
-            </el-table-column>
137 130
 
138 131
             <el-table-column label="治疗" align="center">
139 132
               <template slot-scope="scope">
@@ -151,7 +144,7 @@
151 144
 
152 145
             <el-table-column label="合计" align="center">
153 146
               <template slot-scope="scope">
154
-                {{scope.row.puncture_count + scope.row.change_medicine_count + scope.row.cure_count + scope.row.mission_count ?scope.row.puncture_count + scope.row.change_medicine_count + scope.row.cure_count + scope.row.mission_count:''}}
147
+                {{scope.row.puncture_count + scope.row.cure_count + scope.row.mission_count ?scope.row.puncture_count  + scope.row.cure_count + scope.row.mission_count:''}}
155 148
               </template>
156 149
             </el-table-column>
157 150
           </el-table>
@@ -200,8 +193,7 @@
200 193
         project_options:[
201 194
           {value:1, name:"治疗"},
202 195
           {value:2, name:"穿刺"},
203
-          {value:3, name:"换药"},
204
-          {value:4, name:"宣教/小结"},
196
+          {value:3, name:"宣教/小结"},
205 197
         ],
206 198
         crumbs: [
207 199
           { path: false, name: "质控管理" },
@@ -294,6 +286,24 @@
294 286
                 }
295 287
               }
296 288
             }
289
+          ],
290
+          dataZoom: [
291
+            {
292
+              // Y轴固定,让内容滚动
293
+              type: 'slider',
294
+              show: false,
295
+              xAxisIndex: [0],
296
+              start: 1,
297
+              end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
298
+              zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
299
+            },
300
+            {
301
+              type: 'inside',
302
+              xAxisIndex: [0],
303
+              start: 1,
304
+              end: 20,
305
+              zoomLock: true // 锁定区域禁止缩放
306
+            }
297 307
           ]
298 308
         }
299 309
       };
@@ -383,27 +393,18 @@
383 393
 
384 394
               for (let i = 0;  i < resp.data.data.length;i++){
385 395
                 this.bar.xAxis.data.push(resp.data.data[i].user_name)
386
-                if(this.query.statistics_type == 1){
387
-
396
+                if(this.query.statistics_type == 2){
388 397
                   this.bar.series[0].data.push(resp.data.data[i].puncture_count)
389 398
                   this.percent.push(resp.data.data[i].puncture_ratio)
390
-
391
-                }else if(this.query.statistics_type == 2){
392
-
393
-                  this.bar.series[0].data.push(resp.data.data[i].change_medicine_count)
394
-                  this.percent.push(resp.data.data[i].change_medicine_ratio)
395
-
396
-
397
-                }else if(this.query.statistics_type == 3){
399
+                }else if(this.query.statistics_type == 1){
398 400
                   this.bar.series[0].data.push(resp.data.data[i].cure_count)
399 401
                   this.percent.push(resp.data.data[i].cure_ratio)
400
-
401
-                }else if(this.query.statistics_type == 4){
402
+                }else if(this.query.statistics_type == 3){
402 403
                   this.bar.series[0].data.push(resp.data.data[i].mission_count)
403 404
                   this.percent.push(resp.data.data[i].mission_ratio)
404
-
405 405
                 }
406 406
               }
407
+              this.getArrLength(this.bar.xAxis.data)
407 408
 
408 409
             } else {
409 410
             }
@@ -428,6 +429,15 @@
428 429
         if (this.activeName == "first") {
429 430
           this.$router.push({ path: "/qcd/workAnalysis/doctor" });
430 431
         }
432
+      },
433
+      getArrLength(result){
434
+        if(result.length > 10){
435
+          var dataZoom_end = (10/result.length)*100;
436
+          this.bar.dataZoom[0].end = dataZoom_end
437
+        }else{
438
+          var dataZoom_end = 100;
439
+          this.bar.dataZoom[0].end = dataZoom_end
440
+        }
431 441
       }
432 442
     },created(){
433 443
       var date = new Date()