<template>
  <div>
    <!-- 项目终止 -->
    <div class="TaskPanel-box">
      <div class="panel">
        <div class="panel-mance">
          <span>急</span>
          <span>底层性能优化</span>
          <span>项目终止</span>
        </div>
        <div>华南×××公司信息化建设与集成项目</div>
        <el-progress :percentage="50" status="exception"></el-progress>
        <div class="Termin">
          <span>2019-05-04至</span>
          <p>已终止</p>
        </div>
      </div>
      <!-- 项目中心 -->
      <div class="expand-some">
        <div>
          <span>底层性能优化</span>
          <span>项目终止</span>
        </div>
        <div>华南×××公司信息化建设与集成项目</div>
        <el-progress :percentage="100" status="success"></el-progress>
        <span>2019-05-04至</span>
        <span>2021-08-30</span>
      </div>

      <!--拓展  -->
      <div class="expand-some">
        <div>
          <span>底层性能优化</span>
          <span>项目终止</span>
        </div>
        <div>华南×××公司信息化建设与集成项目</div>
        <el-progress :percentage="40" :format="format"></el-progress>
        <span>2019-05-04至</span>
        <span>2021-08-30</span>
      </div>

      <div class="expand-some">
        <div>
          <span>底层性能优化</span>
          <span>项目终止</span>
        </div>
        <div>华南×××公司信息化建设与集成项目</div>
        <el-progress :percentage="30" :format="format"></el-progress>
        >
        <span>2019-05-04至</span>
        <span>2021-08-30</span>
      </div>

      <div class="expand-some">
        <div>
          <span>底层性能优化</span>
          <span>项目终止</span>
        </div>
        <div>华南×××公司信息化建设与集成项目</div>
        <el-progress :percentage="50" status="exception"></el-progress>
        <span>2019-05-04至</span>
        <span>2021-08-30</span>
      </div>

      <div class="expand-some">
        <div>
          <span>底层性能优化</span>
          <span>项目终止</span>
        </div>
        <div>华南×××公司信息化建设与集成项目</div>
        <el-progress :percentage="50" status="exception"></el-progress>
        <span>2019-05-04至</span>
        <span>2021-08-30</span>
      </div>
    </div>
    <div class="block">
      <el-pagination
        background
        :current-page="page.pagenum"
        :page-size="page.pagesize"
        layout="prev, pager, next, jumper"
        :total="total"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      ></el-pagination>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'TaskPanel',
    data() {
      return {
        total: 0,
        page: {
          //当前页数
          pagenum: 1,
          //当前每页多少条数据
          pagesize: 4,
        },
      }
    },
    methods: {
      // 监听pagesize改变的事件
      handleSizeChange(newSize) {
        this.page.pagesize = newSize
      },
      // 监听页码值
      handleCurrentChange(newSize) {
        this.page.pagenum = newSize
      },
    },
  }
</script>

<style lang="scss" scoped>
  .TaskPanel-box {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: content;
    .panel {
      width: 30%;
      padding: 16px 14px;
      margin-bottom: 46px;
      background-color: rgba(251, 204, 204, 0.4);

      .panel-mance {
        span:nth-child(2) {
          font-size: 15px;
          font-weight: 600;
        }
        span:nth-child(3) {
          padding: 3px 3px;
          border: 1px solid #f15959;
          color: #f15959;
          margin-left: 5px;
        }
      }
    }
    .el-progress {
      margin: 10px 0px;
    }
    .Termin {
      display: flex;
    }
    .expand-some {
      margin-bottom: 46px;
      width: 30%;
      padding: 16px 14px;
      border: 1px solid rgb(224, 224, 224);
      div:nth-child(2) {
        margin: 10px 0px;
      }
      div:nth-child(1) {
        span:nth-child(1) {
          font-size: 15px;
          font-weight: 600;
        }
        span:nth-child(2) {
          padding: 3px 3px;
          border: 1px solid #4ba232;
          color: #4ba232;
          margin-left: 5px;
        }
      }
    }
  }
  .block {
    width: 30%;
    float: right;
  }
</style>
