| | |
| | | <template> |
| | | <div class="p-events-none m-t-2"> |
| | | <el-row justify="space-between"> |
| | | <el-row class="wrap"> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <BaseCard v-show="show" size="medium" direction="left"> |
| | | <template #content> |
| | | <el-row> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="走航融合"> |
| | | <el-select |
| | | v-model="selectedfusionData" |
| | | multiple |
| | | clearable |
| | | @change="handleChange" |
| | | placeholder="选择任务" |
| | | size="small" |
| | | class="w-250" |
| | | :loading="fusionLoading" |
| | | > |
| | | <el-option |
| | | v-for="(s, i) in fusionDataList" |
| | | :key="i" |
| | | :label="s.mixDataId" |
| | | :value="i" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :disabled=" |
| | | !gridCellList || selectedfusionData.length == 0 |
| | | " |
| | | @click="handleFusionClick" |
| | | > |
| | | {{ '叠加融合' }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-row> |
| | | <div class="m-t-8">网格要素</div> |
| | | <el-row class="m-t-8"> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleGridClick" |
| | | > |
| | | {{ gridVisible ? '隐藏融合' : '显示融合' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleRankClick" |
| | | > |
| | | {{ rankVisible ? '隐藏排名' : '显示排名' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleDataClick" |
| | | > |
| | | {{ dataVisible ? '隐藏数据' : '显示数据' }} |
| | | </el-button> |
| | | </el-row> |
| | | <div class="m-t-8">网格样式</div> |
| | | <el-row class="m-t-8"> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleOpacityClick" |
| | | > |
| | | {{ !isOpacity ? '透明化' : '取消透明化' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleColorClick" |
| | | > |
| | | {{ isStandardColor ? '绘制对比色' : '绘制标准色' }} |
| | | </el-button> |
| | | </el-row> |
| | | <div class="m-t-8">走航要素</div> |
| | | <el-row class="m-t-8"> |
| | | <!-- <el-divider content-position="left"></el-divider> --> |
| | | <!-- <div class="p-events-none m-t-2"> --> |
| | | <el-row justify="space-between"> |
| | | <el-row class="wrap"> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <BaseCard v-show="show" size="medium" direction="left"> |
| | | <template #content> |
| | | <el-row> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="走航融合"> |
| | | <el-select |
| | | v-model="selectedfusionData" |
| | | multiple |
| | | clearable |
| | | @change="handleChange" |
| | | placeholder="选择任务" |
| | | size="small" |
| | | style="width: 160px" |
| | | :loading="fusionLoading" |
| | | > |
| | | <el-option |
| | | v-for="(s, i) in fusionDataList" |
| | | :key="i" |
| | | :label="s.mixDataId" |
| | | :value="i" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :disabled=" |
| | | !gridCellList || selectedfusionData.length == 0 |
| | | " |
| | | @click="handleFusionClick" |
| | | > |
| | | {{ '叠加融合' }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-row> |
| | | <div class="m-t-8">操作</div> |
| | | <el-row class="m-t-8"> |
| | | <CheckButton |
| | | active-text="开启融合" |
| | | inactive-text="隐藏融合" |
| | | :default-value="false" |
| | | @change="handleMixClick" |
| | | > |
| | | </CheckButton> |
| | | </el-row> |
| | | <div class="m-t-8">网格要素</div> |
| | | <el-row class="m-t-8"> |
| | | <CheckButton |
| | | active-text="显示网格" |
| | | inactive-text="隐藏网格" |
| | | :default-value="true" |
| | | @change="handleGridClick" |
| | | > |
| | | </CheckButton> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleRankClick" |
| | | > |
| | | {{ rankVisible ? '隐藏排名' : '显示排名' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleDataClick" |
| | | > |
| | | {{ dataVisible ? '隐藏数据' : '显示数据' }} |
| | | </el-button> |
| | | </el-row> |
| | | <div class="m-t-8">网格样式</div> |
| | | <el-row class="m-t-8"> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleOpacityClick" |
| | | > |
| | | {{ !isOpacity ? '透明化' : '取消透明化' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleColorClick" |
| | | > |
| | | {{ isStandardColor ? '绘制对比色' : '绘制标准色' }} |
| | | </el-button> |
| | | </el-row> |
| | | <div class="m-t-8">走航要素</div> |
| | | <el-row class="m-t-8"> |
| | | <!-- <el-divider content-position="left"></el-divider> --> |
| | | |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :loading="missionLoading || loading" |
| | | @click="handleUnderwayClick" |
| | | > |
| | | {{ underwayVisible ? '隐藏走航路线' : '显示走航路线' }} |
| | | </el-button> |
| | | </el-row> |
| | | </template> |
| | | <template #footer> </template> |
| | | </BaseCard> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <CardButton |
| | | name="走航融合" |
| | | direction="right" |
| | | @click="() => (show = !show)" |
| | | ></CardButton> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :loading="missionLoading || loading" |
| | | @click="handleUnderwayClick" |
| | | > |
| | | {{ underwayVisible ? '隐藏走航路线' : '显示走航路线' }} |
| | | </el-button> |
| | | </el-row> |
| | | </template> |
| | | <template #footer> </template> |
| | | </BaseCard> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <CardButton |
| | | name="走航融合" |
| | | direction="right" |
| | | @click="() => (show = !show)" |
| | | ></CardButton> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <GridStyleTool :gridCtrls="gridCtrls"></GridStyleTool> |
| | | </el-row> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted, onUnmounted, watch } from 'vue'; |
| | | import { ref, onMounted, onUnmounted, watch, computed } from 'vue'; |
| | | import moment from 'moment'; |
| | | import gridApi from '@/api/gridApi'; |
| | | import { SatelliteGrid } from '@/model/SatelliteGrid'; |
| | | import GridStyleTool from './component/GridStyleTool.vue'; |
| | | |
| | | const satelliteGrid = new SatelliteGrid(); |
| | | const satelliteGrid = new SatelliteGrid('走航融合'); |
| | | |
| | | const gridCtrls = ref([satelliteGrid]); |
| | | |
| | | // 借用卫星遥测模块中的100米网格 |
| | | const props = defineProps({ |
| | |
| | | |
| | | const gridDataDetailMap = new Map(); |
| | | |
| | | const mixActive = ref(false); |
| | | const gridVisible = ref(true); |
| | | const underwayVisible = ref(false); |
| | | const rankVisible = ref(false); |
| | |
| | | satelliteGrid.gridPrepare(gridInfo); |
| | | } |
| | | |
| | | // 绘制网格遥感数据值和网格颜色 |
| | | function drawGrid(gridDataDetail) { |
| | | satelliteGrid.drawGrid({ gridDataDetail, opacity: 1, zIndex: 11 }); |
| | | } |
| | | |
| | | // watch(mission, (nV, oV) => { |
| | | // if (nV != oV) { |
| | | // checkUnderwayFusionResult(); |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | if (gridDataDetailMap.has(d.id)) { |
| | | // const gdd = gridDataDetailMap.get(d.id); |
| | | // satelliteGrid.drawTagGrid({ |
| | | // tag: d.id, |
| | | // gridDataDetail: gdd, |
| | | // opacity: 1, |
| | | // zIndex: 11 |
| | | // }); |
| | | satelliteGrid.changeVisibility({ tag: d.id, showGridViews: true }); |
| | | satelliteGrid.changeVisibility({ tags: [d.id], showGridViews: true }); |
| | | // gridCtrls.value = Array.from(satelliteGrid.mapViewsMap); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | } else { |
| | | gridApi.fetchGridDataDetail(d.id, d.groupId).then((res) => { |
| | | gridDataDetailMap.set(d.id, res.data); |
| | | const gdd = res.data; |
| | | satelliteGrid.drawTagGrid({ |
| | | tag: d.id, |
| | | gridDataDetail: gdd, |
| | | opacity: 1, |
| | | zIndex: 11 |
| | | data: gdd, |
| | | extData: { |
| | | name: `走航网格 - ${d.mixDataId}` |
| | | } |
| | | }); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | // gridCtrls.value = Array.from(satelliteGrid.mapViewsMap); |
| | | // console.log(gridCtrls.value); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function handleMixClick() { |
| | | mixActive.value = !mixActive.value; |
| | | const tags = fusionDataList.value |
| | | .filter((v, i) => selectedfusionData.value.indexOf(i) != -1) |
| | | .map((v) => v.id); |
| | | satelliteGrid.changeVisibility({ |
| | | showGridViews: false, |
| | | showDataTxt: false, |
| | | showRankTxt: false |
| | | }); |
| | | if (mixActive.value) { |
| | | satelliteGrid.mixGrid(tags); |
| | | } else { |
| | | satelliteGrid.changeVisibility({ |
| | | tags, |
| | | showGridViews: true |
| | | }); |
| | | } |
| | | } |
| | | |
| | | function handleGridClick() { |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tag: d.id, |
| | | tags: [d.id], |
| | | showGridViews: gridVisible.value |
| | | }); |
| | | }); |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tag: d.id, |
| | | tags: [d.id], |
| | | showRankTxt: rankVisible.value |
| | | }); |
| | | }); |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tag: d.id, |
| | | tags: [d.id], |
| | | showDataTxt: dataVisible.value |
| | | }); |
| | | }); |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | if (gridDataDetailMap.has(d.id)) { |
| | | const gdd = gridDataDetailMap.get(d.id); |
| | | satelliteGrid.drawTagGrid({ |
| | | satelliteGrid.changeGridColor({ |
| | | tag: d.id, |
| | | gridDataDetail: gdd, |
| | | useCustomColor: !isStandardColor.value, |
| | | opacity: 1, |
| | | zIndex: 11 |