<template>
  <div class="page_statisticsPersonal">
    <div class="searchBox">
      <el-autocomplete
        class="checkSearch"
        popper-class="my-autocomplete"
        v-model="search_value"
        :fetch-suggestions="querySearchAsync"
        :trigger-on-focus="false"
        placeholder="输入病人透析号/姓名"
        @select="handleSelect"
      >
        <i class="el-icon-search el-input__icon" slot="suffix"></i>
        <template slot-scope="{ item }">
          <div class="name">{{ item.name }}</div>
        </template>
      </el-autocomplete>
    </div>
    <div class="options">
      <div class="optionsOne" @click="stateShow = true">
        <div style="display: flex;align-items: center;">
          {{ state }}
          <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>
    <div class="chart1">统计表</div>
    <div>
      <el-table :data="patientData" style="width: 100%" border :height="tableHeight" v-loadmore="loadMore" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" v-loading="loading">
        <el-table-column fixed prop="name" label="姓名" width="80"></el-table-column>
        <el-table-column prop="id_card_no" label="年龄" width="60">
          <template slot-scope="scope">{{ getAge(scope.row.id_card_no) }}</template>
        </el-table-column>
        <el-table-column prop="dialysis_no" label="透析号" width="80"></el-table-column>
        <el-table-column prop="mode_id" label="透析模式" min-width="300">
          <template slot-scope="scope">
                <span>{{getModeCount(scope.row.patient_id)}}</span>
              </template>
        </el-table-column>
        <el-table-column fixed="right" label="透析总次数" width="100">
          <template slot-scope="scope">
            {{getDialysisCount(scope.row.patient_id)}}
          </template>
        </el-table-column>
      </el-table>
    </div>
    <scroll-top></scroll-top>
    <div>
      <van-popup v-model="stateShow" position="bottom" :style="{ height: '40%' }">
        <van-picker
          show-toolbar
          :columns="patientArr"
          @confirm="chooseState"
          @cancel="stateShow = false"
        />
      </van-popup>
      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
        <van-datetime-picker
          v-model="currentDate1"
          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="currentDate2"
          type="date"
          :min-date="minDate"
          :max-date="maxDate"
          @confirm="getstartTime2"
          @cancel="endShow = false"
        />
      </van-popup>
    </div>
  </div>
</template>

<script>
import ScrollTop from './ScrollTop'
import { PostSearch } from '@/api/patient'
import {getMobilePatientList, getPrescriptionList, getMobilePatientDetial, toSearchPatient} from '@/api/common/common'
export default {
  components: {
    ScrollTop
  },
  data () {
    return {
      isStop: false,
      tableHeight: '',
      patientData: [],
      searchValue: '',
      search_value: '',
      state: '全部病人',
      stateShow: false,
      patientArr: [],
      startShow: false,
      endShow: false,
      currentDate1: new Date(new Date().setMonth(new Date().getMonth() - 3)),
      currentDate2: new Date(),
      startTime: '请选择',
      endTime: '请选择',
      minDate: new Date(new Date().setFullYear(new Date().getFullYear() - 1)),
      maxDate: new Date(),
      page: 1,
      limit: 100,
      total: 0,
      listQuery: {
        page: 1,
        limit: 1000
      },
      patients: [], // 病人列表
      loading: true,
      patient_id: 0,
      DialysisCount: [],
      modeIdCount: []
    }
  },
  created () {
    this.initStartTime(this.currentDate1)
    this.initEndTime(this.currentDate2)
    this.tableHeight = (document.documentElement.clientHeight - (Number(document.documentElement.style.fontSize.slice(0, -2)) * 2.75)) + 'px'

    // 获取病人列表
    this.getMobilePatientList()
    // 获取统计表数据
    this.getPrescriptionList()
  },
  methods: {
    chooseState (val) {
      this.state = val
      this.stateShow = false
      let id = ''
      this.patients.map(item => {
        if (item.name == val) {
          id = item.id
        }
      })
      // 统计单个病人  val.id 为病人ID
      getMobilePatientDetial(id, this.startTime, this.endTime, this.listQuery.limit, this.listQuery.page).then(response => {
        if (response.data.state === 1) {
          var patients = response.data.data.patients
          console.log("patients",patients)
          this.isStop = true
          this.getModeId(patients)
          var hash = {}
          var i = 0
          var res = []
          patients.forEach(function (item) {
            var patient_id = item.patient_id
            hash[patient_id] ? res[hash[patient_id] - 1].mode_id.push(item.mode_id) : hash[patient_id] = ++i && res.push({
              mode_id: [item.mode_id],
              patient_id: patient_id,
              dialysis_no: item.dialysis_no,
              name: item.name,
              id_card_no: item.id_card_no,
              total_dialysis: item.total_dialysis,
              user_sys_before_count: item.user_sys_before_count
            })
          })
          this.patientData = res
          var total = response.data.data.total
          this.total = total
        }
      })
    },
    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
      this.patientData = []
      this.getPrescriptionList()
    },
    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.endShow = false
      this.patientData = []
      this.getPrescriptionList()
    },
    loadMore () {
      if (!this.isStop) {
        this.isStop = true
        this.page++
        getPrescriptionList(this.startTime, this.endTime, this.limit, this.page).then(response => {
          if (response.data.state === 1) {
            this.loading = false
            var list = response.data.data.list
            // console.log("list22222",list)
            var totallist = response.data.data.totallist
            // console.log('totallist', totallist)
            var prescriptionList = response.data.data.prescriptionList
            console.log("prescription",prescriptionList)
            // console.log('prescriptionList', prescriptionList)
            this.getModeId(prescriptionList)
            var modeIdCount = response.data.data.modeIdCount
            // console.log("modeIdCount",modeIdCount)

            let dataInfo = {}
            list.forEach((item, index) => {
              let { patient_id } = item
              if (!dataInfo[patient_id]) {
                dataInfo[patient_id] = {
                  patient_id,
                  name: item.name,
                  id_card_no: item.id_card_no,
                  dialysis_no: item.dialysis_no,
                  total_dialysis: item.total_dialysis,
                  user_sys_before_count: item.user_sys_before_count,
                  mode_id: []
                }
              }
            })
            let list = Object.values(dataInfo)
            list.map(item => {
              for (let i = 0; i < prescriptionList.length; i++) {
                if (item.patient_id === prescriptionList[i].patient_id) {
                  item.mode_id.push(prescriptionList[i].mode_id)
                }
              }
            })

            list.map(item => {
              this.patientData.push(item)
            })

            for (let i = 0; i < modeIdCount.length; i++) {
              if (modeIdCount[i].mode_id == 1) {
                modeIdCount[i].mode_id = 'HD'
              }
              if (modeIdCount[i].mode_id == 2) {
                modeIdCount[i].mode_id = 'HDF'
              }
              if (modeIdCount[i].mode_id == 3) {
                modeIdCount[i].mode_id = 'HD+HP'
              }
              if (modeIdCount[i].mode_id == 4) {
                modeIdCount[i].mode_id = 'HP'
              }
              if (modeIdCount[i].mode_id == 5) {
                modeIdCount[i].mode_id = 'HF'
              }
              if (modeIdCount[i].mode_id == 6) {
                modeIdCount[i].mode_id = 'SCUF'
              }
              if (modeIdCount[i].mode_id == 7) {
                modeIdCount[i].mode_id = 'IUF'
              }
              if (modeIdCount[i].mode_id == 8) {
                modeIdCount[i].mode_id = 'HFHD'
              }
              if (modeIdCount[i].mode_id == 9) {
                modeIdCount[i].mode_id = 'HFHD+HP'
              }
              if (modeIdCount[i].mode_id == 10) {
                modeIdCount[i].mode_id = 'PHF'
              }
              if (modeIdCount[i].mode_id == 11) {
                modeIdCount[i].mode_id = 'HFR'
              }
              if (modeIdCount[i].mode_id == 12) {
                modeIdCount[i].mode_id = 'HDF+HP'
              }
              if (modeIdCount[i].mode_id == 13) {
                modeIdCount[i].mode_id = 'CRRT'
              }
              if (modeIdCount[i].mode_id == 14) {
                modeIdCount[i].mode_id = '腹水回输'
              }
              if (modeIdCount[i].mode_id == 15) {
                modeIdCount[i].mode_id = 'HD前置换'
              }
              if (modeIdCount[i].mode_id == 16) {
                modeIdCount[i].mode_id = 'HD后置换'
              }
              if (modeIdCount[i].mode_id == 17) {
                modeIdCount[i].mode_id = 'HDF前置换'
              }
              if (modeIdCount[i].mode_id == 18) {
                modeIdCount[i].mode_id = 'HDF后置换'
              }
              if (modeIdCount[i].mode_id == 19) {
                modeIdCount[i].mode_id = 'IUF+HD'
              }
              if (modeIdCount[i].mode_id == 21) {
                modeIdCount[i].mode_id = 'HD+'
              }
              if (modeIdCount[i].mode_id == 24) {
                modeIdCount[i].mode_id = 'I-HDF'
              }
              if (modeIdCount[i].mode_id == 25) {
                modeIdCount[i].mode_id = 'HD高通'
              }
              if (modeIdCount[i].mode_id == 26) {
                modeIdCount[i].mode_id = 'CVVH'
              }
              if (modeIdCount[i].mode_id == 27) {
                modeIdCount[i].mode_id = 'CVVHD'
              }
              if (modeIdCount[i].mode_id == 28) {
                modeIdCount[i].mode_id = 'CVVHDF'
              }
              if (modeIdCount[i].mode_id == 29) {
                modeIdCount[i].mode_id = 'PE'
              }
              if (modeIdCount[i].mode_id == 30) {
                modeIdCount[i].mode_id = '血浆胆红素吸附+HP'
              }
              if (modeIdCount[i].mode_id == 31) {
                modeIdCount[i].mode_id = 'HPD'
              }
              if (modeIdCount[i].mode_id == 32) {
                modeIdCount[i].mode_id = 'HDP'
              }
            }
            this.modeIdCount = modeIdCounts
            // console.log("list22222222",list)
            if (response.data.data.list.length <= 0) {
              this.isStop = true
            } else {
              this.isStop = false
            }
            // this.patientData = list
          } else {
            this.loading = false

            this.$toast({
              message: response.msg
            })
          }
        }).catch(error => {
          this.loading = false
        })
      }
    },
    // 转透析模式id
    getModeId (patients) {
      if(patients!=null && patients.length>0){
       for (let i = 0; i < patients.length; i++) {
          if (patients[i].mode_id == 1) {
            patients[i].mode_id = 'HD'
          } else if (patients[i].mode_id == 2) {
            patients[i].mode_id = 'HDF'
          } else if (patients[i].mode_id == 3) {
            patients[i].mode_id = 'HD+HP'
          } else if (patients[i].mode_id == 4) {
            patients[i].mode_id = 'HP'
          } else if (patients[i].mode_id == 5) {
            patients[i].mode_id = 'HF'
          } else if (patients[i].mode_id == 6) {
            patients[i].mode_id = 'SCUF'
          } else if (patients[i].mode_id == 7) {
            patients[i].mode_id = 'IUF'
          } else if (patients[i].mode_id == 8) {
            patients[i].mode_id = 'HFHD'
          } else if (patients[i].mode_id == 9) {
            patients[i].mode_id = 'HFHD+HP'
          } else if (patients[i].mode_id == 10) {
            patients[i].mode_id = 'PHF'
          } else if (patients[i].mode_id == 11) {
            patients[i].mode_id = 'HFR'
          } else if (patients[i].mode_id == 12) {
            patients[i].mode_id = 'HDF+HP'
          } else if (patients[i].mode_id == 13) {
            patients[i].mode_id = 'CRRT'
          } else if (patients[i].mode_id == 14) {
            patients[i].mode_id = '腹水回输'
          } else if (patients[i].mode_id == 15) {
            patients[i].mode_id = 'HD前置换'
          } else if (patients[i].mode_id == 16) {
            patients[i].mode_id = 'HD后置换'
          } else if (patients[i].mode_id == 17) {
            patients[i].mode_id = 'HDF前置换'
          } else if (patients[i].mode_id == 18) {
            patients[i].mode_id = 'HDF后置换'
          } else if (patients[i].mode_id == 19) {
            patients[i].mode_id = 'IUF+HD'
          } else if (patients[i].mode_id == 24) {
            patients[i].mode_id = 'I-HDF'
          } else if (patients[i].mode_id == 25) {
            patients[i].mode_id = 'HD高通'
          } else if (patients[i].mode_id == 26) {
            patients[i].mode_id = 'CVVH'
          } else if (patients[i].mode_id == 27) {
            patients[i].mode_id = 'CVVHD'
          } else if (patients[i].mode_id == 28) {
            patients[i].mode_id = 'CVVHDF'
          } else if (patients[i].mode_id == 29) {
            patients[i].mode_id = 'PE'
          } else if (patients[i].mode_id == 30) {
            patients[i].mode_id = '血浆胆红素吸附+HP'
          } else if (patients[i].mode_id == 31) {
            patients[i].mode_id = 'HPD'
          } else if (patients[i].mode_id == 32) {
            patients[i].mode_id = 'HDP'
          }
        }
      }
    
    },
    // 获取年龄
    getAge (UUserCard) {
      if (UUserCard != null && UUserCard != '') {
        var myDate = new Date()
        var month = myDate.getMonth() + 1
        var day = myDate.getDate()
        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
        if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
          age++
        }
        return age
      }
    },

    // 获取病人列表
    getMobilePatientList () {
      getMobilePatientList().then(response => {
        if (response.data.state === 1) {
          var patients = response.data.data.patients
          this.patients = patients
          patients.map(item => {
            this.patientArr.push(item.name)
          })
        }
      })
    },
    // 获取统计表数据
    getPrescriptionList () {
      this.loading = true
      getPrescriptionList(this.startTime, this.endTime, this.limit, this.page).then(response => {
        if (response.data.state === 1) {
          this.loading = false
          var list = response.data.data.list
          // console.log('list', list.length)
          this.DialysisCount = response.data.data.count
          // console.log('Count====', count)
          var totallist = response.data.data.totallist
          var prescriptionList = response.data.data.prescriptionList
          // console.log('prescriptionList', prescriptionList)
          if(prescriptionList!=null && prescriptionList.length>0){
            this.getModeId(prescriptionList)
          }
         
          var modeIdCount = response.data.data.modeIdCount
          if(modeIdCount!=null && modeIdCount.length>0){
            for (let i = 0; i < modeIdCount.length; i++) {
            if (modeIdCount[i].mode_id == 1) {
              modeIdCount[i].mode_id = 'HD'
            }
            if (modeIdCount[i].mode_id == 2) {
              modeIdCount[i].mode_id = 'HDF'
            }
            if (modeIdCount[i].mode_id == 3) {
              modeIdCount[i].mode_id = 'HD+HP'
            }
            if (modeIdCount[i].mode_id == 4) {
              modeIdCount[i].mode_id = 'HP'
            }
            if (modeIdCount[i].mode_id == 5) {
              modeIdCount[i].mode_id = 'HF'
            }
            if (modeIdCount[i].mode_id == 6) {
              modeIdCount[i].mode_id = 'SCUF'
            }
            if (modeIdCount[i].mode_id == 7) {
              modeIdCount[i].mode_id = 'IUF'
            }
            if (modeIdCount[i].mode_id == 8) {
              modeIdCount[i].mode_id = 'HFHD'
            }
            if (modeIdCount[i].mode_id == 9) {
              modeIdCount[i].mode_id = 'HFHD+HP'
            }
            if (modeIdCount[i].mode_id == 10) {
              modeIdCount[i].mode_id = 'PHF'
            }
            if (modeIdCount[i].mode_id == 11) {
              modeIdCount[i].mode_id = 'HFR'
            }
            if (modeIdCount[i].mode_id == 12) {
              modeIdCount[i].mode_id = 'HDF+HP'
            }
            if (modeIdCount[i].mode_id == 13) {
              modeIdCount[i].mode_id = 'CRRT'
            }
            if (modeIdCount[i].mode_id == 14) {
              modeIdCount[i].mode_id = '腹水回输'
            }
            if (modeIdCount[i].mode_id == 15) {
              modeIdCount[i].mode_id = 'HD前置换'
            }
            if (modeIdCount[i].mode_id == 16) {
              modeIdCount[i].mode_id = 'HD后置换'
            }
            if (modeIdCount[i].mode_id == 17) {
              modeIdCount[i].mode_id = 'HDF前置换'
            }
            if (modeIdCount[i].mode_id == 18) {
              modeIdCount[i].mode_id = 'HDF后置换'
            }
            if (modeIdCount[i].mode_id == 19) {
              modeIdCount[i].mode_id = 'IUF+HD'
            }
            if (modeIdCount[i].mode_id == 20) {
              modeIdCount[i].mode_id = 'UF'
            }
            if (modeIdCount[i].mode_id == 21) {
              modeIdCount[i].mode_id = 'HD+'
            }
            if (modeIdCount[i].mode_id == 22) {
              modeIdCount[i].mode_id = '血浆胆红素吸附+HDF'
            }
            if (modeIdCount[i].mode_id == 23) {
              modeIdCount[i].mode_id = '血浆胆红素吸附'
            }
            if (modeIdCount[i].mode_id == 24) {
              modeIdCount[i].mode_id = 'I-HDF'
            }
            if (modeIdCount[i].mode_id == 25) {
              modeIdCount[i].mode_id = 'HD高通'
            }
            if (modeIdCount[i].mode_id == 26) {
              modeIdCount[i].mode_id = 'CVVH'
            }
            if (modeIdCount[i].mode_id == 27) {
              modeIdCount[i].mode_id = 'CVVHD'
            }
            if (modeIdCount[i].mode_id == 28) {
              modeIdCount[i].mode_id = 'CVVHDF'
            }
            if (modeIdCount[i].mode_id == 29) {
              modeIdCount[i].mode_id = 'PE'
            }
            if (modeIdCount[i].mode_id == 30) {
              modeIdCount[i].mode_id = '血浆胆红素吸附+HP'
            }
            if (modeIdCount[i].mode_id == 31) {
              modeIdCount[i].mode_id = 'HPD'
            }
            if (modeIdCount[i].mode_id == 32) {
              modeIdCount[i].mode_id = 'HDP'
            }
            }
          }
       
          this.modeIdCount = modeIdCount
          let dataInfo = {}
          list.forEach((item, index) => {
            let { patient_id } = item
            if (!dataInfo[patient_id]) {
              dataInfo[patient_id] = {
                patient_id,
                name: item.name,
                id_card_no: item.id_card_no,
                dialysis_no: item.dialysis_no,
                total_dialysis: item.total_dialysis,
                user_sys_before_count: item.user_sys_before_count,
                mode_id: []
              }
            }
          })
          let list = Object.values(dataInfo)
          list.map(item => {
            for (let i = 0; i < prescriptionList.length; i++) {
              if (item.patient_id === prescriptionList[i].patient_id) {
                item.mode_id.push(prescriptionList[i].mode_id)
              }
            }
          })
          list.map(item => {
            this.patientData.push(item)
          })
          // console.log("list第一",list)
          if (response.data.data.list.length <= 0) {
            this.isStop = true
          } else {
            this.isStop = false
          }

          // this.patientData = list
        } else {
          this.loading = false
        }
      })
    },

    // 搜索
    onSearch () {
      toSearchPatient(this.patient_id, this.startTime, this.endTime, this.listQuery.limit, this.listQuery.page).then(response => {
        if (response.data.state === 1) {
          var patients = response.data.data.patient
          this.isStop = true
          this.getModeId(patients)
          var hash = {}
          var i = 0
          var res = []
          patients.forEach(function (item) {
            var patient_id = item.patient_id
            hash[patient_id] ? res[hash[patient_id] - 1].mode_id.push(item.mode_id) : hash[patient_id] = ++i && res.push({
              mode_id: [item.mode_id],
              patient_id: patient_id,
              dialysis_no: item.dialysis_no,
              name: item.name,
              id_card_no: item.id_card_no,
              total_dialysis: item.total_dialysis,
              user_sys_before_count: item.user_sys_before_count
            })
          })
          this.patientData = res
          var total = response.data.data.total
        }
      })
    },
    querySearchAsync (keyword, cb) {
      let key = ''
      if (keyword != undefined) {
        key = keyword
      }
      let searchArray = []
      PostSearch(key).then(response => {
        if (response.data.state == 1) {
          searchArray = response.data.data.patient
          cb(searchArray)
        } else {
          cb([])
        }
      })
    },
    handleSelect (val) {
      this.state = val.name
      this.search_value = val.name
      this.patient_id = val.id
      this.onSearch()
    },
    getDialysisCount (id) {
      var count = 0
      for (let i = 0; i < this.DialysisCount.length; i++) {
        if (id == this.DialysisCount[i].patient_id) {
          count = this.DialysisCount[i].Count
        }
      }
      return count
    },
    getModeCount (id) {
      var arr = []
      for (let i = 0; i < this.modeIdCount.length; i++) {
        if (id == this.modeIdCount[i].patient_id) {
          arr.push(this.modeIdCount[i])
        }
      }
      let str = ''
      arr.map(item => {
        str += item.mode_id + '(' + item.Count + '次) 、'
      })
      var strs = str.substring(0, str.length - 1)

      return strs
    }

  }

}
</script>

<style lang="scss" scoped>
.page_statisticsPersonal {
    width: 100%;
   .searchBox{
    background: #F6F6F6;
    height: 3rem;
    display: flex;
    align-items: center;
    padding:0 0.625rem;
  }
  .options {
    width: 31.25rem;
    display: flex;
    height: 3.125rem;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: #fff;
    .optionsOne {
      //   max-width: 8.75rem;
      //   min-width: 6.25rem;
      padding: 0 0.75rem;
      height: 1.875rem;
      background: rgba(246, 246, 246, 1);
      border-radius: 5px;
      text-align: center;
      font-size: 0.8125rem;
      color: #646566;
      display: flex;
      align-items: center;
      justify-content: space-around;
      margin-left: 0.8125rem;
    }
    .toolOne {
      width: 6.25rem;
      height: 1.875rem;
      background: rgba(246, 246, 246, 1);
      border-radius: 5px;
      text-align: center;
      font-size: 0.8125rem;
      color: #646566;
      display: flex;
      align-items: center;
      justify-content: space-around;
      margin-left: 0.8125rem;
    }
  }
  .chart1 {
    font-size: 1rem;
    font-weight: bold;
    color: #000;
    margin: 0 0 0.625rem 0.8125rem;
  }
}
::-webkit-scrollbar {
  width: 0;
  height: 0;
}
</style>

<style lang="scss">
.page_statisticsPersonal {
    .searchBox{
      .el-input{
        font-size: 14px !important;
      }
      .el-autocomplete{
        width: 100%;
      }
      .el-input__inner{
        border-radius:1rem;
        line-height: 2rem;
        height:2rem;
        border:none;
      }
      .el-input__icon{
        line-height:2rem;
      }
    }
  .van-field__body{
    width: 100%;
  }
  .van-cell__value {
    display: flex;
    align-items: center;
  }
  .el-table td, .el-table th{
    text-align: center;
  }
}
</style>
<style lang="scss">
.page_patientStatistics {
  .searchBox{
      .el-input{
        font-size: .875rem;
      }
      .el-autocomplete{
        width: 100%;
      }
      .el-input__inner{
        border-radius:1rem;
        line-height: 2rem;
        height:2rem;
        border:none;
      }
      .el-input__icon{
        line-height:2rem;
      }
    }
  .van-field__body{
    width:100%;
  }
  .van-cell__value {
    display: flex;
    align-items: center;
  }
  .van-search__content {
    border-radius: 1.875rem;
  }
  .el-table__fixed-body-wrapper {
    top: 2.625rem;
  }
  .el-table {
    ::-webkit-scrollbar {
      width: 0;
      height: 0;
    }
    .el-table__fixed-right {
      right: 0 !important;
    }
    // .el-table__fixed {
    //   height: 15.625rem !important;
    // }
    // .el-table__fixed-right {
    //   height: 15.625rem !important;
    // }

  }
  .el-table td, .el-table th{
    text-align: center;
  }

}
</style>
