上传文件中不可保存
This commit is contained in:
parent
e0519a475b
commit
9007f9204f
|
@ -2,7 +2,7 @@
|
||||||
<a-card :bordered="false" :title="pageName">
|
<a-card :bordered="false" :title="pageName">
|
||||||
<template slot="extra">
|
<template slot="extra">
|
||||||
<a-button @click="goback">返回</a-button>
|
<a-button @click="goback">返回</a-button>
|
||||||
<a-button type="primary" @click="save">保存</a-button>
|
<a-button type="primary" @click="save" :disabled="save">保存</a-button>
|
||||||
</template>
|
</template>
|
||||||
<a-tabs type="card" :default-active-key="parentTabKey" @change="parentcallback">
|
<a-tabs type="card" :default-active-key="parentTabKey" @change="parentcallback">
|
||||||
<a-tab-pane key="1" tab="文件上传">
|
<a-tab-pane key="1" tab="文件上传">
|
||||||
|
@ -157,6 +157,7 @@ import { dictionaryDropDown } from '@/api/sys/dictionaryItem';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
save:false,
|
||||||
pageName: '',
|
pageName: '',
|
||||||
// treeData: [],
|
// treeData: [],
|
||||||
ifResources: this.$route.query.ifResources,
|
ifResources: this.$route.query.ifResources,
|
||||||
|
@ -286,6 +287,9 @@ export default {
|
||||||
this.uploadLoading = true;
|
this.uploadLoading = true;
|
||||||
this.uploadButtonText = '上传中...';
|
this.uploadButtonText = '上传中...';
|
||||||
|
|
||||||
|
//不让他保存
|
||||||
|
this.save= true;
|
||||||
|
|
||||||
//处理视频上传
|
//处理视频上传
|
||||||
const data = new FormData();
|
const data = new FormData();
|
||||||
data.append('file', file);
|
data.append('file', file);
|
||||||
|
@ -299,6 +303,7 @@ export default {
|
||||||
axios
|
axios
|
||||||
.post(ossUpload(), data, { headers: header })
|
.post(ossUpload(), data, { headers: header })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
this.save = false;
|
||||||
this.uploadLoading = false;
|
this.uploadLoading = false;
|
||||||
this.uploadButtonText = '选择文件';
|
this.uploadButtonText = '选择文件';
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
|
|
Loading…
Reference in New Issue