修改文件上传

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}`);
@@ -120,7 +120,7 @@
getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', //查看
deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch', //删除
pullMessage: 'document/bussDocumentLibraryEO/pullMessage',//推送
importZipUrl: 'document/bussDocumentLibraryEO/importZip'//导入
importZipUrl: '/document/bussDocumentLibraryEO/importZip'//导入
},
idList: []
}
@@ -182,12 +182,12 @@
},
//推送
handleCompare() {
if (this.idList.length > 0){
if (this.idList.length > 0) {
this.$nextTick(() => {
this.$refs.libraryPushRef.visible = true
this.$refs.libraryPushRef.tableKey = this.idList
})
}else{
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
@@ -272,7 +272,7 @@
path: '/docManage/library/detail',
query: item
})
window.open(newUrl.href, "_blank");
window.open(newUrl.href, '_blank')
}
}
}