<!--
 * @Author: zhp
 * @Date: 2024-05-14 08:48:34
 * @LastEditTime: 2024-05-17 09:42:41
 * @LastEditors: zhp
 * @Description:
-->

<!--
    filename: NatGas.vue
    author: liubin
    date: 2024-04-29 16:36:27
    description: 天然气能耗
-->

<template>
  <BarChartBase
    :series="series"
    :xAxis="xAxis"
    in="nat-gas"
    class="nat-gas"
  />
</template>

<script>
import BarChartBase from "@/views/copilot/components/gasBarChartBase.vue";

export default {
  name: "NatGasCost",
  components: { BarChartBase },
  props: {
    period: {
      type: String,
      default: "日",
    },
  },
  data() {
    // 城市数组的顺序必须是固定的
    const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
    return {
      // series: [],
      xAxis: cities,
    };
  },
  // watch: {
  //   period() {
  //     this.series = this.$store.getters.copilot.energy.stockDOData;
  //   }
  // },
  computed: {
    series() {
      console.log('this.$store.getters.copilot.energy.gasList', this.$store.getters.copilot.energy.gasList);
      return this.$store.getters.copilot.energy.gasList;
      // let dataList = null;
      // let  dataList = gasList
      // switch (this.period) {
      //   case "日":
      //   case "周":
      //     dataList = ftoInvest?.current;
      //     break;
      //   default:
      //     dataList = [];
      //     dataList[0] = ftoInvest?.pervious;
      //     dataList[1] = ftoInvest?.current;
      // }

      // return gasList
    },
  },
  methods: {},
};
</script>

<style scoped lang="scss">
.nat-gas {
  flex: 1;
}
</style>
