This commit is contained in:
sjl
2025-10-24 16:14:01 +08:00
parent fd2c11cf90
commit 1c90c46806

View File

@@ -102,7 +102,7 @@
:value="item.value"
>
<div style="display: flex; align-items: center; justify-content: space-between">
<span v-if="item.resultFlag === 1">{{ item.label }}</span>
<span v-if="item.resultFlag === 1" >{{ item.label }}</span>
<span v-else-if="item.resultFlag === 2" style="color: #ee6666;">{{ item.label }}</span>
<span v-else-if="item.resultFlag === 4" style="color: #fac858;">{{ item.label }}</span>
</div>
@@ -298,7 +298,7 @@ const initGetResult = async () => {
scriptNameOptions.value = selectScript.value.map(item => ({
label: item.scriptName,
value: item.scriptName,
resultFlag: item.resultFlag
resultFlag: item.resultFlag?? 0
}))
// 默认选中第一个选项
@@ -478,7 +478,8 @@ const handleNodeClick = (data: any) => {
//.filter(item => item.code !== 'wave_data' && item.code !== 'FREQ')
.map(item => ({
label: item.scriptName,
value: item.scriptName
value: item.scriptName,
resultFlag: item.resultFlag ?? 0
}))
// 每次选中录波数据时都重置为第一个选项并触发getResults
@@ -603,16 +604,13 @@ defineExpose({
}
// 根据 resultFlag 设置不同颜色
&[data-result-flag="1"] {
color: #67c23a; // 绿色 - 符合
}
&[data-result-flag="2"] {
color: #f56c6c; // 红色 - 不符合
color: #ee6666; // 红色 - 不符合
}
&[data-result-flag="4"] {
color: #e6a23c; // 橙色 - 警告
color: #fac858; // 橙色 - 警告
}
}
}