修改提交

This commit is contained in:
曹辉 2023-05-04 10:03:00 +08:00
parent 451ad0dbd6
commit 851fdb9f4c

View File

@ -29,6 +29,7 @@
<el-col :xs="24" :md="24" :style="{ height: '350px' }">
<div class="avatar-upload-preview">
<video
v-if="openimg"
style="width: 100%; height: 100%"
v-bind:src="videoForm.showVideoPath"
class="avatar video-avatar"
@ -66,61 +67,6 @@
<el-button v-else :loading="!uploadbtn" type="primary" size="small">提交中...</el-button>
</el-col>
</el-row>
<!-- <el-upload
class="avatar-uploader"
action="http://192.168.16.30:8080/system/trainingItem/uploadVideoUrl"
:show-file-list="false"
accept=".mp4"
:on-progress="uploadVideoProcess"
:auto-upload="false"
:file-list="fileList"
:before-upload="beforeUpload"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>-->
<!-- <el-button size="small">选择
<i class="el-icon-upload el-icon--right"></i>
</el-button>-->
<!-- </el-upload> -->
<!-- <el-upload
action="#"
:http-request="requestUpload"
:show-file-list="false"
:before-upload="beforeUpload"
>
<el-button size="small">
选择
<i class="el-icon-upload el-icon--right"></i>
</el-button>
</el-upload>-->
<!-- <el-col :lg="{ span: 1, offset: 2 }" :md="2">
<el-button
icon="el-icon-plus"
size="small"
@click="changeScale(1)"
></el-button>
</el-col>
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
<el-button
icon="el-icon-minus"
size="small"
@click="changeScale(-1)"
></el-button>
</el-col>
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
<el-button
icon="el-icon-refresh-left"
size="small"
@click="rotateLeft()"
></el-button>
</el-col>
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
<el-button
icon="el-icon-refresh-right"
size="small"
@click="rotateRight()"
></el-button>
</el-col>-->
</el-dialog>
</div>
</template>
@ -174,13 +120,16 @@ export default {
this.uploadbtn = true;
this.filedata.type = this.type;
this.items = this.item;
this.videoForm.showVideoPath = baseurl + this.tovideo;
this.video.VideoPath = baseurl + this.tovideo;
this.title = "上传视频";
},
watch: {
tovideo: {
handler(newimg, oldimg) {
console.log(newimg, oldimg);
this.uploadbtn = true;
this.videoForm.showVideoPath = baseurl + this.tovideo;
this.video.VideoPath = baseurl + this.tovideo;
}
},
@ -208,6 +157,7 @@ export default {
}
},
loadJsonFromFile(file, fileList) {
console.log(file);
const reader = new FileReader();
this.previews.data = file.raw;
this.videoForm.showVideoPath = URL.createObjectURL(file.raw);
@ -255,7 +205,6 @@ export default {
};
},
handleAvatarSuccess(res, file) {
console.log(res);
this.video.VideoPath = baseurl + res.imgUrl;
this.items.itemDirectoryUrl = res.imgUrl;
this.$emit("item", JSON.stringify(this.items));