heat.vue 2.11 KB
<!-- 广场时段客流热力 -->
<!-- 楼层时段客流热力 -->
<template>
  <div>
    <!-- 顶部区域 S-->
    <div class="ipage_top">
      <div class="tit"><img :src="bindIcon('renyuan')" />{{title||chartData.title}}</div>
      <div class="acts"></div>
    </div>
    <div class="ichart">
      <heat-chart ref="chart" :cdata="chartData" tval="heat"></heat-chart>
    </div>
  </div>
</template>

<script>
import mixin from "./mixin";
import mallData from "@/components/Echarts/data";
/**********************************************************/
const chartsConfig = {
  format_association_diagram: {
    //业态关联图
    otherConf: {
      hideVisualMap: true,
      visualColor: ["#6DD9F9", "#ecf9ff"],
    },
  },
  zone_passenger_distribution:{
    otherConf: {
      dateSort: true,
    },   
  },
  period_passenger_distribution:{
    otherConf: {
      dateSort: true,
    }
  },
  mall_period_passenger_flow_heat:{
    otherConf: {
      dateSort: true,
    }, 
  },
  format_association:{
    otherConf: {
      hideVisualMap: true,
      visualColor: ["#6DD9F9", "#ecf9ff"],
    },    
  },
  default: {
    //默认
    otherConf: {
      hideVisualMap: false,
    },
  },
};
/*******************************************************/
export default {
  mixins: [mixin],
  data() {
    return {
      configObj: {},
    };
  },
  created() {
    
  },
  methods: {
    getChartsConfig() {
      return chartsConfig;
    },
    loadChartData(params) {
      this.chartId = this.getChartId(this.ckey);
      if (this.chartId) {
        this.ajaxModuleData().then((data) => {
          this.setChartData(data);
        });
      } else {
        this.setChartData();
      }
    },
    setChartData(data) {
      if (["format_association",'format_association_diagram'].includes(this.ckey)&&data) {
        data = {
          ...data,
          series: data.series.reverse(),
        };
      }
      this.chartData = Object.assign(
        {},
        data /*mallData.body.TimeThermodynamic*/,
        {
          otherConf: this.configObj.otherConf || {},
        }
      );
    },
  },
};
</script>

<style  lang="less">
</style>