1
wangjuncheng
2025-05-23 5ad5f4caf07ec82bc6fb24fc94282e3ad59b3261
src/views/mnfz.vue
@@ -12,7 +12,9 @@
    :waterSimulateParams="waterSimulateParams"
    @playbackFinished="playbackFinished"
    @end="endSimulate"
    @isColorRender="isColorRender"
  />
  <LegendMNFZ class="legend" v-if="isShowLegend"></LegendMNFZ>
  <DebuffDetail
    v-if="showDebuffDetail"
    @open="openDetail"
@@ -25,6 +27,7 @@
import { EventBus } from "@/eventBus"; // 引入事件总线
import { ref, onMounted, onUnmounted, provide } from "vue";
import TimeLine from "@/components/menu/TimeLine.vue";
import LegendMNFZ from "@/components/tools/Legend_mnfz.vue";
import Left from "./left/Left.vue";
import echartInfo from "@/components/monifangzhen/echartInfo.vue";
import DebuffDetail from "@/components/tools/DebuffDetail.vue";
@@ -49,6 +52,7 @@
const showDebuffTable = ref(false);
const isDynamicMode = ref(false);
const isFinish = ref(true);
const isShowLegend = ref(false);
const treeMap = new Map();
@@ -70,8 +74,8 @@
  clearTrailLine();
  removeEmergencyPoints();
  removeDataSources();
  showWaterSimulate.value = false;
  setTimeout(() => {
    showWaterSimulate.value = false;
    isDynamicMode.value = false;
    // 清除威胁对象表格内容
    EventBus.emit("reset-table");
@@ -203,15 +207,99 @@
  }
}
// 虚线避险路线
//   const position1 = [
//     {
//       x: -2172867.1941179745,
//       y: 4339567.67446477,
//       z: 4125575.4386990573,
//     },
//     {
//       x: -2172867.1941179745,
//       y: 4339567.67446477,
//       z: 4125575.4386990573,
//     },
//     {
//       x: -2172700.396781143,
//       y: 4339454.037139385,
//       z: 4125736.906847591,
//     },
//     {
//       x: -2172744.4001612393,
//       y: 4339361.421455601,
//       z: 4125804.324253885,
//     },
//     {
//       x: -2172824.3311673277,
//       y: 4339274.56533081,
//       z: 4125844.432999503,
//     },
//     {
//       x: -2172822.298957661,
//       y: 4339226.700024104,
//       z: 4125896.451233209,
//     },
//     {
//       x: -2172776.0573917977,
//       y: 4339194.843872361,
//       z: 4125947.9581145854,
//     },
//     {
//       x: -2172755.2828807314,
//       y: 4339149.410126468,
//       z: 4125995.9286539108,
//     },
//     {
//       x: -2172660.9533022284,
//       y: 4339085.401362197,
//       z: 4126101.3750262205,
//     },
//     {
//       x: -2172613.460204307,
//       y: 4339073.342332504,
//       z: 4126134.479399525,
//     },
//     {
//       x: -2172583.664140033,
//       y: 4339085.533980615,
//       z: 4126140.3272964833,
//     },
//     {
//       x: -2172348.977405535,
//       y: 4338967.122025027,
//       z: 4126358.7532469626,
//     },
//     {
//       x: -2172276.019363938,
//       y: 4338943.999121099,
//       z: 4126416.339696519,
//     },
//     {
//       x: -2172178.064812976,
//       y: 4338928.9482959965,
//       z: 4126475.798078439,
//     },
//     {
//       x: -2172171.5451145098,
//       y: 4338941.186930828,
//       z: 4126466.425301899,
//     },
//     {
//       x: -2172177.9565195283,
//       y: 4338940.424956708,
//       z: 4126463.8688932694,
//     },
//   ];
///////////////////////////// 流光线避险路线/////////////////////////////
let pathLayer = null; // 存储创建的图层
function showLine() {
  // 创建新图层
  pathLayer = earthCtrl.factory.createPathLayer({
    url: "/json/line.json",
    color: "#008500",
    color: "#00FF00",
    width: 12.0,
    pointColor: "#FFFFFF",
    pointColor: "#FFFF73",
    speed: 2,
    far: 50000,
  });
@@ -423,7 +511,6 @@
///////////////////////////// 箭头版避险路线/////////////////////////////
function timeUpdate(percentage) {
  console.log(percentage, "ppppppppppp");
  if (percentage > 99.9) {
    if (showDebuffDetail.value) {
      return;
@@ -454,6 +541,10 @@
function playbackFinished(val) {
  isFinish.value = val;
}
function isColorRender(val){
  // console.log('这里打印是否显示水位图例的值:',val);
  isShowLegend.value = val
}
// 定义全局变量存储当前正在闪动的面片
let flashingPolygon = null;
@@ -562,4 +653,12 @@
</script>
<style lang="less" scoped>
@import url("../assets/css/home.css");
.legend {
   // background: url("@/assets/img/right/rightbg.png");
   color: white;
   position: fixed;
   bottom: 6%;
   right: 20%;
   z-index: 3333;
}
</style>