<template>
  <div class="detail">
    <div class="tab-select">
      <div class="item active">统计信息<span></span></div>
      <div class="item">人员信息<span></span></div>
    </div>
    <div class="area-select">
      <div class="select-content">
        <div class="area-content">
          <AiAreaPicker ref="areaIds" :areaId="areaId" mode="custom" all @select="areaSelect">
            <img src="./img/local-icon.png" alt="">
            <span class="label" v-if="addressArea">{{ addressArea }}</span>
            <span v-else>请选择</span>
            <u-icon name="arrow-down" color="#666" size="24" />
          </AiAreaPicker>
        </div>
        <div class="search-input">
          <img src="./img/search-icon.png" alt="">
          <u-input type="text" placeholder="请输入姓名" placeholder-style="color:#999;font-size:13px;" height="18" />
        </div>
      </div>
    </div>
    <div v-if="!tabIndex">
      <div class="info-content">
      <div class="title">特殊人群</div>
      <div class="num-content">
        <div class="num-item">
          <h3>18</h3>
          <p>残疾人</p>
        </div>
        <div class="num-item">
          <h3>18</h3>
          <p>精神疾病患者</p>
        </div>
        <div class="num-item">
          <h3>18</h3>
          <p>社区矫正人群</p>
        </div>
        <div class="num-item">
          <h3>18</h3>
          <p>吸毒人员</p>
        </div>
        <div class="num-item">
          <h3>18</h3>
          <p>刑满释放人员</p>
        </div>
      </div>
      </div>
      <div class="info-content">
        <div class="title">本月新增</div>
        <div class="num-content color-org">
          <div class="num-item">
            <h3>18</h3>
            <p>残疾人</p>
          </div>
          <div class="num-item">
            <h3>18</h3>
            <p>精神疾病患者</p>
          </div>
          <div class="num-item">
            <h3>18</h3>
            <p>社区矫正人群</p>
          </div>
          <div class="num-item">
            <h3>18</h3>
            <p>吸毒人员</p>
          </div>
          <div class="num-item">
            <h3>18</h3>
            <p>刑满释放人员</p>
          </div>
        </div>
      </div>
    </div>
    <div>
      <div class="item-content">
        <div class="title">
          <h2>精神病患者</h2>
          <img src="./img/down-icon.png" alt="">
        </div>
        <div class="user-list">
          <div class="user-item">
            <div class="user-img">
              <img src="./img/user-img.png" alt="">
            </div>
            <div class="user-info">
              <p class="name">李毅</p>
              <div class="phone">
                <span>428008******8765</span>
                <span>18164065235</span>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="footer">
        <div class="btn">新增特殊人群信息</div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {

  data() {
    return {
      areaId: '',
      tabIndex: 1,
      addressArea: ''
    }
  },
  computed: { ...mapState(['user']) },
  mounted() {
    this.areaId = this.user.areaId
  },

  methods: {
    areaSelect() {

    }
    
  }
}
</script>

<style lang="scss" scoped>
.detail {
  .tab-select{
    width: 100%;
    height: 96px;
    line-height: 96px;
    background: #3975C6;
    display: flex;
    .item{
      flex: 1;
      text-align: center;
      font-size: 28px;
      font-family: PingFangSC-Regular, PingFang SC;
      color: #CDDCF0;
    }
    .active{
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      position: relative;
      color: #fff;
      span{
        width: 48px;
        height: 4px;
        background: #FFF;
        position: absolute;
        bottom: 14px;
        left: 50%;
        margin-left: -24px;
      }
    }
  }
  .area-select{
    width: 100%;
    background: #FFF;
    padding-left: 32px;
    box-sizing: border-box;
    .select-content{
      width: 100%;
      padding: 24px 32px 24px 0;
      border-bottom: 1px solid #D8DDE6;
      display: flex;
      justify-content: space-between;
      font-family: PingFangSC-Regular, PingFang SC;
      color: #333;
      line-height: 44px;
      box-sizing: border-box;
      display: flex;
      .area-content{
        width: calc(100% - 402px);
        line-height: 64px;
        img{
          width: 42px;
          vertical-align: middle;
          margin-right: 16px;
        }
        .u-icon{
          margin-left: 6px;
        }
      }
      .search-input{
        width: 402px;
        height: 64px;
        background: #F5F5F5;
        border-radius: 32px;
        padding: 14px 32px;
        box-sizing: border-box;
        img{
          width: 32px;
          height: 32px;
          margin-right: 12px;
        }
        ::v-deep .u-input{
          display: inline-block;
          width: 280px;
          font-size: 26px;
        }
      }
    }
  }
  .info-content{
    width: calc(100% - 64px);
    background: #FFF;
    border-radius: 8px;
    margin: 24px 32px 0;
    .title{
      padding-left: 32px;
      line-height: 94px;
      border-bottom: 1px solid #ddd;
      font-size: 32px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #333;
    }
    .num-content{
      overflow: hidden;
      .num-item{
        float: left;
        width: 33%;
        padding: 40px 0;
        text-align: center;
        h3{
          font-size: 64px;
          font-family: DINAlternate-Bold, DINAlternate;
          font-weight: bold;
          color: #3192F4;
          line-height: 74px;
          margin-bottom: 10px;
        }
        p{
          font-size: 28px;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;
          color: #999;
          line-height: 40px;
        }
      }
    }
    .color-org{
      .num-item{
        h3{
          color: #FF8700;
        }
      }
    }
  }
  .item-content{
    margin-bottom: 4px;
    .title{
      width: 100%;
      height: 108px;
      line-height: 108px;
      background: #FFF;
      padding: 0 32px;
      box-sizing: border-box;
      display: flex;
      justify-content: space-between;
      h2{
        font-size: 32px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #333;
      }
      img{
        width: 34px;
        height: 34px;
        margin-top: 38px;
        transition: all .3s ease-in-out;
      }
      .img-active {
        transform: rotate(180deg);
      }
    }
    .user-list{
      background-color: #fff;
      .user-item{
        padding: 24px 32px;
        display: flex;
        .user-img{
          width: 112px;
          img{
            width: 80px;
            height: 80px;
          }
        }
        .user-info{
          .name{
            font-size: 32px;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: #333;
            line-height: 44px;
            margin-bottom: 8px;
          }
          .phone{
            font-size: 26px;
            font-family: PingFangSC-Regular, PingFang SC;
            color: #999;
            line-height: 36px;
            display: flex;
            justify-content: space-between;
          }
        }
      }
    }
  }
  .footer{
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
  }
  .btn{
    width: 100%;
    height: 112px;
    line-height: 112px;
    text-align: center;
    background: #1365DD;
    font-size: 32px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #FFF;
  }
}
</style>