| | |
| | | <!-- <div> |
| | | <el-text type="primary" size="large" tag="b">动态溯源</el-text> |
| | | </div> --> |
| | | <el-scrollbar ref="scrollbarRef" :height="height" class="scrollbar"> |
| | | <el-row ref="scrollContentRef"> |
| | | <div |
| | | <el-scrollbar ref="scrollbarRef" class="scrollbar"> |
| | | <div |
| | | ref="scrollContentRef" |
| | | style="display: flex; width: fit-content" |
| | | > |
| | | <el-scrollbar |
| | | v-for="(item, index) in streams" |
| | | :key="index" |
| | | class="clue-card" |
| | | > |
| | | <el-row> |
| | | <el-row justify="space-between"> |
| | | <!-- <el-tag v-if="index == 0" type="danger">最新</el-tag> --> |
| | | <el-text type="primary">{{ |
| | | '线索时间:' + |
| | |
| | | ' - ' + |
| | | item.pollutedData.endTime |
| | | }}</el-text> |
| | | <el-link |
| | | type="primary" |
| | | :underline="true" |
| | | @click="showMarksAndPolygon(item)" |
| | | > |
| | | {{ item.showMore ? '收起异常' : '定位异常' }} |
| | | </el-link> |
| | | </el-row> |
| | | <div> |
| | | <el-text type="primary"> |
| | |
| | | }} |
| | | </el-text> |
| | | </div> |
| | | <el-row> |
| | | <el-row style="border-top: 1px solid white"> |
| | | <el-col :span="6"> |
| | | <el-statistic |
| | | title="突变因子" |
| | |
| | | ')' |
| | | }} |
| | | </el-link> --> |
| | | <el-link |
| | | type="primary" |
| | | underline |
| | | @click="showMarksAndPolygon(item)" |
| | | > |
| | | {{ item.showMore ? '收起异常' : '定位异常' }} |
| | | </el-link> |
| | | </el-row> |
| | | <div style="width: 320px; height: 140px"> |
| | | <RealTimeLineChart |
| | |
| | | :key="index1" |
| | | :model-value="item1" |
| | | ></RealTimeLineChart> |
| | | </div> |
| | | <div class="border-dashed"> |
| | | <el-text type="" tag="mark"> |
| | | {{ item.pollutedSource.conclusion }} |
| | | </el-text> |
| | | </div> |
| | | <SceneTable |
| | | :show-marks="item.showMore" |
| | |
| | | :scene-list="item.relatedSceneList" |
| | | ></SceneTable> |
| | | <el-divider /> --> |
| | | </div> |
| | | </el-row> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-scrollbar> |
| | | </template> |
| | | </BaseCard> |
| | |
| | | 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"; |
| | | |
| | | |
| | | import websocketMsgParser from '@/views/sourcetrace/websocketMsgParser.js'; |
| | | |
| | | const props = defineProps({ |
| | | factorType: String |
| | |
| | | |
| | | const emits = defineEmits(['update:factorType']); |
| | | |
| | | const height = `48vh`; |
| | | const height = `30vh`; |
| | | const width = `60vh`; |
| | | |
| | | const show = ref(false); |
| | |
| | | |
| | | let showFirstClueTask; |
| | | function dealMsg(data) { |
| | | const {type, content} = websocketMsgParser.parseMsg(data) |
| | | const { type, content } = websocketMsgParser.parseMsg(data); |
| | | |
| | | // 污染线索 PollutedClue |
| | | if (type == '1') { |
| | |
| | | if (streams.length == 0) { |
| | | streams.push(obj); |
| | | } else { |
| | | streams.forEach((s) => { |
| | | s.showMore = false; |
| | | }); |
| | | // streams.forEach((s) => { |
| | | // showMarksAndPolygon(s); |
| | | // }); |
| | | hideAll(); |
| | | streams.unshift(obj); |
| | | show.value = true; |
| | | } |
| | | show.value = true; |
| | | |
| | | // scrollToBottom(); |
| | | scrollToTop(); |
| | |
| | | // } |
| | | }); |
| | | |
| | | function hideAll() { |
| | | streams.forEach((s) => { |
| | | if (polygonMap.has(s.guid)) { |
| | | s.showMore = false; |
| | | map.remove(polygonMap.get(s.guid)); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function showMarksAndPolygon(item) { |
| | | item.showMore = !item.showMore; |
| | | if (item.showMore) { |
| | | hideAll(); |
| | | item.showMore = true; |
| | | drawPolygon(item); |
| | | } else { |
| | | if (polygonMap.has(item.guid)) { |
| | |
| | | }); |
| | | polygonMap.set(item.guid, pollutedAreaPolygon); |
| | | } |
| | | map.setFitView(polygonMap.get(item.guid)); |
| | | // map.setFitView(polygonMap.get(item.guid)); |
| | | } |
| | | |
| | | function parseChartData(obj) { |
| | | console.log('折线图:start'); |
| | | // console.log('折线图:start'); |
| | | const factorDatas = new FactorDatas(); |
| | | factorDatas.setData(obj.pollutedData.dataVoList, 0, () => { |
| | | obj._chartOptions = factorDataParser.parseData(factorDatas, [ |
| | |
| | | value: obj.pollutedData.factorId + '' |
| | | } |
| | | ]); |
| | | console.log('折线图:', obj._chartOptions); |
| | | // console.log('折线图:', obj._chartOptions); |
| | | }); |
| | | } |
| | | |
| | |
| | | --el-statistic-content-color: white; |
| | | } |
| | | |
| | | :deep(.el-text) { |
| | | :deep(.el-text.el-text--primary) { |
| | | --el-text-color: white; |
| | | } |
| | | |
| | |
| | | .scrollbar { |
| | | min-width: 300px; |
| | | max-width: 60vw; |
| | | /* height: 35vh; */ |
| | | /* color: #02ffea; */ |
| | | } |
| | | |
| | | .clue-card { |
| | | padding: 0 4px; |
| | | margin-right: 2px; |
| | | width: 320px; |
| | | border: 1px solid white; |
| | | /* margin-right: 2px; */ |
| | | width: 340px; |
| | | height: 35vh; |
| | | border-right: 1px solid white; |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .border-dashed { |
| | | /* border: 1px dashed white; */ |
| | | border: 1px dashed #ffbc58; |
| | | padding: 0px 1px; |
| | | margin-bottom: 4px; |
| | | } |
| | | </style> |