<script setup lang="ts">
const imgSrc = (await request({
  url: '/dyaw/xlfw_hbgl/index',
  data: {
    limit: 1
  }
})).data?.page_data?.[0]?.dxh_path
const teacherList = (await request({
  url: '/dyaw/xlfw_pbgl_pb/index',
  data: {
    // dxpp_date: (new Date('2023-4-2')).getTime()
    // dxpp_date: Date.now()
  }
})).data?.page_data


function onClickLeft() {
  window.history.back()
}
</script>

<template>
  <div class=" flex flex-col justify-start ">
    <van-nav-bar title="心理健康" left-text="" left-arrow @click-left="onClickLeft" style="--van-nav-bar-background:#397FF6;--van-nav-bar-icon-color:#fff;--van-nav-bar-title-text-color:#fff;--van-nav-bar-title-font-size:18px;" />
    <div class="w-full">
      <img v-show="imgSrc" :src="imgSrc" class="w-full object-contain">
    </div>
    <div
      class="w-full h-full overflow-y-auto flex flex-col items-center space-y-4 py-4 scrollbar scrollbar-thin scrollbar-thumb-rounded-md scrollbar-thumb-gray-200 scrollbar-track-transparent">
      <el-empty v-if="!teacherList?.length" description="今天暂无排班老师"></el-empty>
      <teacher-card v-for="item in teacherList" class="flex-none w-94vw" :d="item">
        <el-tag :type="item.online ? 'success' : 'danger'">
          {{ item.online ? '在 线' : '离 线' }}
        </el-tag>
      </teacher-card>
    </div>
  </div>
</template>
