lixin преди 1 година
родител
ревизия
bbe28d8b17
променени са 2 файла, в които са добавени 34 реда и са изтрити 7 реда
  1. +9
    -0
      src/api/dashboard/index.js
  2. +25
    -7
      src/views/dashboard/components/FireAlarm.vue

+ 9
- 0
src/api/dashboard/index.js Целия файл

@@ -145,3 +145,12 @@ export function confirmWarning(params) {
})
}

// 定点飞行
export function pointflight(params) {
return request({
url: `/airport/pointflight`,
method: 'POST',
params
})
}


+ 25
- 7
src/views/dashboard/components/FireAlarm.vue Целия файл

@@ -25,7 +25,7 @@
<p class="alarm-title">机场调度</p>
<p class="dispatch-detail">
<span>选择机场:</span>
<n-select v-model:value="airValue" placeholder="请选择机场" :options="airpotOptions" />
<n-select v-model:value="airportId" placeholder="请选择机场" :options="airpotOptions" />
<a @click="checkAirport">可用机场列表</a>
</p>
<p class="dispatch-detail">
@@ -93,7 +93,7 @@

import { reactive, toRefs, watch } from 'vue'
import { EARLY_SOURCE, TASK_STATUS } from '@/utils/dictionary.js'
import { getWarningRecord, getWarningInfo, ignoreWarning, confirmWarning } from '@/api/dashboard/index.js'
import { getWarningRecord, getWarningInfo, ignoreWarning, confirmWarning, pointflight } from '@/api/dashboard/index.js'
// turf 用于简单的空间计算
import * as turf from '@turf/turf'
export default {
@@ -121,7 +121,7 @@ export default {
airportShow: false,
warningInfo: {},
airportSelect: '',
airValue: 0,
airportId: null,
warningPic: null,
recoedList: [],
warningShow: false,
@@ -153,7 +153,7 @@ export default {
// 分析后的图片
data.warningPic = info?.data?.fileMarkerUrl || null
// 任务id
data.missionId = info?.data?.missionId || null
data.missionId = info?.data?.missionId
showUsableAirport(info)
showWarningRecord(record)
})
@@ -205,7 +205,7 @@ export default {
label: item.name
})
})
data.airValue = data.airpotOptions[0]?.value || null
data.airportId = data.airpotOptions[0]?.value || null
}

const checkAirport = () => {
@@ -221,9 +221,27 @@ export default {
data.warningShow = false
}

const test = () => {
const test = async() => {
handleExecute()
console.log(data.warningInfo)
var airportName = ''
data.airpotOptions?.map((item) => {
if (item.value === data.airportId) {
airportName = item.label
}
})
const res = await pointflight({
airportId: parseInt(data.airportId),
airportName: airportName,
warningId: parseInt(data.warningInfo?.id),
missionId: parseInt(data.missionId),
alt: String(data.flyHeight),
lon: String(data.warningInfo.lng),
lat: String(data.warningInfo.lat)
})

if (res.code === 0) {
console.log(res)
}
}

// 忽略预警

Loading…
Отказ
Запис