|
|
@@ -50,12 +50,9 @@
|
|
|
失败 <span class="err-sum">{{ errCount }}</span> 条
|
|
|
</div>
|
|
|
<div class="err-info">
|
|
|
- <div v-if="errCount === 0">未检测到相机数据</div>
|
|
|
- <div v-else>
|
|
|
- <ul v-for="(item, index) in errDetail" :key="index">
|
|
|
- <li v-html="item"></li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
+ <ul v-for="(item, index) in errDetail" :key="index">
|
|
|
+ <li v-html="item"></li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<el-button type="primary" @click="handleErrComfirm"> 确定 </el-button>
|
|
|
@@ -174,16 +171,18 @@ const handleUploadSuccess = (response, _file, _fileList) => {
|
|
|
errCount.value = response.data.failCount;
|
|
|
errDetail.value = response.data.errorList;
|
|
|
|
|
|
- errDetail.value.forEach((item, index) => {
|
|
|
- if (item.indexOf('【添加失败】') >= 0) {
|
|
|
- errDetail.value[index] = item.replace('【添加失败】', '<span style="color: #ff4d4f">【添加失败】</span>')
|
|
|
- } else if (item.indexOf('【添加成功】') >= 0) {
|
|
|
- errDetail.value[index] = item.replace('【添加成功】', '<span style="color: #52c41a">【添加成功】</span>')
|
|
|
- }
|
|
|
- })
|
|
|
+ if (errDetail.value.length > 0) {
|
|
|
+ errDetail.value.forEach((item, index) => {
|
|
|
+ if (item.indexOf('【添加失败】') >= 0) {
|
|
|
+ errDetail.value[index] = item.replace('【添加失败】', '<span style="color: #ff4d4f">【添加失败】</span>')
|
|
|
+ } else if (item.indexOf('【添加成功】') >= 0) {
|
|
|
+ errDetail.value[index] = item.replace('【添加成功】', '<span style="color: #52c41a">【添加成功】</span>')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
// 1.全部添加成功 —— failCount === 0
|
|
|
- if (errCount.value === 0 && sucCount.value != 0) {
|
|
|
+ if (sucCount.value != 0 && errCount.value === 0 && errDetail.value.length === 0) {
|
|
|
ElMessage({
|
|
|
message: '添加成功',
|
|
|
type: 'success',
|