<template>
  <el-tabs v-model="activeName" stretch>
    <el-tab-pane
      v-for="(item, index) in recruitStatus"
      :key="index"
      :label="item.status + ' ' + item.value"
      :name="item.status"
    >
      <div v-for="(col, colIndex) in 4" :key="colIndex" class="tab-item">
        <div class="tab-item-tp">
          <div class="tab-item-tp-lf">
            <el-avatar :src="can" size="large" />
            <div class="user-info">
              <div>龙昌萍</div>
              <div class="flx-align-center">
                <span>未知</span>
                <el-divider direction="vertical" style="margin-bottom: 0" />
                <span>20岁</span>
              </div>
              <div class="flx-align-center">
                <el-icon><i-ep-OfficeBuilding /></el-icon>
                <span style="margin-left: 3px">在职求职中</span>
              </div>
              <div class="flx-align-center">
                <el-icon><i-ep-OfficeBuilding /></el-icon>
                <span style="margin-left: 3px">2021-09至2024-07</span>
              </div>
            </div>
          </div>
          <div class="tab-item-tp-rg">
            <div class="flx-align-center">
              <span class="info-label">简历待定</span>
              <span class="info-label">安排面试</span>
              <el-dropdown>
                <span class="info-label">更多</span>
                <template #dropdown>
                  <el-dropdown-menu>
                    <el-dropdown-item>已面试</el-dropdown-item>
                    <el-dropdown-item>已录用</el-dropdown-item>
                    <el-dropdown-item>已入职</el-dropdown-item>
                    <el-dropdown-item>人才库</el-dropdown-item>
                    <el-dropdown-item>黑名单</el-dropdown-item>
                  </el-dropdown-menu>
                </template>
              </el-dropdown>
            </div>
            <div class="recommend flx-align-center">
              推荐指数
              <el-rate v-model="rateValue" style="margin-left: 8px" />
            </div>
          </div>
        </div>
        <div class="tab-item-bt flx-justify-between">
          <div>
            <span class="user-label">大专</span>
            <el-divider direction="vertical" />
            <span class="user-label">长江工程职业技术学校</span>
            <el-divider direction="vertical" />
            <span class="user-label">计算机软件技术</span>
          </div>
          <div>
            <span class="user-label">抖音运营</span>
            <el-divider direction="vertical" />
            <span class="user-label">2023/07/10投递</span>
            <el-divider direction="vertical" />
            <span class="user-label">3323234</span>
          </div>
        </div>
      </div>
    </el-tab-pane>
  </el-tabs>
</template>

<script setup lang="ts">
import { recruitStatus } from '../config/index'
import can from '@/assets/img/icon-can.png'

const activeName = ref('简历未查看')
const rateValue = ref(4)
</script>

<style lang="scss" scoped>
.tab-item {
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 16px;

  .tab-item-tp {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;

    .tab-item-tp-lf {
      display: flex;
      .user-info {
        display: flex;
        flex-direction: column;
        margin-left: 8px;
        div {
          margin-bottom: 12px;

          &:last-child {
            margin-bottom: 0;
          }
        }
        span {
          font-size: 14px;
          font-weight: 400;
          color: #666666;
        }
      }
    }

    .tab-item-tp-rg {
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .recommend {
        font-size: 16px;
        font-weight: 400;
        color: #222222;
      }
      :deep(.el-dropdown) {
        line-height: normal;
      }
    }
  }
  .tab-item-bt {
    background: linear-gradient(90deg, #e3f0ff 0%, rgba(227, 240, 255, 0.15) 100%);
    border-radius: 0px 0px 12px 12px;
    padding: 15px 26px 15px 86px;

    .user-label {
      font-size: 12px;
      font-weight: 400;
      color: #666666;
    }
  }
}

:deep(.el-tabs__active-bar) {
  background: linear-gradient(90deg, #a5cdff 0%, #177cfa 100%);
}
.info-label {
  padding: 4px 8px;
  background: #c0dcff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  color: #177cfa;
  margin-right: 8px;
  cursor: pointer;

  &:focus {
    outline: 0 !important;
  }
}
</style>
