|
|
|
@ -1275,6 +1275,17 @@ const isNotWrite = (val:any) =>{ |
|
|
|
//liwenxuan 20240108 vidioupload start |
|
|
|
|
|
|
|
import { VideoMsg } from '@/api/DesignForm/types' |
|
|
|
import { genFileId } from 'element-plus' |
|
|
|
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus' |
|
|
|
|
|
|
|
const upload = ref<UploadInstance>() |
|
|
|
const handleExceed: UploadProps['onExceed'] = (files) => { |
|
|
|
upload.value!.clearFiles() |
|
|
|
const file = files[0] as UploadRawFile |
|
|
|
file.uid = genFileId() |
|
|
|
upload.value!.handleStart(file) |
|
|
|
} |
|
|
|
|
|
|
|
const videoIndex = ref(0); |
|
|
|
const videoMsgArr:VideoMsg[] = reactive<VideoMsg[]>([{ |
|
|
|
CreatedAt: '', |
|
|
|
@ -1457,15 +1468,18 @@ const handleClose = (done: () => void) => { |
|
|
|
<el-row v-else-if="item.type === 'uploadvideo_url'"> |
|
|
|
<!-- {{ controlData.control }} --> |
|
|
|
<el-upload |
|
|
|
v-if="!controlData.control.videoMsg[videoIndex].videoReady" |
|
|
|
|
|
|
|
:action="uploadUrl" :before-remove="beforeRemove" |
|
|
|
:on-success="videoUploadOk" :show-file-list="true" |
|
|
|
:on-error="videoUploadErr" |
|
|
|
|
|
|
|
:limit="1" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
accept=".mp4,.MOV,.WMV,.FLV,.AVI,.AVCHD,.WebM,.MKV,.rmvb"> |
|
|
|
<el-button type="primary">点此上传</el-button> |
|
|
|
<el-button v-if="!controlData.control.videoMsg[videoIndex].videoReady" type="primary">点此上传</el-button> |
|
|
|
<el-button v-if="controlData.control.videoMsg[videoIndex].videoReady" type="primary">已上传,点击修改</el-button> |
|
|
|
</el-upload> |
|
|
|
<el-button v-if="controlData.control.videoMsg[videoIndex].videoReady" type="primary">已上传<!-- ,点击修改 --></el-button> |
|
|
|
<!-- <el-button v-if="controlData.control.videoMsg[videoIndex].videoReady" type="primary">已上传,点击修改</el-button> |
|
|
|
v-if="!controlData.control.videoMsg[videoIndex].videoReady"--> |
|
|
|
</el-row> |
|
|
|
<!-- <el-row v-else-if="item.type === 'uploadvideo_poster'"> |
|
|
|
<el-upload |
|
|
|
|