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=>{