/* eslint-disable no-unused-vars */
<template>
  <div class="page_basicInfo">
    <van-sticky>
      <div class="feedBackTitle">
        <i class="iconfont icon-zuojiantou jiantou" @click="$router.go(-1)"></i>
        <span class="titleName">基本信息统计</span>
      </div>
    </van-sticky>
    <div>
      <van-tabs v-model="active" sticky   @click="onClick">
        <van-tab title="本月">
          <div class="toolBox">
            <div class="toolOne" @click="typeShow = true">
              <div style="display: flex;align-items: center;">
                {{ type }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="sourceShow = true">
              <div style="display: flex;align-items: center;">
                {{ soureType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="lapseShow = true">
              <div style="display: flex;align-items: center;">
                {{ lapseType }}
                <van-icon name="arrow-down" />
              </div>
            </div>

          </div>

          <basic-template
            :dialysisTotal="dialysisTotal" :dialysisModeType="dialysisModeType"
            :patienttotal="patienttotal" :rollouttotal="rollouttotal" :outtotal="outtotal" :totalMan="totalMan"
            :infectious="infectious" :otherInfetiousTotal="otherInfetiousTotal"
            :ageData="ageData"  :ageCount="ageCount" :typeNum="type == '统计表' ? 1 : 2"
            :startDate="startDate" :endDate="endDate" :totalWoman="totalWoman"
          >
          </basic-template>
        </van-tab>
        <van-tab title="近3月">
          <div class="toolBox">
            <div class="toolOne" @click="typeShow = true">
              <div style="display: flex;align-items: center;">
                {{ type }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="sourceShow = true">
              <div style="display: flex;align-items: center;">
                {{ soureType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="lapseShow = true">
              <div style="display: flex;align-items: center;">
                {{ lapseType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
          </div>
          <basic-template
            :dialysisTotal="dialysisTotal" :dialysisModeType="dialysisModeType"
            :patienttotal="patienttotal" :rollouttotal="rollouttotal" :outtotal="outtotal" :totalMan="totalMan"
            :infectious="infectious" :otherInfetiousTotal="otherInfetiousTotal"
            :ageData="ageData"  :ageCount="ageCount" :typeNum="type == '统计表' ? 1 : 2"
            :startDate="startDate" :endDate="endDate" :totalWoman="totalWoman">
          </basic-template>
        </van-tab>
        <van-tab title="近半年">
          <div class="toolBox">
            <div class="toolOne" @click="typeShow = true">
              <div style="display: flex;align-items: center;">
                {{ type }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="sourceShow = true">
              <div style="display: flex;align-items: center;">
                {{ soureType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="lapseShow = true">
              <div style="display: flex;align-items: center;">
                {{ lapseType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
          </div>
          <basic-template
            :dialysisTotal="dialysisTotal" :dialysisModeType="dialysisModeType"
            :patienttotal="patienttotal" :rollouttotal="rollouttotal" :outtotal="outtotal" :totalMan="totalMan"
            :infectious="infectious" :otherInfetiousTotal="otherInfetiousTotal"
            :ageData="ageData"  :ageCount="ageCount" :typeNum="type == '统计表' ? 1 : 2"
            :startDate="startDate" :endDate="endDate" :totalWoman="totalWoman">
          </basic-template>
        </van-tab>
        <van-tab title="近一年">
          <div class="toolBox">
            <div class="toolOne" @click="typeShow = true">
              <div style="display: flex;align-items: center;">
                {{ type }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="sourceShow = true">
              <div style="display: flex;align-items: center;">
                {{ soureType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="lapseShow = true">
              <div style="display: flex;align-items: center;">
                {{ lapseType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
          </div>
          <basic-template
            :dialysisTotal="dialysisTotal" :dialysisModeType="dialysisModeType"
            :patienttotal="patienttotal" :rollouttotal="rollouttotal" :outtotal="outtotal" :totalMan="totalMan"
            :infectious="infectious" :otherInfetiousTotal="otherInfetiousTotal"
            :ageData="ageData"  :ageCount="ageCount" :typeNum="type == '统计表' ? 1 : 2"
            :startDate="startDate" :endDate="endDate" :totalWoman="totalWoman">
          </basic-template>
        </van-tab>
        <van-tab title="自定义">
          <div class="toolBox">
            <div class="toolOne" @click="typeShow = true">
              <div style="display: flex;align-items: center;">
                {{ type }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="startShow = true">
              <div style="display: flex;align-items: center;">
                {{ startTime }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="endShow = true">
              <div style="display: flex;align-items: center;">
                {{ endTime }}
                <van-icon name="arrow-down"/>
              </div>
            </div>
            <div class="toolOne" @click="sourceShow = true">
              <div style="display: flex;align-items: center;">
                {{ soureType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
            <div class="toolOne" @click="lapseShow = true">
              <div style="display: flex;align-items: center;">
                {{ lapseType }}
                <van-icon name="arrow-down" />
              </div>
            </div>
          </div>
          <basic-template
            :dialysisTotal="dialysisTotal" :dialysisModeType="dialysisModeType"
            :patienttotal="patienttotal" :rollouttotal="rollouttotal" :outtotal="outtotal" :totalMan="totalMan"
            :infectious="infectious" :otherInfetiousTotal="otherInfetiousTotal"
            :ageCount="ageCount" :ageData="ageData" :typeNum="type == '统计表' ? 1 : 2"
            :startDate="startDate" :endDate="endDate" :totalWoman="totalWoman">
          </basic-template>
        </van-tab>
      </van-tabs>
      <van-popup
        v-model="startShow"
        position="bottom"
        :style="{ height: '40%' }"
      >
        <van-datetime-picker
          v-model="currentDate"
          type="date"
          :min-date="minDate"
          :max-date="maxDate"
          @confirm="getstartTime"
          @cancel="startShow = false"
        />
      </van-popup>
      <van-popup v-model="endShow" position="bottom" :style="{ height: '40%' }">
        <van-datetime-picker
          v-model="currentDate"
          type="date"
          :min-date="minDate"
          :max-date="maxDate"
          @confirm="getstartTime2"
          @cancel="endShow = false"
        />
      </van-popup>
      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
        <van-picker
          show-toolbar
          :columns="columns"
          @confirm="chooseType"
          @cancel="typeShow = false"
        />

      </van-popup>

      <van-popup v-model="sourceShow" position="bottom" :style="{ height: '40%' }">
        <van-picker
          show-toolbar
          :columns="sourceColumns"
          @confirm="sourceChooseType"
          @cancel="sourceShow = false"
        />
      </van-popup>

      <van-popup v-model="lapseShow" position="bottom" :style="{ height: '40%' }">
        <van-picker
          show-toolbar
          :columns="lapseColumns"
          @confirm="lapseChooseType"
          @cancel="lapseShow = false"
        />
      </van-popup>
    </div>
  </div>
</template>
<script>
  import BasicTemplate from '../../pages/dqc/components/BasicTemplate'
  import { getTotalDialysis, getMobileTotalLapseCount, getMobileTotalSexCount, getMobileTotalInfectiousCount, getMobileTotalAgeCount, getMobileTotalDialysisCount } from '@/api/common/common'
  const moment = require('moment')
  export default {
    components: {
      BasicTemplate
    },
    data () {
      return {
        active: 0,
        startShow: false,
        endShow: false,
        currentDate: new Date(),
        startTime: '请选择',
        endTime: '请选择',
        dialysisTotal: 0,
        dialysisModeType: [],
        patienttotal: 0,
        rollouttotal: 0,
        totalMan: 0,
        totalWoman:0,
        infectious: [],
        otherInfetiousTotal: 0,
        ageCount: [],
        totalone: 0,
        totaltwo: 0,
        totalthree: 0,
        minDate: new Date(new Date().setFullYear(new Date().getFullYear() - 1)),
        maxDate: new Date(),
        outtotal: 0,
        ageData: [],
        //
        type: '统计表',
        columns: ['统计表', '趋势图'],
        typeShow: false,
        startDate:moment().subtract('month', 0).format('YYYY-MM') + '-01',
        endDate:moment(new Date()).format('YYYY-MM-DD'),
        lapseShow:false,
        sourceShow:false,
        soureType:"病人来源",
        lapseType:"转归情况",
        sourceColumns:['全部','门诊','住院'],
        lapseColumns:['全部','转出','留治'],
        lapsetotype:"",
        sourcetype:"",
        startDateTime:"",
        endDateTime:"",
        start_time:"",
        end_time:"",
      }
    },
    methods: {
      initStartTime (value) {
        let year = value.getFullYear()
        let month = value.getMonth() + 1
        let day = value.getDate()
        if (month >= 1 && month <= 9) {
          month = `0${month}`
        }
        if (day >= 1 && day <= 9) {
          day = `0${day}`
        }

        this.startTime = `${year}-${month}-${day}`
      },
      initEndTime (value) {
        let year = value.getFullYear()
        let month = value.getMonth() + 1
        let day = value.getDate()
        if (month >= 1 && month <= 9) {
          month = `0${month}`
        }
        if (day >= 1 && day <= 9) {
          day = `0${day}`
        }

        this.endTime = `${year}-${month}-${day}`
      },
      getstartTime (value) {
        this.page = 1
        let year = value.getFullYear()
        let month = value.getMonth() + 1
        let day = value.getDate()
        if (month >= 1 && month <= 9) {
          month = `0${month}`
        }
        if (day >= 1 && day <= 9) {
          day = `0${day}`
        }
        this.startTime = `${year}-${month}-${day}`
        this.startShow = false
        var timeStar = Date.parse(this.startTime) / 1000
        var timeEnd = Date.parse(this.endTime) / 1000
        this.startDate = `${year}-${month}-${day}`
        // 统计透析总量
        this.getTotalDialysis(this.startTime, this.endTime)
        // 统计转归状态
        this.getMobileTotalLapseCount(timeStar, timeEnd)
        // 统计男女比列
        this.getMobileTotalSexCount(timeStar, timeEnd)
        // 统计传染病
        this.getMobileTotalInfectiousCount(timeStar, timeEnd)
        // 统计年龄
        this.getMobileTotalAgeCount(timeStar, timeEnd)
        // 统计透析年龄
        this.getMobileTotalDialysisCount(timeStar, timeEnd)
      },
      getstartTime2 (value) {
        this.page = 1
        let year = value.getFullYear()
        let month = value.getMonth() + 1
        let day = value.getDate()
        if (month >= 1 && month <= 9) {
          month = `0${month}`
        }
        if (day >= 1 && day <= 9) {
          day = `0${day}`
        }
        this.endTime = `${year}-${month}-${day}`
        this.endDate = `${year}-${month}-${day}`
        this.endShow = false
        var timeStar = Date.parse(this.startTime) / 1000
        var timeEnd = Date.parse(this.endTime) / 1000
        // 统计透析总量
        this.getTotalDialysis(this.startTime, this.endTime)
        // 统计转归状态
        this.getMobileTotalLapseCount(timeStar, timeEnd)
        // 统计男女比列
        this.getMobileTotalSexCount(timeStar, timeEnd)
        // 统计传染病
        this.getMobileTotalInfectiousCount(timeStar, timeEnd)
        // 统计年龄
        this.getMobileTotalAgeCount(timeStar, timeEnd)
        // 统计透析年龄
        this.getMobileTotalDialysisCount(timeStar, timeEnd)
      },

      // 获取透析总量
      getTotalDialysis (startDate, endDate) {

        var params = {
          startime:startDate,
          endtime:endDate,
          lapsetotype:this.lapsetotype,
          sourcetype:this.sourcetype,
        }
        getTotalDialysis(params).then(response => {
          if (response.data.state === 1) {
            this.dialysisTotal = response.data.data.total.count

            var modetype = response.data.data.modetype

            for (let i = 0; i < modetype.length; i++) {
              if (modetype[i].mode_id == 1) {
                modetype[i].mode_id = 'HD'
              }
              if (modetype[i].mode_id == 2) {
                modetype[i].mode_id = 'HDF'
              }
              if (modetype[i].mode_id == 3) {
                modetype[i].mode_id = 'HD+HP'
              }
              if (modetype[i].mode_id == 4) {
                modetype[i].mode_id = 'HP'
              }
              if (modetype[i].mode_id == 5) {
                modetype[i].mode_id = 'HF'
              }
              if (modetype[i].mode_id == 6) {
                modetype[i].mode_id = 'SCUF'
              }
              if (modetype[i].mode_id == 7) {
                modetype[i].mode_id = 'IUF'
              }
              if (modetype[i].mode_id == 8) {
                modetype[i].mode_id = 'HFHD'
              }
              if (modetype[i].mode_id == 9) {
                modetype[i].mode_id = 'HFHD+HP'
              }
              if (modetype[i].mode_id == 10) {
                modetype[i].mode_id = 'PHF'
              }
              if (modetype[i].mode_id == 11) {
                modetype[i].mode_id = 'HFR'
              }
              if (modetype[i].mode_id == 12) {
                modetype[i].mode_id = 'HDF+HP'
              }
              if (modetype[i].mode_id == 13) {
                modetype[i].mode_id = 'HFHD+HP'
              }
              if (modetype[i].mode_id == 14) {
                modetype[i].mode_id = '腹水回输'
              }
              if (modetype[i].mode_id == 15) {
                modetype[i].mode_id = 'HD前置换'
              }
              if (modetype[i].mode_id == 16) {
                modetype[i].mode_id = 'HD后置换'
              }
              if (modetype[i].mode_id == 17) {
                modetype[i].mode_id = 'HDF前置换'
              }
              if (modetype[i].mode_id == 18) {
                modetype[i].mode_id = 'HDF后置换'
              }
              if (modetype[i].mode_id == 19) {
                modetype[i].mode_id = 'IUF+HD'
              }
              if (modetype[i].mode_id == 21) {
                modetype[i].mode_id = 'HD+'
              }
              if (modetype[i].mode_id == 24) {
                modetype[i].mode_id = 'I-HDF'
              }
              if (modetype[i].mode_id == 25) {
                modetype[i].mode_id = 'HD高通'
              }
              if (modetype[i].mode_id == 26) {
                modetype[i].mode_id = 'CVVH'
              }
              if (modetype[i].mode_id == 27) {
                modetype[i].mode_id = 'CVVHD'
              }
              if (modetype[i].mode_id == 28) {
                modetype[i].mode_id = 'CVVHDF'
              }
            }
            this.dialysisModeType = modetype
          }
        })
      },
      getMobileTotalLapseCount (timeStar, timeEnd) {
        var params = {
          startime:timeStar,
          endtime:timeEnd,
          lapsetotype:this.lapsetotype,
          sourcetype:this.sourcetype,
        }
        getMobileTotalLapseCount(params).then(response => {
          if (response.data.state === 1) {
            this.patienttotal = response.data.data.count
            // console.log("count22222222",this.patienttotal)
            var patients = response.data.data.patient
            this.rollouttotal = patients.length
            var patienttwo = response.data.data.patienttwo
            this.outtotal = patienttwo.length
            // var rollout =  response.data.data.rollout
            // this.outtotal = rollout.length
            // console.log("转出人数22222",rollout)
          }
        })
      },
      getMobileTotalSexCount (timeStar, timeEnd) {
        var params = {
          lapsetotype:this.lapsetotype,
          sourcetype:this.sourcetype,
        }
        getMobileTotalSexCount(params).then(response => {
          if (response.data.state === 1) {
            // eslint-disable-next-line no-unused-vars
            var total = response.data.data.total
            this.totalMan = response.data.data.totalSex
            var totalWoman = response.data.data.totalWoman
            this.totalWoman = totalWoman
          }
        })
      },
      getMobileTotalInfectiousCount (timeStar, timeEnd) {
        var params = {
          startime:timeStar,
          endtime:timeEnd,
          lapsetotype:this.lapsetotype,
          sourcetype:this.sourcetype,
        }
        getMobileTotalInfectiousCount(params).then(response => {
          if (response.data.state === 1) {
            // eslint-disable-next-line no-unused-vars
            var total = response.data.data.total
            this.infectious = response.data.data.count
            this.otherInfetiousTotal = response.data.data.otherTotal
          }
        })
      },
      getMobileTotalAgeCount (timeStar, timeEnd) {
        var params = {
          lapsetotype:this.lapsetotype,
          sourcetype:this.sourcetype,
        }
        getMobileTotalAgeCount(params).then(response => {
          if (response.data.state === 1) {
            // eslint-disable-next-line no-unused-vars
            var total = response.data.data.total
            var ageCount = response.data.data.ageCount
            this.ageCount = ageCount.sort(this.compare('age'))
            // console.log('ageCount', this.ageCount)
          }
        })
      },

      getMobileTotalDialysisCount (timeStar, timeEnd) {
        var params = {
          startime:timeStar,
          endtime:timeEnd,
          lapsetotype:this.lapsetotype,
          sourcetype:this.sourcetype,
        }
        getMobileTotalDialysisCount(params).then(response => {
          if (response.data.state === 1) {
            var ageData = response.data.data.ageData
            this.ageData = ageData
          }
        })
      },
      compare: function (k) {
        return function (a, b) {
          var M = a[k]
          var N = b[k]
          return M - N // 从低向高排
          // return N - M;   // 从高向低排
        }
      },
      onClick (val) {
        const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
        this.startDate = startDate
        const endDate = moment(new Date()).format('YYYY-MM-DD')
        this.endDate = endDate
        var now = new Date()
        var nowMonth = now.getMonth() // 当前月
        var nowYear = now.getFullYear() // 当前年
        // 本月的开始时间
        var monthStartDate = new Date(nowYear, nowMonth, 1)
        var timeStar = Date.parse(monthStartDate) / 1000// s

        // 本月的结束时间
        var monthEndDate = new Date(nowYear, nowMonth + 1, 0)
        var timeEnd = Date.parse(monthEndDate) / 1000 - 1// s

        // 本月
        if (val === 0) {
          // 统计透析总量
          this.getTotalDialysis(startDate, endDate)
          // 统计转归状态
          this.getMobileTotalLapseCount(timeStar, timeEnd)
          // 统计男女比列
          this.getMobileTotalSexCount(timeStar, timeEnd)
          // 统计传染病
          this.getMobileTotalInfectiousCount(timeStar, timeEnd)
          // 统计年龄
          this.getMobileTotalAgeCount(timeStar, timeEnd)
          // 统计透析年龄
          this.getMobileTotalDialysisCount(timeStar, timeEnd)
        }
        // 近3个月
        if (val === 1) {
          const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
          this.startDate = startDate
          var startunitx = Date.parse(startDate) / 1000

          const endDate = moment(new Date()).format('YYYY-MM-DD')
          this.endDate = endDate
          var endunitx = Date.parse(endDate) / 1000

          // 统计透析总量
          this.getTotalDialysis(startDate, endDate)
          // 统计转归状态
          this.getMobileTotalLapseCount(startunitx, endunitx)
          // 统计男女比列
          this.getMobileTotalSexCount(startunitx, endunitx)
          // 统计传染病
          this.getMobileTotalInfectiousCount(startunitx, endunitx)
          // 统计年龄
          this.getMobileTotalAgeCount(startunitx, endunitx)
          // 统计透析年龄
          this.getMobileTotalDialysisCount(startunitx, endunitx)
        }
        // 近半年
        if (val === 2) {
          const startDate = moment().subtract('month', 6).format('YYYY-MM-DD')
          this.startDate = startDate
          var startunitx = Date.parse(startDate) / 1000

          const endDate = moment(new Date()).format('YYYY-MM-DD')
          this.endDate = endDate
          var endunitx = Date.parse(endDate) / 1000

          // 统计透析总量
          this.getTotalDialysis(startDate, endDate)
          // 统计转归状态
          this.getMobileTotalLapseCount(startunitx, endunitx)
          // 统计男女比列
          this.getMobileTotalSexCount(startunitx, endunitx)
          // 统计传染病
          this.getMobileTotalInfectiousCount(startunitx, endunitx)
          // 统计年龄
          this.getMobileTotalAgeCount(startunitx, endunitx)
          // 统计透析年龄
          this.getMobileTotalDialysisCount(startunitx, endunitx)
        }
        // 近一年
        if (val === 3) {
          const startDate = moment().subtract('month', 12).format('YYYY-MM-DD')
          this.startDate = startDate
          var startunitx = Date.parse(startDate) / 1000
          const endDate = moment(new Date()).format('YYYY-MM-DD')
          this.endDate = endDate
          var endunitx = Date.parse(endDate) / 1000

          // 统计透析总量
          this.getTotalDialysis(startDate, endDate)
          // 统计转归状态
          this.getMobileTotalLapseCount(startunitx, endunitx)
          // 统计男女比列
          this.getMobileTotalSexCount(startunitx, endunitx)
          // 统计传染病
          this.getMobileTotalInfectiousCount(startunitx, endunitx)
          // 统计年龄
          this.getMobileTotalAgeCount(startunitx, endunitx)
          // 统计透析年龄
          this.getMobileTotalDialysisCount(startunitx, endunitx)
        }
      },
      chooseType (type) {
        this.type = type
        this.typeShow = false
      },
      sourceChooseType(type){
        this.soureType = type
        if(type == "全部"){
          this.sourcetype = 0
        }
        if(type == "门诊"){
          this.sourcetype = 1
        }
        if(type == "住院"){
          this.sourcetype = 2
        }
        // 统计透析总量
        this.getTotalDialysis(this.startDateTime, this.endDateTime)
        // 统计转归状态
        this.getMobileTotalLapseCount(this.start_time, this.end_time)
        // 统计男女比列
        this.getMobileTotalSexCount(this.start_time, this.end_time)
        // 统计传染病
        this.getMobileTotalInfectiousCount(this.start_time, this.end_time)
        // 统计年龄
        this.getMobileTotalAgeCount(this.start_time, this.end_time)
        // 统计透析年龄
        this.getMobileTotalDialysisCount(this.start_time,this.end_time)

        this.sourceShow = false
      },
      lapseChooseType(type){
        this.lapseType = type
        if(type == "全部"){
          this.lapsetotype = 0
        }
        if(type == "转出"){
          this.lapsetotype = 2
        }
        if(type == "留治"){
          this.lapsetotype = 3
        }
        // 统计透析总量
        this.getTotalDialysis(this.startDateTime, this.endDateTime)
        // 统计转归状态
        this.getMobileTotalLapseCount(this.start_time, this.end_time)
        // 统计男女比列
        this.getMobileTotalSexCount(this.start_time, this.end_time)
        // 统计传染病
        this.getMobileTotalInfectiousCount(this.start_time, this.end_time)
        // 统计年龄
        this.getMobileTotalAgeCount(this.start_time, this.end_time)
        // 统计透析年龄
        this.getMobileTotalDialysisCount(this.start_time, this.end_time)
        this.lapseShow = false
      }

    },
    created () {
      // 获取本月当前机构的透析模式
      const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
      this.startDateTime = startDate
      const endDate = moment(new Date()).format('YYYY-MM-DD')
      this.endDateTime = endDate
      var now = new Date()
      var nowMonth = now.getMonth() // 当前月
      var nowYear = now.getFullYear() // 当前年
      // 本月的开始时间
      var monthStartDate = new Date(nowYear, nowMonth, 1)
      var timeStar = Date.parse(monthStartDate) / 1000// s
      this.start_time = timeStar
      // 本月的结束时间
      var monthEndDate = new Date(nowYear, nowMonth + 1, 0)
      var timeEnd = Date.parse(monthEndDate) / 1000 - 1// s
      this.end_time = timeEnd
      // 统计透析总量
      this.getTotalDialysis(startDate, endDate)
      // 统计转归状态
      this.getMobileTotalLapseCount(timeStar, timeEnd)
      // 统计男女比列
      this.getMobileTotalSexCount(timeStar, timeEnd)
      // 统计传染病
      this.getMobileTotalInfectiousCount(timeStar, timeEnd)
      // 统计年龄
      this.getMobileTotalAgeCount(timeStar, timeEnd)
      // 统计透析年龄
      this.getMobileTotalDialysisCount(timeStar, timeEnd)
    }
  }
</script>

<style lang="scss" scoped>
  .page_basicInfo {
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
  .feedBackTitle {
    background: #fff;
    padding: 0 1.125rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
  }
  .jiantou {
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 6rem;
  }
  .titleName {
    font-size: 1.125rem;
    font-weight: 600;
  }
  .toolBox {
    display: flex;
    height: 3.125rem;
    align-items: center;
  .toolOne {
    width: 6.25rem;
    height: 1.875rem;
    background: rgba(246, 246, 246, 1);
    border-radius: 5px;
    text-align: center;
    font-size: 0.8125rem;
    color: #8d8d8d;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-left: 0.8125rem;
  }
  }
  }
  ::-webkit-scrollbar {
    width: 0;
  }
</style>

<style lang="scss">
  .page_basicInfo {
  .van-tab--active{
    font-size:1rem;
    font-weight: bold;
  }
  }
</style>
