|
|
@ -84,6 +84,7 @@ |
|
|
|
<div class="content_box"> |
|
|
|
<div class="left"> |
|
|
|
<el-upload |
|
|
|
v-if="fileList.length === 0" |
|
|
|
:headers="$getElUploadHeaders()" |
|
|
|
name="processFile" |
|
|
|
action="uploadUlr" |
|
|
@ -98,6 +99,12 @@ |
|
|
|
<i class="el-icon-upload" style="font-size: 58px; color: #c5c9d1"></i> |
|
|
|
<div class="el-upload__text" v-html="$t('upload.text')"></div> |
|
|
|
</el-upload> |
|
|
|
<section v-else class="uploadList"> |
|
|
|
<div v-for="file in fileList" :key="file.id" :file="file" style="display: flex; align-items: center"> |
|
|
|
<span>{{ file.name }}</span> |
|
|
|
<i class="el-icon-close" @click="removeFile(file)" style="cursor: pointer;"></i> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<p>4、上传按导入模板整理后的excel数据文件。</p> |
|
|
@ -255,7 +262,8 @@ export default { |
|
|
|
dataListLoading: false, |
|
|
|
dataList: [], |
|
|
|
groupList: [], |
|
|
|
fileCode: null, |
|
|
|
fileCode:null, |
|
|
|
fileList:[] |
|
|
|
}; |
|
|
|
}, |
|
|
|
props: {}, |
|
|
@ -379,6 +387,7 @@ export default { |
|
|
|
const { fileName, url } = res.data.data; |
|
|
|
this.createdFileName = fileName; |
|
|
|
this.createdFileUrl = url; |
|
|
|
this.fileList.push({name:fileName,url:url}) |
|
|
|
this.checkExtractExcelHead(); |
|
|
|
} else { |
|
|
|
this.$message.error(res.data.msg); |
|
|
@ -392,6 +401,9 @@ export default { |
|
|
|
}); |
|
|
|
this.$refs.upload.clearFiles(); |
|
|
|
}, |
|
|
|
removeFile(){ |
|
|
|
this.fileList = []; |
|
|
|
}, |
|
|
|
// 下载全部模板 |
|
|
|
async handleExportModuleAll() { |
|
|
|
let url = "/actual/base/residentBaseInfo/import/download-template"; |
|
|
@ -512,5 +524,14 @@ export default { |
|
|
|
@import "@/assets/scss/buttonstyle.scss"; |
|
|
|
@import "@/assets/scss/modules/management/detail-main.scss"; |
|
|
|
@import "@/assets/scss/pages/smartImport.scss"; |
|
|
|
.uploadList{ |
|
|
|
width: 99%; |
|
|
|
height: 180px; |
|
|
|
border: 1px dashed #ccc; |
|
|
|
border-radius: 5px; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|