<style>
  .MainPlan .ClassPlanTable {
    width: 100%;
    color: #000;
  }

  .ClassPlanTable th,
  .ClassPlanTable td {
    border: 1px solid #d1d1d1;
    height: 40px;
  }

  .planClass-table td {
    vertical-align: top;
    padding: 5px;
    width: 14%;
  }

  .MainPlan {
    margin: 20px;
  }

  .MainPlan .plan_ClassDate {
    height: 30px;
    line-height: 30px;
    font-size: 15px;
    font-weight: bold;
  }

  .MainPlan .plantHead th {
    border-bottom: 0;
  }

  .MainPlan .planTabDiv {
    max-height: calc(100vh - 235px);
    height: calc(100vh - 235px);
    overflow-y: overlay;
    /* margin-right: -3px; */
  }

  .planTabDiv::-webkit-scrollbar {
    width: 3px;
    height: 3px;
    background-color: #F5F5F5;
  }

  /*!*定义滚动条轨道 内阴影+圆角*!*/
  .planTabDiv::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    background-color: #F5F5F5;
  }

  /*!*定义滑块 内阴影+圆角*!*/
  .planTabDiv::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent));
    background-color: #0ae;
  }

  .MainPlan .el-collapse-item__header {
    font-size: 12px;
    line-height: normal;
    color: #000;
  }

  .MainPlan .plan_Inner {
    font-size: 12px;
    color: #000;
    display: flex;
    margin-top: 5px;
  }

  .MainPlan .plan_LeftTitle {
    width: 60px;
    text-align: right;
    flex-shrink: 0
  }

  .MainPlan .plan_RightInner {
    width: 100%;
  }

  .MainPlan .commonTimeStr {
    display: inline-block;
    color: #fff;
    padding: 1px 3px;
    border-radius: 5px;
  }

  .MainPlan .greenTime {
    background-color: green;
  }

  .MainPlan .blueTime {
    background-color: blue;
  }

  .MainPlan .orangeTime {
    background-color: orange;
  }

  .MainPlan .plan_Tdiv {
    text-overflow: ellipsis;
    overflow: hidden;
    word-break: break-all;
  }

</style>
<template>
  <div>
    <table class="ClassPlanTable plantHead" style="border-collapse:collapse;width:100%;margin:15px 0 0 0;">
      <thead>
        <tr>
          <th colspan="16">甲鹤校区教室使用情况</th>
        </tr>
        <tr>
          <th>周一</th>
          <th>周二</th>
          <th>周三</th>
          <th>周四</th>
          <th>周五</th>
          <th>周六</th>
          <th>周日</th>
        </tr>
      </thead>
    </table>
    <div class="planTabDiv" ref="planTabDiv">
      <table class="ClassPlanTable planClass-table" ref="PlanTable" style="border-collapse:collapse;margin-top:0;">
        <tbody>
          <tr v-for="(item,index) in dataList.fridayList" :key="index">
            <td>
              <div class="plan_ClassDate">{{dataList.mondayList[index].ClassDate}}</div>
              <mateitem v-if="dataList.mondayList&&dataList.mondayList[index].SubList"
                :dayData="dataList.mondayList[index]"></mateitem>
            </td>
            <td>
              <div class="plan_ClassDate">{{dataList.tuesdayList[index].ClassDate}}</div>
              <mateitem v-if="dataList.tuesdayList&&dataList.tuesdayList[index].SubList"
                :dayData="dataList.tuesdayList[index]"></mateitem>
            </td>
            <td>
              <div class="plan_ClassDate">{{dataList.wednesdayList[index].ClassDate}}</div>
              <mateitem v-if="dataList.wednesdayList&&dataList.wednesdayList[index].SubList"
                :dayData="dataList.wednesdayList[index]"></mateitem>
            </td>
            <td>
              <div class="plan_ClassDate">{{dataList.thursdayList[index].ClassDate}}</div>
              <mateitem v-if="dataList.thursdayList&&dataList.thursdayList[index].SubList"
                :dayData="dataList.thursdayList[index]"></mateitem>
            </td>
            <td>
              <div class="plan_ClassDate">{{dataList.fridayList[index].ClassDate}}</div>
              <mateitem v-if="dataList.fridayList&&dataList.fridayList[index].SubList"
                :dayData="dataList.fridayList[index]"></mateitem>
            </td>
            <td>
              <div class="plan_ClassDate">{{dataList.saturdayList[index].ClassDate}}</div>
              <mateitem v-if="dataList.saturdayList&&dataList.saturdayList[index].SubList"
                :dayData="dataList.saturdayList[index]"></mateitem>
            </td>
            <td>
              <div class="plan_ClassDate">{{dataList.sundayList[index].ClassDate}}</div>
              <mateitem v-if="dataList.sundayList&&dataList.sundayList[index].SubList"
                :dayData="dataList.sundayList[index]"></mateitem>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</template>
<script>
  import mateitem from '../course/mateitem';

  export default {
    props: {
      dataList: {
        type: Object,
        default: null
      },
    },
    components: {
      mateitem,

    },
    data() {
      return {
        msg: {
          StartTime: "",
          EndTime: '',
          TeacherId: 0,
          ClassRoomId: 0
        },
      };
    },
    created() {

    },
    mounted() {},
    methods: {
      //获取进度条
      getProgress(num, total) {
        if (num == 0 || total == 0) {
          return 0;
        }
        return (Math.round(num / total * 100) / 100.00);
      }
    }
  };

</script>
