<style>

</style>
<template>
  <div>
    <el-collapse v-if="dayData&&dayData.SubList&&dayData.SubList.length>0">
      <el-collapse-item v-for="(subItem,subIndex) in dayData.SubList" :key="subIndex" :name="subIndex">
        <template slot="title">
          <div class="plan_Tdiv">
            <span v-if="subItem.TimeStr==='早上'" class="commonTimeStr greenTime">{{subItem.TimeStr}}</span>
            <span v-if="subItem.TimeStr==='下午'" class="commonTimeStr blueTime">{{subItem.TimeStr}}</span>
            <span v-if="subItem.TimeStr==='晚上'" class="commonTimeStr orangeTime">{{subItem.TimeStr}}</span>
            <span v-if="subItem.ClassType==2">试听课</span>
            <span style="color:red;margin:0 5px;">{{subItem.TeacherName}}</span>
            <span>[{{subItem.RoomName}}]</span>
          </div>
        </template>
        <div @click="goUrl(subItem)" style="cursor:pointer;">
          <div class="plan_Inner">
            <div class="plan_LeftTitle">上课时间：</div>
            <div class="plan_RightInner">{{subItem.StartTime}}-{{subItem.EndTime}}</div>
          </div>
          <div class="plan_Inner" v-if="subItem.ClassName">
            <div class="plan_LeftTitle">班级：</div>
            <div class="plan_RightInner">{{subItem.ClassName}}</div>
          </div>
          <div class="plan_Inner">
            <div class="plan_LeftTitle">课程名称：</div>
            <div class="plan_RightInner">{{subItem.CourseName}}</div>
          </div>
          <div class="plan_Inner" v-if="subItem.GuestList&&subItem.GuestList.length>0">
            <div class="plan_LeftTitle">学生名称：</div>
            <div class="plan_RightInner">
              <span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
            </div>
          </div>
          <div class="plan_Inner" style="align-items:center;" v-if="subItem.CompleteProgress>=0">
            <div class="plan_LeftTitle">课程进度：</div>
            <div class="plan_RightInner">
              {{subItem.Ranks}}/{{subItem.TotalPlanNum}}
            </div>
          </div>
        </div>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>
<script>
  export default {
    props: {
      dayData: {
        type: Object,
        default: null
      }
    },
    components: {

    },
    data() {
      return {

      }
    },
    created() {},
    mounted() {

    },
    methods: {
      goUrl(item) {
        if (item.ClassType === 1) {
          this.OpenNewUrl("../../classroom/courseInfo", {
            id: item.Id
          });
        }
      }
    }
  }

</script>
