<template>
  <div class="to-do">

    <div class="ls-row">
      <div class="row-header title">
        <span class="icon iconfont icon-shenpi1"></span>
        <span>待办事项</span>
        <span class="badge">12</span>
      </div>
      <div class="row-content right">
        <div @click="handleExtend"
             class="fc8CEE fs28">
          <div v-if="isExtend">
            <span>收起</span>
            <van-icon name="arrow-up" />
          </div>
          <div v-else>
            <span>展开</span>
            <van-icon name="arrow" />
          </div>
        </div>
      </div>
    </div>
    <div class="item-wrap">
      <div class="item">
        <div class="row">
          <div class="left">
            <span class="status">重要</span>
            <span class="fb">A2021090001</span>
          </div>
          <div class="fc8CEE fs28">未接受</div>
        </div>
        <div class="row">
          <div class="left">
            <span>任务来源：</span>
            <span class="fc666">XXXX</span>
          </div>
          <div class="right">
            <span>客户：</span>
            <span class="fc666">AA</span>
          </div>
        </div>
        <div class="row">
          <div class="left">
            <span>截止时间：</span>
            <span class="fc666">2019-08-25</span>
          </div>
          <div class="right">
            <img src="@/assets/images/photo.png" />
            <span class="fc666">张三</span>
          </div>
        </div>
      </div>

      <div class="item">
        <div class="row">
          <div class="left">
            <span class="status">重要</span>
            <span class="fb">A2021090001</span>
          </div>
          <div class="fc8CEE fs28">未接受</div>
        </div>
        <div class="row">
          <div class="left">
            <span>任务来源：</span>
            <span class="fc666">XXXX</span>
          </div>
          <div class="right">
            <span>客户：</span>
            <span class="fc666">AA</span>
          </div>
        </div>
        <div class="row">
          <div class="left">
            <span>截止时间：</span>
            <span class="fc666">2019-08-25</span>
          </div>
          <div class="right">
            <span></span>
            <span class="fc666">张三</span>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<script>
export default {
  name: 'to-do',

  mounted () {

  },
  methods: {
    handleExtend () {
      this.isExtend = !this.isExtend
    }
  },
  data () {
    return {
      isExtend: true
    }
  }

}
</script>

<style type="text/css" scoped lang="scss">
.to-do {
  background-color: #fff;
  margin-bottom: 20px;

  .left {
    display: flex;
    align-items: center;
  }
  .item-wrap {
    padding: 0 20px 20px;

    .item {
      margin-top: 20px;
      background: #f9f9f9;
      border-radius: 20px;
      padding: 20px;

      .row {
        padding-bottom: 20px;
      }
      .left {
        .status {
          background: #fef0f0;
          border: 1px solid #fbc4c4;
          border-radius: 5px;
          color: #f03d36;
          padding: 3px 16px;
          margin-right: 10px;
        }
      }
      .right {
        > img {
          width: 40px;
          vertical-align: bottom;
        }
      }
    }
  }
}
</style>
