fix:excel报错显示修改
This commit is contained in:
1 parent
437815fa32
commit
ce1e6030fc
2 files changed
+15
-4
No files matched your search
@@ -40,10 +40,10 @@
|
|||||||
<!--校验失败错误数据-->
|
<!--校验失败错误数据-->
|
||||||
<el-dialog :title="$t('excel.validationFailureData')" v-model="state.errorVisible" :close-on-click-modal="false" draggable>
|
<el-dialog :title="$t('excel.validationFailureData')" v-model="state.errorVisible" :close-on-click-modal="false" draggable>
|
||||||
<el-table :data="state.errorData">
|
<el-table :data="state.errorData">
|
||||||
<el-table-column property="row" align="center" :label="$t('excel.lineNumbers')" width="100" />
|
<el-table-column property="lineNum" align="center" :label="$t('excel.lineNumbers')" width="100" />
|
||||||
<el-table-column property="reasons" align="center" :label="$t('excel.misDescription')" show-overflow-tooltip>
|
<el-table-column property="errors" align="center" :label="$t('excel.misDescription')" show-overflow-tooltip>
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-tag type="danger" v-for="error in scope.row.reasons" :key="error">{{ error }}</el-tag>
|
<el-tag type="danger" v-for="error in scope.row.errors" :key="error">{{ error }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -123,6 +123,9 @@ const handleFileSuccess = (response: any) => {
|
|||||||
useMessage().error(response.msg ? response.msg : "导入失败,以下数据不合法")
|
useMessage().error(response.msg ? response.msg : "导入失败,以下数据不合法")
|
||||||
state.errorVisible = true
|
state.errorVisible = true
|
||||||
state.errorData = response.data?.errors
|
state.errorData = response.data?.errors
|
||||||
|
if (!state.errorData && response.data) {
|
||||||
|
state.errorData = response.data
|
||||||
|
}
|
||||||
uploadRef.value.clearFiles()
|
uploadRef.value.clearFiles()
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
emit?.("refreshDataList")
|
emit?.("refreshDataList")
|
||||||
|
|||||||
@@ -78,7 +78,15 @@
|
|||||||
<el-table-column prop="createTime" width="200" label="创建时间" />
|
<el-table-column prop="createTime" width="200" label="创建时间" />
|
||||||
<el-table-column label="操作" width="300" fixed="right">
|
<el-table-column label="操作" width="300" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button icon="Document" text type="primary" v-auth="'wallet_walletRechargeApply_edit'" @click="doInfo(row)">数据</el-button>
|
<el-button
|
||||||
|
v-if="row.importTime"
|
||||||
|
icon="Document"
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
v-auth="'wallet_walletRechargeApply_edit'"
|
||||||
|
@click="doInfo(row)"
|
||||||
|
>数据</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="row.importTime && !row.processId"
|
v-if="row.importTime && !row.processId"
|
||||||
icon="Connection"
|
icon="Connection"
|
||||||
|
|||||||
Reference in new issue
Block a user