课件上传

This commit is contained in:
18571350067 2022-02-26 17:06:47 +08:00
parent 4998a082a8
commit 78f1b0b5af
1 changed files with 7 additions and 8 deletions

View File

@ -2,7 +2,7 @@
<a-card :bordered="false" :title="pageName">
<template slot="extra">
<a-button @click="goback">返回</a-button>
<a-button type="primary" @click="save" :disabled="save">保存</a-button>
<a-button type="primary" @click="save" :disabled="isSave">保存</a-button>
</template>
<a-tabs type="card" :default-active-key="parentTabKey" @change="parentcallback">
<a-tab-pane key="1" tab="文件上传">
@ -32,9 +32,9 @@
</div>
<br />
<div>
<span v-show="this.successOssFile.length < 1">视频上传</span>&nbsp; <a-upload list-type="picture" v-model="this.successOssFile" :beforeUpload="beforeUpload" :remove="deleteVideo" accept=".mp4"
<span v-if="this.successOssFile.length < 1">视频上传</span>&nbsp; <a-upload list-type="picture" :default-file-list="this.successOssFile" :beforeUpload="beforeUpload" :remove="deleteVideo" accept=".mp4"
:disabled="this.uploadLoading">
<a-button v-show="this.successOssFile.length <1">
<a-button v-if="this.successOssFile.length <1">
<a-icon type="upload" /> {{this.uploadButtonText}}
</a-button>&nbsp;&nbsp;&nbsp;
</a-upload>
@ -157,7 +157,7 @@ import { dictionaryDropDown } from '@/api/sys/dictionaryItem';
export default {
data() {
return {
save:false,
isSave:false,
pageName: '',
// treeData: [],
ifResources: this.$route.query.ifResources,
@ -288,7 +288,7 @@ export default {
this.uploadButtonText = '上传中...';
//
this.save= true;
this.isSave= true;
//
const data = new FormData();
@ -303,7 +303,7 @@ export default {
axios
.post(ossUpload(), data, { headers: header })
.then(res => {
this.save = false;
this.isSave = false;
this.uploadLoading = false;
this.uploadButtonText = '选择文件';
if (res.data.code === 200) {
@ -525,10 +525,9 @@ export default {
successOssFile_['url'] = element.path;
successOssFile_['size'] = element.size;
this.successOssFile.push(successOssFile_);
console.log("文件问见",this.successOssFile);
});
console.log(this.successOssFile);
if (this.courseware.type == '1') {
this.fileUpload.tabkey = '1';
this.fileUpload.videoForm = this.courseware;