|
@@ -55,11 +55,69 @@
|
55
|
55
|
<span class="point"></span>
|
56
|
56
|
<p class="infoTitle">透析总量({{total}}次)</p>
|
57
|
57
|
</div>
|
58
|
|
-
|
|
58
|
+
|
59
|
59
|
<div class="borderBox">
|
60
|
60
|
<div v-for="(item,index) in modetype" :key="index">
|
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>
|
|
61
|
+ <span v-if="item.mode_id == 1">
|
|
62
|
+ <p>HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
63
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
64
|
+ </span>
|
|
65
|
+ <span v-if="item.mode_id == 2">
|
|
66
|
+ <p>HDF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
67
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
68
|
+ </span>
|
|
69
|
+ <span v-if="item.mode_id == 3">
|
|
70
|
+ <p>HD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
71
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
72
|
+ </span>
|
|
73
|
+ <span v-if="item.mode_id == 4">
|
|
74
|
+ <p>HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
75
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
76
|
+ </span>
|
|
77
|
+ <span v-if="item.mode_id == 5">
|
|
78
|
+ <p>HF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
79
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
80
|
+ </span>
|
|
81
|
+ <span v-if="item.mode_id == 6">
|
|
82
|
+ <p>SCUF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
83
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
84
|
+ </span>
|
|
85
|
+ <span v-if="item.mode_id == 7">
|
|
86
|
+ <p>IUF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
87
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
88
|
+ </span>
|
|
89
|
+ <span v-if="item.mode_id == 8">
|
|
90
|
+ <p>HFHD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
91
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
92
|
+ </span>
|
|
93
|
+ <span v-if="item.mode_id == 9">
|
|
94
|
+ <p>HFHD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
95
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
96
|
+ </span>
|
|
97
|
+ <span v-if="item.mode_id == 10">
|
|
98
|
+ <p>PHF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
99
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
100
|
+ </span>
|
|
101
|
+ <span v-if="item.mode_id == 11">
|
|
102
|
+ <p>HFR:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
103
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
104
|
+ </span>
|
|
105
|
+ <span v-if="item.mode_id == 12">
|
|
106
|
+ <p>HDF+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
107
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
108
|
+ </span>
|
|
109
|
+ <span v-if="item.mode_id == 13">
|
|
110
|
+ <p>HFHD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
111
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
112
|
+ </span>
|
|
113
|
+ <span v-if="item.mode_id == 14">
|
|
114
|
+ <p>腹水回输:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
115
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
116
|
+ </span>
|
|
117
|
+ <span v-if="item.mode_id == 19">
|
|
118
|
+ <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
|
|
119
|
+ <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
|
|
120
|
+ </span>
|
63
|
121
|
</div>
|
64
|
122
|
</div>
|
65
|
123
|
</div>
|
|
@@ -161,14 +219,14 @@
|
161
|
219
|
<p class="infoTitle">透龄统计</p>
|
162
|
220
|
</div>
|
163
|
221
|
<div class="borderBox1">
|
164
|
|
- <p>透析龄≤12:64人(64%)</p>
|
165
|
|
- <el-progress :percentage="70"></el-progress>
|
166
|
|
- <p>12<透析龄≤36:64人(64%)</p>
|
167
|
|
- <el-progress :percentage="70"></el-progress>
|
168
|
|
- <p>36≤透析龄≤60:64人(64%)</p>
|
169
|
|
- <el-progress :percentage="70"></el-progress>
|
170
|
|
- <p>透析龄 ≥60:64人(64%)</p>
|
171
|
|
- <el-progress :percentage="70"></el-progress>
|
|
222
|
+ <p>透析龄≤12:{{totalone}}人({{(totalone/patientCount*100).toFixed(1)}}%)</p>
|
|
223
|
+ <el-progress :percentage="(totalone/patientCount*100).toFixed(1)"></el-progress>
|
|
224
|
+ <p>12<透析龄≤36:{{totaltwo}}人({{(totaltwo/patientCount*100).toFixed(1)}}%)</p>
|
|
225
|
+ <el-progress :percentage="(totaltwo/patientCount*100).toFixed(1)"></el-progress>
|
|
226
|
+ <p>36≤透析龄≤60:{{totalthree}}/人({{(totalthree/patientCount*100).toFixed(1)}}%)</p>
|
|
227
|
+ <el-progress :percentage="(totalthree/patientCount*100).toFixed(1)"></el-progress>
|
|
228
|
+ <p>透析龄 ≥60:{{patientCount-totalone-totaltwo-totalthree}}人({{((patientCount-totalone-totaltwo-totalthree)/patientCount*100).toFixed(1)}}%)</p>
|
|
229
|
+ <el-progress :percentage="((patientCount-totalone-totaltwo-totalthree)/patientCount*100).toFixed(1)"></el-progress>
|
172
|
230
|
</div>
|
173
|
231
|
</div>
|
174
|
232
|
</div>
|
|
@@ -225,6 +283,9 @@ export default {
|
225
|
283
|
ageCount:[],
|
226
|
284
|
ageTotal:0,
|
227
|
285
|
otherTotal:0,
|
|
286
|
+ totalone:0,
|
|
287
|
+ totaltwo:0,
|
|
288
|
+ totalthree:0,
|
228
|
289
|
};
|
229
|
290
|
},
|
230
|
291
|
methods: {
|
|
@@ -232,27 +293,64 @@ export default {
|
232
|
293
|
// 把时间日期转成时间戳
|
233
|
294
|
return new Date(time).getTime() / 1000;
|
234
|
295
|
},
|
235
|
|
- changeTime() {},
|
|
296
|
+ changeTime(val) {
|
|
297
|
+ var timeStar=Date.parse(val)/1000
|
|
298
|
+ var timeEnd =Date.parse(this.listQuery.end_time)/1000
|
|
299
|
+ var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
|
|
300
|
+ if (time > 0) {
|
|
301
|
+ this.$message.error("结束时间不能小于开始时间");
|
|
302
|
+ this.start_time = "";
|
|
303
|
+ } else {
|
|
304
|
+ //统计透析总量
|
|
305
|
+ this.getDialysisModeType(val,this.listQuery.end_time)
|
|
306
|
+ //统计转归状态
|
|
307
|
+ this.getTotalLapseCount(timeStar,timeEnd)
|
|
308
|
+ //统计男女比例
|
|
309
|
+ this.getTotalSexCount(timeStar,timeEnd)
|
|
310
|
+ //统计传染病
|
|
311
|
+ this.getTotalInfectiousCount(timeStar,timeEnd)
|
|
312
|
+ //统计年龄
|
|
313
|
+ this.getTotalAgeCount(timeStar,timeEnd)
|
|
314
|
+ //统计透析年龄
|
|
315
|
+ this.getTotalDialysisCount(timeStar,timeEnd)
|
|
316
|
+ }
|
|
317
|
+ },
|
236
|
318
|
changeEndTime(val) {
|
|
319
|
+ var timeEnd=Date.parse(val)/1000
|
|
320
|
+ var timeStar =Date.parse(this.listQuery.start_time)/1000
|
237
|
321
|
var time =
|
238
|
322
|
this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
|
239
|
323
|
if (time < 0) {
|
240
|
324
|
this.$message.error("结束时间不能小于开始时间");
|
241
|
325
|
this.listQuery.end_time = "";
|
242
|
326
|
} else {
|
|
327
|
+ //统计透析总量
|
|
328
|
+ this.getDialysisModeType(this.listQuery.start_time,val)
|
|
329
|
+ //统计转归状态
|
|
330
|
+ this.getTotalLapseCount(timeStar,timeEnd)
|
|
331
|
+ //统计男女比例
|
|
332
|
+ this.getTotalSexCount(timeStar,timeEnd)
|
|
333
|
+ //统计传染病
|
|
334
|
+ this.getTotalInfectiousCount(timeStar,timeEnd)
|
|
335
|
+ //统计年龄
|
|
336
|
+ this.getTotalAgeCount(timeStar,timeEnd)
|
|
337
|
+ //统计透析年龄
|
|
338
|
+ this.getTotalDialysisCount(timeStar,timeEnd)
|
243
|
339
|
}
|
244
|
340
|
},
|
245
|
341
|
selectLapseTo(state) {
|
|
342
|
+ this.stateType = state;
|
|
343
|
+ this.listQuery.state = state;
|
246
|
344
|
//获取本月当前机构的透析模式
|
247
|
345
|
const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
|
248
|
346
|
console.log("开始时间",startDate)
|
249
|
347
|
const endDate = moment(new Date()).format('YYYY-MM-DD')
|
250
|
|
- // console.log("结束时间",endDate)
|
|
348
|
+ // console.log("结束时间",endDate)
|
251
|
349
|
var now = new Date()
|
252
|
|
- var nowMonth = now.getMonth(); //当前月
|
253
|
|
- var nowYear = now.getFullYear(); //当前年
|
|
350
|
+ var nowMonth = now.getMonth(); //当前月
|
|
351
|
+ var nowYear = now.getFullYear(); //当前年
|
254
|
352
|
//本月的开始时间
|
255
|
|
- var monthStartDate = new Date(nowYear, nowMonth, 1);
|
|
353
|
+ var monthStartDate = new Date(nowYear, nowMonth, 1);
|
256
|
354
|
var timeStar=Date.parse(monthStartDate)/1000;//s
|
257
|
355
|
// console.log("本月第一天",timeStar)
|
258
|
356
|
//本月的结束时间
|
|
@@ -261,8 +359,6 @@ export default {
|
261
|
359
|
// console.log("本月最后一天",timeEnd)
|
262
|
360
|
//本月
|
263
|
361
|
if(state == 0){
|
264
|
|
- this.stateType = state;
|
265
|
|
- this.listQuery.state = state;
|
266
|
362
|
//统计透析总量
|
267
|
363
|
this.getDialysisModeType(startDate,endDate)
|
268
|
364
|
//统计转归状态
|
|
@@ -276,13 +372,78 @@ export default {
|
276
|
372
|
//统计透析年龄
|
277
|
373
|
this.getTotalDialysisCount(timeStar,timeEnd)
|
278
|
374
|
}
|
|
375
|
+ //近三月
|
279
|
376
|
if(state == 1){
|
280
|
|
-
|
281
|
|
- const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
|
282
|
|
- console.log("三月前",nowMonth)
|
|
377
|
+ const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
|
|
378
|
+ console.log("三月前",startDate)
|
|
379
|
+ var startunitx = Date.parse(startDate)/1000
|
|
380
|
+ console.log("开始时间搓",startunitx)
|
|
381
|
+ const endDate = moment(new Date()).format('YYYY-MM-DD')
|
|
382
|
+ console.log("结束时间",endDate)
|
|
383
|
+ var endunitx = Date.parse(endDate)/1000
|
|
384
|
+ console.log("日期时间搓",endunitx)
|
|
385
|
+ //统计透析总量
|
|
386
|
+ this.getDialysisModeType(startDate,endDate)
|
|
387
|
+ //统计转归状态
|
|
388
|
+ this.getTotalLapseCount(startunitx,endunitx)
|
|
389
|
+ //统计男女比例
|
|
390
|
+ this.getTotalSexCount(startunitx,endunitx)
|
|
391
|
+ //统计传染病
|
|
392
|
+ this.getTotalInfectiousCount(startunitx,endunitx)
|
|
393
|
+ //统计年龄
|
|
394
|
+ this.getTotalAgeCount(startunitx,endunitx)
|
|
395
|
+ //统计透析年龄
|
|
396
|
+ this.getTotalDialysisCount(startunitx,endunitx)
|
283
|
397
|
}
|
284
|
|
- this.stateType = state;
|
285
|
|
- this.listQuery.state = state;
|
|
398
|
+
|
|
399
|
+ //近半年
|
|
400
|
+ if(state == 2){
|
|
401
|
+ const startDate = moment().subtract('month', 6).format('YYYY-MM-DD')
|
|
402
|
+ console.log("6月前",startDate)
|
|
403
|
+ var startunitx = Date.parse(startDate)/1000
|
|
404
|
+ console.log("开始时间搓",startunitx)
|
|
405
|
+ const endDate = moment(new Date()).format('YYYY-MM-DD')
|
|
406
|
+ console.log("结束时间",endDate)
|
|
407
|
+ var endunitx = Date.parse(endDate)/1000
|
|
408
|
+ console.log("日期时间搓",endunitx)
|
|
409
|
+ //统计透析总量
|
|
410
|
+ this.getDialysisModeType(startDate,endDate)
|
|
411
|
+ //统计转归状态
|
|
412
|
+ this.getTotalLapseCount(startunitx,endunitx)
|
|
413
|
+ //统计男女比例
|
|
414
|
+ this.getTotalSexCount(startunitx,endunitx)
|
|
415
|
+ //统计传染病
|
|
416
|
+ this.getTotalInfectiousCount(startunitx,endunitx)
|
|
417
|
+ //统计年龄
|
|
418
|
+ this.getTotalAgeCount(startunitx,endunitx)
|
|
419
|
+ //统计透析年龄
|
|
420
|
+ this.getTotalDialysisCount(startunitx,endunitx)
|
|
421
|
+ }
|
|
422
|
+
|
|
423
|
+ //近一年
|
|
424
|
+ if(state == 3){
|
|
425
|
+ const startDate = moment().subtract('month', 12).format('YYYY-MM-DD')
|
|
426
|
+ console.log("6月前",startDate)
|
|
427
|
+ var startunitx = Date.parse(startDate)/1000
|
|
428
|
+ console.log("开始时间搓",startunitx)
|
|
429
|
+ const endDate = moment(new Date()).format('YYYY-MM-DD')
|
|
430
|
+ console.log("结束时间",endDate)
|
|
431
|
+ var endunitx = Date.parse(endDate)/1000
|
|
432
|
+ console.log("日期时间搓",endunitx)
|
|
433
|
+ //统计透析总量
|
|
434
|
+ this.getDialysisModeType(startDate,endDate)
|
|
435
|
+ //统计转归状态
|
|
436
|
+ this.getTotalLapseCount(startunitx,endunitx)
|
|
437
|
+ //统计男女比例
|
|
438
|
+ this.getTotalSexCount(startunitx,endunitx)
|
|
439
|
+ //统计传染病
|
|
440
|
+ this.getTotalInfectiousCount(startunitx,endunitx)
|
|
441
|
+ //统计年龄
|
|
442
|
+ this.getTotalAgeCount(startunitx,endunitx)
|
|
443
|
+ //统计透析年龄
|
|
444
|
+ this.getTotalDialysisCount(startunitx,endunitx)
|
|
445
|
+ }
|
|
446
|
+
|
286
|
447
|
},
|
287
|
448
|
getDialysisModeType(startDate,endDate){
|
288
|
449
|
getDialysisModeType(startDate,endDate).then(response=>{
|
|
@@ -292,56 +453,56 @@ export default {
|
292
|
453
|
var total = response.data.data.total
|
293
|
454
|
console.log("total",total)
|
294
|
455
|
this.total = total
|
295
|
|
- for(let i=0;i<modetype.length;i++){
|
296
|
|
- if(modetype[i].mode_id == 1){
|
297
|
|
- modetype[i].mode_id = "HD"
|
298
|
|
- }
|
299
|
|
- if(modetype[i].mode_id == 2){
|
300
|
|
- modetype[i].mode_id = "HDF"
|
301
|
|
- }
|
302
|
|
- if(modetype[i].mode_id == 3){
|
303
|
|
- modetype[i].mode_id = "HD+HP"
|
304
|
|
- }
|
305
|
|
- if(modetype[i].mode_id == 4){
|
306
|
|
- modetype[i].mode_id = "HP"
|
307
|
|
- }
|
308
|
|
- if(modetype[i].mode_id == 5){
|
309
|
|
- modetype[i].mode_id = "HF"
|
310
|
|
- }
|
311
|
|
- if(modetype[i].mode_id == 6){
|
312
|
|
- modetype[i].mode_id = "SCUF"
|
313
|
|
- }
|
314
|
|
- if(modetype[i].mode_id == 7){
|
315
|
|
- modetype[i].mode_id = "IUF"
|
316
|
|
- }
|
317
|
|
- if(modetype[i].mode_id == 8){
|
318
|
|
- modetype[i].mode_id = "HFHD"
|
319
|
|
- }
|
320
|
|
- if(modetype[i].mode_id == 9){
|
321
|
|
- modetype[i].mode_id = "HFHD+HP"
|
322
|
|
- }
|
323
|
|
- if(modetype[i].mode_id == 10){
|
324
|
|
- modetype[i].mode_id = "PHF"
|
325
|
|
- }
|
326
|
|
- if(modetype[i].mode_id == 11){
|
327
|
|
- modetype[i].mode_id = "HFR"
|
328
|
|
- }
|
329
|
|
- if(modetype[i].mode_id == 12){
|
330
|
|
- modetype[i].mode_id = "HDF+HP"
|
331
|
|
- }
|
332
|
|
- if(modetype[i].mode_id == 13){
|
333
|
|
- modetype[i].mode_id = "HFHD+HP"
|
334
|
|
- }
|
335
|
|
- if(modetype[i].mode_id == 14){
|
336
|
|
- modetype[i].mode_id = "腹水回输"
|
337
|
|
- }
|
338
|
|
- if(modetype[i].mode_id == 19){
|
339
|
|
- modetype[i].mode_id = "IUF+HD"
|
340
|
|
- }
|
341
|
|
- }
|
|
456
|
+ // for(let i=0;i<modetype.length;i++){
|
|
457
|
+ // if(modetype[i].mode_id == 1){
|
|
458
|
+ // modetype[i].mode_id = "HD"
|
|
459
|
+ // }
|
|
460
|
+ // if(modetype[i].mode_id == 2){
|
|
461
|
+ // modetype[i].mode_id = "HDF"
|
|
462
|
+ // }
|
|
463
|
+ // if(modetype[i].mode_id == 3){
|
|
464
|
+ // modetype[i].mode_id = "HD+HP"
|
|
465
|
+ // }
|
|
466
|
+ // if(modetype[i].mode_id == 4){
|
|
467
|
+ // modetype[i].mode_id = "HP"
|
|
468
|
+ // }
|
|
469
|
+ // if(modetype[i].mode_id == 5){
|
|
470
|
+ // modetype[i].mode_id = "HF"
|
|
471
|
+ // }
|
|
472
|
+ // if(modetype[i].mode_id == 6){
|
|
473
|
+ // modetype[i].mode_id = "SCUF"
|
|
474
|
+ // }
|
|
475
|
+ // if(modetype[i].mode_id == 7){
|
|
476
|
+ // modetype[i].mode_id = "IUF"
|
|
477
|
+ // }
|
|
478
|
+ // if(modetype[i].mode_id == 8){
|
|
479
|
+ // modetype[i].mode_id = "HFHD"
|
|
480
|
+ // }
|
|
481
|
+ // if(modetype[i].mode_id == 9){
|
|
482
|
+ // modetype[i].mode_id = "HFHD+HP"
|
|
483
|
+ // }
|
|
484
|
+ // if(modetype[i].mode_id == 10){
|
|
485
|
+ // modetype[i].mode_id = "PHF"
|
|
486
|
+ // }
|
|
487
|
+ // if(modetype[i].mode_id == 11){
|
|
488
|
+ // modetype[i].mode_id = "HFR"
|
|
489
|
+ // }
|
|
490
|
+ // if(modetype[i].mode_id == 12){
|
|
491
|
+ // modetype[i].mode_id = "HDF+HP"
|
|
492
|
+ // }
|
|
493
|
+ // if(modetype[i].mode_id == 13){
|
|
494
|
+ // modetype[i].mode_id = "HFHD+HP"
|
|
495
|
+ // }
|
|
496
|
+ // if(modetype[i].mode_id == 14){
|
|
497
|
+ // modetype[i].mode_id = "腹水回输"
|
|
498
|
+ // }
|
|
499
|
+ // if(modetype[i].mode_id == 19){
|
|
500
|
+ // modetype[i].mode_id = "IUF+HD"
|
|
501
|
+ // }
|
|
502
|
+ //}
|
342
|
503
|
this.modetype = modetype
|
343
|
504
|
console.log("modetype",modetype)
|
344
|
|
-
|
|
505
|
+
|
345
|
506
|
}
|
346
|
507
|
})
|
347
|
508
|
},
|
|
@@ -399,7 +560,7 @@ export default {
|
399
|
560
|
// if(infectious[i].disease_id == 6){
|
400
|
561
|
// infectious[i].disease_id = "梅毒"
|
401
|
562
|
// }
|
402
|
|
-
|
|
563
|
+
|
403
|
564
|
// }
|
404
|
565
|
var otherTotal = response.data.data.otherTotal
|
405
|
566
|
this.otherTotal = otherTotal
|
|
@@ -416,7 +577,7 @@ export default {
|
416
|
577
|
this.ageTotal = response.data.data.total
|
417
|
578
|
// var two = response.data.data.two
|
418
|
579
|
// console.log("two",two)
|
419
|
|
-
|
|
580
|
+
|
420
|
581
|
}
|
421
|
582
|
})
|
422
|
583
|
},
|
|
@@ -424,21 +585,36 @@ export default {
|
424
|
585
|
getTotalDialysisCount(timeStar,timeEnd){
|
425
|
586
|
getTotalDialysisCount(timeStar,timeEnd).then(response=>{
|
426
|
587
|
if(response.data.state == 1){
|
|
588
|
+ var dataage = response.data.data.dataage
|
|
589
|
+ console.log("dataage",dataage)
|
|
590
|
+ var nowtime = response.data.data.nowtime
|
|
591
|
+ console.log("nowtime",nowtime)
|
427
|
592
|
var patients = response.data.data.patients
|
428
|
|
- var now = new Date()
|
429
|
|
- var nowMonth = now.getMonth(); //当前月
|
430
|
|
- var nowYear = now.getFullYear(); //当前年
|
431
|
|
- var notime = moment(new Date()).format('YYYY-MM-DD')
|
432
|
|
- var nowdataunix = Date.parse(notime)/1000
|
433
|
|
- console.log("档期是---------------",nowdataunix)
|
|
593
|
+ var arr =[]
|
|
594
|
+ var arrtwo = []
|
|
595
|
+ var arrthree = []
|
434
|
596
|
for(let i=0;i<patients.length;i++){
|
435
|
|
- if(patients[i].first_dialysis_date){
|
|
597
|
+ if(nowtime - patients[i].first_dialysis_date <= 378691200){
|
|
598
|
+ arr.push(patients[i].first_dialysis_date)
|
|
599
|
+ }
|
|
600
|
+ if((nowtime-patients[i].first_dialysis_date)>378691200 && (nowtime-patients[i].first_dialysis_date)<=1136073600){
|
|
601
|
+ arrtwo.push(patients[i].first_dialysis_date)
|
|
602
|
+ }
|
|
603
|
+ if((nowtime-patients[i].first_dialysis_date)>1136073600 && (nowtime-patients[i].first_dialysis_date)<=1893456000){
|
|
604
|
+ arrthree.push(patients[i].first_dialysis_date)
|
436
|
605
|
}
|
437
|
606
|
}
|
|
607
|
+ this.totalone = arr.length
|
|
608
|
+ this.totaltwo = arrtwo.length
|
|
609
|
+ this.totalthree = arrthree.length
|
|
610
|
+ console.log("长度",arr.length)
|
|
611
|
+ console.log("长度2",arrtwo.length)
|
|
612
|
+ console.log("长度3",arrthree.length)
|
438
|
613
|
console.log("patients",patients)
|
|
614
|
+
|
439
|
615
|
var date = new Date(1212508800)
|
440
|
616
|
console.log("date",date)
|
441
|
|
-
|
|
617
|
+
|
442
|
618
|
}
|
443
|
619
|
})
|
444
|
620
|
}
|
|
@@ -448,12 +624,12 @@ export default {
|
448
|
624
|
const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
|
449
|
625
|
console.log("开始时间",startDate)
|
450
|
626
|
const endDate = moment(new Date()).format('YYYY-MM-DD')
|
451
|
|
- // console.log("结束时间",endDate)
|
|
627
|
+ // console.log("结束时间",endDate)
|
452
|
628
|
var now = new Date()
|
453
|
|
- var nowMonth = now.getMonth(); //当前月
|
454
|
|
- var nowYear = now.getFullYear(); //当前年
|
|
629
|
+ var nowMonth = now.getMonth(); //当前月
|
|
630
|
+ var nowYear = now.getFullYear(); //当前年
|
455
|
631
|
//本月的开始时间
|
456
|
|
- var monthStartDate = new Date(nowYear, nowMonth, 1);
|
|
632
|
+ var monthStartDate = new Date(nowYear, nowMonth, 1);
|
457
|
633
|
var timeStar=Date.parse(monthStartDate)/1000;//s
|
458
|
634
|
// console.log("本月第一天",timeStar)
|
459
|
635
|
//本月的结束时间
|