SeviceRatio.vue 1.11 KB
Newer Older
姜雷 committed
1 2 3 4 5 6 7 8 9 10 11 12 13
<template>
  <div class="Dashboard-DataCard">
    <div class="Dashboard-title">
      <div class="Dashboard-title-icon service">
        <img src="@/assets/images/dashboard/icon_zhanbi@2x.png" />
      </div>
      <div class="Dashboard-title-text">各服务消费占比</div>
      <div class="Dashboard-title-top">TOP1</div>
    </div>
    <SeviceRatioChart
      :data="seviceRatioList"
      :changeServiceHandle="changeServiceHandle"
    />
姜雷 committed
14
    <div class="SeviceRatio-title">{{areaName}}</div>
姜雷 committed
15 16 17 18 19 20 21 22 23 24
  </div>
</template>

<script>
import SeviceRatioChart from './SeviceRatioChart';
import { mapActions, mapGetters } from 'vuex';
export default {
  name: 'SeviceRatio',
  components: { SeviceRatioChart },
  computed: {
姜雷 committed
25
    ...mapGetters('Dashboard', ['seviceRatioList', 'areaName']),
姜雷 committed
26 27 28 29 30 31 32 33 34 35 36 37
  },
  methods: {
    ...mapActions('Dashboard', ['fetchConsumeList']),
    changeServiceHandle(data) {
      this.fetchConsumeList({
        serviceId: data.serviceId,
        updateEuipmentList: true,
      });
    },
  },
};
</script>
姜雷 committed
38 39 40 41 42 43 44 45

<style lang="scss">
.SeviceRatio-title {
  font-size: 16px;
  text-align: center;
  padding-bottom: 12px;
}
</style>