<ul ref="scrollRef"> | <ul ref="scrollRef"> | ||||
<li v-for="(item,index) in list" :key="index" @click="handleClick(item)"> | <li v-for="(item,index) in list" :key="index" @click="handleClick(item)"> | ||||
<n-ellipsis :tooltip="false"> | <n-ellipsis :tooltip="false"> | ||||
{{ `${item.airportName}正在执行紧急任务,${item.airportStatus}` }} | |||||
{{ `${item.airportName}正在执行紧急任务,${item.airportStatus || '飞行中'}` }} | |||||
</n-ellipsis> | </n-ellipsis> | ||||
</li> | </li> | ||||
</ul> | </ul> |
airportList, getWarning | airportList, getWarning | ||||
} from '@/api/dashboard/index.js' | } from '@/api/dashboard/index.js' | ||||
import { getTaskDetail } from '@/api/task/index.js' | import { getTaskDetail } from '@/api/task/index.js' | ||||
import { gcj02towgs84 } from '@/utils/coordinate-util.js' | |||||
import AirInfo from './AirInfo.vue' | import AirInfo from './AirInfo.vue' | ||||
import ProblemInfo from './ProblemInfo.vue' | import ProblemInfo from './ProblemInfo.vue' | ||||
import SuppliesInfo from './SuppliesInfo.vue' | import SuppliesInfo from './SuppliesInfo.vue' | ||||
if (data.airportsAll.length > 0) { | if (data.airportsAll.length > 0) { | ||||
for (let i = 0; i < data.airportsAll.length; i++) { | for (let i = 0; i < data.airportsAll.length; i++) { | ||||
const airport = data.airportsAll[i] | const airport = data.airportsAll[i] | ||||
const lngLat = gcj02towgs84( | |||||
const lngLat = [ | |||||
parseFloat(airport.longitude), | parseFloat(airport.longitude), | ||||
parseFloat(airport.latitude) | parseFloat(airport.latitude) | ||||
) | |||||
] | |||||
const feature = new Feature({ | const feature = new Feature({ | ||||
geometry: new Point(fromLonLat(lngLat)) | geometry: new Point(fromLonLat(lngLat)) | ||||
}) | }) |
import { getTrackList } from '@/api/task/index.js' | import { getTrackList } from '@/api/task/index.js' | ||||
import { useInspectionStore } from '@/store/modules/inspection.js' | import { useInspectionStore } from '@/store/modules/inspection.js' | ||||
import { airportList, getWarningInfo } from '@/api/dashboard/index.js' | import { airportList, getWarningInfo } from '@/api/dashboard/index.js' | ||||
import { gcj02towgs84 } from '@/utils/coordinate-util.js' | |||||
import uav_icon from '@/assets/images/airport.png' | import uav_icon from '@/assets/images/airport.png' | ||||
import warningIcon from '@/assets/gis/images/fire.png' | import warningIcon from '@/assets/gis/images/fire.png' | ||||
import gcj02Mecator from '@/utils/map/gcj02Mecator.js' | import gcj02Mecator from '@/utils/map/gcj02Mecator.js' | ||||
for (let i = 0; i < res.data.length; i++) { | for (let i = 0; i < res.data.length; i++) { | ||||
if (id === res.data[i].id) { | if (id === res.data[i].id) { | ||||
const airport = res.data[i] | const airport = res.data[i] | ||||
const lngLat = gcj02towgs84( | |||||
const lngLat = [ | |||||
parseFloat(airport.longitude), | parseFloat(airport.longitude), | ||||
parseFloat(airport.latitude) | parseFloat(airport.latitude) | ||||
) | |||||
] | |||||
const feature = new Feature({ | const feature = new Feature({ | ||||
geometry: new Point(fromLonLat(lngLat)) | geometry: new Point(fromLonLat(lngLat)) | ||||
}) | }) |
// 视频组件 | // 视频组件 | ||||
import VideoPlayer from '@/components/VideoPlayer/index.vue' | import VideoPlayer from '@/components/VideoPlayer/index.vue' | ||||
import gcj02Mecator from '@/utils/map/gcj02Mecator.js' | import gcj02Mecator from '@/utils/map/gcj02Mecator.js' | ||||
import { gcj02towgs84 } from '@/utils/coordinate-util.js' | |||||
export default defineComponent({ | export default defineComponent({ | ||||
name: 'FlightDrawer', | name: 'FlightDrawer', | ||||
components: { VideoPlayer }, | components: { VideoPlayer }, | ||||
for (let i = 0; i < res.data.length; i++) { | for (let i = 0; i < res.data.length; i++) { | ||||
if (id === res.data[i].id) { | if (id === res.data[i].id) { | ||||
const airport = res.data[i] | const airport = res.data[i] | ||||
const lngLat = gcj02towgs84( | |||||
const lngLat = [ | |||||
parseFloat(airport.longitude), | parseFloat(airport.longitude), | ||||
parseFloat(airport.latitude) | parseFloat(airport.latitude) | ||||
) | |||||
] | |||||
const feature = new Feature({ | const feature = new Feature({ | ||||
geometry: new Point(fromLonLat(lngLat)) | geometry: new Point(fromLonLat(lngLat)) | ||||
}) | }) |