riku
2025-05-08 6f7bbdd390abdcdb2cdaef980bc69816a3ff2202
src/views/historymode/HistoryMode.vue
@@ -8,6 +8,13 @@
        @search="onSearch"
      ></SearchBar>
      <TrajectoryState v-show="status != 0" :status="status"></TrajectoryState>
      <el-button
        type="primary"
        class="p-events-auto el-button-custom"
        @click="handleClick"
      >
        分析
      </el-button>
    </el-row>
    <el-row class="m-t-2">
      <FactorRadio
@@ -64,6 +71,7 @@
import DataSheet from './component/DataSheet.vue';
import { ElMessage } from 'element-plus';
import { fetchHistoryData } from '@/utils/factor/data';
import dataAnalysisApi from '@/api/dataAnalysisApi';
import { mapStores } from 'pinia';
import { useSceneStore } from '@/stores/scene';
@@ -196,9 +204,10 @@
      });
    },
    onSearch(option) {
      const { deviceType, deviceCode, timeArray } = option;
      const { deviceType, deviceCode, timeArray, mission } = option;
      this.deviceType = deviceType;
      this.deviceCode = deviceCode;
      this.mission = mission;
      let startTime, endTime;
      if (timeArray && timeArray.length == 2) {
        startTime = moment(timeArray[0]).format('YYYY-MM-DD HH:mm:ss');
@@ -214,6 +223,19 @@
          perPage: pageSize
        }).then((res) => this.onFetchData(deviceType, res.data));
      });
    },
    handleClick() {
      const { missionCode } = this.mission;
      dataAnalysisApi.pollutionTrace(missionCode).then((res) => {
        res.data.forEach((e) => {
          const fDatas = new FactorDatas();
          fDatas.setData(e.dataVoList, this.drawMode, () => {
            fDatas.refreshHeight(this.factorType);
            Layer.drawHighLight3DLayer(fDatas, fDatas.factor[this.factorType]);
            console.log(e.dataVoList);
          });
        });
      });
    }
  },
  mounted() {