| | |
| | | <template #content> |
| | | <div class="content-wrap"> |
| | | <div v-for="(g, i) in gridStore.gridClzList" :key="i"> |
| | | <div> |
| | | <div v-for="(value, key) in g.mapViewsMap" :key="key"> |
| | | {{ value[1].extData.name }} |
| | | <el-text>g.name</el-text> |
| | | </div> |
| | | <el-row> |
| | |
| | | |
| | | getCustomColor: function (data, min, max) { |
| | | var per = (max - min) / this._custom.length; |
| | | var i = parseInt(data / per); |
| | | var i = parseInt((data - min) / per); |
| | | if (i >= this._custom.length) { |
| | | i = this._custom.length - 1; |
| | | } |
| | |
| | | |
| | | const selectedGridCellAndDataDetail = ref(undefined); |
| | | |
| | | return { gridClzList, selectedSatelliteProxy, selectedGridCellAndDataDetail }; |
| | | function pushGridClz(clz) { |
| | | gridClzList.value.push(clz); |
| | | } |
| | | |
| | | return { |
| | | gridClzList, |
| | | selectedSatelliteProxy, |
| | | selectedGridCellAndDataDetail, |
| | | pushGridClz |
| | | }; |
| | | }); |
| | |
| | | import { map, isDragging } from '@/utils/map/index_old'; |
| | | import marks from '@/utils/map/marks'; |
| | | import Layer from '@/utils/map/3dLayer'; |
| | | |
| | | /** |
| | | * 坐标集合的最西南角和最东北角 |
| | |
| | | clearMap() { |
| | | marks.clearMassMarks(); |
| | | map.clearMap(); |
| | | Layer.clear(); |
| | | }, |
| | | setFitView(views) { |
| | | if (views) { |
| | |
| | | import { useCloned } from '@vueuse/core'; |
| | | |
| | | export class SatelliteProxy { |
| | | constructor(name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | // 地图网格相关对象 |
| | | mapViews; |
| | | |
| | | mapViewsList = []; |
| | | |
| | | mapViewsMap = new Map(); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // |
| | | drawGrids({ |
| | | gridDataDetailList, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | }) { |
| | | if (this.mapViewsList.length < gridDataDetailList.length) { |
| | | let index = this.mapViewsList.length; |
| | | while (index < gridDataDetailList.length) { |
| | | const newMapViews = { |
| | | gridViews: gridMapUtil.drawPolylines({ |
| | | points: this.mapViews.gridPoints, |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | }; |
| | | this.mapViewsList.push(newMapViews); |
| | | } |
| | | } |
| | | |
| | | this.mapViewsList.forEach((m, i) => { |
| | | this.drawGrid({ |
| | | gridDataDetail: gridDataDetailList[i], |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt, |
| | | mapViews: m |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | drawNewGrid({ |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | }) { |
| | | const newMapViews = { |
| | | gridViews: gridMapUtil.drawPolylines({ |
| | | points: this.mapViews.gridPoints, |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | }; |
| | | this.mapViewsList.push(newMapViews); |
| | | this.drawGrid({ |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt, |
| | | mapViews: newMapViews |
| | | }); |
| | | } |
| | | drawTagGrid({ |
| | | tag, |
| | | gridDataDetail, |
| | |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | showRankTxt, |
| | | extData |
| | | }) { |
| | | if (!this.mapViewsMap.has(tag)) { |
| | | const newMapViews = { |
| | |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)), |
| | | extData: extData |
| | | }; |
| | | this.mapViewsMap.set(tag, newMapViews); |
| | | } |
| | |
| | | </el-row> --> |
| | | </template> |
| | | <script setup> |
| | | import { map, onMapMounted } from '@/utils/map/index_old'; |
| | | import calculate from '@/utils/map/calculate'; |
| | | import marks from '@/utils/map/marks'; |
| | | import grid from '@/utils/map/grid'; |
| | | |
| | | import { ref, onMounted } from 'vue'; |
| | | import gridApi from '@/api/gridApi'; |
| | | import SatelliteManage from './component/SatelliteManage.vue'; |
| | | import SatelliteDataMix from './component/SatelliteDataMix.vue'; |
| | | import SatelliteMixTool from './component/SatelliteMixTool.vue'; |
| | | import moment from 'moment'; |
| | | import GridStyleTool from './component/GridStyleTool.vue'; |
| | | import { SatelliteProxy } from './SatelliteProxy'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | |
| | | |
| | | const gridStore = useGridStore(); |
| | | gridStore.selectedSatelliteProxy = satelliteProxy; |
| | | gridStore.pushGridClz(satelliteProxy); |
| | | |
| | | const sceneStore = useSceneStore(); |
| | | const satelliteGridStore = useSatelliteGridStore(); |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | function drawGrid(gridDataDetail) { |
| | | satelliteProxy.drawGrid({ |
| | | gridDataDetail: gridDataDetail, |
| | | useDataTxtColor: true |
| | | function drawGrid(useCustomColor) { |
| | | satelliteProxy.changeVisibility({ |
| | | showGridViews: false, |
| | | showDataTxt: false, |
| | | showRankTxt: false |
| | | }); |
| | | satelliteProxy.drawTagGrid({ |
| | | tag: satelliteGridStore.selectedGridData.id, |
| | | gridDataDetail: satelliteGridStore.selectedGridDataDetail, |
| | | useCustomColor, |
| | | useDataTxtColor: true, |
| | | extData: { |
| | | name: `卫星遥测数据 - ${moment(satelliteGridStore.selectedGridData).format('YYYY-MM-DD')}` |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function handleRowClick(row) { |
| | | satelliteGridStore.fetchGridDataDetail(row, drawGrid); |
| | | satelliteGridStore.fetchGridDataDetail(row, () => { |
| | | drawGrid(); |
| | | }); |
| | | } |
| | | |
| | | function handleRankClick(rankVisible) { |
| | |
| | | } |
| | | |
| | | function handleColorClick(isStandardColor) { |
| | | satelliteProxy.drawGrid({ |
| | | gridDataDetail: satelliteGridStore.selectedGridDataDetail, |
| | | useCustomColor: !isStandardColor, |
| | | useDataTxtColor: true |
| | | }); |
| | | drawGrid(!isStandardColor); |
| | | } |
| | | |
| | | function handleOpacityClick(value) { |
| | |
| | | satelliteProxy.gridPrepare(gridInfo); |
| | | } |
| | | |
| | | // 绘制网格遥感数据值和网格颜色 |
| | | function drawGrid(gridDataDetail) { |
| | | satelliteProxy.drawGrid({ gridDataDetail, opacity: 1, zIndex: 11 }); |
| | | } |
| | | |
| | | // watch(mission, (nV, oV) => { |
| | | // if (nV != oV) { |
| | | // checkUnderwayFusionResult(); |
| | |
| | | } |
| | | }); |
| | | |
| | | let selectedGridDataDetail; |
| | | // 叠加融合 |
| | | // function handleFusionClick() { |
| | | // // resetButton(); |
| | | // const d = fusionData.value; |
| | | // if (gridDataDetailMap.has(d.id)) { |
| | | // selectedGridDataDetail = gridDataDetailMap.get(d.id); |
| | | // // selectedGridData = gridData; |
| | | // drawGrid(selectedGridDataDetail); |
| | | // } else { |
| | | // gridApi.fetchGridDataDetail(d.id, d.groupId).then((res) => { |
| | | // gridDataDetailMap.set(d.id, res.data); |
| | | // selectedGridDataDetail = res.data; |
| | | // // selectedGridData = gridData; |
| | | // drawGrid(selectedGridDataDetail); |
| | | // }); |
| | | // } |
| | | // } |
| | | function handleFusionClick() { |
| | | // resetButton(); |
| | | satelliteProxy.changeVisibility({ showGridViews: false }); |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | if (gridDataDetailMap.has(d.id)) { |
| | | // const gdd = gridDataDetailMap.get(d.id); |
| | | // satelliteProxy.drawTagGrid({ |
| | | // tag: d.id, |
| | | // gridDataDetail: gdd, |
| | | // opacity: 1, |
| | | // zIndex: 11 |
| | | // }); |
| | | satelliteProxy.changeVisibility({ tag: d.id, showGridViews: true }); |
| | | } else { |
| | | gridApi.fetchGridDataDetail(d.id, d.groupId).then((res) => { |
| | |
| | | |
| | | function handleColorClick() { |
| | | isStandardColor.value = !isStandardColor.value; |
| | | // satelliteProxy.drawGrid({ |
| | | // gridDataDetail: selectedGridDataDetail, |
| | | // useCustomColor: !isStandardColor.value, |
| | | // opacity: 1, |
| | | // zIndex: 11 |
| | | // }); |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | if (gridDataDetailMap.has(d.id)) { |