修改文件上传
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user