|
@@ -18,7 +18,11 @@
|
|
|
<template v-if="is_status === 'show'">
|
|
|
<div class="show">
|
|
|
<div class="left">
|
|
|
- <el-card v-for="(item, i) in selectList()" :key="i">
|
|
|
+ <el-card
|
|
|
+ style="margin-bottom: 1em"
|
|
|
+ v-for="(item, i) in selectList()"
|
|
|
+ :key="i"
|
|
|
+ >
|
|
|
<p
|
|
|
class="list"
|
|
|
style="font-size: 12px; font-weight: 400; color: #888"
|
|
@@ -46,6 +50,7 @@
|
|
|
<div
|
|
|
@click="() => selectList(i)"
|
|
|
class="item"
|
|
|
+ :style="{ backgroundColor: select === i ? '#d9e6ff' : '#fff' }"
|
|
|
v-for="(item, i) in err_text"
|
|
|
:key="i"
|
|
|
>
|
|
@@ -73,7 +78,7 @@
|
|
|
"
|
|
|
>
|
|
|
<p v-text="item.text" style="line-height: 1.5em"></p>
|
|
|
- <p v-text="geterrNum(i)" style="line-height: 1.5em"></p>
|
|
|
+ <p v-text="geterrNum(i) + '个'" style="line-height: 1.5em"></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -92,6 +97,8 @@ const props = defineProps({
|
|
|
headTitle: String,
|
|
|
html: Function,
|
|
|
text: Function,
|
|
|
+ setHtml: Function,
|
|
|
+ setisupText: Function,
|
|
|
});
|
|
|
let li = [];
|
|
|
let select = ref(0);
|
|
@@ -140,10 +147,22 @@ const selectList = i => {
|
|
|
const index = !i && i !== 0 ? select.value : i;
|
|
|
select.value = index;
|
|
|
let l = [];
|
|
|
+ props.setisupText(true);
|
|
|
for (let o = 0; o < li.length; o++) {
|
|
|
if (index === 0) l.push(li[o]);
|
|
|
else if (li[o].errorType === index) l.push(li[o]);
|
|
|
+
|
|
|
+ let html = props.html();
|
|
|
+ const rex = new RegExp(li[o].sourceText);
|
|
|
+ html.replace(
|
|
|
+ rex,
|
|
|
+ `<span style="border-bottom: 1px solid ${
|
|
|
+ err_text.value[li[o].errorType].color
|
|
|
+ }">${li[o].sourceText}</span>`
|
|
|
+ );
|
|
|
+ props.setHtml(html);
|
|
|
}
|
|
|
+ props.setisupText(false);
|
|
|
return l;
|
|
|
};
|
|
|
|
|
@@ -161,7 +180,6 @@ const jiaoyue = () => {
|
|
|
})
|
|
|
.then(r => {
|
|
|
if (r.errCode !== 0) return;
|
|
|
- console.log(r);
|
|
|
li = r.alerts || [];
|
|
|
is_status.value = li.length ? 'show' : 'none';
|
|
|
})
|
|
@@ -171,8 +189,8 @@ const jiaoyue = () => {
|
|
|
};
|
|
|
jiaoyue();
|
|
|
defineExpose({
|
|
|
- jiaoyue
|
|
|
-})
|
|
|
+ jiaoyue,
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
@@ -294,6 +312,7 @@ ul > li {
|
|
|
}
|
|
|
.show .right {
|
|
|
display: inline-block;
|
|
|
+ width: 30%;
|
|
|
}
|
|
|
.list {
|
|
|
font-size: 14px;
|
|
@@ -342,6 +361,7 @@ ul > li {
|
|
|
font-size: 0;
|
|
|
}
|
|
|
.item {
|
|
|
+ padding: 7px 0 0 10px;
|
|
|
margin-bottom: 1em;
|
|
|
}
|
|
|
</style>
|