<template>
  <div class="simulation">
    <div class="top">
      <img
        src="@/assets/images/career/img_bg.png"
        style="width: 100%; margin: 20px 0"
        alt=""
      />
      <div class="desc">
        <p>志愿必修——带你快速了解高考的方方面面</p>
        <p>
          对于很多刚接触高考志愿填报的家长而言，填报的过程中会遇到各种的名词术语，一时之间找不到合适的专业人士来咨询，了解的志愿填报就更是挑战。下面为大家整理了高考志愿填报过程中常见的专业术语，帮助各位考生和家长加深理解。
        </p>
      </div>
    </div>
    <div class="container">
      <div class="item" v-for="(item, index) in list" :key="index">
        <div class="tag">
          <div>{{ item.type }}</div>
          <div class="bg"></div>
        </div>
        <div class="data">
          <div
            class="data_item"
            v-for="(item2, index) in item.children"
            :key="index"
            @click="toDetail(item2.id)"
          >
            {{ item2.name }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { list } from "@/api/webApi/career-other";
export default {
  data() {
    return {
      list: [],
    };
  },
  created() {
    list().then((res) => {
      this.list = res.rows;
      console.log(res);
    });
  },
  methods:{
      toDetail(id){
          this.$router.push({path:'/career/gkmc/detail',query:{id:id}})
      }
  }
};
</script>

<style lang="scss" scoped>
.top {
  position: relative;
}
.top .desc {
  position: absolute;
  top: 43px;
  left: 43px;
}
.top .desc p:first-child {
  font-size: 36px;
  font-family: PingFangSC-Semibold, PingFang SC;
  font-weight: 600;
  color: #ffffff;
  line-height: 50px;
  margin-bottom: 32px;
}
.top .desc p:last-child {
  font-size: 16px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  padding-right: 273px;
  color: #525252;
  line-height: 22px;
}
.item {
  width: 100%;
  background: #fcfcfc;
  border: 1px solid #dcdcdc;
  margin-bottom: 16px;
}
.tag {
  position: relative;
}
.tag div:first-child {
  width: 164px;
  height: 56px;
  position: relative;
  top: 24px;
  text-align: center;
  line-height: 56px;
  background: #47c6a2;
  border-radius: 0px 8px 8px 0px;
  z-index: 30;
  color: white;
}
.tag .bg {
  position: absolute;
  left: 0;
  top: 30px;
  left: 8px;
  width: 164px;
  height: 56px;
  background: #737373;
  border-radius: 0px 8px 8px 0px;
  opacity: 0.14;
}
.data {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  flex-grow: 0;
}
.data .data_item {
  cursor: pointer;
  text-align: center;
  height: 60px;
  line-height: 60px;
  flex: 25%;
  flex-grow: 0;
}
.data .data_item:hover {
  color: #47c6a2;
}
</style>
