|
|
@@ -127,7 +127,7 @@ |
|
|
|
ref="videoRefs" |
|
|
|
:upload-name="'视频'" |
|
|
|
:limit="1" |
|
|
|
class="upload" |
|
|
|
:class="{'uploads': remBtn}" |
|
|
|
@upload-status="vodStatusVideo" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
@@ -136,7 +136,6 @@ |
|
|
|
:btn-name="'视频'" |
|
|
|
:limit="1" |
|
|
|
:default-list="data.videoUrl" |
|
|
|
class="upload" |
|
|
|
@upload-status="vodStatusVideo" |
|
|
|
/> |
|
|
|
|
|
|
@@ -148,7 +147,7 @@ |
|
|
|
:btn-name="'轨迹'" |
|
|
|
:limit="1" |
|
|
|
:default-list="data.srtUrl" |
|
|
|
class="upload" |
|
|
|
:class="{'uploads': remBtn}" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
|
v-if="data.photographyWay === 2" |
|
|
@@ -158,7 +157,6 @@ |
|
|
|
:show-upload-btn="true" |
|
|
|
:limit="9" |
|
|
|
:default-list="data.orthoUrl" |
|
|
|
class="upload" |
|
|
|
@upload-status="statusfile" |
|
|
|
/> |
|
|
|
<fileOss |
|
|
@@ -169,11 +167,17 @@ |
|
|
|
:btn-name="'倾斜影像'" |
|
|
|
:limit="9" |
|
|
|
:default-list="data.inclinedUrl" |
|
|
|
class="upload" |
|
|
|
@upload-status="statusfile" |
|
|
|
/> |
|
|
|
|
|
|
|
<n-button v-if="data.photographyWay === 1 && roleId === data.flightHandId" type="primary" class="btn" :loading="loading" @click="submitFile"> |
|
|
|
<n-button |
|
|
|
v-if="data.photographyWay === 1 && !data.videoUrl" |
|
|
|
type="primary" |
|
|
|
class="btn" |
|
|
|
:loading="loading" |
|
|
|
:disabled="remBtn" |
|
|
|
@click="submitFile" |
|
|
|
> |
|
|
|
<n-icon> |
|
|
|
<UploadOutlined /> |
|
|
|
</n-icon> |
|
|
@@ -215,7 +219,7 @@ const current = data.pilotStatus / 5 // 当前状态 |
|
|
|
|
|
|
|
const roleId = useUserStore().userInfo.id || '00a5a13322fc088cc1c4ba4c40d22fcs' // 默认为管理员id |
|
|
|
// const roleId = '00a5a13322fc088cc1c4ba4c40d22fcs' // 调试id |
|
|
|
console.log(roleId, data.flightHandId) // 调试id |
|
|
|
// console.log(roleId, data.flightHandId) // 调试id |
|
|
|
|
|
|
|
const formRef = ref() // 表格refs - 分配飞手 |
|
|
|
const formRefOrder = ref() // 表格refs - 飞手接单 |
|
|
@@ -331,6 +335,7 @@ const statusfile = async(status, list) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 上传中取消 |
|
|
|
// 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) { |
|
|
@@ -340,8 +345,9 @@ const statusfile = async(status, list) => { |
|
|
|
// }) |
|
|
|
const videoVal = ref({}) |
|
|
|
const srtVal = ref({}) |
|
|
|
const remBtn = ref(false) |
|
|
|
|
|
|
|
watch(() => [videoVal.value.videoId, srtVal.value], async([val1, val2]) => { |
|
|
|
watch(() => [videoVal.value.videoId, srtVal.value], ([val1, val2]) => { |
|
|
|
if (val1 && Object.keys(val2).length !== 0) { |
|
|
|
loading.value = false |
|
|
|
const params = { |
|
|
@@ -350,16 +356,24 @@ watch(() => [videoVal.value.videoId, srtVal.value], async([val1, val2]) => { |
|
|
|
...srtVal.value |
|
|
|
} |
|
|
|
console.log(params) |
|
|
|
await uploadFlightUrl(params) |
|
|
|
uploadFlightUrl(params).then(({ code }) => { |
|
|
|
if (code !== 0) { |
|
|
|
remBtn.value = false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// 视频和文件上传 |
|
|
|
const submitFile = async() => { |
|
|
|
if (Object.keys(videoRefs.value.data.fileList).length === 0 || |
|
|
|
Object.keys(srtRefs.value.fileList).length === 0) return |
|
|
|
Object.keys(srtRefs.value.fileList).length === 0) { |
|
|
|
$message.warning('请选择视频和轨迹后再上传') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
loading.value = true |
|
|
|
remBtn.value = true |
|
|
|
videoVal.value = videoRefs.value.handleUploadStart() |
|
|
|
srtVal.value = await srtRefs.value?.startUpload() |
|
|
|
} |
|
|
@@ -432,7 +446,7 @@ const submitFile = async() => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.upload { |
|
|
|
.uploads { |
|
|
|
|
|
|
|
:deep(.n-button__icon) { |
|
|
|
display: none; // 隐藏删除按钮 |