|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 设备/影响基本信息 - 飞手接单: 管理员 --> |
|
|
<!-- 设备/影响基本信息 - 飞手接单: 管理员 --> |
|
|
<div v-if="current == 2 && isAdmin" class="cont"> |
|
|
<div v-if="current == 2 && isAdmin" class="cont"> |
|
|
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影响基本信息"> |
|
|
|
|
|
|
|
|
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影像基本信息"> |
|
|
<template v-for="(it, i) in equipmentInfo" :key="i + it.label"> |
|
|
<template v-for="(it, i) in equipmentInfo" :key="i + it.label"> |
|
|
<n-descriptions-item v-if="it?.isLive !== data.isLive" :label="it.label"> |
|
|
<n-descriptions-item v-if="it?.isLive !== data.isLive" :label="it.label"> |
|
|
{{ it.value }} |
|
|
{{ it.value }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 设备/影响基本信息 - 已接单 --> |
|
|
<!-- 设备/影响基本信息 - 已接单 --> |
|
|
<div v-if="current === 3" class="cont"> |
|
|
<div v-if="current === 3" class="cont"> |
|
|
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影响基本信息"> |
|
|
|
|
|
|
|
|
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影像基本信息"> |
|
|
<template v-for="(it, i) in executionInfo" :key="i + it.label"> |
|
|
<template v-for="(it, i) in executionInfo" :key="i + it.label"> |
|
|
<n-descriptions-item :label="it.label"> |
|
|
<n-descriptions-item :label="it.label"> |
|
|
{{ it.value }} |
|
|
{{ it.value }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 设备/影响基本信息 - 执行中: 管理员 --> |
|
|
<!-- 设备/影响基本信息 - 执行中: 管理员 --> |
|
|
<div v-if="current === 4" class="cont"> |
|
|
<div v-if="current === 4" class="cont"> |
|
|
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影响基本信息"> |
|
|
|
|
|
|
|
|
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影像基本信息"> |
|
|
<template v-for="(it, i) in executionInfo" :key="i + it.label"> |
|
|
<template v-for="(it, i) in executionInfo" :key="i + it.label"> |
|
|
<n-descriptions-item :label="it.label"> |
|
|
<n-descriptions-item :label="it.label"> |
|
|
{{ it.value }} |
|
|
{{ it.value }} |
|
|
|
|
|
|
|
|
<div v-if="current === 5" class="cont"> |
|
|
<div v-if="current === 5" class="cont"> |
|
|
<div class="title">飞行文件</div> |
|
|
<div class="title">飞行文件</div> |
|
|
|
|
|
|
|
|
<UploadVod @upload-status="vodStatus" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<UploadVod v-if="data.photographyWay === 1" :auto-upload="true" :upload-name="'选择【视频】'" :limit="1" @upload-status="vodStatusVideo" /> |
|
|
|
|
|
<fileOss v-if="data.photographyWay === 1" ref="srtRefs" :file-type="'srt'" :btn-name="'选择【轨迹】'" :limit="1" :default-list="data.srtUrl" @upload-status="vodStatusSRT" /> |
|
|
|
|
|
<fileOss v-if="data.photographyWay !== 1" ref="ortRefs" :file-type="'tif'" :btn-name="'选择【正射影像】'" :limit="9" :default-list="data.orthoUrl" @upload-status="vodStatusZS" /> |
|
|
|
|
|
<fileOss v-if="data.photographyWay !== 1" ref="inclinedRefs" :file-type="'tif'" :btn-name="'选择【倾斜影像】'" :limit="9" :default-list="data.inclinedUrl" @upload-status="vodStatusQX" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <UploadVod v-if="data.photographyWay === 1" :auto-upload="true" :upload-name="'选择【轨迹】'" :limit="1" @upload-status="vodStatusSRT" /> |
|
|
|
|
|
<UploadVod v-if="data.photographyWay !== 1" :auto-upload="true" :upload-name="'选择【正射影像】tif文件'" @upload-status="vodStatusZS" /> |
|
|
|
|
|
<UploadVod v-if="data.photographyWay !== 1" :auto-upload="true" :upload-name="'选择【倾斜影像】tif文件'" @upload-status="vodStatusQX" /> --> |
|
|
|
|
|
<n-button type="primary" class="btn" @click="submitFile"> |
|
|
|
|
|
<n-icon> |
|
|
|
|
|
<UploadOutlined /> |
|
|
|
|
|
</n-icon> |
|
|
|
|
|
开始上传 |
|
|
|
|
|
</n-button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
import { form, getPilotList, getEquipment, getEquipmentMount, getCloudMount } from '../tools/drawForm' |
|
|
import { form, getPilotList, getEquipment, getEquipmentMount, getCloudMount } from '../tools/drawForm' |
|
|
import { basic, fly, equipment, execution } from '../hook/index' |
|
|
import { basic, fly, equipment, execution } from '../hook/index' |
|
|
import UploadVod from '@/components/UploadVod/index.vue' |
|
|
import UploadVod from '@/components/UploadVod/index.vue' |
|
|
|
|
|
import fileOss from '@/components/UploadOss/fileOss.vue' |
|
|
|
|
|
import { UploadOutlined } from '@vicons/antd' |
|
|
|
|
|
|
|
|
getPilotList() // 获取飞手列表 |
|
|
getPilotList() // 获取飞手列表 |
|
|
getEquipment() // 无人机列表 |
|
|
getEquipment() // 无人机列表 |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
const { detail: { data }} = props // 传来的详情数据 |
|
|
const { detail: { data }} = props // 传来的详情数据 |
|
|
|
|
|
form.userForm = data |
|
|
|
|
|
|
|
|
const current = data.pilotStatus / 5 // 当前状态 |
|
|
const current = data.pilotStatus / 5 // 当前状态 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const equipmentInfo = equipment(data) // 设备/影响基本信息 |
|
|
const equipmentInfo = equipment(data) // 设备/影响基本信息 |
|
|
const executionInfo = execution(data) // 执行中信息 |
|
|
const executionInfo = execution(data) // 执行中信息 |
|
|
|
|
|
|
|
|
|
|
|
const videoUrl = ref('') // 视频文件 |
|
|
|
|
|
const srtUrl = ref('') // srt文件 |
|
|
|
|
|
const inclinedUrl = ref('') // 倾斜摄影 |
|
|
|
|
|
const orthoUrl = ref('') // 正射影像 |
|
|
|
|
|
|
|
|
|
|
|
const srtRefs = ref(null) // srt refs |
|
|
|
|
|
const ortRefs = ref(null) // 正射 refs |
|
|
|
|
|
const inclinedRefs = ref(null) // 倾斜 refs |
|
|
|
|
|
|
|
|
const emit = defineEmits(['close']) |
|
|
const emit = defineEmits(['close']) |
|
|
|
|
|
|
|
|
// 分配飞手 |
|
|
// 分配飞手 |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 视频上传 |
|
|
|
|
|
const vodStatus = ({ status, list }) => { |
|
|
|
|
|
console.log(status, list) |
|
|
|
|
|
const videoUrl = [] |
|
|
|
|
|
|
|
|
// 上传 - 视频 |
|
|
|
|
|
const vodStatusVideo = ({ status, list }) => { |
|
|
|
|
|
const arr = [] |
|
|
for (var key in list) { |
|
|
for (var key in list) { |
|
|
videoUrl.push(list[key].url) |
|
|
|
|
|
|
|
|
arr.push(list[key].url) |
|
|
} |
|
|
} |
|
|
const videoList = videoUrl.join(',') |
|
|
|
|
|
console.log('videoList', videoList) |
|
|
|
|
|
return |
|
|
|
|
|
if (status === 'success') { |
|
|
if (status === 'success') { |
|
|
// 视频上传 |
|
|
|
|
|
uploadFlightUrl({ |
|
|
|
|
|
id: data.id, |
|
|
|
|
|
videoUrl: videoList |
|
|
|
|
|
}).then(({ code }) => { |
|
|
|
|
|
console.log(code) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
videoUrl.value = arr.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 上传 - SRT |
|
|
|
|
|
const vodStatusSRT = async(status) => { |
|
|
|
|
|
const res = await srtRefs.value.startUpload() |
|
|
|
|
|
console.log('status: ', status) |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
if (status === 'success' && res.includes('error')) { |
|
|
|
|
|
$message.error('上传失败,请稍后重试') |
|
|
|
|
|
} else if (status === 'success') { |
|
|
|
|
|
srtUrl.value = res.join() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 上传 - 倾斜 |
|
|
|
|
|
const vodStatusQX = async(status) => { |
|
|
|
|
|
const res = await inclinedRefs.value.startUpload() |
|
|
|
|
|
if (status === 'success' && res.includes('error')) { |
|
|
|
|
|
$message.error('上传失败,请稍后重试') |
|
|
|
|
|
} else if (status === 'success') { |
|
|
|
|
|
inclinedUrl.value = res.join() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 上传 - 正射 |
|
|
|
|
|
const vodStatusZS = async(status) => { |
|
|
|
|
|
const res = await ortRefs.value.startUpload() |
|
|
|
|
|
if (status === 'success' && res.includes('error')) { |
|
|
|
|
|
$message.error('上传失败,请稍后重试') |
|
|
|
|
|
} else if (status === 'success') { |
|
|
|
|
|
orthoUrl.value = res.join() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 上传 |
|
|
|
|
|
const submitFile = () => { |
|
|
|
|
|
uploadFlightUrl({ |
|
|
|
|
|
id: data.id, |
|
|
|
|
|
videoUrl: videoUrl.value ? videoUrl.value : data.videoUrl, |
|
|
|
|
|
srtUrl: srtUrl.value ? srtUrl.value : data.srtUrl, |
|
|
|
|
|
inclinedUrl: data.inclinedUrl + ',' + inclinedUrl.value, |
|
|
|
|
|
orthoUrl: data.orthoUrl + ',' + orthoUrl.value |
|
|
|
|
|
}).then(({ code }) => { |
|
|
|
|
|
console.log(code) |
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
emit('close') |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.btn { |
|
|
.btn { |
|
|
width: 70px; |
|
|
|
|
|
margin-left: calc(50% - 30px); |
|
|
|
|
|
|
|
|
width: 90px; |
|
|
|
|
|
margin-left: calc(50% - 45px); |
|
|
margin-top: 10px; |
|
|
margin-top: 10px; |
|
|
margin-bottom: 30px; |
|
|
margin-bottom: 30px; |
|
|
} |
|
|
} |