Ver código fonte

Merge branch 'cfclub' of http://git.iwintrue.com/liaoxg/cfc into cfclub

iwt 1 mês atrás
pai
commit
63076c64ee
1 arquivos alterados com 9 adições e 7 exclusões
  1. 9 7
      cfc-frontend/pages/health/report-confirm.vue

+ 9 - 7
cfc-frontend/pages/health/report-confirm.vue

@@ -733,15 +733,14 @@ export default {
       this.groupExpandList = arr
       this.groupExpandList = arr
     },
     },
     _cssClass(status) {
     _cssClass(status) {
-      var map = { 'high': 'high', 'low': 'low', 'abnormal': 'abnormal', 'normal': 'normal', '缺乏': 'deficient', '偏低': 'low', '不足': 'insufficient', '正常': 'normal', '注意': 'warning', '偏高': 'high', '高风险': 'high-risk', '低风险': 'low-risk', '未检出': 'not-detected' }
+      var map = { 'high': 'high', 'low': 'low', 'abnormal': 'abnormal', 'normal': 'normal', '缺乏': 'deficient', '偏低': 'low', '不足': 'insufficient', '正常': 'normal', '注意': 'warning', '偏高': 'high', '异常': 'abnormal', '高风险': 'high-risk', '低风险': 'low-risk', '未检出': 'not-detected' }
       return map[status] || 'normal'
       return map[status] || 'normal'
     },
     },
     statusText(status) {
     statusText(status) {
-      if (status === 'high') return '偏高'
-      if (status === 'low') return '偏低'
-      if (status === 'abnormal') return '异常'
+      if (status === 'high' || status === '偏高') return '偏高'
+      if (status === 'low' || status === '偏低') return '偏低'
+      if (status === 'abnormal' || status === '异常') return '异常'
       if (status === '缺乏') return '缺乏'
       if (status === '缺乏') return '缺乏'
-      if (status === '偏低') return '偏低'
       if (status === '不足') return '不足'
       if (status === '不足') return '不足'
       if (status === '正常') return '正常'
       if (status === '正常') return '正常'
       if (status === '注意') return '注意'
       if (status === '注意') return '注意'
@@ -750,9 +749,12 @@ export default {
       if (status === '未检出') return '未检出'
       if (status === '未检出') return '未检出'
       return '正常'
       return '正常'
     },
     },
+    // 与 _cssClass 保持同一白名单:仅明确异常/需关注的状态计入异常数,
+    // 未知状态文本(解析器自由提取)一律视为正常,避免"样式正常却计入异常"的矛盾。
     isAbnormalStatus(status) {
     isAbnormalStatus(status) {
-      if (!status || status === 'normal' || status === '正常' || status === '低风险' || status === '未检出') return false
-      return true
+      if (!status) return false
+      var abnormalMap = { 'high': 1, 'low': 1, 'abnormal': 1, '偏高': 1, '偏低': 1, '异常': 1, '缺乏': 1, '不足': 1, '注意': 1, '高风险': 1 }
+      return !!abnormalMap[String(status).trim()]
     },
     },
     showHelp(ind) {
     showHelp(ind) {
       this.helpData = {
       this.helpData = {