<template>
  <div class="my-bank">
    <div class="my-bank__header">
      <el-tabs v-model="activeName">
        <el-tab-pane label="全部题库" name="1"></el-tab-pane>
        <el-tab-pane label="考前培训" name="2"></el-tab-pane>
        <el-tab-pane label="继续教育" name="3"></el-tab-pane>
      </el-tabs>
    </div>

    <div class="my-bank__body">
      <div class="list">
        <div class="bank-item" v-for="(item, index) in 5" :key="index">
          <div class="bank-item__header">
            二级建造师建设工程施工管理
            <div class="time">学习有效期：2022-12-1 至 2022-12-31</div>
          </div>
          <div class="bank-item__body">
            <div class="img"></div>
            <div class="text">
              <div class="title">
                <div class="note">60学时</div>
              </div>
              <div class="progress">
                学习进度
                <el-progress
                  class="progress-line"
                  :text-inside="true"
                  :stroke-width="16"
                  :percentage="70"
                ></el-progress>
              </div>
            </div>
            <div class="btns-wrap">
              <div class="btns">
                <div class="btn" @click="goStudy">进入学习</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Mybank",
  data() {
    return {
      activeName: "1",
    };
  },
  mounted() {},
  methods: {
    pay() {
      this.$router.push({
        path: "payment-success",
      });
    },
    goStudy() {
      this.$router.push({
        path: "/person-center/my-bank/bank-detail/123",
      });
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.my-bank {
  &__header {
    /deep/ .el-tabs__header {
      margin-bottom: 0;
    }
  }
  &__body {
    .list {
      .bank-item {
        margin-top: 24px;
        background: #fafbfc;
        border-radius: 8px;
        overflow: hidden;

        &__header {
          height: 40px;
          line-height: 40px;
          border-bottom: 1px solid #eee;
          padding: 0 18px;
          font-size: 16px;
          font-family: Microsoft YaHei;
          font-weight: bold;
          color: #333333;

          .time {
            float: right;
            line-height: 40px;
            text-align: right;
            font-size: 12px;
            font-family: Microsoft YaHei;
            font-weight: 400;
            color: #666666;
          }
        }

        &__body {
          .img {
            float: left;
            width: 160px;
            height: 90px;
            background: #3f8dfd;
          }

          .text {
            float: left;
            margin-left: 12px;
            .title {
              margin-top: 10px;
              font-size: 16px;
              font-family: Microsoft YaHei;
              font-weight: bold;
              color: #333333;
              .note {
                display: inline-block;
                vertical-align: middle;
                border: 1px solid #333333;
                border-radius: 4px;
                font-size: 12px;
                font-family: Microsoft YaHei;
                font-weight: 400;
                color: #333333;
                padding: 2px 5px;
              }
            }

            .progress {
              margin-top: 30px;

              font-size: 14px;
              font-family: Microsoft YaHei;
              font-weight: 400;
              color: #333333;

              &-line {
                width: 200px;
                display: inline-block;
              }
            }
          }

          .btns-wrap {
            display: table;
            float: right;
            height: 90px;
            width: 130px;

            .btns {
              display: table-cell;
              vertical-align: middle;
              text-align: center;

              .btn {
                cursor: pointer;
                margin: 2px 0;
                width: 122px;
                height: 32px;
                background: #3f8dfd;
                border-radius: 16px;
                display: inline-block;
                text-align: center;
                line-height: 32px;
                color: #fff;
              }
            }
          }
        }
      }
    }
  }
}
</style>
