修复 导入Excel时出现异常 未能获取到提示信息 #13

Merged
hy merged 1 commits from dev into staging 2025-08-27 15:46:12 +08:00
3 changed files with 13 additions and 9 deletions
Showing only changes of commit 7d3f6c7001 - Show all commits

View File

@ -131,8 +131,9 @@
<template #default="scope"> <template #default="scope">
<span v-if="!scope.row.reliefApplication">未申请</span> <span v-if="!scope.row.reliefApplication">未申请</span>
<span v-else <span v-else
>{{ scope.row.reliefSubTime }} {{ scope.row.amountRelief }} >{{ scope.row.reliefSubTime }}申请{{ scope.row.amountRelief }} <br />{{
{{ scope.row.reliefType }} scope.row.reliefType
}}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -693,9 +694,10 @@ const importData = () => {
if (res.code !== 200) return ElMessage.error(res.message); if (res.code !== 200) return ElMessage.error(res.message);
else return ElMessage.success("所有数据录入成功"); else return ElMessage.success("所有数据录入成功");
} else if (res.type === "application/json") { } else if (res.type === "application/json") {
let json = await res.text(); let json = JSON.parse(await res.text());
if (json !== undefined && json.Code !== 200) { let code = json.code || json.Code;
return ElMessage.error(json.Message); if (json !== undefined && code !== 200) {
return ElMessage.error(json.message);
} else { } else {
return ElMessage.success("操所有数据录入成功作成功"); return ElMessage.success("操所有数据录入成功作成功");
} }

View File

@ -704,8 +704,9 @@ const importData = () => {
if (res.code !== 200) return ElMessage.error(res.message); if (res.code !== 200) return ElMessage.error(res.message);
else return ElMessage.success("所有数据录入成功"); else return ElMessage.success("所有数据录入成功");
} else if (res.type === "application/json") { } else if (res.type === "application/json") {
let json = await res.text(); let json = JSON.parse(await res.text());
if (json !== undefined && json.Code !== 200) { let code = json.code || json.Code;
if (json !== undefined && code !== 200) {
return ElMessage.error(json.Message); return ElMessage.error(json.Message);
} else { } else {
return ElMessage.success("操所有数据录入成功作成功"); return ElMessage.success("操所有数据录入成功作成功");

View File

@ -452,8 +452,9 @@ function handleImport() {
return ElMessage.success("所有数据录入成功"); return ElMessage.success("所有数据录入成功");
} }
} else if (res.type === "application/json") { } else if (res.type === "application/json") {
let json = await res.text(); let json = JSON.parse(await res.text());
if (json !== undefined && json.Code !== 200) { let code = json.code || json.Code;
if (json !== undefined && code !== 200) {
return ElMessage.error(json.Message); return ElMessage.error(json.Message);
} else { } else {
loadList(); loadList();