Browse Source

map change

tags/v1.2.0
lixin 1 year ago
parent
commit
340b2bceb1
4 changed files with 8 additions and 16 deletions
  1. +1
    -2
      src/views/dashboard/components/FireAlarm.vue
  2. +3
    -6
      src/views/dashboard/components/OneMap.vue
  3. +3
    -6
      src/views/dashboard/components/Underlay.vue
  4. +1
    -2
      src/views/dashboard/components/WarningDrawer.vue

+ 1
- 2
src/views/dashboard/components/FireAlarm.vue View File



if (res.code === 0) { if (res.code === 0) {
getRecord(parseInt(data.warningInfo?.id)) getRecord(parseInt(data.warningInfo?.id))
handleExecute(parseInt(data.missionId))
} }
handleExecute(parseInt(data.missionId))
} }


// 忽略预警 // 忽略预警
} }


const handleExecute = (id) => { const handleExecute = (id) => {
// console.log(id)
emit('start', id) emit('start', id)
} }



+ 3
- 6
src/views/dashboard/components/OneMap.vue View File



<fire-alarm ref="Warning" :data="warningDetail" :airport="airportsAll" @start="handleExecute" /> <fire-alarm ref="Warning" :data="warningDetail" :airport="airportsAll" @start="handleExecute" />


<WarningDrawer v-model:visible="drawerShow" />
<WarningDrawer :id="missionId" v-model:visible="drawerShow" />


</template> </template>


monitorVideo.value?.disposeVideo() monitorVideo.value?.disposeVideo()
} }


let abc = ref()
const handleExecute = (id) => { const handleExecute = (id) => {
data.drawerShow = true data.drawerShow = true
abc = id
provide('test', abc)
data.missionId = id
} }


onMounted(() => { onMounted(() => {
hideProblemInfo, hideProblemInfo,
getMaxZOverlay, getMaxZOverlay,
Warning, Warning,
handleExecute,
abc
handleExecute
} }
} }
} }

+ 3
- 6
src/views/dashboard/components/Underlay.vue View File



<script> <script>


import { reactive, toRefs, onMounted, computed, watch, onBeforeUnmount, inject, ref } from 'vue'
import { reactive, toRefs, onMounted, computed, watch, onBeforeUnmount } from 'vue'
import { Map, View, Feature } from 'ol' import { Map, View, Feature } from 'ol'
import 'ol/ol.css' import 'ol/ol.css'
import { Tile, Vector as VectorLayer } from 'ol/layer' import { Tile, Vector as VectorLayer } from 'ol/layer'
type: String, type: String,
default: 'underlay' default: 'underlay'
}, },
data: {
idd: {
type: Number, type: Number,
default: 0 default: 0
} }
} }
}) })


let abc = ref()
abc = inject('test')

watch(() => abc, (value) => {
watch(() => props.idd, (value) => {
if (value) { if (value) {
console.log('hhh', value) console.log('hhh', value)
} else { } else {

+ 1
- 2
src/views/dashboard/components/WarningDrawer.vue View File



</div> </div>
<div ref="mapRef" class="warn__back"> <div ref="mapRef" class="warn__back">
<Underlay />
<Underlay :idd="missionId" />
</div> </div>
<div ref="videoRef" class="inner"> <div ref="videoRef" class="inner">
111111111111 111111111111
watch(() => props.id, (id) => { watch(() => props.id, (id) => {
if (id) { if (id) {
data.missionId = id data.missionId = id
console.log(data.missionId)
} }
}) })



Loading…
Cancel
Save