<template>
  <div class="main-contain">
    <div class="position">
      <bread-crumb :crumbs="crumbs"></bread-crumb>
    </div>
    <div class="app-container">
      <div class="page_treatment">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="患者透析次数统计" name="first"></el-tab-pane>
          <el-tab-pane label="患者检验检查统计" name="second"></el-tab-pane>
        </el-tabs>
        <div class="cell clearfix">
          <div class="time">
            <ul class>
              <li
                :class="item.state == wayType ? 'active' : ''"
                @click="chooseWay(item.state)"
                v-for="item in way"
                :key="item.value"
              >{{ item.label }}</li>
            </ul>
          </div>
        </div>
        <div v-if="wayType == 0">
          <check-personal></check-personal>
        </div>
        <div v-if="wayType == 1">
          <check-all></check-all>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import BreadCrumb from "@/xt_pages/components/bread-crumb";
import LineChart from "../../qcd/components/LineChart";
import CheckPersonal from "../treatmentControlAnalysis/components/CheckPersonal";
import CheckAll from "../treatmentControlAnalysis/components/CheckAll";
export default {
  components: {
    LineChart,
    BreadCrumb,
    CheckPersonal,
    CheckAll
  },
  data() {
    return {
      crumbs: [
        { path: false, name: "质控管理" },
        { path: false, name: "治疗信息统计" },
        { path: false, name: "患者透析次数统计" }
      ],
      activeName: "second",
      way: [
        { value: 0, label: "统计个人", state: 0 },
        { value: 1, label: "统计全部", state: 1 }
      ],
      wayType: 0
    };
  },
  methods: {
    handleClick() {
      if (this.activeName == "first") {
        this.$router.push({ path: "/qcd/treatmentControlAnalysis/time" });
      }
    },
    chooseWay(way) {
      this.wayType = way;
    }
  }
};
</script>



<style lang="scss">
.page_treatment {
  .el-form-item {
    margin-bottom: 0;
  }
}
</style>
