} | } | ||||
const executeNow = async() => { | const executeNow = async() => { | ||||
if (data.airportId === null) { | |||||
$message.warning('当前无在线机场!') | |||||
return | |||||
} | |||||
var airportName = '' | var airportName = '' | ||||
data.airpotOptions?.map((item) => { | data.airpotOptions?.map((item) => { | ||||
if (item.value === data.airportId) { | if (item.value === data.airportId) { |
import { transform, fromLonLat } from 'ol/proj' | import { transform, fromLonLat } from 'ol/proj' | ||||
import { Style, Icon, Text, Fill, Circle } from 'ol/style' | import { Style, Icon, Text, Fill, Circle } from 'ol/style' | ||||
import * as control from 'ol/control' | import * as control from 'ol/control' | ||||
import * as interaction from 'ol/interaction' | |||||
import uav_icon from '@/assets/images/airport.png' | import uav_icon from '@/assets/images/airport.png' | ||||
import warningIcon from '@/assets/gis/images/fire.png' | import warningIcon from '@/assets/gis/images/fire.png' | ||||
import warningSelectIcon from '@/assets/gis/images/fire_select.png' | import warningSelectIcon from '@/assets/gis/images/fire_select.png' | ||||
attribution: false, | attribution: false, | ||||
rotate: false, | rotate: false, | ||||
zoom: false | zoom: false | ||||
}), | |||||
interactions: interaction.defaults({ | |||||
// 禁止地图双击放大事件 | |||||
doubleClickZoom: false | |||||
}) | }) | ||||
}) | }) | ||||
data.map.addLayer(wmsSource) | data.map.addLayer(wmsSource) |
</template> | </template> | ||||
<script> | <script> | ||||
import { defineComponent, ref, reactive, toRefs, computed, watch, nextTick, onBeforeUnmount, onMounted } from 'vue' | |||||
import { defineComponent, ref, reactive, toRefs, computed, watch, nextTick, onBeforeUnmount, onMounted, onUnmounted } from 'vue' | |||||
import Underlay from './Underlay.vue' | import Underlay from './Underlay.vue' | ||||
import ControlPanel from './ControlPanel.vue' | import ControlPanel from './ControlPanel.vue' | ||||
import SpeedChart from './SpeedChart.vue' | import SpeedChart from './SpeedChart.vue' | ||||
} | } | ||||
const clearTimer = () => { | const clearTimer = () => { | ||||
if (data.chartTimer) { | |||||
clearInterval(data.chartTimer) | |||||
data.chartTimer = null | |||||
} | |||||
if (data.liveTimer) { | |||||
clearInterval(data.liveTimer) | |||||
data.liveTimer = null | |||||
} | |||||
if (data.failTimer) { | |||||
clearInterval(data.failTimer) | |||||
data.failTimer = null | |||||
} | |||||
clearInterval(data.chartTimer) | |||||
data.chartTimer = null | |||||
clearInterval(data.liveTimer) | |||||
data.liveTimer = null | |||||
clearInterval(data.failTimer) | |||||
data.failTimer = null | |||||
} | } | ||||
function handleVideoStatus(status) { | function handleVideoStatus(status) { | ||||
clearTimer() | clearTimer() | ||||
}) | }) | ||||
onUnmounted(() => { | |||||
clearInterval(data.failTimer) | |||||
data.failTimer = null | |||||
}) | |||||
return { | return { | ||||
containerRef, | containerRef, | ||||
sideRef, | sideRef, |