CustomerRanking.vue 2.25 KB

   <template>
  <div class="store-ranking-wrap">
    <template v-if="staffDistributionVOList.length > 0">
      <div class="store-rank-inline flex" v-for="i in staffDistributionVOList" :key="i.id">
        <div class="customers-portrait">
          <template v-if="i.staffId != -1&&i.thumbAvatar">
            <img :src="i.thumbAvatar" alt="" />
          </template>
          <template v-else>
            <img src="@/assets/images/general.png" alt="" />
          </template>
        </div>
        <div>
          <div class="gray-text staffName">{{ i.staffName }}</div>
          <div class="text-message">占{{ (i.newlyQyRatio * 100).toFixed(0) }}%</div>
        </div>
        <div class="gray-text location">
          新增
          <span>{{ i.newlyQyCount }}</span>
          位客户
        </div>
      </div>
    </template>
    <template v-else>
      <Empty></Empty>
    </template>
  </div>
</template>
    <script type='text/ecmascript-6'>
import { mapState } from 'vuex'
export default {
  name: 'CustomerRanking',
  data() {
    return {}
  },
  computed: {
    ...mapState({
      tabIndex: state => state.report.tabIndex,
      tabType: state => state.report.tabType,
      userInfo: state => state.report.userInfo,
      staffDistributionVOList: state => state.report.staffDistributionVOList
    })
  },
  mounted() {},
  methods: {}
}
</script>

<style lang='scss' scoped>
.store-ranking-wrap {
  height: auto;
  .store-rank-inline {
    border-bottom: 1px solid #e8e8f2;
    background-color: #fff;
    height: 70px;
    box-sizing: border-box;
    &:last-child {
      border-bottom: 1px solid #ffffff;
    }

    .customers-portrait {
      width: 40px;
      height: 40px;
      margin: 0 15px 0 20px;
      img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
      }
    }
    .text-message {
      margin-top: 2px;
    }
    .staffName {
      width: 120px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
    }
    .gray-text {
      span {
        font-size: 14px;
        font-weight: 500;
        color: #3975c6;
        line-height: 15px;
        margin: 0 7px;
        width: 26px;
      }
    }
    .location {
      position: absolute;
      right: 25px;
    }
  }
}
</style>