|
|
@@ -41,7 +41,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { defineComponent, computed, ref, reactive, toRefs, watch, nextTick } from 'vue' |
|
|
|
import { defineComponent, computed, ref, reactive, toRefs, watch, nextTick, onBeforeUnmount } from 'vue' |
|
|
|
import { Map, View, Feature } from 'ol' |
|
|
|
import 'ol/ol.css' |
|
|
|
import { Tile, Vector as VectorLayer } from 'ol/layer' |
|
|
@@ -158,6 +158,14 @@ export default defineComponent({ |
|
|
|
}) |
|
|
|
} |
|
|
|
liveStore.resetList() |
|
|
|
originRef.value?.disposeVideo() |
|
|
|
data.videoInfo = { |
|
|
|
url: null, |
|
|
|
status: 'init' |
|
|
|
} |
|
|
|
data.mapData = null |
|
|
|
clearInterval(data.socket) |
|
|
|
data.socket = null |
|
|
|
} |
|
|
|
|
|
|
|
/* 获取轨迹数据 */ |
|
|
@@ -238,7 +246,7 @@ export default defineComponent({ |
|
|
|
zoom: false |
|
|
|
}) |
|
|
|
}) |
|
|
|
data.mapData.render() |
|
|
|
// data.mapData.render() |
|
|
|
} |
|
|
|
|
|
|
|
/* 处理轨迹列表 */ |
|
|
@@ -360,6 +368,18 @@ export default defineComponent({ |
|
|
|
data.videoShow = value |
|
|
|
} |
|
|
|
|
|
|
|
onBeforeUnmount(() => { |
|
|
|
liveStore.resetList() |
|
|
|
originRef.value?.disposeVideo() |
|
|
|
data.videoInfo = { |
|
|
|
url: null, |
|
|
|
status: 'init' |
|
|
|
} |
|
|
|
data.mapData = null |
|
|
|
clearInterval(data.socket) |
|
|
|
data.socket = null |
|
|
|
}) |
|
|
|
|
|
|
|
return { |
|
|
|
...toRefs(data), |
|
|
|
originRef, |