|
|
@@ -11,10 +11,12 @@
|
|
|
<img src="../../../assets/img/import.png" class="pic"/>
|
|
|
<div class="flex flex-center full-width flex-justify-start">
|
|
|
<span class="bold mr-20">文件上传</span>
|
|
|
- <uploads ref='upload' max="9" btn-text="点击进行文件上传" @before="before" @success="upload"
|
|
|
- :loading='loading'
|
|
|
- action='/api/wutong-parse-file/import-excel/v1/parse-excel'
|
|
|
- accept=".xls,.xlsx"/>
|
|
|
+ <div>
|
|
|
+ <uploads ref='upload' max="9" btn-text="点击进行文件上传" @before="before" @success="upload"
|
|
|
+ :loading='loading'
|
|
|
+ action='/api/wutong-parse-file/import-excel/v1/parse-excel'
|
|
|
+ accept=".xls,.xlsx"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="flex flex-justify-start full-width">
|
|
|
<span class="font-12 mt-10"
|
|
|
@@ -22,7 +24,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-divider/>
|
|
|
- <div class="hide-scrollbar full-width" style="height: 20vh;overflow-x: scroll">
|
|
|
+ <div class="hide-scrollbar full-width" style="height: 20vh;overflow-x: scroll" v-loading='loading'>
|
|
|
<div v-if='attaches.length === 0' class='full-width flex flex-center '>
|
|
|
<el-empty image-size='100'/>
|
|
|
</div>
|
|
|
@@ -165,10 +167,11 @@ export default {
|
|
|
this.$emit('close')
|
|
|
},
|
|
|
upload (res) {
|
|
|
- console.log(res)
|
|
|
this.attaches = res.fileList
|
|
|
this.$message.success('操作成功')
|
|
|
this.showImport = false
|
|
|
+ this.loading = false
|
|
|
+ this.close()
|
|
|
},
|
|
|
before (files) {
|
|
|
console.log(files)
|
|
|
@@ -201,6 +204,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
importExcel () {
|
|
|
+ this.loading = true
|
|
|
+ this.$message.success('正在导入,请稍后...')
|
|
|
this.$refs.upload.submit()
|
|
|
},
|
|
|
change (parentIndex, index) {
|