src/views/historymode/component/TrendAnalysis.vue
@@ -3,10 +3,12 @@
    <Transition name="">
      <el-col v-show="show" span="10">
        <FactorCheckbox
          v-model="selectFactorType"
          :device-type="deviceType"
          @change="(e) => (selectFactorType = e)"
        ></FactorCheckbox>
        <LineChart
          :locate-index="locateIndex"
          @chart-click="handleChartClick"
          :factor-datas="factorDatas"
          :select-factor-type="selectFactorType"
        ></LineChart>
@@ -32,13 +34,21 @@
    deviceType: {
      type: String
    },
    factorDatas: FactorDatas
    factorDatas: FactorDatas,
    // 当前选中高亮的数据点索引
    locateIndex: Number
  },
  data() {
    return {
      selectFactorType: ['1'],
      show: true
    };
  },
  emits: ['chartClick'],
  methods: {
    handleChartClick(index) {
      this.$emit('chartClick', index);
    }
  }
};
</script>