<template>
  <div class="page_allStatistics">
    <van-sticky>
      <div class="allStatisticsTitle">
        <i class="iconfont icon-zuojiantou jiantou"  @click="$router.go(-1)"></i>
        <span class="titleName" @click="show = true">
          {{ type }}
          <van-icon name="arrow-down" class="arrow" />
        </span>
      </div>
    </van-sticky>
    <div v-if="type == '化验指标统计'">
      <van-tabs v-model="active" sticky>
        <van-tab title="科室">
          <office></office>
        </van-tab>
        <van-tab title="患者">
          <sufferer></sufferer>
        </van-tab>
      </van-tabs>
    </div>
    <div v-if="type == '透析过程指标统计'">
      <dialysis-process></dialysis-process>
    </div>

    <div v-if="type == '透析监测指标统计'">
      <dialysis-monitor></dialysis-monitor>
    </div>

    <div v-if="type == '患者血压统计'">
      <blood-pressure></blood-pressure>
    </div>

    <div v-if="type == '患者体重统计'">
      <weight></weight>
    </div>

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

<script>
import office from "../dqc/components/office";
import sufferer from "../dqc/components/sufferer";
import dialysisProcess from "../dqc/components/dialysisProcess";
import dialysisMonitor from "../dqc/components/dialysisMonitor";
import bloodPressure from "../dqc/components/bloodPressure";
import weight from "../dqc/components/weight";
export default {
  components: {
    office,
    sufferer,
    dialysisProcess,
    dialysisMonitor,
    bloodPressure,
    weight
  },
  data() {
    return {
      active: 0,
      show: false,
      type: "化验指标统计",
      columns: [
        "化验指标统计",
        "透析过程指标统计",
        "透析监测指标统计",
        "患者血压统计",
        "患者体重统计"
      ]
    };
  },
  methods: {
    chooseType(val) {
      this.type = val;
      this.show = false;

    }
  },created(){

    this.type = this.$route.query.tab_name

  }
};
</script>



<style lang="scss" scoped>
.page_allStatistics {
  height: 100%;
  overflow: hidden;
  overflow-y: auto;
  .allStatisticsTitle {
    background: #fff;
    padding: 0 1.125rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
  }
  .jiantou {
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 5rem;
  }
  .titleName {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    .arrow {
      margin-left: 0.375rem;
    }
  }
  .van-cell {
    font-size: 1rem;
  }
}
::-webkit-scrollbar {
  width: 0;
  height: 0;
}
</style>


<style lang="scss">
.page_allStatistics {
  .van-tabs__line {
    width: 3.125rem !important;
    background-color: #5b98ff;
  }
  .van-tab--active {
    font-size: 1.125rem;
    font-weight: bold;
  }
}
.el-table td, .el-table th{
  font-size: 15px !important;
  // font-size: .9375rem;
}
</style>
