diff --git a/.env.development b/.env.development index 0676c220..c47ccc3c 100644 --- a/.env.development +++ b/.env.development @@ -7,8 +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' @@ -17,7 +16,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 diff --git a/src/components/examination/es-analysis.vue b/src/components/examination/es-analysis.vue index 996216ae..59b1a12b 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 []; 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 ff181608..9a9f2834 100644 --- a/src/components/examination/subject.vue +++ b/src/components/examination/subject.vue @@ -116,7 +116,7 @@ 试题解析:{{ subject_data?.analyContent }} diff --git a/src/components/points-and-badge/holiday - 副本.vue b/src/components/points-and-badge/holiday - 副本.vue deleted file mode 100644 index 9ba5e746..00000000 --- a/src/components/points-and-badge/holiday - 副本.vue +++ /dev/null @@ -1,412 +0,0 @@ - - - - - diff --git a/src/components/points-and-badge/holiday.vue b/src/components/points-and-badge/holiday.vue index c602e7c5..caaefe56 100644 --- a/src/components/points-and-badge/holiday.vue +++ b/src/components/points-and-badge/holiday.vue @@ -16,14 +16,6 @@ src="@/static/images/pointsAndRank/festival-bg-up.png" > - - - - + + + + + {{ holidayInfo.holidayDesc }} - {{ holidayInfo.holidayDesc }} {{ done.tipText }} @@ -49,7 +49,7 @@ - + {{ done.buttonText }} @@ -73,7 +73,7 @@ const done = computed(() => holidayInfo.rewardType === RewardType.RANDOM_POINT ? { - tipText: '最高可获', + tipText: animationLoading.value === AnimationStatus.COMPLETED ? '恭喜获得' : '最高可获', buttonText: animationLoading.value === AnimationStatus.COMPLETED ? '开心收下' : '立即抽取' } : { tipText: '恭喜获得', buttonText: '开心收下' } @@ -195,8 +195,8 @@ completeCallback = completeCb; // 关闭弹窗的回调 Object.assign(holidayInfo, holidayBody); - if (!holidayInfo.rewardFlag || holidayInfo.obtainFlag) { - // if (!holidayInfo.rewardFlag) { + // if (!holidayInfo.rewardFlag || holidayInfo.obtainFlag) { + if (!holidayInfo.rewardFlag) { // 如果当前没有节日窗口,立刻返回回调函数 completeCallback({ status: false }); return; @@ -281,8 +281,9 @@ } .festival-text-div { + position: relative; z-index: 60; - width: 338rpx; + width: 358rpx; height: 136rpx; padding-top: 0; margin: 0 auto; @@ -333,8 +334,8 @@ .festival-special-mascot { z-index: 50; position: absolute; - right: -36rpx; - top: 70rpx; + right: -66rpx; + top: 40rpx; transform-origin: left bottom; transform: translateY(-100%); .festival-special-mascot-img { diff --git a/src/static/images/test/BG@2x.png b/src/static/images/test/BG@2x.png deleted file mode 100644 index dc994c5e..00000000 Binary files a/src/static/images/test/BG@2x.png and /dev/null differ