Pārlūkot izejas kodu

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

csx 4 gadus atpakaļ
vecāks
revīzija
8d134719b2

+ 60 - 0
src/api/common/common.js Parādīt failu

@@ -143,3 +143,63 @@ export function getDialysisModeType(startime, endtime) {
143 143
     params: params
144 144
   })
145 145
 }
146
+
147
+export function getTotalLapseCount(startime, endtime) {
148
+  const params = {
149
+    startime: startime,
150
+    endtime: endtime
151
+  }
152
+  return request({
153
+    url: '/com/api/gettotallapsecount',
154
+    method: 'get',
155
+    params: params
156
+  })
157
+}
158
+
159
+export function getTotalSexCount(startime, endtime) {
160
+  const params = {
161
+    startime: startime,
162
+    endtime: endtime
163
+  }
164
+  return request({
165
+    url: '/com/api/gettotalsexcount',
166
+    method: 'get',
167
+    params: params
168
+  })
169
+}
170
+
171
+export function getTotalInfectiousCount(startime, endtime) {
172
+  const params = {
173
+    startime: startime,
174
+    endtime: endtime
175
+  }
176
+  return request({
177
+    url: '/com/api/gettoalinfectiouscount',
178
+    method: 'get',
179
+    params: params
180
+  })
181
+}
182
+
183
+export function getTotalAgeCount(startime, endtime) {
184
+  const params = {
185
+    startime: startime,
186
+    endtime: endtime
187
+  }
188
+  return request({
189
+    url: '/com/api/gettotalagecount',
190
+    method: 'get',
191
+    params: params
192
+  })
193
+}
194
+
195
+export function getTotalDialysisCount(startime, endtime) {
196
+  const params = {
197
+    startime: startime,
198
+    endtime: endtime
199
+  }
200
+  return request({
201
+    url: '/com/api/gettotaldialysiscount',
202
+    method: 'get',
203
+    params: params
204
+  })
205
+}

+ 32 - 10
src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue Parādīt failu

@@ -222,8 +222,8 @@
222 222
           <td>执行者签名</td>
223 223
         </tr>
224 224
         <tr v-for="(advice, advice_index) in tableAdvice" :key="advice_index">
225
-          <td style="height:30px;line-height:30px">{{ getTime(advice.start_time, "{y}-{m}-{d} {h}:{i}") }}</td>
226
-          <td class="parent">
225
+          <td style="height:40px;line-height:40px">{{ getTime(advice.start_time, "{y}-{m}-{d} {h}:{i}") }}</td>
226
+          <td class="parent" style="max-width:400px">
227 227
             <span v-if="advice.parent_id > 0">---></span>
228 228
             <span>{{ advice.advice_name }}</span>
229 229
             <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
@@ -281,7 +281,7 @@
281 281
 
282 282
 
283 283
             <tr v-for="monitor in monitors" :key="monitor.id">
284
-              <td>&nbsp;
284
+              <td style="height:40px;line-height:40px">&nbsp;
285 285
                 {{getTime(monitor.operate_time,'{h}:{i}')}}
286 286
               </td>
287 287
               <td>&nbsp;{{monitor.systolic_blood_pressure?monitor.systolic_blood_pressure:''}} /
@@ -346,10 +346,10 @@
346 346
             </td>
347 347
             <td width="50" style="border:none;padding-left:5px">透析器凝血:</td>
348 348
             <td width="120" style="text-align:left;border:none;">
349
-              <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-0度') > -1 ? true : false" showValue="0"></label-box>
350
-              <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅰ度') > -1 ? true : false" showValue="+"></label-box>
351
-              <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅱ度') > -1" showValue="+ +"></label-box>
352
-              <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅲ度') > -1 ? true : false" showValue="+ + +"></label-box>
349
+              <label-box :isChecked="afterdialysis.cruor ? (afterdialysis.cruor.indexOf('透析器-0度') > -1 ? true : false) : false" showValue="0"></label-box>
350
+              <label-box :isChecked="afterdialysis.cruor ? (afterdialysis.cruor.indexOf('透析器-Ⅰ度') > -1 ? true : false) : false" showValue="+"></label-box>
351
+              <label-box :isChecked="afterdialysis.cruor ? (afterdialysis.cruor.indexOf('透析器-Ⅱ度') > -1 ? true : false) : false" showValue="+ +"></label-box>
352
+              <label-box :isChecked="afterdialysis.cruor ? (afterdialysis.cruor.indexOf('透析器-Ⅲ度') > -1 ? true : false) : false" showValue="+ + +"></label-box>
353 353
             </td>
354 354
           </tr>
355 355
         </tbody>
@@ -358,7 +358,7 @@
358 358
       <table class="print-table" border="1">
359 359
         <tr style="height:36px;text-align:left;border:none;">
360 360
           <td style="padding-left:5px;border:none">
361
-              <p style="margin-bottom:60px">
361
+              <p style="margin-bottom:160px">
362 362
                 透析小结:{{ summary.dialysis_summary ? summary.dialysis_summary : "" }}
363 363
               </p>
364 364
           </td>
@@ -700,12 +700,16 @@ export default {
700 700
             var obj3 = { advice_name: "", start_time: "" };
701 701
             var obj4 = { advice_name: "", start_time: "" };
702 702
             var obj5 = { advice_name: "", start_time: "" };
703
+            var obj6 = { advice_name: "", start_time: "" };
704
+            var obj7 = { advice_name: "", start_time: "" };
703 705
             tableAdvice.push(obj);
704 706
             tableAdvice.push(obj1);
705 707
             tableAdvice.push(obj2);
706 708
             tableAdvice.push(obj3);
707 709
             tableAdvice.push(obj4);
708 710
             tableAdvice.push(obj5);
711
+            tableAdvice.push(obj6);
712
+            tableAdvice.push(obj7);
709 713
             this.tableAdvice = tableAdvice;
710 714
           }
711 715
           if (tableAdvice.length === 1) {
@@ -714,11 +718,15 @@ export default {
714 718
             var obj2 = { advice_name: "", start_time: "" };
715 719
             var obj3 = { advice_name: "", start_time: "" };
716 720
             var obj4 = { advice_name: "", start_time: "" };
721
+            var obj5 = { advice_name: "", start_time: "" };
722
+            var obj6 = { advice_name: "", start_time: "" };
717 723
             tableAdvice.push(obj);
718 724
             tableAdvice.push(obj1);
719 725
             tableAdvice.push(obj2);
720 726
             tableAdvice.push(obj3);
721 727
             tableAdvice.push(obj4);
728
+            tableAdvice.push(obj5);
729
+            tableAdvice.push(obj6);
722 730
             this.tableAdvice = tableAdvice;
723 731
           }
724 732
           if (tableAdvice.length === 2) {
@@ -726,10 +734,14 @@ export default {
726 734
             var obj1 = { advice_name: "", start_time: "" };
727 735
             var obj2 = { advice_name: "", start_time: "" };
728 736
             var obj3 = { advice_name: "", start_time: "" };
737
+            var obj4 = { advice_name: "", start_time: "" };
738
+            var obj5 = { advice_name: "", start_time: "" };
729 739
             tableAdvice.push(obj);
730 740
             tableAdvice.push(obj1);
731 741
             tableAdvice.push(obj2);
732 742
             tableAdvice.push(obj3);
743
+            tableAdvice.push(obj4);
744
+            tableAdvice.push(obj5);
733 745
             this.tableAdvice = tableAdvice;
734 746
           }
735 747
           if (tableAdvice.length === 3) {
@@ -740,10 +752,13 @@ export default {
740 752
             // eslint-disable-next-line no-redeclare
741 753
             var obj2 = { advice_name: "", start_time: "" };
742 754
             // eslint-disable-next-line no-redeclare
755
+            var obj3 = { advice_name: "", start_time: "" };
756
+            var obj4 = { advice_name: "", start_time: "" };
743 757
             tableAdvice.push(obj);
744 758
             tableAdvice.push(obj1);
745 759
             tableAdvice.push(obj2);
746
-
760
+            tableAdvice.push(obj3);
761
+            tableAdvice.push(obj4);
747 762
             this.tableAdvice = tableAdvice;
748 763
           }
749 764
           if (tableAdvice.length === 4) {
@@ -752,9 +767,12 @@ export default {
752 767
             // eslint-disable-next-line no-redeclare
753 768
             var obj1 = { advice_name: "", start_time: "" };
754 769
             // eslint-disable-next-line no-redeclare
755
-
770
+            var obj2 = { advice_name: "", start_time: "" };
771
+            var obj3 = { advice_name: "", start_time: "" };
756 772
             tableAdvice.push(obj);
757 773
             tableAdvice.push(obj1);
774
+            tableAdvice.push(obj2);
775
+            tableAdvice.push(obj3);
758 776
             this.tableAdvice = tableAdvice;
759 777
           }
760 778
           if (tableAdvice.length === 5) {
@@ -762,8 +780,12 @@ export default {
762 780
             var obj = { advice_name: "", start_time: "" };
763 781
             // eslint-disable-next-line no-redeclare
764 782
             var obj1 = { advice_name: "", start_time: "" };
783
+            var obj1 = { advice_name: "", start_time: "" };
784
+            // eslint-disable-next-line no-redeclare
785
+            var obj2 = { advice_name: "", start_time: "" };
765 786
             tableAdvice.push(obj);
766 787
             tableAdvice.push(obj1);
788
+            tableAdvice.push(obj2);
767 789
             this.tableAdvice = tableAdvice;
768 790
           }
769 791
 

+ 156 - 33
src/xt_pages/qcd/basicInformationAnalysis.vue Parādīt failu

@@ -58,11 +58,9 @@
58 58
             
59 59
               <div class="borderBox">
60 60
                <div v-for="(item,index) in modetype" :key="index">
61
-                <p>{{item.mode_id}}:{{getTotalCount(item.mode_id)}}次(64%)</p>
62
-                <el-progress :percentage="70"></el-progress>
61
+                <p>{{item.mode_id}}:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
62
+                <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
63 63
                </div>
64
-                <p>HD:64次(64%)</p>
65
-                <el-progress :percentage="70"></el-progress>
66 64
               </div>
67 65
             </div>
68 66
             <div class="infoOne">
@@ -71,10 +69,10 @@
71 69
                 <p class="infoTitle">传染病统计</p>
72 70
               </div>
73 71
               <div class="borderBox2">
74
-                <p>无传染病:64人(64%)</p>
75
-                <el-progress :percentage="70"></el-progress>
76
-                <p>乙肝:64人(64%)</p>
77
-                <el-progress :percentage="70"></el-progress>
72
+               <div v-for="(item,i) in this.InfectiousList" :key="i">
73
+                  <p>{{item.disease_id}}:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
74
+                  <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
75
+                </div>
78 76
               </div>
79 77
             </div>
80 78
           </div>
@@ -84,13 +82,13 @@
84 82
             <div class="infoOne">
85 83
               <div class="titleBox">
86 84
                 <span class="point1"></span>
87
-                <p class="infoTitle">转归统计(总人数100人)</p>
85
+                <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
88 86
               </div>
89 87
               <div class="borderBox1">
90
-                <p>留治:64人(64%)</p>
91
-                <el-progress :percentage="70"></el-progress>
92
-                <p>转出:64人(64%)</p>
93
-                <el-progress :percentage="70"></el-progress>
88
+                <p>留治:{{RetentionCount}}人({{(RetentionCount/patientCount*100).toFixed(1)}}%)</p>
89
+                <el-progress :percentage="(RetentionCount/patientCount*100).toFixed(1)"></el-progress>
90
+                <p>转出:{{rollOut}}人({{(rollOut/patientCount*100).toFixed(1)}}%)</p>
91
+                <el-progress :percentage="(rollOut/patientCount*100).toFixed(1)"></el-progress>
94 92
               </div>
95 93
             </div>
96 94
             <div class="infoOne">
@@ -99,10 +97,10 @@
99 97
                 <p class="infoTitle">男女比例</p>
100 98
               </div>
101 99
               <div class="borderBox2">
102
-                <p>男:64人(64%)</p>
103
-                <el-progress :percentage="70"></el-progress>
104
-                <p>女:64人(64%)</p>
105
-                <el-progress :percentage="70"></el-progress>
100
+                <p>男:{{totalMan}}人({{(totalMan/totalGender*100).toFixed(1)}}%)</p>
101
+                <el-progress :percentage="(totalMan/totalGender*100).toFixed(1)"></el-progress>
102
+                <p>女:{{totalWoman}}人({{(totalWoman/totalGender*100).toFixed(1)}}%)</p>
103
+                <el-progress :percentage="(totalWoman/totalGender*100).toFixed(1)"></el-progress>
106 104
               </div>
107 105
             </div>
108 106
             <div class="infoOne">
@@ -111,14 +109,28 @@
111 109
                 <p class="infoTitle">年龄统计</p>
112 110
               </div>
113 111
               <div class="borderBox">
114
-                <p>年龄&lt;20:64人(64%)</p>
115
-                <el-progress :percentage="70"></el-progress>
116
-                <p>20≤年龄≤30:64人(64%)</p>
117
-                <el-progress :percentage="70"></el-progress>
118
-                <p>30≤年龄≤40:64人(64%)</p>
119
-                <el-progress :percentage="70"></el-progress>
120
-                <p>其他:64人(64%)</p>
121
-                <el-progress :percentage="70"></el-progress>
112
+                <div v-for="(item,j) in ageCount" :key="j">
113
+                    <span v-if="item.age == 20">
114
+                     <p>年龄≤20:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
115
+                     <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
116
+                    </span>
117
+                   <span v-if="item.age == 40">
118
+                      <p>20&lt;年龄≤40:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
119
+                      <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
120
+                    </span>
121
+                    <span v-if="item.age == 60">
122
+                      <p>40&lt;年龄≤60:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
123
+                      <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
124
+                    </span>
125
+                    <span v-if="item.age == 80">
126
+                     <p>60&lt;年龄≤80:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
127
+                     <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
128
+                    </span>
129
+                    <span v-if="item.age ==150">
130
+                      <p>大于80:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
131
+                      <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
132
+                    </span>
133
+                </div>
122 134
               </div>
123 135
             </div>
124 136
             <div class="infoOne">
@@ -127,9 +139,9 @@
127 139
                 <p class="infoTitle">透龄统计</p>
128 140
               </div>
129 141
               <div class="borderBox1">
130
-                <p>透析龄&lt;12:64人(64%)</p>
142
+                <p>透析龄12:64人(64%)</p>
131 143
                 <el-progress :percentage="70"></el-progress>
132
-                <p>12透析龄≤36:64人(64%)</p>
144
+                <p>12&lt;透析龄≤36:64人(64%)</p>
133 145
                 <el-progress :percentage="70"></el-progress>
134 146
                 <p>36≤透析龄≤60:64人(64%)</p>
135 147
                 <el-progress :percentage="70"></el-progress>
@@ -152,7 +164,7 @@ import { GetOICData } from "@/api/qcd";
152 164
 import PieChart from "../qcd/components/BarChart";
153 165
 import { uParseTime } from "@/utils/tools";
154 166
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
155
-import {getDialysisModeType} from "@/api/common/common"
167
+import {getDialysisModeType,getTotalLapseCount,getTotalSexCount,getTotalInfectiousCount,getTotalAgeCount,getTotalDialysisCount} from "@/api/common/common"
156 168
 export default {
157 169
   name: "dialysisTotal",
158 170
   components: {
@@ -180,6 +192,16 @@ export default {
180 192
       ],
181 193
       modetype:[],
182 194
       total:0,
195
+      patientCount:0,
196
+      rollOut:0,
197
+      RetentionCount:0,
198
+      totalMan:0,
199
+      totalWoman:0,
200
+      totalGender:0,
201
+      InfectiousList:[],
202
+      InfectiousTotal:0,
203
+      ageCount:[],
204
+      ageTotal:0,
183 205
     };
184 206
   },
185 207
   methods: {
@@ -204,7 +226,8 @@ export default {
204 226
     getDialysisModeType(startDate,endDate){
205 227
       getDialysisModeType(startDate,endDate).then(response=>{
206 228
          if(response.data.state == 1){
207
-           var modetype =  response.data.data.modetype
229
+          var modetype =  response.data.data.modetype
230
+          console.log("mode---",modetype)
208 231
             var total =  response.data.data.total
209 232
             console.log("total",total)
210 233
             this.total = total
@@ -257,12 +280,78 @@ export default {
257 280
            }
258 281
            this.modetype = modetype
259 282
            console.log("modetype",modetype)
260
-           
283
+         
261 284
          }
262 285
       })
263 286
     },
264
-    getTotalCount(id){
265
-      console.log("id",id)
287
+    //统计转归
288
+    getTotalLapseCount(startDate,endDate){
289
+      getTotalLapseCount(startDate,endDate).then(response=>{
290
+         if(response.data.state == 1){
291
+          var patients =  response.data.data.patients
292
+          var total = response.data.data.total
293
+          this.rollOut = total
294
+          var count = response.data.data.count
295
+          this.patientCount = count
296
+          this.RetentionCount = count-total
297
+         }
298
+      })
299
+    },
300
+    getTotalSexCount(timeStar,timeEnd){
301
+      getTotalSexCount(timeStar,timeEnd).then(response=>{
302
+        if(response.data.state === 1){
303
+          var total = response.data.data.total
304
+          this.totalGender = total
305
+          var totalMan = response.data.data.totalSex
306
+          this.totalMan = totalMan
307
+          var totalWoman = total - totalMan
308
+          this.totalWoman = totalWoman
309
+        }
310
+      })
311
+    },
312
+    //统计传染病
313
+    getTotalInfectiousCount(timeStar,timeEnd){
314
+       getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
315
+           if(response.data.state === 1){
316
+             this.InfectiousTotal = response.data.data.total
317
+             var infectious = response.data.data.count
318
+             for(let i=0;i<infectious.length;i++){
319
+               if(infectious[i].disease_id == 2){
320
+                 infectious[i].disease_id = "乙肝"
321
+               }
322
+               if(infectious[i].disease_id == 3){
323
+                 infectious[i].disease_id = "丙肝"
324
+               }
325
+               if(infectious[i].disease_id == 4){
326
+                 infectious[i].disease_id = "艾滋病"
327
+               }
328
+               if(infectious[i].disease_id == 5){
329
+                 infectious[i].disease_id = "肺结核"
330
+               }
331
+               if(infectious[i].disease_id == 6){
332
+                 infectious[i].disease_id = "梅毒"
333
+               }
334
+               this.InfectiousList = infectious
335
+             }
336
+             console.log("infectious-----------",infectious)
337
+           }
338
+       })
339
+    },
340
+    getTotalAgeCount(timeStar,timeEnd){
341
+      getTotalAgeCount(timeStar,timeEnd).then(response=>{
342
+         if(response.data.state == 1){
343
+          var ageCount =  response.data.data.ageCount
344
+          this.ageCount = ageCount
345
+          console.log("ageCount",ageCount)
346
+          this.ageTotal =  response.data.data.total
347
+         // var two = response.data.data.two
348
+        //  console.log("two",two)
349
+         }
350
+      })
351
+    },
352
+    getTotalDialysisCount(timeStar,timeEnd){
353
+      getTotalDialysisCount(timeStar,timeEnd).then(response=>{
354
+      })
266 355
     }
267 356
   },
268 357
   created() {
@@ -270,8 +359,30 @@ export default {
270 359
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
271 360
       console.log("开始时间",startDate)
272 361
       const endDate = moment(new Date()).format('YYYY-MM-DD')
273
-      console.log("结束时间",endDate)
362
+      console.log("结束时间",endDate) 
363
+      var now = new Date()
364
+      var nowMonth = now.getMonth(); //当前月 
365
+      var nowYear = now.getFullYear(); //当前年 
366
+      //本月的开始时间
367
+      var monthStartDate = new Date(nowYear, nowMonth, 1); 
368
+      var timeStar=Date.parse(monthStartDate)/1000;//s
369
+      console.log("本月第一天",timeStar)
370
+      //本月的结束时间
371
+      var monthEndDate = new Date(nowYear, nowMonth+1, 0);
372
+      var timeEnd=Date.parse(monthEndDate)/1000-1;//s
373
+      console.log("本月最后一天",timeEnd)
374
+      //统计透析总量
274 375
       this.getDialysisModeType(startDate,endDate)
376
+      //统计转归状态
377
+      this.getTotalLapseCount(timeStar,timeEnd)
378
+      //统计男女比例
379
+      this.getTotalSexCount(timeStar,timeEnd)
380
+      //统计传染病
381
+      this.getTotalInfectiousCount(timeStar,timeEnd)
382
+      //统计年龄
383
+      this.getTotalAgeCount(timeStar,timeEnd)
384
+      //统计透析年龄
385
+      this.getTotalDialysisCount(timeStar,timeEnd)
275 386
   },
276 387
 };
277 388
 </script>
@@ -381,6 +492,10 @@ export default {
381 492
           rgba(159, 189, 252, 1)
382 493
         );
383 494
       }
495
+      .el-progress-bar{
496
+        margin-right: -59px;
497
+        padding-right: 60px;
498
+      }
384 499
     }
385 500
     .borderBox1 {
386 501
       .el-progress-bar__inner {
@@ -390,6 +505,10 @@ export default {
390 505
           rgba(255, 153, 148, 1)
391 506
         );
392 507
       }
508
+      .el-progress-bar{
509
+        margin-right: -59px;
510
+        padding-right: 60px;
511
+      }
393 512
     }
394 513
     .borderBox2 {
395 514
       .el-progress-bar__inner {
@@ -399,6 +518,10 @@ export default {
399 518
           rgba(179, 168, 247, 1)
400 519
         );
401 520
       }
521
+      .el-progress-bar{
522
+        margin-right: -59px;
523
+        padding-right: 60px;
524
+      }
402 525
     }
403 526
   }
404 527
 }

+ 1 - 0
src/xt_pages/statistics/index.vue Parādīt failu

@@ -179,6 +179,7 @@ export default {
179 179
               contagionMap[contagionList[index].id] = contagionList[index].name;
180 180
             }
181 181
             var diseaseCounts = response.data.data.disease_counts;
182
+            console.log("diseaseCounts",diseaseCounts)
182 183
             var diseaseCountsMap = {};
183 184
             for (var index in diseaseCounts) {
184 185
               diseaseCountsMap[diseaseCounts[index].disease_id] =