上传文件中不可保存

This commit is contained in:
18571350067 2022-02-26 11:32:35 +08:00
parent e0519a475b
commit 9007f9204f
1 changed files with 6 additions and 1 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">保存</a-button>
<a-button type="primary" @click="save" :disabled="save">保存</a-button>
</template>
<a-tabs type="card" :default-active-key="parentTabKey" @change="parentcallback">
<a-tab-pane key="1" tab="文件上传">
@ -157,6 +157,7 @@ import { dictionaryDropDown } from '@/api/sys/dictionaryItem';
export default {
data() {
return {
save:false,
pageName: '',
// treeData: [],
ifResources: this.$route.query.ifResources,
@ -286,6 +287,9 @@ export default {
this.uploadLoading = true;
this.uploadButtonText = '上传中...';
//
this.save= true;
//
const data = new FormData();
data.append('file', file);
@ -299,6 +303,7 @@ export default {
axios
.post(ossUpload(), data, { headers: header })
.then(res => {
this.save = false;
this.uploadLoading = false;
this.uploadButtonText = '选择文件';
if (res.data.code === 200) {