Selaa lähdekoodia

视频bug

tags/v1.0.0
吴迪 2 vuotta sitten
vanhempi
commit
c9c66421a9
1 muutettua tiedostoa jossa 19 lisäystä ja 16 poistoa
  1. +19
    -16
      src/views/task-manage/components/DrawComp.vue

+ 19
- 16
src/views/task-manage/components/DrawComp.vue Näytä tiedosto

@@ -123,7 +123,7 @@
<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"
@@ -131,7 +131,7 @@
@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"
@@ -215,7 +215,7 @@ const current = data.pilotStatus / 5 // 当前状态

const roleId = useUserStore().userInfo.id || '00a5a13322fc088cc1c4ba4c40d22fcs' // 默认为管理员id
// const roleId = '00a5a13322fc088cc1c4ba4c40d22fcs' // 调试id
// console.log(data.flightHandId) // 调试id
console.log(roleId, data.flightHandId) // 调试id

const formRef = ref() // 表格refs - 分配飞手
const formRefOrder = ref() // 表格refs - 飞手接单
@@ -338,27 +338,30 @@ const statusfile = async(status, list) => {
// }
// }
// })
const videoVal = ref({})
const srtVal = ref({})

// 视频和文件上传
const submitFile = async() => {
if (Object.keys(videoRefs.value.data.fileList).length === 0 ||
Object.keys(srtRefs.value.fileList).length === 0) return

loading.value = true
const res = videoRefs.value.handleUploadStart()
const srt = await srtRefs.value?.startUpload()
if (res?.videoId && srt?.srtUrl) {
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>

Loading…
Peruuta
Tallenna