diff --git a/.env.development b/.env.development index 0676c220..03b74a85 100644 --- a/.env.development +++ b/.env.development @@ -7,9 +7,7 @@ ENV = 'development' #VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' - -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' - +#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # VITE_APP_BASE_API_Url = 'http://192.168.247.200' @@ -17,7 +15,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # VITE_APP_BASE_API_Url = 'http://192.168.108.129' # dev -#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' +VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' # sit @@ -30,6 +28,9 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # DEV # app入口 + +#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' + # VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' # VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786' # VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786' diff --git a/src/components/examination/es-analysis.vue b/src/components/examination/es-analysis.vue index 996216ae..cab4acd9 100644 --- a/src/components/examination/es-analysis.vue +++ b/src/components/examination/es-analysis.vue @@ -11,7 +11,7 @@ {{ item.gradeDimens }}: {{ item.anlyGrade }} - + 未命中: @@ -56,12 +56,15 @@ return optionErrorIcon(); } }); - + const keywords = computed(() => { - if (!props.value.relKeyword) return []; + if (!props.value?.relKeyword) return []; return props.value.relKeyword.split(/[,、/]/).map((key) => key.trim()); }); - + const keywordsLength = computed(() => { + if (!props.value.relKeyword) return 0; + return props.value.relKeyword.split(/[,、]/).map((key) => key.trim()).length; + }); const highlightedText = computed(() => { // 如果没有关键词,直接返回原文本 if (!keywords.value.length) return '命中:' + props.anserResult; @@ -120,6 +123,39 @@ return missing; }); + // 找出答案中存在的关键词 + const hitKeywords = computed(() => { + const relKeyword = props.value.relKeyword; + if (!props.anserResult) { + return []; + } + + // 步骤1:按顿号拆分关键词组 + const keywordGroups = relKeyword.split('、'); + const missing = []; + // 步骤2:遍历每个关键词组,检查是否存在任意一种说法 + keywordGroups.forEach((group) => { + // 拆分同关键词的不同说法(/ 分隔) + const keywordVariants = group.split('/'); + let isFound = false; + + // 检查答案中是否包含任意一种说法 + for (const variant of keywordVariants) { + // 可选:增加 trim() 忽略首尾空格,提升匹配容错 + if (props.anserResult.trim().includes(variant.trim())) { + isFound = true; + break; + } + } + + // 未找到则加入缺失列表 + if (isFound) { + missing.push(group); + } + }); + + return missing; + }); const click_option = () => { emit('click_option', props.analysisVo); }; @@ -129,23 +165,22 @@ .mt-10 { margin-top: 10rpx; } + .analysis_div { + :deep(.highlight) { + color: #15b859; + } + } .success { background-color: #e7f8ed; .td { color: #15b859; } - :deep(.highlight) { - color: #15b859; - } } .error { background-color: #fce8e9; .td { color: #f5212d; } - :deep(.highlight) { - color: #f5212d; - } } .your_answer { @@ -153,10 +188,19 @@ text-decoration: underline; } } - .keyword-text { - color: #d70c18; - text-decoration: underline; + .hit-keyword-item{ + .keyword-text { + color: #15b859; + text-decoration: underline; + } } + .miss-keyword-item{ + .keyword-text { + color: #d70c18; + text-decoration: underline; + } + } + .separator { } .analysis_div { @@ -176,13 +220,14 @@ .dimension-line::before { content: ''; position: absolute; - left: 0.5em; /* 对齐padding-left的起始位置 */ - top: 1em; /* 垂直居中 */ - transform: translateY(-50%); - width: 8px; /* 圆点大小(默认是4px左右,调大到8px) */ - height: 8px; /* 和宽度一致,保证圆形 */ + left: 0.5rem; /* 对齐padding-left的起始位置 */ + top: 0.5rem; + // transform: translateY(-50%); + width: 16rpx; /* 圆点大小(默认是4px左右,调大到8px) */ + height: 16rpx; /* 和宽度一致,保证圆形 */ border-radius: 50%; /* 圆形 */ background-color: #333; /* 圆点颜色,可自定义 */ + } .tr { diff --git a/src/components/examination/reference-answer.vue b/src/components/examination/reference-answer.vue index 32df8e60..91c2dec1 100644 --- a/src/components/examination/reference-answer.vue +++ b/src/components/examination/reference-answer.vue @@ -20,15 +20,16 @@ required: true } }); - + + // 判断一下维度有没有关键词命中率这一项 + const isKeywordsStatus = computed(() => props.value.evalSettingVos.some(res => res.dimensCode === '01')); const keywords = computed(() => { if (!props.value.relKeyword) return []; return props.value.relKeyword.split(/[,、/]/).map((key) => key.trim()); }); - const highlightedText = computed(() => { // 如果没有关键词,直接返回原文本 - if (!keywords.value.length) return props.anserResult; + if (!keywords.value.length || !isKeywordsStatus.value) return props.anserResult; // 构建正则表达式,匹配所有关键词(不区分大小写) // 对关键词进行转义,避免特殊字符影响正则 const escapedKeywords = keywords.value.map((keyword) => keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')); diff --git a/src/components/examination/subject.vue b/src/components/examination/subject.vue index 287cd4f4..f0f9a70e 100644 --- a/src/components/examination/subject.vue +++ b/src/components/examination/subject.vue @@ -1,5 +1,5 @@