riku
2025-04-11 5e059c9c17a6d63b6c017d2d2beb25ae227071d1
src/views/underwaymix/UnderwayMixMode.vue
@@ -57,7 +57,7 @@
                  v-model="selectedPollutionDegree"
                  multiple
                  clearable
                  placeholder="选择背景"
                  placeholder="选择污染背景"
                  size="small"
                  style="width: 300px"
                >
@@ -154,6 +154,7 @@
                class="el-button-custom"
                size="small"
                @click="handleMixClick"
                :disabled="selectedfusionData.length < 2"
              >
                {{ '融合分析' }}
              </el-button>
@@ -231,6 +232,8 @@
// 走航融合数据
const fusionLoading = ref(false);
const fusionDataList = ref([]);
const lastSelectedfusionData = ref([]);
const selectedfusionData = ref([]);
const tableRef = ref();
const selectable = (row) => gridCellList.value;
@@ -482,59 +485,17 @@
let mixTag;
function handleMixClick() {
  // mixActive.value = !mixActive.value;
  const tags = selectedfusionData.value.map((v) => v.id);
  satelliteGrid.changeVisibility({
    showGridViews: false,
    showDataTxt: false,
    showRankTxt: false
  });
  // if (mixActive.value) {
  gridApi.mixUnderwayGridData(props.groupId, tags).then((res) => {
    mixTag = satelliteGrid.mixGrid2({ tags, gridDataDetailList: res.data });
    satelliteGrid.setDefaultGridClickEvent([mixTag]);
    gridCtrls.value = [satelliteGrid];
  });
  // satelliteGrid.setGridEvent([mixTag], 'click', (gridCell, gridDataDetail) => {
  //   gridStore.selectedGridCellAndDataDetail = {
  //     gridCell,
  //     gridDataDetail
  //   };
  // });
  // gridCtrls.value = [satelliteGrid];
  // } else {
  // satelliteGrid.changeVisibility({
  //   tags,
  //   showGridViews: true
  // });
  // }
}
let heatTag;
const heatMapSearchLength = 4;
function handleHeatMapClick() {
  heatActive.value = !heatActive.value;
  satelliteGrid.changeVisibility({
    showGridViews: false,
    showDataTxt: false,
    showRankTxt: false
  });
  if (heatActive.value) {
    const data = satelliteGrid.gridDataDetailMap.get(mixTag);
    gridApi
      .buildUnderwayHeatmap(props.groupId, data, heatMapSearchLength)
      .then((res) => {
        heatTag = satelliteGrid.drawHeatGrid2(mixTag, res.data);
        satelliteGrid.setDefaultGridClickEvent([heatTag]);
        gridCtrls.value = [satelliteGrid];
      });
  } else {
    satelliteGrid.changeVisibility({
      tags: [mixTag],
      showGridViews: true
    });
  }
}
function handleHeatMapSearchClick() {
@@ -571,21 +532,24 @@
function handleFusionDelete(index, tag) {
  const f = selectedfusionData.value.find((v) => v.id == tag);
  if (f) {
    // const i = selectedfusionData.value.indexOf(f);
    // selectedfusionData.value.splice(i, 1);
    const i = selectedfusionData.value.indexOf(f);
    selectedfusionData.value.splice(i, 1);
    lastSelectedfusionData.value = useCloned(
      selectedfusionData.value
    ).cloned.value;
    tableRef.value.toggleRowSelection(f, false);
  }
}
function handleSelectionChange(val) {
  console.log(val);
  // console.log(val);
  const deleted = selectedfusionData.value.filter((v) => {
  const deleted = lastSelectedfusionData.value.filter((v) => {
    return !val.find((t) => t.id == v.id);
  });
  const deletedIdList = deleted.map((d) => d.id);
  const added = val.filter((v) => {
    return !selectedfusionData.value.find((t) => t.id == v.id);
    return !lastSelectedfusionData.value.find((t) => t.id == v.id);
  });
  if (val.length > 4) {
@@ -658,7 +622,8 @@
    }
  });
  selectedfusionData.value = useCloned(val).cloned.value;
  lastSelectedfusionData.value = useCloned(val).cloned.value;
  selectedfusionData.value = val;
}
/**走航轨迹*******************************************************************/