| | |
| | | import cesiumOperation from '@/utils/cesium-tsa'; |
| | | import { useStore } from 'vuex'; |
| | | |
| | | import { initPointWayline } from './initPointWayline'; |
| | | |
| | | const { parsingFiles } = initPointWayline() |
| | | |
| | | const { _init, viewerDestory } = cesiumOperation() |
| | | const store = useStore(); |
| | | |
| | | |
| | | const isShowCurrentTaskDetails = defineModel('show'); |
| | | const props = defineProps({ |
| | |
| | | |
| | | // 获取直播地址 |
| | | const getVideoUrl = () => { |
| | | console.log(props.rowData, '当前任务详情'); |
| | | liveStart(props.rowData.deviceSns).then(res => { |
| | | if (res.data.code !== 0) return; |
| | | airPortUrl.value = res.data.data.rtcs_url; |
| | |
| | | // 获取任务详情获取航线文件 |
| | | const getTaskDetails = () => { |
| | | getJobDetails({ wayLineJobInfoId: props.rowData.id }).then(res => { |
| | | console.log(res.data.data, '顶顶顶'); |
| | | if (res.data.data.way_lines && res.data.data.way_lines.length === 1) { |
| | | const line = res.data.data.way_lines[0].url |
| | | // console.log(window.$viewer,'顶顶顶顶') |
| | | parsingFiles(res.data.data.way_lines[0].url, window.$viewer); |
| | | } |
| | | }) |
| | | } |
| | |
| | | // 监听 rowData 变化 |
| | | watch(() => props.rowData, (newVal) => { |
| | | if (newVal && Object.keys(newVal).length) { |
| | | getVideoUrl(); |
| | | // getVideoUrl(); |
| | | getTaskDetails(); |
| | | } |
| | | }, { deep: true, immediate: true }); |