<template>
  <div class="AppPdDv">
    <div class="left">
      <div class="appPdDv-title">企微数据库</div>
      <div class="tab">
        <div class="tab-item" :class="[leftIndex === 0 ? 'active' : '']">居民统计</div>
        <div class="tab-item" :class="[leftIndex === 1 ? 'active' : '']">会话统计</div>
      </div>
      <div class="tab-content">
        <div class="tab-content__item">
          <div class="item">
            <div class="title">居民好友统计</div>
            <div class="item-top">
              <div class="item-top__item">
                <h2>居民好友</h2>
                <div class="bottom">
                  <span>9</span>
                  <img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/bottom.png" />
                </div>
              </div>
              <div class="item-top__item">
                <h2>昨日新增</h2>
                <div class="bottom">
                  <span>9</span>
                  <img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/bottom.png" />
                </div>
              </div>
              <div class="item-top__item">
                <h2>昨日流失</h2>
                <div class="bottom">
                  <span>9</span>
                  <img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/bottom.png" />
                </div>
              </div>
            </div>
            <div class="chart1"></div>
          </div>
          <div class="item">
            <div class="title">居民群统计</div>
            <div class="item-top">
              <div class="item-top__item">
                <h2>居民群</h2>
                <div class="bottom">
                  <span>9</span>
                  <img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/bottom.png" />
                </div>
              </div>
              <div class="item-top__item">
                <h2>群成员</h2>
                <div class="bottom">
                  <span>9</span>
                  <img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/bottom.png" />
                </div>
              </div>
              <div class="item-top__item">
                <h2>昨日新增</h2>
                <div class="bottom">
                  <span>9</span>
                  <img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/bottom.png" />
                </div>
              </div>
              <div class="item-top__item">
                <h2>昨日流失</h2>
                <div class="bottom">
                  <span>9</span>
                  <img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/bottom.png" />
                </div>
              </div>
            </div>
            <div class="chart2"></div>
          </div>
          <div class="item item-tags">
            <div class="title">标签人群</div>
            <div class="item-bottom">
              <div class="item-bottom__item">
                <h2>居民群</h2>
                <span>245</span>
              </div>
              <div class="item-bottom__item">
                <h2>群成员</h2>
                <span>245</span>
              </div>
              <div class="item-bottom__item">
                <h2>昨日新增</h2>
                <span>245</span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="middle">
      <div class="top"></div>
      <div class="bottom">
        <div class="bottom-title">
          <img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/icon.png" />
          <h2>网格动态</h2>
        </div>
        <div class="bottom-list">
          <div class="item" v-for="(item, index) in 3" :key="index">
            <i>07/19 09:45</i>
            <span>书院社区-张三 </span>
            <em>添加居民"</em>
            <span>蓝天白云</span>
            <em>"为好友</em>
          </div>
        </div>
      </div>
    </div>
    <div class="right">
      <div class="appPdDv-title">网格信息</div>
      <div class="right-item top-wrapper">
        <div class="title">"星"网格</div>
        <div class="item-wrapper">
          <div class="item-top__item">
            <h2>925</h2>
            <p>微网格长</p>
          </div>
          <div class="item-top__item">
            <h2>925</h2>
            <p>微网格长</p>
          </div>
          <div class="item-top__item">
            <h2>925</h2>
            <p>微网格长</p>
          </div>
          <div class="item-top__item">
            <h2>925</h2>
            <p>微网格长</p>
          </div>
        </div>
      </div>
      <div class="right-item middle-wrapper">
        <div class="title">居民群统计</div>
        <div class="item-table">
          <div class="item-table__header">
            <span style="width: 110px">居民群</span>
            <span style="flex: 1; text-align: center;">群主</span>
            <span style="width: 60px; text-align: right;">群人数</span>
          </div>
          <div class="item-table__body">
            <div class="item-table__item" v-for="(item, index) in 4" :key="index">
              <span style="width: 110px">XX网格居民群</span>
              <span style="flex: 1; text-align: center;">王磊</span>
              <span style="width: 60px; text-align: right;">150</span>
            </div>
          </div>
        </div>
      </div>
      <div class="right-item bottom-wrapper">
        <div class="title">积分排行</div>
        <div class="item-wrapper">
          <div class="tab">
            <div :class="[rightIndex === 0 ? 'active' : '']">累计积分榜</div>
            <div :class="[rightIndex === 1 ? 'active' : '']">上周积分榜</div>
          </div>
          <div class="tab-content">
            <div class="tab-item" v-for="(item, index) in 5" :key="index">
              <div class="left" :class="'left'+ index">{{ index + 1 }}</div>
              <div class="middel">
                <div class="top">
                  <h2>王磊</h2>
                  <span>网格长</span>
                </div>
                <p></p>
              </div>
              <i>433</i>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'AppPdDv',

    label: '微网实格',

    data () {
      return {
        leftIndex: 0,
        rightIndex: 0
      }
    }
  }
</script>

<style lang="scss" scoped>
  .AppPdDv {
    display: flex;
    height: 100%;
    background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/bg.png);
    background-size: 100% 100%;

    * {
      box-sizing: border-box;
    }

    .appPdDv-title {
      position: absolute;
      top: 0;
      left: 10px;
      z-index: 1;
      width: 146px;
      height: 40px;
      line-height: 40px;
      padding-left: 10px;
      font-family: YouSheBiaoTiHei;
      color: #FFFFFF;
      font-weight: bold;
      transform: translateY(-50%);
      background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/b-title__bg.png);
      background-size: 100% 100%;
    }

    .title {
      width: 154px;
      height: 42px;
      padding: 4px 0 0 34px;
      color: #fff;
      font-size: 16px;
      background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/title.png);
      background-size: 100% 100%;
    }

    & > .left {
      position: relative;
      width: 360px;
      height: 100%;
      padding: 36px 12px 12px;
      box-shadow: inset 0px 0px 5px 0px #D5E6FF;
      border-radius: 8px;
      border: 1px solid #030D1C;

      .tab {
        display: flex;
        align-items: center;
        height: 32px;
        margin-bottom: 15px;
        border: 1px solid #0E6EB5;

        div {
          flex: 1;
          line-height: 32px;
          text-align: center;
          color: #fff;
          font-size: 14px;
          cursor: pointer;
          user-select: none;

          &.active {
            background: #0F93B8;
          }
        }
      }

      .item-tags {
        margin-top: 20px;

        .item-bottom__item {
          display: flex;
          align-items: center;
          justify-content: space-between;
          width: 100%;
          height: 36px;
          padding: 0 20px 0 39px;
          background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/tag-title.png);
          background-size: 100% 100%;

          h2 {
            color: #aeacaf;
            font-size: 13px;
          }

          span {
            color: #FFFFFF;
            font-size: 16px;
            font-weight: bold;
          }
        }
      }
    }

    & > .middle {
      display: flex;
      flex-direction: column;
      flex: 1;
      height: 100%;
      margin: 0 16px;

      .top {
        flex: 1;
      }

      .bottom {
        width: 100%;
        height: 160px;
        padding: 20px 24px;
        background: rgba(15,20,47,0.5000);
        box-shadow: inset 0px 0px 24px 4px rgba(163,247,255,0.7000);
        border-radius: 8px;

        .bottom-title {
          display: flex;
          align-items: center;
          margin-bottom: 10px;

          h2 {
            margin-left: 4px;
            font-size: 16px;
            font-family: MicrosoftYaHeiSemibold;
            color: #FFFFFF;
            text-shadow: 0px 0px 10px #1C2F92;
          }
        }

        .bottom-list {
          height: 80px;
          overflow-y: auto;

          .item {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
            font-size: 14px;

            &:last-child {
              margin-bottom: 0;
            }

            i {
              margin-right: 24px;
              color: #aeacaf;
              font-style: normal;
              font-size: 14px;
            }

            span {
              color: #FFD458;
            }

            em {
              font-style: normal;
              color: #2CF0F4;
            }
          }
        }
      }
    }

    & > .right {
      position: relative;
      width: 360px;
      height: 100%;
      padding: 36px 12px 12px;
      box-shadow: inset 0px 0px 5px 0px #D5E6FF;
      border-radius: 8px;
      border: 1px solid #030D1C;

      .top-wrapper {
        margin-bottom: 23px;

        .item-wrapper {
          display: flex;
          align-items: center;

          .item-top__item {
            display: flex;
            align-items: center;
            flex-direction: column;
            justify-content: center;
            flex: 1;
            margin-right: 8px;
            width: 78px;
            height: 66px;
            border-radius: 4px;
            border: 1px solid #23A0AC;

            h2 {
              margin-bottom: 4px;
              color: #fff;
              font-size: 20px;
            }

            p {
              color: #2AF0F8;
              font-size: 12px;
            }

            &:last-child {
              margin-right: 0;
            }
          }
        }
      }

      .middle-wrapper {
        margin-bottom: 23px;

        .item-table {
          .item-table__header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 40px;
            padding: 0 24px;
            color: #82C5FF;
            font-size: 14px;
            background: rgba(35,160,172,0.2000);
          }

          .item-table__body {
            .item-table__item {
              display: flex;
              align-items: center;
              justify-content: space-between;
              height: 40px;
              padding: 0 24px;
              color: #fff;
              font-size: 14px;
              background: rgba(35,160,172,0.2000);

              &:nth-of-type(2n - 1) {
                background: transparent;
              }
            }
          }
        }
      }

      .bottom-wrapper {
        .tab {
          display: flex;
          align-items: center;
          height: 32px;
          margin-bottom: 15px;
          border: 1px solid #0E6EB5;

          div {
            flex: 1;
            line-height: 32px;
            text-align: center;
            color: #fff;
            font-size: 14px;
            cursor: pointer;
            user-select: none;

            &.active {
              background: #0F93B8;
            }
          }
        }

        .tab-content {
          .tab-item {
            display: flex;
            align-items: center;
            margin-bottom: 8px;

            &:last-child {
              margin-bottom: 0;
            }

            .left {
              width: 22px;
              height: 24px;
              line-height: 24px;
              text-align: center;
              color: #fff;
              font-size: 14px;
              background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/right-icon3.png);
              background-size: 100% 100%;

              &.left0 {
                background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/right-icon1.png);
                background-size: 100% 100%;
              }

              &.left1 {
                background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/right-icon2.png);
                background-size: 100% 100%;
              }
            }

            i {
              position: relative;
              color: #fff;
              font-size: 12px;
              font-style: normal;
              transform: translateY(50%);
            }

            .middel {
              width: 250px;
              margin: 0 8px;

              p {
                width: 100%;
                height: 8px;
                background: linear-gradient(270deg, #51BF34 0%, #257718 100%);
                border: 1px solid;
                border-image: linear-gradient(270deg, rgba(96, 255, 99, 1), rgba(13, 156, 17, 1)) 1 1;
              }

              .top {
                display: flex;
                align-items: center;
                margin-bottom: 4px;

                h2 {
                  margin-right: 4px;
                  color: #FFFFFF;
                  font-size: 14px;
                }

                span {
                  width: 48px;
                  height: 20px;
                  line-height: 20px;
                  text-align: center;
                  color: #2AF0F8;
                  font-size: 12px;
                  background: linear-gradient(180deg, rgba(69,210,218,0.2500) 0%, rgba(69,210,218,0.1000) 100%);
                  border: 1px solid;
                  border-image: linear-gradient(180deg, rgba(5, 185, 203, 1), rgba(73, 214, 207, 1)) 1 1;
                }
              }
            }
          }
        }
      }
    }
  }
</style>
