TotalMerchant.vue 2.09 KB
<template>
  <div>
    <div class="bill-total-box">
      <box-title title="提单门店数"></box-title>
      <div v-if="totalMerchantData.length" class="content-box">
        <div class="text-box">
          <div class="text">提单门店数</div>
          <div class="number-text">{{ numAddSymbol(totalMerchant) }}</div>
        </div>
        <RightViewContent
          :chart="totalMerchantChart"
          :listData="totalMerchantData"
          :legentList="totalMerchantLegend"
          :legendColors="totalMerchantChart.colors"
        ></RightViewContent>
      </div>
      <div v-else class="empty">
        <Empty></Empty>
      </div>
    </div>
  </div>
</template>

<script>
import RightViewContent from '../../solar/RightViewContent.vue'
export default {
  name: 'TotalMerchant',
  components: {
    RightViewContent
  },
  props: {
    totalMerchantData: {
      type: Array,
      default: () => []
    },
    totalMerchant: Number
  },
  data() {
    return {
      totalMerchantChart: {
        id: 'totalMerchant',
        keys: ['name', 'num'],
        height: '6vh',
        colors: ['#EBA3FF', '#726BFF'],
        formatter: 'none'
      },
      totalMerchantLegend: [
        {
          name: 'name',
          width: '7vw'
        },
        {
          name: 'num',
          type: 'number',
          width: '5vw'
        }
      ]
    }
  },

  mounted() {},

  methods: {}
}
</script>

<style lang="scss" scoped>
.bill-total-box {
  width: 47.78vw;
  height: 13vh;
  box-shadow: inset 0 0 20px 0 #3d57ff69;
  .content-box {
    display: flex;
    padding: 1.03vh 0 0 2.92vw;
    .text-box {
      // margin-right: 3.75vw;
      width: 13.75vw;
      .text {
        font-weight: 500;
        font-size: 14px;
        color: #ffffff;
      }
      .number-text {
        font-weight: 600;
        font-size: 20px;
        color: #5894ff;
        background-image: -webkit-linear-gradient(left, #24d8ff, #7787ff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
      }
    }
  }
  .empty {
    height: 8vh;
    display: flex;
    align-items: center;
  }
}
</style>