课件上传
This commit is contained in:
parent
4998a082a8
commit
78f1b0b5af
|
@ -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> <a-upload list-type="picture" v-model="this.successOssFile" :beforeUpload="beforeUpload" :remove="deleteVideo" accept=".mp4"
|
||||
<span v-if="this.successOssFile.length < 1">视频上传:</span> <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>
|
||||
</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;
|
||||
|
|
Loading…
Reference in New Issue