|
|
|
@ -106,13 +106,19 @@ |
|
|
|
<el-button type="info" |
|
|
|
@click="exportHandle()">{{ $t('export') }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="info" |
|
|
|
@click="exportMoudleHandle()">导出模板</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-upload class="upload-demo" |
|
|
|
v-loading="dataListLoading" |
|
|
|
:action="uploadUrl" |
|
|
|
:on-preview="handlePreview" |
|
|
|
multiple |
|
|
|
:limit="1" |
|
|
|
:on-exceed="handleExceed"> |
|
|
|
:on-success='uploadSuccess' |
|
|
|
:on-error='errorExceed'> |
|
|
|
<el-button type="primary">点击上传</el-button> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
@ -201,6 +207,26 @@ |
|
|
|
<add-or-update v-if="addOrUpdateVisible" |
|
|
|
ref="addOrUpdate" |
|
|
|
@refreshDataList="getDataList"></add-or-update> |
|
|
|
<!-- 错误信息 --> |
|
|
|
<el-dialog :visible.sync="faultDataVisible"> |
|
|
|
<el-table :data="errordataList" |
|
|
|
title="错误详情" |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column prop="erroLine" |
|
|
|
label="行数" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
<el-table-column prop="errorInfo" |
|
|
|
label="错误信息" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
</el-table> |
|
|
|
<template slot="footer"> |
|
|
|
<el-button type="primary" |
|
|
|
@click="faultDataVisible = false">确定</el-button> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</template> |
|
|
|
@ -218,7 +244,8 @@ export default { |
|
|
|
getDataListIsPage: true, |
|
|
|
deleteURL: '/app-user/partymembers', |
|
|
|
deleteIsBatch: true, |
|
|
|
exportURL: '/app-user/partymembers/export' |
|
|
|
exportURL: '/app-user/partymembers/export', |
|
|
|
exportMoudle: '/app-user/partymembers/exportMoudle' |
|
|
|
}, |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
@ -239,7 +266,9 @@ export default { |
|
|
|
registOptions: [], |
|
|
|
postOptions: [], |
|
|
|
timeRange: [], |
|
|
|
upLoadUrl: '' |
|
|
|
upLoadUrl: '', |
|
|
|
faultDataVisible: false, |
|
|
|
errordataList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -350,11 +379,29 @@ export default { |
|
|
|
this.dataListLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleExceed (files, fileList) { |
|
|
|
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`) |
|
|
|
}, |
|
|
|
beforeRemove (file, fileList) { |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`) |
|
|
|
}, |
|
|
|
errorExceed (file, fileList) { |
|
|
|
this.$message.error('上传失败请重试') |
|
|
|
}, |
|
|
|
uploadSuccess (response, file, fileList) { |
|
|
|
this.dataListLoading = false |
|
|
|
console.log(response) |
|
|
|
if (response.data !== null && response.data.length > 0) { |
|
|
|
this.faultDataVisible = true |
|
|
|
this.errordataList = response.data |
|
|
|
console.log(this.faultDataVisible) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.getDataList() |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|