VITE_APP_USE_MOCK = false | VITE_APP_USE_MOCK = false | ||||
# proxy | # proxy | ||||
VITE_PROXY = [["/api-local","http://127.0.0.1:8002/api"],["/api-mock","http://127.0.0.1:8003"]] | |||||
VITE_PROXY = [["/api-local","https://lcxj-test.t-aaron.com/api"],["/api-mock","http://127.0.0.1:8003"]] | |||||
# base api | # base api | ||||
VITE_APP_GLOB_BASE_API = '/api-local' | VITE_APP_GLOB_BASE_API = '/api-local' |
</p> | </p> | ||||
<p class="dispatch-detail"> | <p class="dispatch-detail"> | ||||
<span>飞行高度:</span> | <span>飞行高度:</span> | ||||
<n-slider v-model:value="flyHeight" :default-value="100" :format-tooltip="formatHeight" :max="600" :show-tooltip="true" /> | |||||
<n-slider v-model:value="flyHeight" :default-value="100" :format-tooltip="formatHeight" :max="600" @update:value="limitMin" /> | |||||
</p> | </p> | ||||
<p class="execute-btn" @click="test">立即执行</p> | <p class="execute-btn" @click="test">立即执行</p> | ||||
<p class="alarm-title">任务记录</p> | <p class="alarm-title">任务记录</p> | ||||
}) | }) | ||||
} | } | ||||
const limitMin = (value) => { | |||||
data.flyHeight = data.flyHeight >= 100 ? value : 100 | |||||
} | |||||
// 可用机场列表 | // 可用机场列表 | ||||
const showUsableAirport = (info) => { | const showUsableAirport = (info) => { | ||||
data.usableAirport.length = 0 | data.usableAirport.length = 0 | ||||
if (res.code === 0) { | if (res.code === 0) { | ||||
getRecord(parseInt(data.warningInfo?.id)) | getRecord(parseInt(data.warningInfo?.id)) | ||||
handleExecute() | |||||
} | } | ||||
handleExecute(parseInt(data.missionId)) | |||||
} | } | ||||
// 忽略预警 | // 忽略预警 | ||||
const res = await ignoreWarning(data.warningInfo.id) | const res = await ignoreWarning(data.warningInfo.id) | ||||
if (res.code === 0) { | if (res.code === 0) { | ||||
closeWarning() | closeWarning() | ||||
data.warningDesc = '' | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
if (res.code === 0) { | if (res.code === 0) { | ||||
closeWarning() | closeWarning() | ||||
data.warningDesc = '' | |||||
} | } | ||||
} | } | ||||
closeWarning, | closeWarning, | ||||
ignore, | ignore, | ||||
confirm, | confirm, | ||||
handleExecute | |||||
handleExecute, | |||||
limitMin | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
.n-slider-handle-indicator{ | |||||
margin: 0 !important; | |||||
} | |||||
</style> | </style> | ||||
<fire-alarm ref="Warning" :data="warningDetail" :airport="airportsAll" @start="handleExecute" /> | <fire-alarm ref="Warning" :data="warningDetail" :airport="airportsAll" @start="handleExecute" /> | ||||
<WarningDrawer :id="missionId" v-model:visible="drawerShow" /> | |||||
<WarningDrawer v-model:visible="drawerShow" /> | |||||
</template> | </template> | ||||
warningList: [], | warningList: [], | ||||
warningLayers: [], | warningLayers: [], | ||||
warningDetail: {}, | warningDetail: {}, | ||||
drawerShow: false, | |||||
missionId: 0 | |||||
drawerShow: false | |||||
}) | }) | ||||
const getMapOptions = computed(() => { | const getMapOptions = computed(() => { | ||||
monitorVideo.value?.disposeVideo() | monitorVideo.value?.disposeVideo() | ||||
} | } | ||||
const handleExecute = (id) => { | |||||
const handleExecute = () => { | |||||
data.drawerShow = true | data.drawerShow = true | ||||
data.missionId = id | |||||
} | } | ||||
onMounted(() => { | onMounted(() => { |
id: { | id: { | ||||
type: String, | type: String, | ||||
default: 'underlay' | default: 'underlay' | ||||
}, | |||||
idd: { | |||||
type: Number, | |||||
default: 0 | |||||
} | } | ||||
}, | }, | ||||
setup(props) { | |||||
setup(props, { emit }) { | |||||
const data = reactive({ | const data = reactive({ | ||||
map: null, | map: null, | ||||
drawerShow: false, | drawerShow: false, | ||||
trackLayer: null, | trackLayer: null, | ||||
trackInfo: null, | trackInfo: null, | ||||
// 轨迹数据 | // 轨迹数据 | ||||
trackList: [], | |||||
id: 0 | |||||
trackList: [] | |||||
}) | }) | ||||
const getMapOptions = computed(() => { | const getMapOptions = computed(() => { | ||||
} | } | ||||
}) | }) | ||||
watch(() => props.idd, (value) => { | |||||
if (value) { | |||||
console.log('hhh', value) | |||||
} else { | |||||
console.log('hhh', value) | |||||
} | |||||
// getTrackData(id).then(res => { | |||||
// if (res.trackList.length > 0) { | |||||
// initTrack(formatTradeList(res.trackList), 'route') | |||||
// } | |||||
// }) | |||||
}) | |||||
// watch(() => props.idd, (value) => { | |||||
// if (value) { | |||||
// console.log('hhh', value) | |||||
// } else { | |||||
// console.log('hhh', value) | |||||
// } | |||||
// }) | |||||
// if (props.ttest) { | |||||
// getTrackData(props.ttest.missionId).then(res => { | |||||
// if (res.trackList.length > 0) { | |||||
// initTrack(formatTradeList(res.trackList), 'route') | |||||
// } | |||||
// }) | |||||
// } | |||||
/** | /** | ||||
* 初始化地图 | * 初始化地图 |
</div> | </div> | ||||
<div ref="mapRef" class="warn__back"> | <div ref="mapRef" class="warn__back"> | ||||
<Underlay :idd="missionId" /> | |||||
<Underlay /> | |||||
</div> | </div> | ||||
<div ref="videoRef" class="inner"> | <div ref="videoRef" class="inner"> | ||||
111111111111 | 111111111111 | ||||
import Underlay from './Underlay.vue' | import Underlay from './Underlay.vue' | ||||
import ControlPanel from './ControlPanel.vue' | import ControlPanel from './ControlPanel.vue' | ||||
import SpeedChart from './SpeedChart.vue' | import SpeedChart from './SpeedChart.vue' | ||||
export default defineComponent({ | |||||
export default { | |||||
name: 'WarningDrawer', | name: 'WarningDrawer', | ||||
components: { Underlay, ControlPanel, SpeedChart }, | components: { Underlay, ControlPanel, SpeedChart }, | ||||
props: { | props: { | ||||
data: { | data: { | ||||
type: Object, | type: Object, | ||||
default: () => {} | default: () => {} | ||||
}, | |||||
id: { | |||||
type: Number, | |||||
default: 0 | |||||
} | } | ||||
}, | }, | ||||
emits: { | emits: { | ||||
showControl: false, | showControl: false, | ||||
operate: '悬停', | operate: '悬停', | ||||
control: '手动控制', | control: '手动控制', | ||||
chartData: {}, | |||||
missionId: 0 | |||||
chartData: {} | |||||
}) | }) | ||||
/* 获取抽屉的信息 */ | /* 获取抽屉的信息 */ | ||||
} | } | ||||
}) | }) | ||||
watch(() => props.id, (id) => { | |||||
if (id) { | |||||
data.missionId = id | |||||
} | |||||
}) | |||||
const handleOperate = () => { | const handleOperate = () => { | ||||
data.operate = data.operate === '悬停' ? '继续飞行' : '悬停' | data.operate = data.operate === '悬停' ? '继续飞行' : '悬停' | ||||
} | } | ||||
endOrder | endOrder | ||||
} | } | ||||
} | } | ||||
}) | |||||
} | |||||
</script> | </script> | ||||
<style scoped lang='scss'> | <style scoped lang='scss'> |