导入增加错误提醒
This commit is contained in:
@@ -43,7 +43,12 @@
|
||||
<div class="name">导入进度</div>
|
||||
<el-progress class="exportPopover" :text-inside="true" :stroke-width="12" :percentage="importInfo.rate" />
|
||||
</div>
|
||||
<div class="errText"></div>
|
||||
<div class="errText" v-if="errorShow">
|
||||
<div class="deleteErr" @click="errorShow=false"><el-icon class="icon"><el-icon-Close/></el-icon></div>
|
||||
<el-scrollbar max-height="120px">
|
||||
<p v-for="item in errorList" :key="item">{{item.msg}}</p>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</div>
|
||||
@@ -77,7 +82,9 @@ export default {
|
||||
importDis:false,
|
||||
importTrue:false,
|
||||
progressShow:false,
|
||||
errorShow:false,
|
||||
importInfo:{},
|
||||
errorList:[]
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@@ -96,7 +103,11 @@ export default {
|
||||
if(res.data && (res.data.type == 5)){
|
||||
this.importInfo = res.data;
|
||||
this.progressShow = true;
|
||||
if(res.data.status == 1){
|
||||
if(res.data.status == 0){
|
||||
this.errorShow = true;
|
||||
this.errorList.push(res.data);
|
||||
}
|
||||
if(res.data.rate == 100){
|
||||
this.progressShow = false;
|
||||
this.$emit('importSuccess');
|
||||
}
|
||||
@@ -173,10 +184,10 @@ export default {
|
||||
}
|
||||
.deleteFile{
|
||||
position: absolute;
|
||||
right: -4px;
|
||||
top: -12px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: -6px;
|
||||
top: -10px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background: var(--el-color-danger);
|
||||
display: flex;
|
||||
@@ -193,7 +204,8 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 15px;color: var(--el-text-color-placeholder);
|
||||
margin-top: 15px;
|
||||
color: var(--el-text-color-placeholder);
|
||||
.btn{
|
||||
color: var(--el-color-primary);
|
||||
cursor: pointer;
|
||||
@@ -211,4 +223,26 @@ export default {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
.errText{
|
||||
margin: 15px 0 0 0;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
background: var(--el-color-danger-light-9);
|
||||
position: relative;
|
||||
p{
|
||||
color: var(--el-color-danger);
|
||||
font-size: 12px;
|
||||
padding: 3px 0;
|
||||
}
|
||||
.deleteErr{
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 4px;
|
||||
z-index: 20;
|
||||
cursor: pointer;
|
||||
.icon{
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user