InactiveMerchant.vue 2.09 KB
<template>
  <div>
    <div class="bill-total-box">
      <box-title title="停业门店数"></box-title>
      <div v-if="inactiveMerchantData.length" class="content-box">
        <div class="text-box">
          <div class="text">停业门店数</div>
          <div class="number-text">{{ numAddSymbol(totalInactiveMerchant) }}</div>
        </div>
        <RightViewContent :chart="inactiveMerchantChart" :listData="inactiveMerchantData" :legentList="inactiveMerchantLegend" :legendColors="inactiveMerchantChart.colors"></RightViewContent>
      </div>
      <div v-else class="empty">
        <Empty></Empty>
      </div>
    </div>
  </div>
</template>

<script>
import RightViewContent from '../../solar/RightViewContent.vue'
export default {
  name: 'InactiveMerchant',
  components: {
    RightViewContent
  },
  props: {
    inactiveMerchantData: {
      type: Array,
      default: () => []
    },
    totalInactiveMerchant: Number
  },
  data() {
    return {
      inactiveMerchantChart: {
        id: 'inactiveMerchant',
        keys: ['name', 'num'],
        height: '6vh',
        colors: ['#EBA3FF', '#726BFF'],
        formatter: 'none'
      },
      inactiveMerchantLegend: [
        {
          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>