Kaynağa Gözat

提交代码

陈少旭 9 ay önce
ebeveyn
işleme
998d7818be

+ 105 - 0
src/xt_pages/Dialysisanalysis/otherIndicators/otherIndicators.vue Dosyayı Görüntüle

@@ -0,0 +1,105 @@
1
+<!-- 甲状旁腺激素分析 -->
2
+<template>
3
+  <div class="main-contain">
4
+    <div class="position">
5
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
6
+    </div>
7
+    <div class="app-container">
8
+      <div class="page_patientControlAnalysis">
9
+        <el-tabs v-model="activeName" @tab-click="handleClick" >
10
+          <el-tab-pane label="统计全部" name="first">
11
+            <keep-alive>
12
+              <otherIndicatorsall :project_id="project_id" :item_id="item_id" v-if="activeName == 'first'"></otherIndicatorsall>
13
+            </keep-alive>
14
+          </el-tab-pane>
15
+
16
+          <el-tab-pane label="统计个人" name="second">
17
+            <keep-alive>
18
+              <otherIndicatorsone  :project_id="project_id" :item_id="item_id"  v-if="activeName == 'second'"></otherIndicatorsone>
19
+            </keep-alive>
20
+          </el-tab-pane>
21
+
22
+        </el-tabs>
23
+      </div>
24
+    </div>
25
+  </div>
26
+</template>
27
+
28
+<script>
29
+// import echarts from 'echarts'
30
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
31
+import otherIndicatorsall from './otherIndicatorsall.vue'
32
+import otherIndicatorsone from './otherIndicatorsone.vue'
33
+export default {
34
+  name:'otherIndicators',
35
+  components: {
36
+    BreadCrumb,
37
+    otherIndicatorsall,
38
+    otherIndicatorsone
39
+  },
40
+  data() {
41
+    return {
42
+      activeName: 'first',
43
+      project_id:this.$route.query.project_id,
44
+      item_id:this.$route.query.item_id,
45
+
46
+    }
47
+  },
48
+  methods:{
49
+    handleClick(tab, event) {
50
+      console.log(tab, event);
51
+    }
52
+  }
53
+}
54
+</script>
55
+
56
+<style lang="scss" scoped>
57
+// .page_patientControlAnalysis {
58
+
59
+// .pointTitle {
60
+   //   font-size: 13px;
61
+   // }
62
+
63
+// .chartTitle {
64
+   //   font-size: 16px;
65
+   //   font-weight: bold;
66
+   //   color: #000000;
67
+   // }
68
+
69
+// .point {
70
+   //   width: 13px;
71
+   //   height: 13px;
72
+   //   background: linear-gradient(
73
+   //       0deg,
74
+   //       rgba(169, 224, 243, 1),
75
+   //       rgba(159, 189, 252, 1)
76
+   //   );
77
+   //   border-radius: 7px;
78
+   //   margin-right: 8px;
79
+   // }
80
+
81
+// .pointTitle {
82
+   //   font-size: 13px;
83
+   // }
84
+
85
+// }
86
+
87
+</style>
88
+
89
+<style lang="scss">
90
+// .page_patientControlAnalysis {
91
+
92
+// .el-form-item {
93
+   //   margin-bottom: 0;
94
+   // }
95
+
96
+// .cell {
97
+   //   text-align: center;
98
+   // }
99
+
100
+// ::-webkit-scrollbar {
101
+   //   height: 15px !important;
102
+   // }
103
+
104
+// }
105
+</style>

+ 697 - 0
src/xt_pages/Dialysisanalysis/otherIndicators/otherIndicatorsall.vue Dosyayı Görüntüle

@@ -0,0 +1,697 @@
1
+<template>
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
26
+            type="date"
27
+
28
+            placeholder="选择日期">
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
33
+            v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
36
+            type="date"
37
+            placeholder="选择日期">
38
+          </el-date-picker>
39
+        </div>
40
+      </el-col>
41
+      <el-col :span="5">
42
+        <div >
43
+          <el-input disabled v-model="input" placeholder="请输入内容"></el-input>
44
+        </div>
45
+      </el-col>
46
+      <el-col :span="3">
47
+        <el-button type="primary" @click="getData()">查询</el-button>
48
+      </el-col>
49
+    </el-row>
50
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
51
+      <p class="chartTitle">统计图</p>
52
+    </div>
53
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
54
+    <div style="width: 80%;margin: auto;">
55
+      <el-table
56
+        :data="tableData"
57
+        border
58
+        :header-cell-style="{
59
+          backgroundColor: 'rgb(245, 247, 250)',
60
+          color: '#606266'
61
+        }"
62
+        style="width: 100%;">
63
+        <el-table-column
64
+          prop="name"
65
+          align="center"
66
+          label="血红蛋白"
67
+
68
+
69
+        >
70
+        </el-table-column>
71
+        <el-table-column
72
+          prop="count"
73
+          label="人数"
74
+        >
75
+        </el-table-column>
76
+        <el-table-column
77
+          prop="address"
78
+          align="center"
79
+          label="操作">
80
+          <template slot-scope="scope">
81
+            <el-button @click="handleClick(scope.row)" style="font-size:16px;"
82
+                       type="text">查看详情
83
+            </el-button>
84
+          </template>
85
+        </el-table-column>
86
+      </el-table>
87
+    </div>
88
+    <el-dialog
89
+      width="1000px" class="registerDialog" :visible.sync="detailVisibility"
90
+      :close-on-click-modal="isClose"
91
+      :close-on-press-escape="isClose"
92
+    >
93
+      <el-row :gutter="25">
94
+        <el-col :span="5">
95
+          <div class="block">
96
+            <span>查询时间:</span>
97
+            <el-select size="small" v-model="time_type_two" placeholder="请选择"
98
+                       style="width:100px;margin-left:5px;" @change="changeItemTwo">
99
+              <el-option
100
+                v-for="item,index in times"
101
+                :key="index"
102
+                :label="item.label"
103
+                :value="item.value">
104
+              </el-option>
105
+            </el-select>
106
+          </div>
107
+        </el-col>
108
+        <el-col :span="10">
109
+          <div>
110
+            <el-date-picker
111
+              style="width: 120px"
112
+              v-model="start_time_one"
113
+              format="yyyy-MM-dd"
114
+              value-format="yyyy-MM-dd"
115
+              type="date"
116
+
117
+              placeholder="选择日期">
118
+            </el-date-picker>
119
+            <span>-</span>
120
+            <el-date-picker
121
+              style="width: 120px"
122
+              v-model="end_time_one"
123
+              format="yyyy-MM-dd"
124
+              value-format="yyyy-MM-dd"
125
+              type="date"
126
+              placeholder="选择日期">
127
+            </el-date-picker>
128
+          </div>
129
+        </el-col>
130
+
131
+        <el-col :span="4">
132
+          <div>
133
+
134
+            <el-select size="small" v-model="statistics_type" placeholder="请选择"
135
+                       style="width:100px;margin-left:5px;">
136
+              <el-option
137
+                v-for="item,index in statistics_types"
138
+                :key="index"
139
+                :label="item.label"
140
+                :value="item.value">
141
+              </el-option>
142
+            </el-select>
143
+
144
+          </div>
145
+        </el-col>
146
+
147
+        <!--        <el-col :span="4">-->
148
+        <!--          <div>-->
149
+        <!--            <el-select size="small" v-model="sort_type" placeholder="请选择"-->
150
+        <!--                       style="width:100px;margin-left:5px;">-->
151
+        <!--              <el-option-->
152
+        <!--                v-for="item,index in sort_types"-->
153
+        <!--                :key="index"-->
154
+        <!--                :label="item.label"-->
155
+        <!--                :value="item.value">-->
156
+        <!--              </el-option>-->
157
+        <!--            </el-select>-->
158
+        <!--          </div>-->
159
+        <!--        </el-col>-->
160
+
161
+        <el-col :span="4">
162
+          <div >
163
+            <el-input v-model="keyword" placeholder="请输入患者姓名或透析号"></el-input>
164
+          </div>
165
+        </el-col>
166
+
167
+        <el-col :span="2">
168
+          <div>
169
+            <el-button @click="getDataTwo()">查询</el-button>
170
+          </div>
171
+        </el-col>
172
+
173
+        <el-col :span="2">
174
+          <div>
175
+            <el-button @click="exportAction()">导出</el-button>
176
+          </div>
177
+        </el-col>
178
+
179
+        <!--        <el-col :span="2">-->
180
+        <!--          <div>-->
181
+        <!--            <el-button @click="getDataTwo()">打印</el-button>-->
182
+        <!--          </div>-->
183
+        <!--        </el-col>-->
184
+
185
+
186
+
187
+
188
+
189
+      </el-row>
190
+
191
+      <el-table
192
+        :data="patientTableData"
193
+        border
194
+        ref="table"
195
+        max-height="500px"
196
+        style="width: 100%">
197
+        <el-table-column
198
+          prop="dialysis_no"
199
+          align="center"
200
+          label="透析号"
201
+        >
202
+        </el-table-column>
203
+        <el-table-column
204
+          prop="name"
205
+          label="患者姓名"
206
+        >
207
+        </el-table-column>
208
+        <el-table-column
209
+          prop="date"
210
+          label="检查日期"
211
+        >
212
+        </el-table-column>
213
+
214
+        <el-table-column
215
+          prop="inspect_value"
216
+          label="结果"
217
+        >
218
+        </el-table-column>
219
+
220
+      </el-table>
221
+
222
+      <div slot="footer" class="dialog-footer">
223
+        <el-button @click="detailVisibility = false">取消</el-button>
224
+        <el-button type="primary" @click="detailVisibility = false">确定</el-button>
225
+      </div>
226
+    </el-dialog>
227
+
228
+  </div>
229
+</template>
230
+<script>
231
+import * as echarts from 'echarts'
232
+import { GetAllQCStatistisData, GetQCStatistisData } from '../../../api/qcd'
233
+import { number } from 'echarts/lib/export'
234
+
235
+const moment = require('moment')
236
+
237
+export default {
238
+  props: {
239
+    project_id:{
240
+      type: number,
241
+    }, item_id:{
242
+      type: number,
243
+    },
244
+    width: {
245
+      type: String,
246
+      default: '100%'
247
+    },
248
+    height: {
249
+      type: String,
250
+      default: '400px'
251
+    }
252
+
253
+  },
254
+  data() {
255
+    return {
256
+      statistics_types:[
257
+        { value: 1, label: '不达标患者' },
258
+        { value: 2, label: '未检查患者' },
259
+        { value: 3, label: '达标患者' },
260
+      ],
261
+      sort_types:[
262
+        { value: 1, label: '时间' },
263
+        { value: 2, label: '患者' },
264
+      ],
265
+      detailVisibility:false,
266
+      isClose:true,
267
+      time_type: 1,
268
+      time_type_two:1,
269
+      times: [
270
+        { value: 1, label: '本月' },
271
+        { value: 2, label: '上月' },
272
+        { value: 3, label: '今年' },
273
+        { value: 4, label: '上一年' },
274
+        { value: 5, label: '第一季度' },
275
+        { value: 6, label: '第二季度' },
276
+        { value: 7, label: '第三季度' },
277
+        { value: 8, label: '第四季度' },
278
+        { value: 9, label: '自定义' }
279
+
280
+      ],
281
+      reference:{},
282
+      time_month: '',
283
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
284
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
285
+      start_time_one: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
286
+      end_time_one: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
287
+      input: '',
288
+      myChart: {},
289
+      pieData: [],
290
+      pieName: [],
291
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
292
+      tableData: [],
293
+      statistics_type:1,
294
+      sort_type:"",
295
+      keyword:"",
296
+      patientTableData:[],
297
+    }
298
+  },
299
+  mounted() {
300
+    this.getData()
301
+  },
302
+  methods: {
303
+    exportAction(){
304
+      let list = []
305
+      for (let i = 0; i < this.patientTableData.length; i++) {
306
+        let order = this.patientTableData[i]
307
+        let name = order.name
308
+        let value = order.inspect_value
309
+        let inspect_date = order.date
310
+
311
+        let obj = {
312
+          '姓名': name,
313
+          '数值': value,
314
+          '日期': inspect_date,
315
+        }
316
+        list.push(obj)
317
+      }
318
+      import('@/vendor/Export2Excel').then(excel => {
319
+        const tHeader = ['姓名', '数值', '日期']
320
+        const filterVal = ['姓名', '数值', '日期']
321
+        const data = this.formatJson(filterVal, list)
322
+        excel.export_json_to_excel1({
323
+          header: tHeader,
324
+          data,
325
+          filename: '明细',
326
+          ref: this.$refs['table'].$el
327
+        })
328
+      })
329
+    },
330
+
331
+    formatJson(filterVal, jsonData) {
332
+      return jsonData.map(v => filterVal.map(j => v[j]))
333
+    },
334
+    changeItemTwo(val) {
335
+      const currentDate = new Date()
336
+      switch (val) {
337
+        case 1:
338
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
339
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
340
+          this.start_time_one = startOfMonth
341
+          this.end_time_one = endOfMonth
342
+          // this.getDataTwo()
343
+          break
344
+        case 2:
345
+          // 上月的起始日期和结束日期
346
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
347
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
348
+          this.start_time_one = startOfLastMonth
349
+          this.end_time_one = endOfLastMonth
350
+          // this.getDataTwo()
351
+          break
352
+        case 3:
353
+          // 今年的起始日期和结束日期
354
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
355
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
356
+
357
+          this.start_time_one = startOfYear
358
+          this.end_time_one = endOfYear
359
+          // this.getDataTwo()
360
+
361
+          break
362
+        case 4:
363
+          // 上一年的起始日期和结束日期
364
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
365
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
366
+
367
+          this.start_time_one = startOfLastYear
368
+          this.end_time_one = endOfLastYear
369
+          // this.getDataTwo()
370
+
371
+          break
372
+        case 5:
373
+          // 第一季度的起始日期和结束日期
374
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
375
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
376
+          this.start_time_one = startOfFirstQuarter
377
+          this.end_time_one = endOfFirstQuarter
378
+          // this.getDataTwo()
379
+          break
380
+        case 6:
381
+          // 第二季度的起始日期和结束日期
382
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
383
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
384
+          this.start_time_one = startOfSecondQuarter
385
+          this.end_time_one = endOfSecondQuarter
386
+          // this.getDataTwo()
387
+          break
388
+        case 7:
389
+          // 第三季度的起始日期和结束日期
390
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
391
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
392
+
393
+          this.start_time_one = startOfThirdQuarter
394
+          this.end_time_one = endOfThirdQuarter
395
+          // this.getDataTwo()
396
+
397
+          break
398
+        case 8:
399
+          // 第四季度的起始日期和结束日期
400
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
401
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
402
+
403
+          this.start_time_one = startOfFourthQuarter
404
+          this.end_time_one = endOfFourthQuarter
405
+          // this.getDataTwo()
406
+          break
407
+        case 9:
408
+          this.start_time_one = ''
409
+          this.end_time_one = ''
410
+          break
411
+      }
412
+    },
413
+
414
+    getDataTwo() {
415
+      if(this.start_time_one.length == 0){
416
+        this.$message.error("请选择开始时间")
417
+      }
418
+      if(this.end_time_one.length == 0){
419
+        this.$message.error("请选择结束时间")
420
+      }
421
+      let params = {
422
+        start_date: this.start_time_one,
423
+        end_date: this.end_time_one,
424
+        project_id: this.project_id,
425
+        item_id: this.item_id,
426
+        item_type:this.statistics_type,
427
+        order_type:this.sort_type,
428
+        keyword: this.keyword,
429
+      }
430
+      this.patientTableData = []
431
+      GetAllQCStatistisData(params).then(response => {
432
+        if (response.data.state == 1) {
433
+          this.detailVisibility = true
434
+          this.patientTableData  =  this.patientTableData.concat(response.data.data.list)
435
+        } else {
436
+          this.$message.error(response.data.msg)
437
+        }
438
+      })
439
+
440
+    },
441
+    getData() {
442
+      if(this.start_time.length == 0){
443
+        this.$message.error("请选择开始时间")
444
+      }
445
+      if(this.end_time.length == 0){
446
+        this.$message.error("请选择结束时间")
447
+      }
448
+      let params = {
449
+        start_date: this.start_time,
450
+        end_date: this.end_time,
451
+        project_id: this.project_id,
452
+        item_id: this.item_id
453
+      }
454
+      this.pieData = []
455
+      this.tableData = []
456
+      console.log("~~~~~~~~~~")
457
+      GetQCStatistisData(params).then(response => {
458
+        if (response.data.state == 1) {
459
+          this.reference = response.data.data.reference
460
+          this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
461
+          let objone = {
462
+            value:  response.data.data.unusual_total ,
463
+            name: '不达标值患者',
464
+            count:response.data.data.unusual_total,
465
+          }
466
+          this.pieData.push(objone)
467
+          this.tableData.push(objone)
468
+
469
+          let objtwo = {
470
+            value:   response.data.data.normal_total ,
471
+            name: '达标值患者',
472
+            count:response.data.data.normal_total,
473
+
474
+          }
475
+          this.pieData.push(objtwo)
476
+          this.tableData.push(objtwo)
477
+
478
+          let objthree = {
479
+            value: response.data.data.no_check_total ,
480
+            name: '未检查患者',
481
+            count:response.data.data.no_check_total,
482
+
483
+          }
484
+          this.pieData.push(objthree)
485
+          this.tableData.push(objthree)
486
+
487
+          let objfour = {
488
+            value: response.data.data.patient_count,
489
+            name: '合计',
490
+            count:response.data.data.patient_count,
491
+          }
492
+          this.tableData.push(objfour)
493
+          for (let i = 0; i < this.pieData.length; i++) {
494
+            this.pieName[i] = this.pieData[i].name
495
+          }
496
+          this.myChart = echarts.init(document.getElementById('mychart'))
497
+          window.addEventListener('resize', () => {
498
+            this.myChart.resize()
499
+          })
500
+          const option = {
501
+            legend: {
502
+              // 图例
503
+              data: this.pieName,
504
+              left: '10%',
505
+              top: '30%',
506
+              orient: 'vertical'
507
+            },
508
+            color: ['#F74587', '#32D79B', '#6590FF'],
509
+
510
+
511
+            title: {
512
+              // 设置饼图标题,位置设为顶部居中
513
+              //   text: "国内院士前五省份图示",
514
+              top: '0%',
515
+              left: 'center'
516
+            },
517
+            series: [
518
+              {
519
+                type: 'pie',
520
+                label: {
521
+                  normal : {
522
+                    formatter: '{b}:{c}: ({d}%)',
523
+                    textStyle : {
524
+                        fontWeight : 'normal',
525
+                        fontSize : 15,
526
+                        color : "black"
527
+                    }
528
+                  }
529
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
530
+                },
531
+                radius: '65%', //饼图半径
532
+                data: this.pieData,
533
+                itemStyle : {
534
+                  emphasis: {
535
+                      shadowBlur: 10,
536
+                      shadowOffsetX: 0,
537
+                      shadowColor: 'rgba(0, 0, 0, 0.5)'
538
+                  }
539
+                }
540
+              }
541
+            ]
542
+          }
543
+          //   console.log(this.seriesData);
544
+          const optionFree = {
545
+            series: [
546
+              {
547
+                data: this.seriesData,
548
+                type: 'line',
549
+                smooth: true
550
+              }
551
+            ]
552
+          }
553
+          this.myChart = echarts.init(document.getElementById('mychart'))
554
+          this.myChart.setOption(option)
555
+        } else {
556
+          this.$message.error(response.data.msg)
557
+        }
558
+      })
559
+
560
+    },
561
+    changeItem(val) {
562
+      const currentDate = new Date()
563
+      switch (val) {
564
+        case 1:
565
+
566
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
567
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
568
+
569
+          this.start_time = startOfMonth
570
+          this.end_time = endOfMonth
571
+          this.getData()
572
+
573
+          break
574
+        case 2:
575
+          // 上月的起始日期和结束日期
576
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
577
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
578
+
579
+          this.start_time = startOfLastMonth
580
+          this.end_time = endOfLastMonth
581
+          this.getData()
582
+
583
+          break
584
+        case 3:
585
+          // 今年的起始日期和结束日期
586
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
587
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
588
+
589
+          this.start_time = startOfYear
590
+          this.end_time = endOfYear
591
+          this.getData()
592
+
593
+          break
594
+        case 4:
595
+          // 上一年的起始日期和结束日期
596
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
597
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
598
+
599
+          this.start_time = startOfLastYear
600
+          this.end_time = endOfLastYear
601
+          this.getData()
602
+
603
+          break
604
+        case 5:
605
+          // 第一季度的起始日期和结束日期
606
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
607
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
608
+
609
+          this.start_time = startOfFirstQuarter
610
+          this.end_time = endOfFirstQuarter
611
+          this.getData()
612
+
613
+          break
614
+        case 6:
615
+          // 第二季度的起始日期和结束日期
616
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
617
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
618
+
619
+          this.start_time = startOfSecondQuarter
620
+          this.end_time = endOfSecondQuarter
621
+          this.getData()
622
+
623
+          break
624
+        case 7:
625
+          // 第三季度的起始日期和结束日期
626
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
627
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
628
+
629
+          this.start_time = startOfThirdQuarter
630
+          this.end_time = endOfThirdQuarter
631
+          this.getData()
632
+
633
+          break
634
+        case 8:
635
+          // 第四季度的起始日期和结束日期
636
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
637
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
638
+
639
+          this.start_time = startOfFourthQuarter
640
+          this.end_time = endOfFourthQuarter
641
+          this.getData()
642
+          break
643
+        case 9:
644
+          this.start_time = ''
645
+          this.end_time = ''
646
+          break
647
+      }
648
+    },
649
+
650
+
651
+    getSummaries(param) {
652
+      const { columns, data } = param
653
+      const sums = []
654
+      columns.forEach((column, index) => {
655
+        if (index === 0) {
656
+          sums[index] = '总价'
657
+          return
658
+        }
659
+        const values = data.map(item => Number(item[column.property]))
660
+        if (!values.every(value => isNaN(value))) {
661
+          sums[index] = values.reduce((prev, curr) => {
662
+            const value = Number(curr)
663
+            if (!isNaN(value)) {
664
+              return prev + curr
665
+            } else {
666
+              return prev
667
+            }
668
+          }, 0)
669
+          sums[index] += ' 元'
670
+        } else {
671
+          sums[index] = 'N/A'
672
+        }
673
+      })
674
+
675
+      return sums
676
+    },
677
+    handleClick(row) {
678
+      if(row.name == "不达标值患者"){
679
+        this.statistics_type = 1
680
+      }else if(row.name == "达标值患者"){
681
+        this.statistics_type = 3
682
+      }else {
683
+        this.statistics_type = 2
684
+      }
685
+      this.getDataTwo()
686
+    }
687
+  }
688
+
689
+}
690
+</script>
691
+<style lang="scss" scoped>
692
+.content_top {
693
+  display: flex;
694
+  justify-content: space-around;
695
+  color: #1e5feb;
696
+}
697
+</style>