From 419fe50acad4674f50c6639b3ec7ccbcaf2cbf44 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 20 三月 2025 17:43:49 +0800 Subject: [PATCH] 走航融合(待完成) --- src/views/underwaymix/UnderwayMixMode.vue | 95 +++++++++++++++++++++++++++++++++++------------ 1 files changed, 70 insertions(+), 25 deletions(-) diff --git a/src/views/underwaymix/UnderwayMixMode.vue b/src/views/underwaymix/UnderwayMixMode.vue index 3d690d3..3d321e7 100644 --- a/src/views/underwaymix/UnderwayMixMode.vue +++ b/src/views/underwaymix/UnderwayMixMode.vue @@ -51,8 +51,16 @@ @change="handleMixClick" > </CheckButton> + <CheckButton + :disabled="!mixActive" + active-text="椋庨櫓鐑姏鍥�" + inactive-text="椋庨櫓鐑姏鍥�" + :default-value="false" + @change="handleHeatMapClick" + > + </CheckButton> </el-row> - <div class="m-t-8">缃戞牸瑕佺礌</div> + <!-- <div class="m-t-8">缃戞牸瑕佺礌</div> <el-row class="m-t-8"> <CheckButton active-text="鏄剧ず缃戞牸" @@ -99,7 +107,6 @@ </el-row> <div class="m-t-8">璧拌埅瑕佺礌</div> <el-row class="m-t-8"> - <!-- <el-divider content-position="left"></el-divider> --> <el-button type="primary" @@ -110,7 +117,7 @@ > {{ underwayVisible ? '闅愯棌璧拌埅璺嚎' : '鏄剧ず璧拌埅璺嚎' }} </el-button> - </el-row> + </el-row> --> </template> <template #footer> </template> </BaseCard> @@ -126,7 +133,10 @@ </el-row> </el-col> </el-row> - <GridStyleTool :gridCtrls="gridCtrls"></GridStyleTool> + <GridStyleTool + :gridCtrls="gridCtrls" + @show-underway="handleUnderwayClick" + ></GridStyleTool> </el-row> <!-- </div> --> </template> @@ -272,12 +282,19 @@ }); if (mixActive.value) { satelliteGrid.mixGrid(tags); + gridCtrls.value = [satelliteGrid]; } else { satelliteGrid.changeVisibility({ tags, showGridViews: true }); } +} + +function handleHeatMapClick() { + const tags = fusionDataList.value + .filter((v, i) => selectedfusionData.value.indexOf(i) != -1) + .map((v) => v.id); } function handleGridClick() { @@ -291,9 +308,18 @@ }); } -function handleUnderwayClick() { +function handleUnderwayClick({ isShow, dataId }) { underwayVisible.value = !underwayVisible.value; - underwayVisible.value ? draw() : mapLine.hideLine(); + + if (isShow) { + draw(dataId); + } else { + const d = fusionDataList.value.find((v) => v.id == dataId); + const mission = missionStore.missionList.find((v) => { + return v.missionCode == d.mixDataId; + }); + mapLine.hideLine(mission.missionCode); + } } function handleRankClick() { @@ -389,30 +415,49 @@ }); } -function draw() { +function draw(dataId) { if (isUnmounted.value) return; - selectedfusionData.value.forEach((i) => { - const d = fusionDataList.value[i]; + // selectedfusionData.value.forEach((i) => { + // const d = fusionDataList.value[i]; - const mission = missionStore.missionList.find((v) => { - return v.missionCode == d.mixDataId; - }); + // const mission = missionStore.missionList.find((v) => { + // return v.missionCode == d.mixDataId; + // }); - if (factorDataMap.has(mission.missionCode)) { - const fd = factorDataMap.get(mission.missionCode); - drawLine(mission.missionCode, fd); - } else { - search(mission).then((res) => { - const fd = new FactorDatas(); - fd.setData(res.data, drawMode.value, () => { - fd.refreshHeight(factorType.value); - factorDataMap.set(mission.missionCode, fd); - drawLine(mission.missionCode, fd); - }); - }); - } + // if (factorDataMap.has(mission.missionCode)) { + // const fd = factorDataMap.get(mission.missionCode); + // drawLine(mission.missionCode, fd); + // } else { + // search(mission).then((res) => { + // const fd = new FactorDatas(); + // fd.setData(res.data, drawMode.value, () => { + // fd.refreshHeight(factorType.value); + // factorDataMap.set(mission.missionCode, fd); + // drawLine(mission.missionCode, fd); + // }); + // }); + // } + // }); + + const d = fusionDataList.value.find((v) => v.id == dataId); + const mission = missionStore.missionList.find((v) => { + return v.missionCode == d.mixDataId; }); + + if (factorDataMap.has(mission.missionCode)) { + const fd = factorDataMap.get(mission.missionCode); + drawLine(mission.missionCode, fd); + } else { + search(mission).then((res) => { + const fd = new FactorDatas(); + fd.setData(res.data, drawMode.value, () => { + fd.refreshHeight(factorType.value); + factorDataMap.set(mission.missionCode, fd); + drawLine(mission.missionCode, fd); + }); + }); + } } function drawLine(missionCode, fd) { -- Gitblit v1.9.3