<template>
  <div class="layout_com_page">
    <div class="banner">
      <div class="banner-inner">
        <h1>威斯康星协和大学—家庭教育硕士</h1>
        <p>
          目前，国内普遍的家庭教育课程结构像是一棵树，父母好比树干，孩子好比枝叶，课程更多的是围绕父母教养孩子的“狭义家庭教育”。然而，深入的家庭教育不应只片面地强调子女养育。家庭好比一片森林（FOREST），科学的家庭教育是将家庭作为一个系统进行研究。
        </p>
      </div>
    </div>
    <section class="school-top">
      <div class="subtitle">
        <h2>专业排名与认证</h2>
      </div>
      <img src="https://webapp-pub.ezijing.com/project/cuw/project_top.jpg" />
    </section>
    <section class="project-forest">
      <h2>项目采用<span>“FOREST（森林）”</span>教学体系</h2>
      <p class="t0">
        引领学生全方位掌握在家庭教育中，个体发展、婚姻关系、家庭发展、性与家庭、儿童和青少年养育等理论与方法，<br />
        以及家庭与社会的文化、政策、法律等关系，让学生从根本上理解并解决家庭的问题。
      </p>
      <div class="forest-group">
        <div
          class="forest-item"
          :class="{ 'is-active': forestIndex === index }"
          v-for="(item, index) in forest"
          :key="item.name"
          @mouseenter="forestIndex = index"
        >
          <div class="circle">
            <p class="t1">{{ item.eName }}</p>
            <p class="t2">{{ item.name }}</p>
          </div>
          <div class="forest-item-main">
            <div class="line"></div>
            <dl v-for="child in item.children" :key="child.nam">
              <dt>{{ child.name }}</dt>
              <dd>{{ child.eName }}</dd>
            </dl>
          </div>
        </div>
      </div>
    </section>

    <div class="layout_com_page_banner major-kc-wm" :style="{ 'min-height': 700 + 'px' }">
      <h3 style="padding-top:30px;">
        <span>师资介绍</span>
      </h3>
      <div class="major-kc-wm-body">
        <swiper ref="mySwiper" :options="swiperOptions">
          <template v-for="(item, index) in wmList">
            <swiper-slide :key="index">
              <div class="major-kc-wm-list">
                <div class="list-img">
                  <img :src="item.img" style="width: 162px" />
                </div>
                <div class="list-body">
                  <span class="font-size-18 nowrap title">{{ item.title }}</span>
                  <span class="font-size-14 wm-red zs">{{ item.label }}</span>
                  <template v-for="(sItem, sIndex) in item.main">
                    <span :key="sIndex + '-' + index" class="font-size-14 mian-txt">{{ sItem }}</span>
                  </template>
                </div>
              </div>
            </swiper-slide>
          </template>
          <div class="swiper-pagination" slot="pagination"></div>
        </swiper>
      </div>
    </div>
    <div class="layout_com_page_banner major-kc-wm bg2" :style="{ 'min-height': 700 + 'px' }">
      <h3>
        <span>师资介绍</span>
      </h3>
      <div class="major-kc-wm-body" @mouseover="mouseOver2" @mouseleave="mouseLeave2">
        <swiper ref="mySwiper2" :options="swiperOptions">
          <template v-for="(item, index) in wmList2">
            <swiper-slide :key="index">
              <div class="major-kc-wm-list">
                <div class="list-img">
                  <img :src="item.img" style="width: 162px" />
                </div>
                <div class="list-body">
                  <span class="font-size-18 nowrap title">{{ item.title }}</span>
                  <span class="font-size-14 wm-red zs">{{ item.label }}</span>
                  <template v-for="(sItem, sIndex) in item.main">
                    <span :key="sIndex + '-' + index" class="font-size-14 mian-txt">{{ sItem }}</span>
                  </template>
                </div>
              </div>
            </swiper-slide>
          </template>
          <div class="swiper-pagination" slot="pagination"></div>
        </swiper>
      </div>
    </div>
    <section class="project-card">
      <div class="project-card-item" v-for="(item, index) in list" :key="index">
        <div class="project-card-item-header">
          <h3>{{ item.name }}</h3>
        </div>
        <div class="project-card-item-box">
          <img :src="item.bg" />
          <ul>
            <li v-for="child in item.children">{{ child }}</li>
          </ul>
        </div>
      </div>
    </section>
    <section class="project-study">
      <div class="subtitle">
        <h2>学习相关</h2>
      </div>
      <div class="project-study-bd">
        <div class="project-study-left">
          <img src="https://webapp-pub.ezijing.com/project/cuw/project_study.png" width="500px" />
        </div>
        <div class="project-study-right">
          <h3>项目学制</h3>
          <ul>
            <li><span>20</span>个月</li>
            <li>修满<span>30</span>学分</li>
          </ul>
          <p>
            修满全部学分并考核合格后，由威斯康星协和大学授予教育学硕士学位。学位证书与出国留学学习所获得的学位证书相同。
          </p>
        </div>
      </div>
    </section>
    <FormBox />
  </div>
</template>

<script>
import FormBox from '@/components/formBox'
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'
export default {
  name: 'major-set',
  components: {
    Swiper,
    SwiperSlide,
    FormBox
  },
  directives: {
    swiper: directive
  },
  computed: {
    swiper() {
      return this.$refs.mySwiper.$swiper
    },
    swiper2() {
      return this.$refs.mySwiper2.$swiper
    }
  },

  data() {
    return {
      forestIndex: 0,
      forest: [
        {
          name: '家庭',
          eName: 'Family',
          children: [
            { name: '今日家庭', eName: 'The Family Today' },
            { name: '家庭发展', eName: 'Family Development' }
          ]
        },
        {
          name: '社会',
          eName: 'Others',
          children: [
            { name: '人类发展', eName: 'Human Development' },
            { name: '家庭法律与公共政策', eName: 'Family Law and Public Policy' }
          ]
        },
        {
          name: '关系',
          eName: 'Relations',
          children: [
            { name: '婚姻与家庭关系', eName: 'Marriage and Family Relations' },
            { name: '人类性学', eName: 'Human Sexuality' }
          ]
        },
        {
          name: '养育',
          eName: 'Education',
          children: [
            { name: '家庭与育儿的现代议题-儿童期', eName: 'Contemporary Issues of Family and Parenting - Childhood' },
            { name: '家庭与育儿的现代议题-青少年期', eName: 'Contemporary Issues of Family and Parenting - Adolescent' }
          ]
        },
        {
          name: '技能',
          eName: 'Skills',
          children: [{ name: '家庭教育的课程设计与方法', eName: 'Curriculum and Methods in Family Life Education' }]
        },
        {
          name: '治疗',
          eName: 'Therapy',
          children: [{ name: '家庭治疗（技术与特殊专题）', eName: 'Family Therapy (Techniques and specials Topics)' }]
        }
      ],
      list: [
        {
          name: '招生对象',
          bg: 'https://webapp-pub.ezijing.com/project/cuw/project_bg_01.png',
          children: [
            '心理咨询师、婚姻家庭治疗师、家庭教育指导师、社区工作者',
            '幼儿园、小学、中学教师、班主任',
            '对科学理解家庭及养育有需求的人群'
          ]
        },
        {
          name: '入学条件',
          bg: 'https://webapp-pub.ezijing.com/project/cuw/project_bg_02.png',
          children: ['持有本科学历或学位', '有两年以上相关工作经验的大专学历学生有少量名额，可通过筛选后择优录取']
        },
        {
          name: '授课形式',
          bg: 'https://webapp-pub.ezijing.com/project/cuw/project_bg_03.png',
          children: ['双语环境，中文授课', '操作流畅的学习平台', '线上课程+线下工作坊']
        },
        {
          name: '毕业典礼',
          bg: 'https://webapp-pub.ezijing.com/project/cuw/project_bg_04.png',
          children: ['学生可在学业全部完成后，在国内或赴美参加毕业典礼，共享学有所成的高光时刻']
        }
      ],
      wmList: [
        {
          img: require('@/assets/images/major-set/ent1.png'),
          title: 'Dr. Val Keiper',
          label: '',
          main: ['威斯康星协和大学教育学院教授', '家庭教育项目主任', '在CUW任教40余年', 'CUW棒球队主教练']
        },
        {
          img: require('@/assets/images/major-set/ent2.png'),
          title: 'Dr.Roger Sonnenberg',
          label: '',
          main: [
            '威斯康星协和大学家庭教育教授',
            '青少年、性、家庭教育专家',
            '《501种养育与家庭实用方法系列》等畅销书作家'
          ]
        },

        {
          img: require('@/assets/images/major-set/ent3.png'),
          title: 'Dr. Scott Turansky',
          label: '',
          main: [
            '威斯康星协和大学家庭教育教授',
            '美国知名育儿专家',
            '《家庭改善：可以读给孩子的育儿书》等数十本畅销书作家'
          ]
        },

        {
          img: require('@/assets/images/major-set/ent4.png'),
          title: 'Dr. Warren Braden',
          label: '博士',
          main: ['威斯康星协和大学家庭教育教授', '婚姻家庭治疗师', '北伊利诺伊大学教育学博士']
        },

        {
          img: require('@/assets/images/major-set/ent5.png'),
          title: 'Josh Kittleman',
          label: '',
          main: ['威斯康星协和大学家庭教育助理教授', '安娜堡协和大学家庭教育助理教授']
        }
      ],
      wmList2: [
        {
          img: require('@/assets/images/major-set/cnt1.png'),
          title: '黄翯青',
          label: '博士',
          main: ['北京大学心理学博士', '首都师范大学学前教育学院副教授', '北京大学健康中心研究员']
        },
        {
          img: require('@/assets/images/major-set/cnt2.png'),
          title: '蔺秀云',
          label: '博士',
          main: [
            '北京师范大学心理学部教授',
            '博士生导师',
            '青年长江学者',
            '家庭治疗与发展心理学博士',
            '资深家庭治疗师',
            '注册系统督导师'
          ]
        },
        {
          img: require('@/assets/images/major-set/cnt3.png'),
          title: '苏彦捷',
          label: '博士',
          main: [
            '北京大学心理与认知科学学院教授',
            '博士生导师',
            '长江学者特聘教授',
            '享受国务院特殊津贴专家',
            '美国心理科学学会会士'
          ]
        },
        {
          img: require('@/assets/images/major-set/cnt4.png'),
          title: '方刚',
          label: '博士',
          main: [
            '著名性学家',
            '性与性别研究专家',
            '台湾树德科技大学人类性学研究所兼职教授',
            '中国妇女研究会理事',
            '中国性学会理事'
          ]
        }
      ],
      swiperOptions: {
        observer: true,
        autoHeight: true,
        slidesPerView: 3,
        // paginationClickable: true,
        spaceBetween: 0,
        freeMode: true,
        // autoplay: {
        //   delay: 2000
        // },
        pagination: {
          el: '.swiper-pagination',
          clickable: true,
          type: 'bullets'
        }
      }
    }
  },
  methods: {
    mouseOver() {
      this.swiper.autoplay.stop()
    },
    mouseLeave() {
      this.swiper.autoplay.start()
    },
    mouseOver2() {
      this.swiper2.autoplay.stop()
    },
    mouseLeave2() {
      this.swiper2.autoplay.start()
    }
  }
}
</script>

<style lang="scss" scoped>
.banner {
  position: relative;
  height: calc(100vh - 10px);
  min-height: 600px;
  background: url(https://webapp-pub.ezijing.com/project/cuw/project_banner.jpg) no-repeat center;
  background-size: cover;
  .banner-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 980px;
    margin: 0 auto;
  }
  h1 {
    font-size: 50px;
    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
    font-weight: 500;
    color: #ffffff;
    line-height: 58px;
    letter-spacing: 9px;
    text-align: center;
    padding: 20px 0;
  }
  p {
    font-size: 24px;
    font-family: SourceHanSansCN-Regular, SourceHanSansCN;
    font-weight: 400;
    color: #ffffff;
    line-height: 40px;
  }
}
.school-top {
  position: relative;
  img {
    width: 100%;
  }
  .subtitle {
    position: absolute;
    top: 50px;
    left: 50%;
    padding: 20px 0;
    text-align: center;
    transform: translateX(-50%);
    h2 {
      display: inline-block;
      padding-bottom: 12px;
      font-size: 40px;
      font-family: SourceHanSansCN-Medium, SourceHanSansCN;
      font-weight: 500;
      color: #fff;
      line-height: 1;
      border-bottom: 3px solid #fff;
    }
  }
}
.project-forest {
  padding: 70px 0;
  height: 760px;
  background: url(https://webapp-pub.ezijing.com/project/cuw/project_forest.jpg) no-repeat;
  background-size: cover;
  box-sizing: border-box;
  h2 {
    font-size: 40px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    span {
      color: #faa634;
    }
  }
  .t0 {
    font-size: 20px;
    font-family: SourceHanSansCN-Regular, SourceHanSansCN;
    font-weight: 400;
    color: #ffffff;
    line-height: 30px;
    text-align: center;
  }
}
.forest-group {
  display: flex;
  justify-content: center;
  margin-top: 65px;
}
.forest-item {
  position: relative;
  margin: 0 12px;
  &:hover,
  &.is-active {
    .circle {
      border-color: #faa634;
    }
    .forest-item-main {
      display: block;
    }
  }
  .circle {
    width: 160px;
    height: 160px;
    border: 6px solid #0d78c6;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    .t1 {
      font-size: 30px;
      font-family: Lato-Regular, Lato;
      font-weight: 400;
      color: #ffffff;
      &::first-letter {
        font-size: 50px;
      }
    }
    .t2 {
      font-size: 22px;
      font-family: SourceHanSansCN-Regular, SourceHanSansCN;
      font-weight: 400;
      color: #ffffff;
    }
  }
}
.forest-item-main {
  display: none;
  position: absolute;
  left: 50%;
  transform: translate(-50%);
  .line {
    position: relative;
    margin: 0 auto 22px;
    width: 0;
    height: 100px;
    border-left: 1px dashed #faa634;
    &::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background-color: #faa634;
      transform: translateX(-50%);
    }
  }
  dl {
    padding-left: 8px;
    border-left: 2px solid #faa634;
  }
  dl + dl {
    margin-top: 30px;
  }
  dt {
    font-size: 16px;
    font-family: SourceHanSansCN-Bold, SourceHanSansCN;
    font-weight: bold;
    color: #ffffff;
    line-height: 24px;
    white-space: nowrap;
  }
  dd {
    margin-top: 5px;
    font-size: 16px;
    font-family: Lato-Bold, Lato;
    font-weight: bold;
    color: #ffffff;
    line-height: 19px;
    white-space: nowrap;
  }
}

.project-card {
  padding: 120px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('~@/assets/images/major-set/bg1.png');
  background-size: cover;
}
.project-card-item {
  width: 260px;
  margin: 0 20px;
  &:hover {
    .project-card-item-box {
      img {
        transform: scale(1.05);
      }
    }
  }
}
.project-card-item-header {
  width: 220px;
  height: 60px;
  margin: 0 auto;
  font-size: 26px;
  font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  font-weight: 500;
  color: #ffffff;
  line-height: 60px;
  text-align: center;
  background: url('https://webapp-pub.ezijing.com/project/cuw/proejct_card_bg.png') no-repeat center top;
  background-size: contain;
}
.project-card-item-box {
  position: relative;
  background: #0b5a94;
  border-radius: 13px;
  overflow: hidden;
  padding-bottom: 10px;
  img {
    width: 100%;
    transition: all 0.25s ease-in-out;
  }
  ul {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    padding: 40px 18px 0;
    background: rgba(0, 0, 0, 0.5);
  }
  li {
    position: relative;
    font-size: 18px;
    font-family: SourceHanSansCN-Regular, SourceHanSansCN;
    font-weight: 400;
    color: #ffffff;
    line-height: 28px;
    padding-left: 15px;
    &::before {
      content: '';
      position: absolute;
      top: 12px;
      left: 0;
      width: 6px;
      height: 6px;
      background: #ffffff;
      border-radius: 50%;
      overflow: hidden;
    }
  }
  li + li {
    margin-top: 10px;
  }
}
.project-study {
  height: 600px;
  background: url(https://webapp-pub.ezijing.com/project/cuw/project_study_bg.jpg) no-repeat center center;
  background-size: cover;
  .subtitle {
    padding: 50px 0;
    text-align: center;
    h2 {
      display: inline-block;
      padding-bottom: 12px;
      font-size: 40px;
      font-family: SourceHanSansCN-Medium, SourceHanSansCN;
      font-weight: 500;
      color: #fff;
      line-height: 1;
      border-bottom: 3px solid #fff;
    }
  }
}
.project-study-bd {
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-study-right {
  width: 452px;
  margin-left: 45px;
  color: #fff;
  h3 {
    font-size: 26px;
    font-family: SourceHanSansCN-Bold, SourceHanSansCN;
    font-weight: bold;
    color: #ffffff;
    line-height: 34px;
  }
  ul {
    margin-top: 66px;
    margin-bottom: 20px;
    display: flex;
  }
  li {
    font-size: 22px;
    font-family: SourceHanSansCN-Regular, SourceHanSansCN;
    font-weight: 400;
    color: #ffffff;
    line-height: 1;
    padding-right: 30px;
    span {
      font-size: 66px;
      font-family: 思源黑体 CN Regular;
    }
  }
  li + li {
    padding-left: 30px;
    border-left: 1px solid #fff;
  }
  p {
    font-size: 18px;
    font-family: SourceHanSansCN-Regular, SourceHanSansCN;
    font-weight: 400;
    color: #ffffff;
    line-height: 30px;
  }
}
.major-kc-wm {
  background: url('~@/assets/images/major-set/teacher_bg11.jpg') no-repeat center;
  background-size: cover;
  position: relative;
  align-items: center;
  flex-wrap: wrap;
  overflow: hidden;
  &.bg2 {
    background: url('~@/assets/images/major-set/teacher_bg22.jpg') no-repeat bottom;
    background-size: cover;
  }
  h3 {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 40px;
    color: rgba(255, 255, 255, 1);
    span {
      position: relative;
      &::before {
        content: '';
        position: absolute;
        bottom: -8px;
        width: 100%;
        height: 3px;
        background: #ffffff;
      }
    }
  }
  .major-kc-wm-body {
    ::v-deep .swiper-container {
      .swiper-pagination-bullet {
        opacity: 1;
        background: #fff;
      }
      .swiper-pagination-bullet-active {
        background: rgb(174, 14, 63);
      }
    }
    width: 80%;
    display: flex;
    justify-content: center;
    h3 {
      color: #ffffffff;
    }
    .major-kc-wm-list {
      display: flex;
      flex-direction: column;
      position: relative;
      padding: 20px 30px;
      width: 300px;
      margin: 0 auto;
      .list-img {
        z-index: 3;
        position: relative;
        position: absolute;
        left: 50%;
        background: #fff;
        border-radius: 50%;
        top: 7%;
        overflow: hidden;
        transform: translate(-50%, -50%);
        img {
          transition: all 0.5s;
          transform: scale(0.9);
          cursor: pointer;
          &:hover {
            transform: scale(1);
          }
        }
      }
      .list-body {
        display: flex;
        position: relative;
        // align-items: center;
        flex-direction: column;
        background: #fff;
        border-radius: 26px;
        width: 300px;
        padding: 100px 0px 30px 0px;
        height: 185px;
        .max-width-180 {
          max-width: 180px;
        }
        span {
          padding: 5px 15px 0 40px;
          color: #222222ff;
          line-height: 20px;
        }
        &::before {
          content: '';
          position: absolute;
          height: 90%;
          width: 90%;
          top: 5%;
          border: 1px solid rgba(151, 151, 151, 1);
          border-radius: 26px;
          border-style: dashed;
        }
        .mian-txt {
          position: relative;
          &::before {
            content: '';
            position: absolute;
            left: 22px;
            top: 10px;
            // -webkit-transform: translateX(-50%);
            width: 8px;
            height: 8px;
            border: 2px solid #e27f4d;
            border-radius: 50%;
          }
        }
        .title {
          padding: 0;
          display: block;
          width: 100%;
          text-align: center;
        }
        .zs {
          padding: 5px 0 0 0;
          display: block;
          width: 100%;
          text-align: center;
          color: #e27f4d;
        }
        &::before {
          content: '';
          position: absolute;
          height: 90%;
          width: 90%;
          top: 5%;
          left: 50%;
          -webkit-transform: translateX(-50%);
          border: 1px solid rgba(151, 151, 151, 1);
          border-radius: 26px;
          border-style: dashed;
        }
      }
    }
  }
}
.swiper-container {
  padding-top: 70px;
  padding-bottom: 40px;
}
</style>
