|
|
@@ -105,10 +105,51 @@ |
|
|
|
<div v-if="current === 5" class="cont"> |
|
|
|
<div class="title">飞行文件</div> |
|
|
|
|
|
|
|
<UploadVod v-if="data.photographyWay === 1" ref="videoRefs" :auto-upload="true" :upload-name="'选择【视频】'" :limit="1" @upload-status="vodStatusVideo" /> |
|
|
|
<fileOss v-if="data.photographyWay === 1" ref="srtRefs" :file-type="'srt'" :key-name="'srtUrl'" :btn-name="'选择【轨迹】'" :limit="1" :default-list="data.srtUrl" @upload-status="vodStatusSRT" /> |
|
|
|
<fileOss v-if="data.photographyWay === 2" ref="ortRefs" :file-type="'tif'" :key-name="'orthoUrl'" :btn-name="'选择【正射影像】'" :limit="9" :default-list="data.orthoUrl" @upload-status="vodStatusZS" /> |
|
|
|
<fileOss v-if="data.photographyWay === 3" ref="inclinedRefs" :file-type="'tif'" :key-name="'inclinedUrl'" :btn-name="'选择【倾斜影像】'" :limit="9" :default-list="data.inclinedUrl" @upload-status="vodStatusQX" /> |
|
|
|
<UploadVod |
|
|
|
v-if="data.photographyWay === 1 && isAdmin" |
|
|
|
ref="videoRefs" |
|
|
|
:auto-upload="true" |
|
|
|
:upload-name="'选择【视频】'" |
|
|
|
:limit="1" |
|
|
|
@upload-status="vodStatusVideo" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
|
v-if="data.photographyWay === 1 && !isAdmin" |
|
|
|
:file-type="'video'" |
|
|
|
:btn-name="'选择【视频111】'" |
|
|
|
:limit="1" |
|
|
|
:default-list="data.videoUrl" |
|
|
|
@upload-status="vodStatusVideo" |
|
|
|
/> |
|
|
|
|
|
|
|
<fileOss |
|
|
|
v-if="data.photographyWay === 1" |
|
|
|
ref="srtRefs" |
|
|
|
:file-type="'srt'" |
|
|
|
:key-name="'srtUrl'" |
|
|
|
:btn-name="'选择【轨迹】'" |
|
|
|
:limit="1" |
|
|
|
:default-list="data.srtUrl" |
|
|
|
@upload-status="vodStatusSRT" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
|
v-if="data.photographyWay === 2" |
|
|
|
ref="ortRefs" |
|
|
|
:file-type="'tif'" |
|
|
|
:key-name="'orthoUrl'" |
|
|
|
:btn-name="'选择【正射影像】'" |
|
|
|
:limit="9" |
|
|
|
:default-list="data.orthoUrl" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
|
v-if="data.photographyWay === 3" |
|
|
|
ref="inclinedRefs" |
|
|
|
:file-type="'tif'" |
|
|
|
:key-name="'inclinedUrl'" |
|
|
|
:btn-name="'选择【倾斜影像】'" |
|
|
|
:limit="9" |
|
|
|
:default-list="data.inclinedUrl" |
|
|
|
/> |
|
|
|
|
|
|
|
<n-button v-if="isAdmin" type="primary" class="btn" :loading="loading" @click="submitFile"> |
|
|
|
<n-icon> |
|
|
@@ -160,6 +201,7 @@ const executionInfo = execution(data) // 执行中信息 |
|
|
|
|
|
|
|
const videoUrl = ref('') // 视频文件 |
|
|
|
const videoId = ref('') // 视频文件 |
|
|
|
const videoStatus = ref('') // 视频文件 |
|
|
|
const srtUrl = ref('') // srt文件 |
|
|
|
// const inclinedUrl = ref('') // 倾斜摄影 |
|
|
|
// const orthoUrl = ref('') // 正射影像 |
|
|
@@ -233,6 +275,7 @@ const endFly = () => { |
|
|
|
// 上传 - 视频 |
|
|
|
const vodStatusVideo = ({ status, list, videoIds }) => { |
|
|
|
console.log(status, list, videoIds) |
|
|
|
videoStatus.value = status |
|
|
|
const arr = [] |
|
|
|
for (var key in list) { |
|
|
|
arr.push(list[key].url) |
|
|
@@ -246,14 +289,6 @@ const vodStatusVideo = ({ status, list, videoIds }) => { |
|
|
|
const vodStatusSRT = async(status) => { |
|
|
|
srtUrl.value = status |
|
|
|
console.log('srtUrl: ---------------', srtUrl.value, 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() |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
// watchEffect(() => [videoUrl, srtUrl], ([videoVal], [srtVal]) => { |
|
|
@@ -270,13 +305,13 @@ const submitFile = () => { |
|
|
|
if (data.photographyWay === 1) { // 视频 和 srt |
|
|
|
// videoRefs.value.data.uploader.startUpload() |
|
|
|
srtRefs.value?.startUpload().then(res => { |
|
|
|
console.log('res:', res) |
|
|
|
console.log('srtRefs - res:', res) |
|
|
|
if (!res.includes('error')) { |
|
|
|
uploadFlightUrl({ |
|
|
|
id: data.id, |
|
|
|
videoUrl: videoUrl.value, |
|
|
|
videoId: videoId.value, |
|
|
|
...res |
|
|
|
...res[0] |
|
|
|
}).then(({ code }) => { |
|
|
|
if (code === 0) { |
|
|
|
emit('close') |