修改文件上传

This commit is contained in:
qq787203167
2022-03-07 15:18:31 +08:00
parent 3a07e28dcf
commit e22408e5e3
2 changed files with 8 additions and 6 deletions
+4 -2
View File
@@ -3,7 +3,7 @@
<a-upload name="file" :showUploadList="false"
class="upload-text"
:multiple="false" :headers="tokenHeader"
:action="url.importZipUrl"
:action="importUrl"
@change="handleImportZip"
accept=".zip">
<a-icon type="import" :rotate="270"/>
@@ -15,6 +15,7 @@
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import eventBUs from '../../common/event'
export default {
name: 'index',
props:{
@@ -26,6 +27,7 @@
data(){
return{
tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
importUrl:window._CONFIG['domianURL']+this.url.importZipUrl,
}
},
mounted() {
@@ -59,7 +61,7 @@
} else {
this.$message.success(info.file.response.message || `${info.file.name} 文件导入成功`)
}
this.loadData()
eventBUs.$emit('searchReset')
this.spinning = false
} else {
this.$message.error(`${info.file.name} ${info.file.response.message}`);