| | |
| | | @change="handleHeatMapClick" |
| | | > |
| | | </CheckButton> |
| | | <!-- <CheckButton |
| | | active-text="搜索网格" |
| | | inactive-text="搜索网格" |
| | | :default-value="false" |
| | | @change="handleHeatMapSearchClick" |
| | | > |
| | | </CheckButton> --> |
| | | </el-row> |
| | | <!-- <div class="m-t-8">网格要素</div> |
| | | <el-row class="m-t-8"> |
| | |
| | | import gridApi from '@/api/gridApi'; |
| | | import { SatelliteGrid } from '@/model/SatelliteGrid'; |
| | | import GridStyleTool from './component/GridStyleTool.vue'; |
| | | import { useGridStore } from '@/stores/grid-info'; |
| | | |
| | | const gridStore = useGridStore(); |
| | | |
| | | const satelliteGrid = new SatelliteGrid('走航融合'); |
| | | |
| | | const gridCtrls = ref([satelliteGrid]); |
| | | |
| | | // 借用卫星遥测模块中的100米网格 |
| | |
| | | const gridDataDetailMap = new Map(); |
| | | |
| | | const mixActive = ref(false); |
| | | const heatActive = ref(false); |
| | | const gridVisible = ref(true); |
| | | const underwayVisible = ref(false); |
| | | const rankVisible = ref(false); |
| | |
| | | } |
| | | |
| | | function prepareGrid(gridInfo) { |
| | | satelliteGrid.gridPrepare(gridInfo); |
| | | satelliteGrid.gridPrepare(gridInfo, (polygon) => { |
| | | //鼠标移入事件 |
| | | polygon.on('mouseover', () => { |
| | | polygon.setOptions({ |
| | | //修改多边形属性的方法 |
| | | strokeWeight: 2, |
| | | strokeColor: 'red' |
| | | }); |
| | | }); |
| | | //鼠标移出事件 |
| | | polygon.on('mouseout', () => { |
| | | polygon.setOptions({ |
| | | strokeWeight: 1, |
| | | strokeColor: 'white' |
| | | }); |
| | | }); |
| | | }); |
| | | // satelliteGrid.setGridEvent('click', (gridCell, gridDataDetail) => { |
| | | // // const polygon = e.target |
| | | // // const { gridCell } = polygon.getExtData(); |
| | | // // const cellIndex = gridCell.cellIndex; |
| | | // gridStore.selectedGridCellAndDataDetail = { |
| | | // gridCell, |
| | | // gridDataDetail |
| | | // }; |
| | | // }); |
| | | } |
| | | |
| | | // watch(mission, (nV, oV) => { |
| | |
| | | tag: d.id, |
| | | data: gdd, |
| | | extData: { |
| | | name: `走航网格 - ${d.mixDataId}` |
| | | name: `走航网格 - ${d.mixDataId}`, |
| | | type: 0 |
| | | } |
| | | }); |
| | | satelliteGrid.setGridEvent( |
| | | [d.id], |
| | | 'click', |
| | | (gridCell, gridDataDetail) => { |
| | | gridStore.selectedGridCellAndDataDetail = { |
| | | gridCell, |
| | | gridDataDetail |
| | | }; |
| | | } |
| | | ); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | // gridCtrls.value = Array.from(satelliteGrid.mapViewsMap); |
| | | // console.log(gridCtrls.value); |
| | |
| | | }); |
| | | } |
| | | |
| | | let mixTag; |
| | | function handleMixClick() { |
| | | mixActive.value = !mixActive.value; |
| | | const tags = fusionDataList.value |
| | |
| | | showRankTxt: false |
| | | }); |
| | | if (mixActive.value) { |
| | | satelliteGrid.mixGrid(tags); |
| | | mixTag = satelliteGrid.mixGrid(tags); |
| | | satelliteGrid.setGridEvent( |
| | | [mixTag], |
| | | 'click', |
| | | (gridCell, gridDataDetail) => { |
| | | gridStore.selectedGridCellAndDataDetail = { |
| | | gridCell, |
| | | gridDataDetail |
| | | }; |
| | | } |
| | | ); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | } else { |
| | | satelliteGrid.changeVisibility({ |
| | |
| | | } |
| | | } |
| | | |
| | | let heatTag; |
| | | function handleHeatMapClick() { |
| | | const tags = fusionDataList.value |
| | | .filter((v, i) => selectedfusionData.value.indexOf(i) != -1) |
| | | .map((v) => v.id); |
| | | heatActive.value = !heatActive.value; |
| | | satelliteGrid.changeVisibility({ |
| | | showGridViews: false, |
| | | showDataTxt: false, |
| | | showRankTxt: false |
| | | }); |
| | | if (heatActive.value) { |
| | | heatTag = satelliteGrid.drawHeatGrid(mixTag); |
| | | satelliteGrid.setGridEvent( |
| | | [heatTag], |
| | | 'click', |
| | | (gridCell, gridDataDetail) => { |
| | | gridStore.selectedGridCellAndDataDetail = { |
| | | gridCell, |
| | | gridDataDetail |
| | | }; |
| | | } |
| | | ); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | } else { |
| | | satelliteGrid.changeVisibility({ |
| | | tags: [mixTag], |
| | | showGridViews: true |
| | | }); |
| | | } |
| | | } |
| | | |
| | | function handleHeatMapSearchClick() { |
| | | const res = satelliteGrid.search( |
| | | { |
| | | groupId: 1, |
| | | cellId: 2893, |
| | | pm25: 50 |
| | | }, |
| | | 120, |
| | | 90, |
| | | 10, |
| | | 10, |
| | | 3 |
| | | ); |
| | | |
| | | console.log(res); |
| | | } |
| | | |
| | | function handleGridClick() { |