From 6b0bf3ef80ce62259c318852425a132096ffb1e5 Mon Sep 17 00:00:00 2001 From: yyhouc <792163605@qq.com> Date: Mon, 5 Jun 2023 10:29:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9B=BE=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../remoteSensingData/components/searchCondition.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/dataService/remoteSensingData/components/searchCondition.vue b/src/views/dataService/remoteSensingData/components/searchCondition.vue index a1e2c7f..8d5438d 100644 --- a/src/views/dataService/remoteSensingData/components/searchCondition.vue +++ b/src/views/dataService/remoteSensingData/components/searchCondition.vue @@ -121,7 +121,9 @@ import { ref, reactive, watch, defineExpose, onMounted,defineEmits } from 'vue'; import { rs, submit ,rs2 } from '/@/api/crawl/index'; import { useUserInfo } from '/@/stores/userInfo'; import { ElMessage, ElMessageBox } from "element-plus"; +import { useVariableStore } from '/@/stores/index.ts'; import { getList as BizDict } from "/@/api/system/dictbiz.js"; +const variableStore = useVariableStore(); const userInfo = useUserInfo(); const emit = defineEmits(['response']); const disabledDate = (time) => { @@ -219,7 +221,6 @@ const onMapClick = (e) => { Lat: state.lat, Lng: state.lon }) - // changeLatLon(e) } const changeLatLon = (e) => { @@ -318,13 +319,17 @@ const startCrawl = () => { ElMessage.error("Please select the search end time") return; } - if (state.coordinateList.length == 0 || !state.coordinateList[0].Lat || !state.coordinateList[0].Lng || !state.coordinateList[1].Lat || !state.coordinateList[1].Lng) { + if ((state.coordinateList.length == 0 || !state.coordinateList[0].Lat || !state.coordinateList[0].Lng || !state.coordinateList[1].Lat || !state.coordinateList[1].Lng)&&state.switch) { + ElMessage.error("Please draw the area on the map") + return; + } + if(!state.switch&&variableStore.layerGroupPoly==null){ ElMessage.error("Please draw the area on the map") return; } - var ranges = state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng + var ranges =state.switch? state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng:variableStore.layerGroupPoly; var param = [] state.satelliteSelected.forEach(data=>{