<template>
  <div class="app-container">
    <el-row :gutter="40" class="panel-group">
      <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
        <div class="card-panel">
          <div class="card-panel-icon-wrapper icon-people">
            <svg-icon icon-class="message" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">总收入创新币</div>
            <div class="card-panel-num">124,345</div>
          </div>
        </div>
      </el-col>
      <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
        <div class="card-panel">
          <div class="card-panel-icon-wrapper icon-message">
            <svg-icon icon-class="message" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">总收入金额</div>
            <div class="card-panel-num">54,323</div>
          </div>
        </div>
      </el-col>
      <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
        <div class="card-panel">
          <div class="card-panel-icon-wrapper icon-money">
            <svg-icon icon-class="message" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">总充值创新币</div>
            <div class="card-panel-num">124,345</div>
          </div>
        </div>
      </el-col>
      <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
        <div class="card-panel">
          <div class="card-panel-icon-wrapper icon-shopping">
            <svg-icon icon-class="message" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">总充值创新币金额</div>
            <div class="card-panel-num">54,323</div>
          </div>
        </div>
      </el-col>
    </el-row>
    <div class="card-panel surplus-currency">
      <span style="margin-right: 50px; font-size: 16px; font-weight: 700"
        >剩余创新币：98</span
      >
      <el-button class="x_btns">创新币充值</el-button>
    </div>

    <el-card>
      <template #header>
        <div>快捷功能</div>
      </template>
      <div class="card_body">
        <div class="card_item">
          <img
            style="width: 70px; height: 70px; border-radius: 50%"
            src="https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg"
          />
          <div>发布成果</div>
        </div>
        <div class="card_item">
          <img
            style="width: 70px; height: 70px; border-radius: 50%"
            src="https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg"
          />
          <div>发布需求</div>
        </div>
      </div>
    </el-card>

    <el-card style="margin-top: 20px">
      <template #header>
        <div>数据统计</div>
      </template>
      <el-descriptions :column="4">
        <el-descriptions-item label="发布成果:">
          <span style="color: #f97c7c; font-weight: 700"> 0 </span
          >项</el-descriptions-item
        >
        <el-descriptions-item label="成果需求:"
          ><span style="color: #f97c7c; font-weight: 700"> 0 </span
          >项</el-descriptions-item
        >
        <el-descriptions-item label=""></el-descriptions-item>
        <el-descriptions-item label="发布视频:"
          ><span style="color: #f97c7c; font-weight: 700"> 0 </span
          >项</el-descriptions-item
        >
        <el-descriptions-item label="已报名活动:"
          ><span style="color: #f97c7c; font-weight: 700"> 0 </span>项
        </el-descriptions-item>
        <el-descriptions-item label="我的收藏:"
          ><span style="color: #f97c7c; font-weight: 700"> 0 </span
          >项</el-descriptions-item
        >
        <el-descriptions-item label="代表专利:"
          ><span style="color: #f97c7c; font-weight: 700"> 0 </span
          >项</el-descriptions-item
        >
        <el-descriptions-item label="我的沦文:"
          ><span style="color: #f97c7c; font-weight: 700"> 0 </span
          >项</el-descriptions-item
        >
      </el-descriptions>
    </el-card>

    <el-card style="margin-top: 20px">
      <template #header>
        <div>收益走势</div>
      </template>
      <el-row :gutter="20">
        <el-col :span="3" style="border-right: 1px solid #e4e7ed">
          <div style="margin-top: 15px">累计收益</div>
          <div style="font-size: 28px">4320.00</div>
          <div style="margin-top: 100px">本月收益</div>
          <div style="font-size: 28px">342.00</div>
          <div>
            <el-icon color="#f04133">
              <caret-bottom />
            </el-icon>
            <span style="color: #f04133">10%</span>
            <span>同比上月</span>
          </div>
        </el-col>
        <el-col :span="21">
          <!-- :chart-data="lineChartData3" -->
          <div style="margin-left: 20px">近一年收益走势</div>
          <LineChart />
        </el-col>
      </el-row>
    </el-card>
  </div>
</template>

<script setup>
import LineChart from "./components/LineChart.vue";
</script>

<style lang="scss" scoped>
::v-deep .el-card__header {
  padding-top: 0;
  padding-bottom: 0;
  div {
    height: 40px;
    line-height: 40px;
  }
}
.panel-group {
  .card-panel-col {
    margin-bottom: 20px;
  }

  .card-panel {
    height: 108px;
    cursor: pointer;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    color: #666;
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);

    &:hover {
      .card-panel-icon-wrapper {
        color: #fff;
      }

      .icon-people {
        background: #36a3f7;
      }

      .icon-message {
        background: #40c9c6;
      }

      .icon-money {
        background: #36a3f7;
      }

      .icon-shopping {
        background: #34bfa3;
      }
    }

    .icon-people {
      color: #36a3f7;
    }

    .icon-message {
      color: #40c9c6;
    }

    .icon-money {
      color: #36a3f7;
    }

    .icon-shopping {
      color: #34bfa3;
    }

    .card-panel-icon-wrapper {
      float: left;
      margin: 14px 0 0 14px;
      padding: 16px;
      transition: all 0.38s ease-out;
      border-radius: 6px;
    }

    .card-panel-icon {
      float: left;
      font-size: 48px;
    }

    .card-panel-description {
      float: right;
      font-weight: bold;
      margin: 26px;
      margin-left: 0px;

      .card-panel-text {
        line-height: 18px;
        color: rgba(0, 0, 0, 0.45);
        font-size: 16px;
        margin-bottom: 12px;
      }
      .card-panel-num {
        font-size: 28px;
      }
    }
  }
}
.surplus-currency {
  margin-bottom: 20px;
  height: 108px;
  background-color: #f2f2f2;
  padding: 20px 0 0 50px;
}
.card_body {
  display: flex;
  .card_item {
    text-align: center;
    margin-right: 50px;
  }
}

@media (max-width: 550px) {
  .card-panel-description {
    display: none;
  }

  .card-panel-icon-wrapper {
    float: none !important;
    width: 100%;
    height: 100%;
    margin: 0 !important;

    .svg-icon {
      display: block;
      margin: 14px auto !important;
      float: none !important;
    }
  }
}
</style>
