Riku
2025-06-04 d0f07e25103d7c7845c3b9534e8c66b5905447c0
src/views/sourcetrace/SourceTrace.vue
@@ -74,7 +74,7 @@
                  </el-col>
                </el-row>
                <el-row justify="space-between">
                  <el-link
                  <!-- <el-link
                    type="primary"
                    underline
                    @click="showMarksAndPolygon(item)"
@@ -85,16 +85,16 @@
                      item.pollutedSource.sceneList.length +
                      ')'
                    }}
                  </el-link>
                  <!-- <el-link
                  </el-link> -->
                  <el-link
                    type="primary"
                    underline
                    @click="drawPolygon(item.pollutedArea)"
                    @click="showMarksAndPolygon(item)"
                  >
                    定位异常
                  </el-link> -->
                    {{ item.showMore ? '收起异常' : '定位异常' }}
                  </el-link>
                </el-row>
                <div v-show="item.showMore" style="width: 320px; height: 140px">
                <div style="width: 320px; height: 140px">
                  <RealTimeLineChart
                    v-for="(item1, index1) in item._chartOptions"
                    :key="index1"
@@ -102,7 +102,6 @@
                  ></RealTimeLineChart>
                </div>
                <SceneTable
                  v-show="item.showMore"
                  :show-marks="item.showMore"
                  :scene-list="item.pollutedSource.sceneList"
                ></SceneTable>
@@ -179,10 +178,9 @@
import { map, onMapMounted } from '@/utils/map/index_old';
import { FactorDatas } from '@/model/FactorDatas';
import factorDataParser from '@/utils/chart/factor-data-parser';
import websocketMsgParser from "@/views/sourcetrace/websocketMsgParser.js";
const START_STR = '##';
const SPLIT_STR = '&&';
const END_STR = '%%';
const props = defineProps({
  factorType: String
@@ -219,9 +217,7 @@
let showFirstClueTask;
function dealMsg(data) {
  const [type, content] = data
    .substring(START_STR.length, data.length - END_STR.length)
    .split(SPLIT_STR);
  const {type, content} = websocketMsgParser.parseMsg(data)
  // 污染线索 PollutedClue
  if (type == '1') {
@@ -251,11 +247,6 @@
    showFirstClueTask = setTimeout(() => {
      showMarksAndPolygon(obj);
    }, 1000);
  }
  // 污染分析结果 AnalysisResult
  else if (type == '2') {
    const obj = JSON.parse(content);
    console.log('污染分析结果: ', obj);
  }
}