Browse Source

耗材参数

XMLWAN 4 years ago
parent
commit
c9e141eeb7

+ 1 - 1
src/xt_pages/dialysis/components/allSummaryDialog.vue View File

1
 <template>
1
 <template>
2
     <el-dialog
2
     <el-dialog
3
-    title="统计"
3
+    title="汇总统计"
4
     width="800px"
4
     width="800px"
5
     :visible.sync="visible"
5
     :visible.sync="visible"
6
     :before-close="_close"
6
     :before-close="_close"

+ 3 - 3
src/xt_pages/dialysis/components/dialysisParameters.vue View File

402
      getAnticoagulantShouji(id){
402
      getAnticoagulantShouji(id){
403
        var shouji = ""
403
        var shouji = ""
404
        for(let i=0;i<this.prescriptionList.length;i++){
404
        for(let i=0;i<this.prescriptionList.length;i++){
405
-         if(this.prescriptionList[i].patient_id == id){
405
+         if(this.prescriptionList[i].patient_id == id && this.prescriptionList[i].anticoagulant_shouji!=0 ){
406
             shouji = "("+this.prescriptionList[i].anticoagulant_shouji
406
             shouji = "("+this.prescriptionList[i].anticoagulant_shouji
407
           }
407
           }
408
         }
408
         }
411
      getAnticoagulantWeichi(id){
411
      getAnticoagulantWeichi(id){
412
         var weichi = ""
412
         var weichi = ""
413
         for(let i=0;i<this.prescriptionList.length;i++){
413
         for(let i=0;i<this.prescriptionList.length;i++){
414
-         if(this.prescriptionList[i].patient_id == id){
414
+         if(this.prescriptionList[i].patient_id == id && this.prescriptionList[i].anticoagulant_weichi!=0 ){
415
             weichi = "("+this.prescriptionList[i].anticoagulant_weichi
415
             weichi = "("+this.prescriptionList[i].anticoagulant_weichi
416
         }
416
         }
417
        return weichi
417
        return weichi
420
      getAnticoagulantZongliang(id){
420
      getAnticoagulantZongliang(id){
421
        var zongliang = ""
421
        var zongliang = ""
422
        for(let i=0;i<this.prescriptionList.length;i++){
422
        for(let i=0;i<this.prescriptionList.length;i++){
423
-         if(this.prescriptionList[i].patient_id == id){
423
+         if(this.prescriptionList[i].patient_id == id && this.prescriptionList[i].anticoagulant_zongliang!=0 ){
424
             zongliang = "("+this.prescriptionList[i].anticoagulant_zongliang
424
             zongliang = "("+this.prescriptionList[i].anticoagulant_zongliang
425
           }
425
           }
426
         }
426
         }

+ 1 - 1
src/xt_pages/dialysis/components/dialysisParametersDialog.vue View File

1
 <template>
1
 <template>
2
     <el-dialog
2
     <el-dialog
3
-    title="统计"
3
+    title="透析参数统计"
4
     width="800px"
4
     width="800px"
5
     :visible.sync="visible"
5
     :visible.sync="visible"
6
     :before-close="_close"
6
     :before-close="_close"

+ 351 - 30
src/xt_pages/qcd/basicInformationAnalysis.vue View File

18
             >{{ item.label }}</li>
18
             >{{ item.label }}</li>
19
           </ul>
19
           </ul>
20
         </div>
20
         </div>
21
+        <label class="title">
22
+          <span class="name">查看范围</span> :
23
+        </label>
24
+        <div class="time">
25
+          <ul class>
26
+            <li
27
+              :class="item.state == way ? 'active' : ''"
28
+              @click="selectWay(item.state)"
29
+              v-for="item in wayArr"
30
+              :key="item.value"
31
+            >{{ item.label }}</li>
32
+          </ul>
33
+        </div>
21
         <label class="title">
34
         <label class="title">
22
              <span class="name">日期查询</span> :
35
              <span class="name">日期查询</span> :
23
         </label>
36
         </label>
49
           :picker-options="pickerOptions"
62
           :picker-options="pickerOptions"
50
         ></el-date-picker>
63
         ></el-date-picker>
51
       </div>
64
       </div>
52
-      <div class="cell clearfix" style="align-items:normal">
65
+      <div v-if="way == 0" class="cell clearfix" style="align-items:normal">
53
         <div style="float:left">
66
         <div style="float:left">
54
           <div class="infoBox">
67
           <div class="infoBox">
55
             <div class="infoOne">
68
             <div class="infoOne">
60
 
73
 
61
               <div class="borderBox">
74
               <div class="borderBox">
62
                <div v-for="(item,index) in modetype" :key="index">
75
                <div v-for="(item,index) in modetype" :key="index">
63
-                 <span v-if="item.mode_id == 1">
76
+                 <span v-if="item.mode_id == 'HD'">
64
                     <p>HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
77
                     <p>HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
65
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
78
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
66
                   </span>
79
                   </span>
67
-                  <span v-if="item.mode_id == 2">
80
+                  <span v-if="item.mode_id == 'HDF'">
68
                     <p>HDF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
81
                     <p>HDF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
69
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
82
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
70
                   </span>
83
                   </span>
71
-                  <span v-if="item.mode_id == 3">
84
+                  <span v-if="item.mode_id == 'HD+HP'">
72
                     <p>HD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
85
                     <p>HD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
73
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
86
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
74
                   </span>
87
                   </span>
75
-                  <span v-if="item.mode_id == 4">
88
+                  <span v-if="item.mode_id == 'HP'">
76
                     <p>HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
89
                     <p>HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
77
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
90
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
78
                   </span>
91
                   </span>
79
-                  <span v-if="item.mode_id == 5">
92
+                  <span v-if="item.mode_id == 'HF'">
80
                     <p>HF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
93
                     <p>HF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
81
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
94
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
82
                   </span>
95
                   </span>
83
-                  <span v-if="item.mode_id == 6">
96
+                  <span v-if="item.mode_id == 'SCUF'">
84
                     <p>SCUF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
97
                     <p>SCUF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
85
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
98
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
86
                   </span>
99
                   </span>
87
-                  <span v-if="item.mode_id == 7">
100
+                  <span v-if="item.mode_id == 'IUF'">
88
                     <p>IUF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
101
                     <p>IUF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
89
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
102
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
90
                   </span>
103
                   </span>
91
-                  <span v-if="item.mode_id == 8">
104
+                  <span v-if="item.mode_id == 'HFHD'">
92
                     <p>HFHD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
105
                     <p>HFHD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
93
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
106
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
94
                   </span>
107
                   </span>
95
-                  <span v-if="item.mode_id == 9">
108
+                  <span v-if="item.mode_id == 'HFHD+HP'">
96
                     <p>HFHD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
109
                     <p>HFHD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
97
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
110
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
98
                   </span>
111
                   </span>
99
-                  <span v-if="item.mode_id == 10">
112
+                  <span v-if="item.mode_id == 'PHF'">
100
                     <p>PHF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
113
                     <p>PHF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
101
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
114
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
102
                   </span>
115
                   </span>
103
-                   <span v-if="item.mode_id == 11">
116
+                   <span v-if="item.mode_id == 'HFR'">
104
                     <p>HFR:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
117
                     <p>HFR:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
105
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
118
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
106
                   </span>
119
                   </span>
107
-                  <span v-if="item.mode_id == 12">
120
+                  <span v-if="item.mode_id == 'HDF+HP'">
108
                     <p>HDF+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
121
                     <p>HDF+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
109
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
122
                     <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
110
                   </span>
123
                   </span>
111
-                  <span v-if="item.mode_id == 13">
124
+                  <span v-if="item.mode_id == 'HFHD+HP'">
112
                       <p>HFHD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
125
                       <p>HFHD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
113
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
126
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
114
                   </span>
127
                   </span>
115
-                   <span v-if="item.mode_id == 14">
128
+                   <span v-if="item.mode_id == '腹水回输'">
116
                       <p>腹水回输:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
129
                       <p>腹水回输:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
117
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
130
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
118
                   </span>
131
                   </span>
119
-                   <span v-if="item.mode_id == 15">
132
+                   <span v-if="item.mode_id == 'HD前置换'">
120
                       <p>HD前置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
133
                       <p>HD前置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
121
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
134
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
122
                    </span>
135
                    </span>
123
-                    <span v-if="item.mode_id == 16">
136
+                    <span v-if="item.mode_id == 'HD后置换'">
124
                       <p>HD后置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
137
                       <p>HD后置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
125
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
138
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
126
                    </span>
139
                    </span>
127
-                    <span v-if="item.mode_id == 17">
140
+                    <span v-if="item.mode_id == 'HDF前置换'">
128
                       <p>HDF前置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
141
                       <p>HDF前置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
129
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
142
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
130
                    </span>
143
                    </span>
131
-                    <span v-if="item.mode_id == 18">
144
+                    <span v-if="item.mode_id == 'HDF后置换'">
132
                       <p>HDF后置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
145
                       <p>HDF后置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
133
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
146
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
134
                    </span>
147
                    </span>
135
-                   <span v-if="item.mode_id == 19">
148
+                   <span v-if="item.mode_id == 'IUF+HD'">
136
                       <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
149
                       <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
137
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
150
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
138
                   </span>
151
                   </span>
260
           </div>
273
           </div>
261
         </div>
274
         </div>
262
       </div>
275
       </div>
276
+      <div v-else>
277
+        <div  style="margin-bottom:20px;">
278
+          <line-chart :options="chart"></line-chart>
279
+        </div>
280
+        <div >
281
+          <line-chart :options="bar"></line-chart>
282
+        </div>
283
+      </div>
263
     </div>
284
     </div>
264
   </div>
285
   </div>
265
 </template>
286
 </template>
268
 
289
 
269
 <script>
290
 <script>
270
 const moment = require('moment')
291
 const moment = require('moment')
292
+import echarts from "echarts";
271
 import { GetOICData } from "@/api/qcd";
293
 import { GetOICData } from "@/api/qcd";
272
 import PieChart from "../qcd/components/BarChart";
294
 import PieChart from "../qcd/components/BarChart";
273
 import { uParseTime } from "@/utils/tools";
295
 import { uParseTime } from "@/utils/tools";
274
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
296
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
297
+import LineChart from "../qcd/components/LineChart";
275
 import {getDialysisModeType,getTotalLapseCount,getTotalSexCount,getTotalInfectiousCount,getTotalAgeCount,getTotalDialysisCount} from "@/api/common/common"
298
 import {getDialysisModeType,getTotalLapseCount,getTotalSexCount,getTotalInfectiousCount,getTotalAgeCount,getTotalDialysisCount} from "@/api/common/common"
276
 export default {
299
 export default {
277
   name: "dialysisTotal",
300
   name: "dialysisTotal",
278
   components: {
301
   components: {
279
     PieChart,
302
     PieChart,
280
-    BreadCrumb
303
+    BreadCrumb,
304
+    LineChart
281
   },
305
   },
282
   data() {
306
   data() {
283
     return {
307
     return {
324
       rollOutTotal:0,
348
       rollOutTotal:0,
325
       outTotal:0,
349
       outTotal:0,
326
       dialysisAge:[],
350
       dialysisAge:[],
351
+
352
+      way: 0,
353
+      wayArr: [
354
+        { value: 0, label: "统计表", state: 0 },
355
+        { value: 1, label: "统计图", state: 1 }
356
+      ],
357
+      modesData: {
358
+       xAxis: [],
359
+       series: []
360
+      },
361
+      modesDataTwo:{
362
+        xAxis:[],
363
+        series:[]
364
+      },
365
+      chart: {
366
+        title: {
367
+          text: "ECharts 入门示例"
368
+        },
369
+        tooltip: {},
370
+        legend: {
371
+          data: [],
372
+          left: 0
373
+        },
374
+        xAxis: {
375
+          data: []
376
+        },
377
+        yAxis: {
378
+          axisLabel: {
379
+            formatter: "{value} %"
380
+          },
381
+          show: false
382
+        },
383
+        series: [
384
+          {
385
+            name: "",
386
+            type: "bar",
387
+            data: [],
388
+            barWidth: 30,
389
+            label: {
390
+              normal: {
391
+                show: true,
392
+                position: "top",
393
+                formatter: "{c}%"
394
+              }
395
+            },
396
+            //配置样式
397
+            itemStyle: {
398
+              //通常情况下:
399
+
400
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
401
+              normal: {
402
+                color: function(params) {
403
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
404
+                  var colorList = [
405
+                    ["#A9E0F3", "#9FBDFC"],
406
+
407
+                    ["#FFD7C0", "#FF9994"]
408
+                  ];
409
+
410
+                  var index = params.dataIndex;
411
+                  if (params.dataIndex >= colorList.length) {
412
+                    index = params.dataIndex % colorList.length;
413
+                  }
414
+
415
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
416
+                    { offset: 0, color: colorList[index][0] },
417
+                    // { offset: 0.5, color: colorList[index][1] },
418
+                    { offset: 1, color: colorList[index][1] }
419
+                  ]);
420
+                },
421
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
422
+              },
423
+
424
+              //鼠标悬停时:
425
+              emphasis: {
426
+                shadowBlur: 10,
427
+                shadowOffsetX: 0,
428
+                shadowColor: "rgba(0, 0, 0, 0.2)"
429
+              }
430
+            }
431
+          }
432
+        ],
433
+        dataZoom: [
434
+          {
435
+            // Y轴固定,让内容滚动
436
+            type: 'slider',
437
+            show: false,
438
+            xAxisIndex: [0],
439
+            start: 1,
440
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
441
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
442
+          },
443
+          {
444
+            type: 'inside',
445
+            xAxisIndex: [0],
446
+            start: 1,
447
+            end: 20,
448
+            zoomLock: true // 锁定区域禁止缩放
449
+          }
450
+        ],
451
+      },
452
+
453
+      bar: {
454
+        title: {
455
+          text: "ECharts 入门示例"
456
+        },
457
+        tooltip: {},
458
+        legend: {
459
+          data: [],
460
+          left: 0
461
+        },
462
+        xAxis: {
463
+          data: []
464
+        },
465
+        yAxis: {
466
+          axisLabel: {
467
+            formatter: "{value} %"
468
+          },
469
+          show: false
470
+        },
471
+        series: [
472
+          {
473
+            name: "",
474
+            type: "bar",
475
+            data: [],
476
+            barWidth: 30,
477
+            label: {
478
+              normal: {
479
+                show: true,
480
+                position: "top",
481
+                formatter: "{c}%"
482
+              }
483
+            },
484
+            //配置样式
485
+            itemStyle: {
486
+              //通常情况下:
487
+
488
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
489
+              normal: {
490
+                color: function(params) {
491
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
492
+                  var colorList = [
493
+                    ["#A9E0F3", "#9FBDFC"],
494
+
495
+                    ["#FFD7C0", "#FF9994"]
496
+                  ];
497
+
498
+                  var index = params.dataIndex;
499
+                  if (params.dataIndex >= colorList.length) {
500
+                    index = params.dataIndex % colorList.length;
501
+                  }
502
+
503
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
504
+                    { offset: 0, color: colorList[index][0] },
505
+                    // { offset: 0.5, color: colorList[index][1] },
506
+                    { offset: 1, color: colorList[index][1] }
507
+                  ]);
508
+                },
509
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
510
+              },
511
+
512
+              //鼠标悬停时:
513
+              emphasis: {
514
+                shadowBlur: 10,
515
+                shadowOffsetX: 0,
516
+                shadowColor: "rgba(0, 0, 0, 0.2)"
517
+              }
518
+            }
519
+          }
520
+        ],
521
+        dataZoom: [
522
+          {
523
+            // Y轴固定,让内容滚动
524
+            type: 'slider',
525
+            show: false,
526
+            xAxisIndex: [0],
527
+            start: 1,
528
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
529
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
530
+          },
531
+          {
532
+            type: 'inside',
533
+            xAxisIndex: [0],
534
+            start: 1,
535
+            end: 20,
536
+            zoomLock: true // 锁定区域禁止缩放
537
+          }
538
+        ],
539
+      }
327
     };
540
     };
541
+
542
+    
328
   },
543
   },
329
   methods: {
544
   methods: {
330
     getTimestamp(time) {
545
     getTimestamp(time) {
494
 
709
 
495
     },
710
     },
496
     getDialysisModeType(startDate,endDate){
711
     getDialysisModeType(startDate,endDate){
712
+       this.modesData.series = []
713
+       this.modesData.xAxis = []
497
       getDialysisModeType(startDate,endDate).then(response=>{
714
       getDialysisModeType(startDate,endDate).then(response=>{
498
          if(response.data.state == 1){
715
          if(response.data.state == 1){
716
+         
499
           var modetype =  response.data.data.modetype
717
           var modetype =  response.data.data.modetype
500
-            var total =  response.data.data.total
501
-            // console.log("total",total)
502
-            this.total = total
503
-           this.modetype = modetype
504
-          //  console.log("modetype",modetype)
505
-
718
+          this.modetype = modetype
719
+          var total =  response.data.data.total
720
+          this.total = total
721
+          // console.log("数据",this.modetype)
722
+          var modedate = response.data.data.modetype
723
+          for(let i=0;i<modedate.length;i++){
724
+            if(modedate[i].mode_id == 1){
725
+               modedate[i].mode_id = "HD"
726
+            }
727
+            if(modedate[i].mode_id == 2){
728
+               modedate[i].mode_id = "HDF"
729
+            }
730
+            if(modedate[i].mode_id == 3){
731
+               modedate[i].mode_id = "HD+HP"
732
+            }
733
+            if(modedate[i].mode_id == 4){
734
+               modedate[i].mode_id = "HP"
735
+            }
736
+           if(modedate[i].mode_id == 5){
737
+               modedate[i].mode_id = "HF"
738
+            }
739
+           if(modedate[i].mode_id == 6){
740
+               modedate[i].mode_id = "SCUF"
741
+            }
742
+            if(modedate[i].mode_id == 7){
743
+               modedate[i].mode_id = "IUF"
744
+            }
745
+           if(modedate[i].mode_id == 8){
746
+               modedate[i].mode_id = "HFHD"
747
+            }
748
+           if(modedate[i].mode_id == 9){
749
+               modedate[i].mode_id = "HFHD+HP"
750
+            }
751
+           if(modedate[i].mode_id == 10){
752
+               modedate[i].mode_id = "PHF"
753
+            }
754
+            if(modedate[i].mode_id == 11){
755
+               modedate[i].mode_id = "HFR"
756
+            }
757
+            if(modedate[i].mode_id == 12){
758
+               modedate[i].mode_id = "HDF+HP"
759
+            }
760
+           if(modedate[i].mode_id == 13){
761
+               modedate[i].mode_id = "CRRT"
762
+            }
763
+           if(modedate[i].mode_id == 14){
764
+               modedate[i].mode_id = "腹水回输"
765
+            }
766
+           if(modedate[i].mode_id == 15){
767
+               modedate[i].mode_id = "HD前置换"
768
+            }
769
+           if(modedate[i].mode_id == 16){
770
+               modedate[i].mode_id = "HD后置换"
771
+            }
772
+           if(modedate[i].mode_id == 17){
773
+               modedate[i].mode_id = "HDF前置换"
774
+            }
775
+           if(modedate[i].mode_id == 18){
776
+               modedate[i].mode_id = "HDF后置换"
777
+            }
778
+           if(modedate[i].mode_id == 19){
779
+               modedate[i].mode_id = "IUF+HD"
780
+            }
781
+            this.modesData.xAxis.push(modedate[i].mode_id)
782
+            this.modesData.series.push(((modedate[i].count/total)*100).toFixed(1))
783
+          }
784
+          this.chart.series[0].data = this.modesData.series
785
+          this.chart.xAxis.data = this.modesData.xAxis
786
+          this.getArrLength1(this.chart.xAxis.data)
787
+           
506
          }
788
          }
507
       })
789
       })
508
     },
790
     },
509
     //统计转归
791
     //统计转归
510
     getTotalLapseCount(startDate,endDate){
792
     getTotalLapseCount(startDate,endDate){
793
+       this.modesDataTwo.series = []
794
+       this.modesDataTwo.xAxis = []
511
       getTotalLapseCount(startDate,endDate).then(response=>{
795
       getTotalLapseCount(startDate,endDate).then(response=>{
512
          if(response.data.state == 1){
796
          if(response.data.state == 1){
797
+           var arr = [
798
+             {name:"留治",count:0},
799
+             {name:"转出",count:0}
800
+           ]
513
           var patients =  response.data.data.patients
801
           var patients =  response.data.data.patients
514
-          console.log('patients',patients)
515
           this.rollOutTotal = patients.length
802
           this.rollOutTotal = patients.length
516
-          console.log("留治病人长度",patients.length)
517
           var patienttwo = response.data.data.patienttwo
803
           var patienttwo = response.data.data.patienttwo
518
           this.outTotal = patienttwo.length
804
           this.outTotal = patienttwo.length
519
-          console.log("转出长度", this.outTotal)
520
           var count = response.data.data.count
805
           var count = response.data.data.count
806
+          console.log("count",count)
521
           this.patientCount = count
807
           this.patientCount = count
808
+
809
+          for(let i=0;i<arr.length;i++){
810
+            arr[0].count = this.rollOutTotal
811
+            arr[1].count = this.outTotal
812
+          }
813
+
814
+          for(let j=0;j<arr.length;j++){
815
+            this.modesDataTwo.xAxis.push(arr[j].name)
816
+            this.modesDataTwo.series.push(((arr[j].count/count)*100).toFixed(1))
817
+          }
818
+          this.bar.series[0].data = this.modesDataTwo.series
819
+          this.bar.xAxis.data = this.modesDataTwo.xAxis
820
+          this.getArrLength(this.bar.xAxis.data)
821
+        
522
          }
822
          }
523
       })
823
       })
524
     },
824
     },
610
 
910
 
611
          }
911
          }
612
       })
912
       })
913
+    },
914
+    selectWay(index){
915
+      this.way = index
916
+    },
917
+    getArrLength(result){
918
+      if(result.length > 10){
919
+        var dataZoom_end = (10/result.length)*100;
920
+        this.bar.dataZoom[0].end = dataZoom_end
921
+      }else{
922
+        var dataZoom_end = 100;
923
+        this.bar.dataZoom[0].end = dataZoom_end
924
+      }
925
+    },
926
+    getArrLength1(result){
927
+      if(result.length > 10){
928
+        var dataZoom_end = (10/result.length)*100;
929
+        this.chart.dataZoom[0].end = dataZoom_end
930
+      }else{
931
+        var dataZoom_end = 100;
932
+        this.chart.dataZoom[0].end = dataZoom_end
933
+      }
613
     }
934
     }
614
   },
935
   },
615
   created() {
936
   created() {

+ 83 - 14
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue View File

84
           </el-table-column>
84
           </el-table-column>
85
           <el-table-column prop="mode_id" label="透析模式">
85
           <el-table-column prop="mode_id" label="透析模式">
86
               <template slot-scope="scope">
86
               <template slot-scope="scope">
87
-                <span>{{ scope.row.mode_id.join("、") }}</span>
87
+                <!-- <span>{{ scope.row.mode_id.join("、") }}</span> -->
88
+                <span>{{getModeIdCount(scope.row.patient_id)}}</span>
88
               </template>
89
               </template>
89
            </el-table-column>
90
            </el-table-column>
90
           <el-table-column prop="address" label="透析总次数" width="140">
91
           <el-table-column prop="address" label="透析总次数" width="140">
142
         }
143
         }
143
       }, 
144
       }, 
144
       patient_id:0,
145
       patient_id:0,
146
+      modeIdCount:[],
145
     };
147
     };
146
   },
148
   },
147
   methods: {
149
   methods: {
192
       getDialysisList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
194
       getDialysisList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
193
          if(response.data.state === 1){
195
          if(response.data.state === 1){
194
           var list = response.data.data.list
196
           var list = response.data.data.list
195
-          // console.log("list",list)
196
           var totallist  =  response.data.data.totallist
197
           var totallist  =  response.data.data.totallist
197
-          //  console.log("totallist",totallist)
198
           this.total = totallist  
198
           this.total = totallist  
199
           var prescriptionList = response.data.data.prescriptionList
199
           var prescriptionList = response.data.data.prescriptionList
200
-          // console.log("prescriptionList",prescriptionList)
200
+         
201
           this.getModeId(prescriptionList)
201
           this.getModeId(prescriptionList)
202
           var count = response.data.data.count
202
           var count = response.data.data.count
203
-          // console.log("count",count)
204
           this.DialysisCount = count
203
           this.DialysisCount = count
205
-          // for(let i=0;i<count.length;i++){
206
-          //  for(let j=0;j<prescriptionList.length;j++){
207
-          //    if(count[i].patient_id == prescriptionList[j].patient_id){
208
-          //         prescriptionList[j].count = count[i].Count
209
-          //    }
210
-          //  }
211
-          // }
212
-          // console.log("prescriptionList",prescriptionList)
204
+          
205
+          var modeIdCount = response.data.data.modeIdCount
206
+          console.log("modeidcount=====",modeIdCount)
207
+          for(let i=0;i<modeIdCount.length;i++){
208
+            if(modeIdCount[i].mode_id == 1){
209
+               modeIdCount[i].mode_id = "HD"
210
+            }
211
+            if(modeIdCount[i].mode_id == 2){
212
+               modeIdCount[i].mode_id = "HDF"
213
+            }
214
+            if(modeIdCount[i].mode_id == 3){
215
+               modeIdCount[i].mode_id = "HD+HP"
216
+            }
217
+            if(modeIdCount[i].mode_id == 4){
218
+               modeIdCount[i].mode_id = "HP"
219
+            }
220
+            if(modeIdCount[i].mode_id == 5){
221
+               modeIdCount[i].mode_id = "HF"
222
+            }
223
+            if(modeIdCount[i].mode_id == 6){
224
+               modeIdCount[i].mode_id = "SCUF"
225
+            }
226
+            if(modeIdCount[i].mode_id == 7){
227
+               modeIdCount[i].mode_id = "IUF"
228
+            }
229
+            if(modeIdCount[i].mode_id == 8){
230
+               modeIdCount[i].mode_id = "HFHD"
231
+            }
232
+            if(modeIdCount[i].mode_id == 9){
233
+               modeIdCount[i].mode_id = "HFHD+HP"
234
+            }
235
+            if(modeIdCount[i].mode_id == 10){
236
+               modeIdCount[i].mode_id = "PHF"
237
+            }
238
+            if(modeIdCount[i].mode_id == 11){
239
+               modeIdCount[i].mode_id = "HFR"
240
+            }
241
+            if(modeIdCount[i].mode_id == 12){
242
+               modeIdCount[i].mode_id = "HDF+HP"
243
+            }
244
+            if(modeIdCount[i].mode_id == 13){
245
+               modeIdCount[i].mode_id = "CRRT"
246
+            }
247
+             if(modeIdCount[i].mode_id == 14){
248
+               modeIdCount[i].mode_id = "腹水回输"
249
+            }
250
+             if(modeIdCount[i].mode_id == 15){
251
+               modeIdCount[i].mode_id = "HD前置换"
252
+            }
253
+             if(modeIdCount[i].mode_id == 16){
254
+               modeIdCount[i].mode_id = "HD后置换"
255
+            }
256
+             if(modeIdCount[i].mode_id == 17){
257
+               modeIdCount[i].mode_id = "HDF前置换"
258
+            }
259
+             if(modeIdCount[i].mode_id == 18){
260
+               modeIdCount[i].mode_id = "HDF后置换"
261
+            }
262
+              if(modeIdCount[i].mode_id == 19){
263
+               modeIdCount[i].mode_id = "IUF+HD"
264
+            }
265
+          }
266
+          this.modeIdCount = modeIdCount
213
           let dataInfo = {}
267
           let dataInfo = {}
214
           list.forEach((item, index) => {
268
           list.forEach((item, index) => {
215
             let { patient_id } = item
269
             let { patient_id } = item
388
           }
442
           }
389
         })
443
         })
390
       },
444
       },
391
-   handleSelect(val) {
445
+    handleSelect(val) {
392
         // console.log("val",val)
446
         // console.log("val",val)
393
         this.listQuery.search = val.name
447
         this.listQuery.search = val.name
394
         this.patient_id = val.id
448
         this.patient_id = val.id
395
         this.onSearch()
449
         this.onSearch()
396
       },
450
       },
451
+      getModeIdCount(id){
452
+        var arr = []
453
+        for(let i = 0;i<this.modeIdCount.length;i++){
454
+          if(id == this.modeIdCount[i].patient_id){
455
+             arr.push(this.modeIdCount[i])
456
+           }
457
+        }
458
+        let str = ''
459
+        arr.map(item => {
460
+          str += item.mode_id + '(' + item.Count + '次) 、' 
461
+        })
462
+        var strs = str.substring(0, str.length - 1)
463
+       
464
+        return strs
465
+      }
397
   },
466
   },
398
   created(){
467
   created(){
399
     var nowDate = new Date();
468
     var nowDate = new Date();

+ 14 - 5
src/xt_pages/user/patients.vue View File

406
           <template slot-scope="scope">
406
           <template slot-scope="scope">
407
             <span>{{ LapsetoInfo(scope.row) }}</span>
407
             <span>{{ LapsetoInfo(scope.row) }}</span>
408
           </template>
408
           </template>
409
+        </el-table-column>
410
+         <el-table-column label="转出原因" align="center">
411
+          <template slot-scope="scope">
412
+            <span>{{scope.row.out_reason}}</span>
413
+          </template>
409
         </el-table-column>
414
         </el-table-column>
410
         <el-table-column label="操作" align="center" min-width="140">
415
         <el-table-column label="操作" align="center" min-width="140">
411
           <template slot-scope="scope">
416
           <template slot-scope="scope">
503
             >
508
             >
504
             </el-date-picker>
509
             </el-date-picker>
505
           </el-form-item>
510
           </el-form-item>
511
+          <el-form-item label="转出原因:" v-if="lapsetoForm.lapseto_type == 1">
512
+              <el-input v-model="lapsetoForm.out_reason"></el-input>
513
+          </el-form-item>
506
         </el-form>
514
         </el-form>
507
         <div slot="footer" class="dialog-footer">
515
         <div slot="footer" class="dialog-footer">
508
           <el-button @click="LapsetoDialogVisible = false">取 消</el-button>
516
           <el-button @click="LapsetoDialogVisible = false">取 消</el-button>
604
         lapsetoForm: {
612
         lapsetoForm: {
605
           lapseto_type: 0,
613
           lapseto_type: 0,
606
           lapseto_time: '',
614
           lapseto_time: '',
607
-          patient_id: 0
615
+          patient_id: 0,
616
+          out_reason:''
608
         },
617
         },
609
         schedulArr: [
618
         schedulArr: [
610
           { value: 0, label: '全部' },
619
           { value: 0, label: '全部' },
1132
                 type: 'success',
1141
                 type: 'success',
1133
                 duration: 2000
1142
                 duration: 2000
1134
               })
1143
               })
1135
-              this.tableData[
1136
-                this.currentIndex
1137
-                ].lapseto = this.lapsetoForm.lapseto_type
1144
+              this.tableData[this.currentIndex].lapseto = this.lapsetoForm.lapseto_type
1145
+              this.tableData[this.currentIndex].out_reason = this.lapsetoForm.out_reason
1138
               this.currentIndex = -1
1146
               this.currentIndex = -1
1139
               this.LapsetoDialogVisible = false
1147
               this.LapsetoDialogVisible = false
1140
             } else {
1148
             } else {
1155
         this.lapsetoForm.lapseto_time = ''
1163
         this.lapsetoForm.lapseto_time = ''
1156
         this.lapsetoForm.lapseto_type = row.lapseto
1164
         this.lapsetoForm.lapseto_type = row.lapseto
1157
         this.lapsetoForm.patient_id = row.id
1165
         this.lapsetoForm.patient_id = row.id
1166
+        this.lapsetoForm.out_reason = row.out_reason
1158
         this.LapsetoDialogVisible = true
1167
         this.LapsetoDialogVisible = true
1159
       },
1168
       },
1160
       LapsetoInfo(row) {
1169
       LapsetoInfo(row) {
1258
             return false
1267
             return false
1259
           } else {
1268
           } else {
1260
             this.tableData = response.data.data.patients
1269
             this.tableData = response.data.data.patients
1261
-            //  console.log('病人是', this.tableData)
1270
+           console.log('病人是', this.tableData)
1262
             this.pageTotal = this.tableData.length
1271
             this.pageTotal = this.tableData.length
1263
             this.total = response.data.data.total
1272
             this.total = response.data.data.total
1264
           }
1273
           }