|
|
@@ -100,7 +100,7 @@ |
|
|
|
<div v-if="current === 4" class="cont"> |
|
|
|
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影像基本信息"> |
|
|
|
<template v-for="(it, i) in executionInfo" :key="i + it.label"> |
|
|
|
<n-descriptions-item :label="it.label"> |
|
|
|
<n-descriptions-item v-if="it?.isLive !== data.isLive" :label="it.label"> |
|
|
|
{{ it.value }} |
|
|
|
</n-descriptions-item> |
|
|
|
</template> |
|
|
@@ -108,22 +108,35 @@ |
|
|
|
<n-button v-if="roleId === data.flightHandId" type="Error" class="btn" @click="endFly">结束飞行</n-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 设备/影响基本信息 - 执行中: 管理员 --> |
|
|
|
<div v-if="current === 5" class="cont"> |
|
|
|
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影像基本信息"> |
|
|
|
<template v-for="(it, i) in executionInfo" :key="i + it.label"> |
|
|
|
<n-descriptions-item v-if="it?.isLive !== data.isLive" :label="it.label"> |
|
|
|
{{ it.value }} |
|
|
|
</n-descriptions-item> |
|
|
|
</template> |
|
|
|
</n-descriptions> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="current === 5" class="cont"> |
|
|
|
<div class="title">飞行文件</div> |
|
|
|
|
|
|
|
<UploadVod |
|
|
|
v-if="data.photographyWay === 1 && roleId === data.flightHandId" |
|
|
|
v-if="data.photographyWay === 1 && !data.videoUrl" |
|
|
|
ref="videoRefs" |
|
|
|
:upload-name="'视频'" |
|
|
|
:limit="1" |
|
|
|
class="upload" |
|
|
|
@upload-status="vodStatusVideo" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
|
v-if="data.photographyWay === 1 && roleId !== data.flightHandId" |
|
|
|
v-if="data.photographyWay === 1 && data.videoUrl" |
|
|
|
:file-type="'video'" |
|
|
|
:btn-name="'视频'" |
|
|
|
:limit="1" |
|
|
|
:default-list="data.videoUrl" |
|
|
|
class="upload" |
|
|
|
@upload-status="vodStatusVideo" |
|
|
|
/> |
|
|
|
|
|
|
@@ -135,6 +148,7 @@ |
|
|
|
:btn-name="'轨迹'" |
|
|
|
:limit="1" |
|
|
|
:default-list="data.srtUrl" |
|
|
|
class="upload" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
|
v-if="data.photographyWay === 2" |
|
|
@@ -144,6 +158,7 @@ |
|
|
|
:show-upload-btn="true" |
|
|
|
:limit="9" |
|
|
|
:default-list="data.orthoUrl" |
|
|
|
class="upload" |
|
|
|
@upload-status="statusfile" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
@@ -154,6 +169,7 @@ |
|
|
|
:btn-name="'倾斜影像'" |
|
|
|
:limit="9" |
|
|
|
:default-list="data.inclinedUrl" |
|
|
|
class="upload" |
|
|
|
@upload-status="statusfile" |
|
|
|
/> |
|
|
|
|
|
|
@@ -168,7 +184,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup name="DrawComp"> |
|
|
|
import { ref, defineProps, reactive, defineEmits, watchEffect } from 'vue' |
|
|
|
import { ref, defineProps, reactive, defineEmits, watch } from 'vue' |
|
|
|
import { TASK_STATUS } from '@/utils/dictionary' |
|
|
|
import { distributionPilot, pilotOrder, pilotStart, pilotEnd, uploadFlightUrl } from '@/api/task/index.js' |
|
|
|
import { form, getPilotList, getEquipment, getEquipmentMount, getCloudMount } from '../tools/drawForm' |
|
|
@@ -197,7 +213,9 @@ form.userForm = data |
|
|
|
|
|
|
|
const current = data.pilotStatus / 5 // 当前状态 |
|
|
|
|
|
|
|
const roleId = useUserStore().userInfo.id || '管理员id:00a5a13322fc088cc1c4ba4c40d22fcs' |
|
|
|
const roleId = useUserStore().userInfo.id || '00a5a13322fc088cc1c4ba4c40d22fcs' // 默认为管理员id |
|
|
|
// const roleId = '00a5a13322fc088cc1c4ba4c40d22fcs' // 调试id |
|
|
|
console.log(roleId, data.flightHandId) // 调试id |
|
|
|
|
|
|
|
const formRef = ref() // 表格refs - 分配飞手 |
|
|
|
const formRefOrder = ref() // 表格refs - 飞手接单 |
|
|
@@ -313,23 +331,37 @@ const statusfile = async(status, list) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 视频和文件上传 |
|
|
|
const submitFile = async() => { |
|
|
|
loading.value = true |
|
|
|
const res = videoRefs.value.handleUploadStart() |
|
|
|
const srt = await srtRefs.value?.startUpload() |
|
|
|
if (res?.videoId && srt?.srtUrl) { |
|
|
|
// watch(() => [videoRefs.value?.data?.fileList, srtRefs.value?.fileList], ([val1, val2]) => { |
|
|
|
// if (data.flightHandId === roleId) { |
|
|
|
// if (Object.keys(val1).length === 0 && Object.keys(val2).length === 0) { |
|
|
|
// loading.value = false |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }) |
|
|
|
const videoVal = ref({}) |
|
|
|
const srtVal = ref({}) |
|
|
|
|
|
|
|
watch(() => [videoVal.value.videoId, srtVal.value], async([val1, val2]) => { |
|
|
|
if (val1 && Object.keys(val2).length !== 0) { |
|
|
|
loading.value = false |
|
|
|
const params = { |
|
|
|
id: data.id, |
|
|
|
...res, |
|
|
|
...srt |
|
|
|
...videoVal.value, |
|
|
|
...srtVal.value |
|
|
|
} |
|
|
|
console.log(params) |
|
|
|
await uploadFlightUrl(params) |
|
|
|
} else { |
|
|
|
loading.value = false |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// 视频和文件上传 |
|
|
|
const submitFile = async() => { |
|
|
|
if (Object.keys(videoRefs.value.data.fileList).length === 0 || |
|
|
|
Object.keys(srtRefs.value.fileList).length === 0) return |
|
|
|
|
|
|
|
loading.value = true |
|
|
|
videoVal.value = videoRefs.value.handleUploadStart() |
|
|
|
srtVal.value = await srtRefs.value?.startUpload() |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
@@ -399,4 +431,11 @@ const submitFile = async() => { |
|
|
|
text-indent: 2em; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.upload { |
|
|
|
|
|
|
|
:deep(.n-button__icon) { |
|
|
|
display: none; // 隐藏删除按钮 |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |