|
|
@@ -90,11 +90,11 @@ export default { |
|
|
|
* @param {*} res |
|
|
|
* @return {*} |
|
|
|
*/ |
|
|
|
const loadAirport = (async function() { |
|
|
|
const loadAirport = (async function(id) { |
|
|
|
const res = await airportList({ page: 1, limit: 60 }) |
|
|
|
if (res.code === 0) { |
|
|
|
data.airOptions = dataToSelect(res.data, { label: 'name', value: 'id' }) |
|
|
|
data.videoForm.airportId = res.data[0]?.id |
|
|
|
data.videoForm.airportId = id || res.data[0]?.id |
|
|
|
handleAirportChange(data.videoForm.airportId) |
|
|
|
} |
|
|
|
})() |
|
|
@@ -107,7 +107,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
function handleAirportChange(value) { |
|
|
|
if (value === data.airportIdBack) return |
|
|
|
// if (value === data.airportIdBack) return |
|
|
|
data.airportIdBack = value |
|
|
|
data.videoForm.taskId = null |
|
|
|
missionLive(value) |
|
|
@@ -123,10 +123,15 @@ export default { |
|
|
|
loadTaskOption(value) |
|
|
|
} |
|
|
|
|
|
|
|
function handleVideoChange(value) { |
|
|
|
async function handleVideoChange(value) { |
|
|
|
const row = data.taskOptions.find((item) => { return item.id === value }) |
|
|
|
if (!value) { |
|
|
|
data.liveUrl = { ...data.airportUrl, isLive: true } |
|
|
|
const res = await airportList({ page: 1, limit: 60 }) |
|
|
|
if (res.code === 0) { |
|
|
|
data.airOptions = dataToSelect(res.data, { label: 'name', value: 'id' }) |
|
|
|
handleAirportChange(data.videoForm.airportId) |
|
|
|
} |
|
|
|
// data.liveUrl = { ...data.airportUrl, isLive: true } |
|
|
|
} else { |
|
|
|
data.liveUrl = { |
|
|
|
origin: row.videoUrl, |
|
|
@@ -158,6 +163,7 @@ export default { |
|
|
|
width: '100%', |
|
|
|
height: '100%', |
|
|
|
source: data.liveUrl.origin, |
|
|
|
autoplay: data.liveUrl.isLive, |
|
|
|
isLive: data.liveUrl.isLive |
|
|
|
} |
|
|
|
originRef.value?.init(origin) |
|
|
@@ -174,6 +180,7 @@ export default { |
|
|
|
width: '100%', |
|
|
|
height: '100%', |
|
|
|
source: data.liveUrl.analyse, |
|
|
|
autoplay: data.liveUrl.isLive, |
|
|
|
isLive: data.liveUrl.isLive |
|
|
|
} |
|
|
|
analyseRef.value?.init(analyse) |