<template>
  <div class="inpatientNurse-home-container">
    <PatientList :selected-patient="patientInfo" :on-select="handlePatientSelect" />
    <el-container>
      <el-header>
        <inPatientBarDoctorFold></inPatientBarDoctorFold>
      </el-header>
      <el-main>
        <Details></Details>
      </el-main>
    </el-container>
  </div>
</template>

<script setup>
import { computed } from 'vue';
import inPatientBarDoctorFold from '@/components/patientBar/inPatientBarDoctorFold.vue';
import Details from './components/details.vue';
import { patientInfo, updatePatientInfo } from '@/views/inpatientNurse/components/store/patient';
import PatientList from '@/components/PatientList/patient-list.vue';

// 处理患者选择
const handlePatientSelect = (patient) => {
  updatePatientInfo(patient);
};
</script>

<style lang="scss" scoped>
.inpatientNurse-home-container {
  padding-top: 10px;
  display: flex;
  height: 100%;
  .el-container {
    height: 100%;
  }
  .inpatientNurse-home-main {
    background-color: #ffffff;
    :deep(.el-header) {
      padding: 0px;
      margin-bottom: 0px;
    }
    .el-main {
      padding: 0px 8px;
    }
    :deep(.patient-tabs) {
      height: 100%;
      .el-tabs__header {
        margin: 0;
      }
      .el-tabs__content {
      }
      .el-tab-pane {
        height: 100%;
      }
    }
  }
}
</style>
