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) | ||||
} | } | ||||
<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 | |||||
} | } | ||||
} | } | ||||
} | } |
<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 { |
</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) | |||||
} | } | ||||
}) | }) | ||||