Explorar el Código

Merge branch 'wudi' of gitadmin/tuoheng_pilot_web into develop

tags/v1.0.0
吴迪 hace 2 años
padre
commit
2726cf8f7f
Se han modificado 1 ficheros con 19 adiciones y 16 borrados
  1. +19
    -16
      src/views/task-manage/components/DrawComp.vue

+ 19
- 16
src/views/task-manage/components/DrawComp.vue Ver fichero

@@ -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>

Cargando…
Cancelar
Guardar