|
@@ -18,6 +18,9 @@
|
18
|
18
|
>{{ item.label }}</li>
|
19
|
19
|
</ul>
|
20
|
20
|
</div>
|
|
21
|
+ <label class="title">
|
|
22
|
+ <span class="name">日期查询</span> :
|
|
23
|
+ </label>
|
21
|
24
|
<el-date-picker
|
22
|
25
|
v-model="listQuery.start_time"
|
23
|
26
|
prefix-icon="el-icon-date"
|
|
@@ -299,8 +302,8 @@ export default {
|
299
|
302
|
{ value: 0, label: "本月", state: 0 },
|
300
|
303
|
{ value: 1, label: "近三个月", state: 1 },
|
301
|
304
|
{ value: 2, label: "近半年", state: 2 },
|
302
|
|
- { value: 3, label: "近一年", state: 3 },
|
303
|
|
- { value:4,label:"自定义",state:4}
|
|
305
|
+ { value: 3, label: "近一年", state: 3 }
|
|
306
|
+ // { value:4,label:"自定义",state:4}
|
304
|
307
|
],
|
305
|
308
|
modetype:[],
|
306
|
309
|
total:0,
|
|
@@ -340,11 +343,11 @@ export default {
|
340
|
343
|
//统计透析总量
|
341
|
344
|
this.getDialysisModeType(val,this.listQuery.end_time)
|
342
|
345
|
//统计转归状态
|
343
|
|
- this.getTotalLapseCount(timeStar,timeEnd)
|
|
346
|
+ this.getTotalLapseCount(this.listQuery.start_time,this.listQuery.end_time)
|
344
|
347
|
//统计男女比例
|
345
|
348
|
this.getTotalSexCount(timeStar,timeEnd)
|
346
|
349
|
//统计传染病
|
347
|
|
- this.getTotalInfectiousCount(timeStar,timeEnd)
|
|
350
|
+ this.getTotalInfectiousCount(this.listQuery.start_time,this.listQuery.end_time)
|
348
|
351
|
//统计年龄
|
349
|
352
|
this.getTotalAgeCount(timeStar,timeEnd)
|
350
|
353
|
//统计透析年龄
|
|
@@ -364,11 +367,11 @@ export default {
|
364
|
367
|
//统计透析总量
|
365
|
368
|
this.getDialysisModeType(this.listQuery.start_time,val)
|
366
|
369
|
//统计转归状态
|
367
|
|
- this.getTotalLapseCount(timeStar,timeEnd)
|
|
370
|
+ this.getTotalLapseCount(this.listQuery.start_time,this.listQuery.end_time)
|
368
|
371
|
//统计男女比例
|
369
|
372
|
this.getTotalSexCount(timeStar,timeEnd)
|
370
|
373
|
//统计传染病
|
371
|
|
- this.getTotalInfectiousCount(timeStar,timeEnd)
|
|
374
|
+ this.getTotalInfectiousCount(this.listQuery.start_time,this.listQuery.end_time)
|
372
|
375
|
//统计年龄
|
373
|
376
|
this.getTotalAgeCount(timeStar,timeEnd)
|
374
|
377
|
//统计透析年龄
|
|
@@ -380,9 +383,9 @@ export default {
|
380
|
383
|
this.listQuery.state = state;
|
381
|
384
|
//获取本月当前机构的透析模式
|
382
|
385
|
const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
|
383
|
|
- console.log("开始时间",startDate)
|
|
386
|
+ // console.log("开始时间",startDate)
|
384
|
387
|
const endDate = moment(new Date()).format('YYYY-MM-DD')
|
385
|
|
- console.log("结束时间",endDate)
|
|
388
|
+ // console.log("结束时间",endDate)
|
386
|
389
|
var now = new Date()
|
387
|
390
|
var nowMonth = now.getMonth(); //当前月
|
388
|
391
|
var nowYear = now.getFullYear(); //当前年
|
|
@@ -411,6 +414,8 @@ export default {
|
411
|
414
|
}
|
412
|
415
|
//近三月
|
413
|
416
|
if(state == 1){
|
|
417
|
+ this.listQuery.start_time = ""
|
|
418
|
+ this.listQuery.end_time = ""
|
414
|
419
|
const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
|
415
|
420
|
// console.log("三月前",startDate)
|
416
|
421
|
var startunitx = Date.parse(startDate)/1000
|
|
@@ -435,6 +440,8 @@ export default {
|
435
|
440
|
|
436
|
441
|
//近半年
|
437
|
442
|
if(state == 2){
|
|
443
|
+ this.listQuery.start_time = ""
|
|
444
|
+ this.listQuery.end_time = ""
|
438
|
445
|
const startDate = moment().subtract('month', 6).format('YYYY-MM-DD')
|
439
|
446
|
// console.log("6月前",startDate)
|
440
|
447
|
var startunitx = Date.parse(startDate)/1000
|
|
@@ -459,6 +466,8 @@ export default {
|
459
|
466
|
|
460
|
467
|
//近一年
|
461
|
468
|
if(state == 3){
|
|
469
|
+ this.listQuery.start_time = ""
|
|
470
|
+ this.listQuery.end_time = ""
|
462
|
471
|
const startDate = moment().subtract('month', 12).format('YYYY-MM-DD')
|
463
|
472
|
// console.log("6月前",startDate)
|
464
|
473
|
var startunitx = Date.parse(startDate)/1000
|
|
@@ -502,11 +511,12 @@ export default {
|
502
|
511
|
getTotalLapseCount(startDate,endDate).then(response=>{
|
503
|
512
|
if(response.data.state == 1){
|
504
|
513
|
var patients = response.data.data.patients
|
|
514
|
+ console.log('patients',patients)
|
505
|
515
|
this.rollOutTotal = patients.length
|
506
|
|
- // console.log("留治病人长度",patients.length)
|
|
516
|
+ console.log("留治病人长度",patients.length)
|
507
|
517
|
var patienttwo = response.data.data.patienttwo
|
508
|
518
|
this.outTotal = patienttwo.length
|
509
|
|
- // console.log("转出长度", this.outTotal)
|
|
519
|
+ console.log("转出长度", this.outTotal)
|
510
|
520
|
var count = response.data.data.count
|
511
|
521
|
this.patientCount = count
|
512
|
522
|
}
|
|
@@ -534,7 +544,7 @@ export default {
|
534
|
544
|
this.InfectiousTotal = response.data.data.total
|
535
|
545
|
// console.log("===",this.InfectiousTotal)
|
536
|
546
|
var infectious = response.data.data.count
|
537
|
|
- // console.log("infectious",infectious)
|
|
547
|
+ // console.log("infectious",infectious)
|
538
|
548
|
var otherTotal = response.data.data.otherTotal
|
539
|
549
|
// console.log("otherTotal",otherTotal)
|
540
|
550
|
this.otherTotal = otherTotal
|
|
@@ -595,7 +605,7 @@ export default {
|
595
|
605
|
getTotalDialysisCount(timeStar,timeEnd).then(response=>{
|
596
|
606
|
if(response.data.state == 1){
|
597
|
607
|
var dataage = response.data.data.dataage
|
598
|
|
- console.log("dataage",dataage)
|
|
608
|
+ // console.log("dataage",dataage)
|
599
|
609
|
this.dialysisAge = dataage
|
600
|
610
|
|
601
|
611
|
}
|
|
@@ -605,24 +615,24 @@ export default {
|
605
|
615
|
created() {
|
606
|
616
|
//获取本月当前机构的透析模式
|
607
|
617
|
const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
|
608
|
|
- // console.log("开始时间",startDate)
|
|
618
|
+ console.log("开始时间",startDate)
|
609
|
619
|
const endDate = moment(new Date()).format('YYYY-MM-DD')
|
610
|
|
- // console.log("结束时间",endDate)
|
|
620
|
+ console.log("结束时间",endDate)
|
611
|
621
|
var now = new Date()
|
612
|
622
|
var nowMonth = now.getMonth(); //当前月
|
613
|
623
|
var nowYear = now.getFullYear(); //当前年
|
614
|
624
|
//本月的开始时间
|
615
|
625
|
var monthStartDate = new Date(nowYear, nowMonth, 1);
|
616
|
626
|
var timeStar=Date.parse(monthStartDate)/1000;//s
|
617
|
|
- // console.log("本月第一天",timeStar)
|
|
627
|
+ console.log("本月第一天",timeStar)
|
618
|
628
|
//本月的结束时间
|
619
|
629
|
var monthEndDate = new Date(nowYear, nowMonth+1, 0);
|
620
|
630
|
var timeEnd=Date.parse(monthEndDate)/1000-1;//s
|
621
|
|
- // console.log("本月最后一天",timeEnd)
|
|
631
|
+ console.log("本月最后一天",timeEnd)
|
622
|
632
|
//统计透析总量
|
623
|
633
|
this.getDialysisModeType(startDate,endDate)
|
624
|
634
|
//统计转归状态
|
625
|
|
- this.getTotalLapseCount(timeStar,timeEnd)
|
|
635
|
+ this.getTotalLapseCount(startDate,endDate)
|
626
|
636
|
//统计男女比例
|
627
|
637
|
this.getTotalSexCount(timeStar,timeEnd)
|
628
|
638
|
//统计传染病
|