JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_修改关键词知识点样式
This commit is contained in:
@@ -7,15 +7,17 @@
|
||||
<image :src="select_status_icon" class="img"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dimension-line" v-for="item in evalSettingVos">
|
||||
<text class="tr">{{ item.gradeDimens }}:</text>
|
||||
<text class="td">{{ item.anlyGrade }}</text>
|
||||
<view class="dimension-max" v-for="(item,index) in evalSettingVos">
|
||||
<view class="dimension-div">
|
||||
<image class="icon-img" :src="index % 2 === 1 ?li2:li1" mode=""></image>
|
||||
<text class="tr">{{ item.gradeDimens }}:</text>
|
||||
<text class="td">{{ item.anlyGrade }}</text>
|
||||
</view>
|
||||
<view class="your_answer" v-if="item.dimensCode === '01'">
|
||||
<rich-text v-if="missingKeywords.length !== keywordsLength" :nodes="highlightedText" class="content" />
|
||||
<rich-text v-if="missingKeywords.length !== keywordsLength" :nodes="highlightedText" class="content" />
|
||||
<view class="mt-10" v-if="missingKeywords.length">
|
||||
<text class="">未命中:</text>
|
||||
<text v-for="(keyword, index) in missingKeywords" :key="index" class="miss-keyword-item">
|
||||
<!-- 关键词:红色 -->
|
||||
<text class="keyword-text">{{ keyword }}</text>
|
||||
<text class="separator" v-if="index < missingKeywords.length - 1">、</text>
|
||||
</text>
|
||||
@@ -28,7 +30,8 @@
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, nextTick, computed, watch } from 'vue';
|
||||
import { optionErrorIcon, optionSuccessIcon } from '@/common/imgSvg';
|
||||
|
||||
import li1 from '@/static/images/examination/li-1.png'
|
||||
import li2 from '@/static/images/examination/li-2.png'
|
||||
const emit = defineEmits(['click_option']);
|
||||
const props = defineProps({
|
||||
value: {
|
||||
@@ -56,7 +59,7 @@
|
||||
return optionErrorIcon();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const keywords = computed(() => {
|
||||
if (!props.value?.relKeyword) return [];
|
||||
return props.value.relKeyword.split(/[,、/]/).map((key) => key.trim());
|
||||
@@ -129,7 +132,7 @@
|
||||
if (!props.anserResult) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
// 步骤1:按顿号拆分关键词组
|
||||
const keywordGroups = relKeyword.split('、');
|
||||
const missing = [];
|
||||
@@ -138,7 +141,7 @@
|
||||
// 拆分同关键词的不同说法(/ 分隔)
|
||||
const keywordVariants = group.split('/');
|
||||
let isFound = false;
|
||||
|
||||
|
||||
// 检查答案中是否包含任意一种说法
|
||||
for (const variant of keywordVariants) {
|
||||
// 可选:增加 trim() 忽略首尾空格,提升匹配容错
|
||||
@@ -147,13 +150,13 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 未找到则加入缺失列表
|
||||
if (isFound) {
|
||||
missing.push(group);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return missing;
|
||||
});
|
||||
const click_option = () => {
|
||||
@@ -167,17 +170,17 @@
|
||||
}
|
||||
.analysis_div {
|
||||
:deep(.highlight) {
|
||||
color: #15b859;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.success {
|
||||
background-color: #e7f8ed;
|
||||
background-color: #f5f5f5;
|
||||
.td {
|
||||
color: #15b859;
|
||||
}
|
||||
}
|
||||
.error {
|
||||
background-color: #fce8e9;
|
||||
background-color: #f5f5f5;
|
||||
.td {
|
||||
color: #f5212d;
|
||||
}
|
||||
@@ -188,19 +191,19 @@
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
.hit-keyword-item{
|
||||
.hit-keyword-item {
|
||||
.keyword-text {
|
||||
color: #15b859;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
.miss-keyword-item{
|
||||
.miss-keyword-item {
|
||||
.keyword-text {
|
||||
color: #d70c18;
|
||||
text-decoration: underline;
|
||||
color: #666666;
|
||||
// text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.separator {
|
||||
}
|
||||
.analysis_div {
|
||||
@@ -212,24 +215,26 @@
|
||||
margin: 12rpx 0;
|
||||
position: relative;
|
||||
}
|
||||
.dimension-line {
|
||||
.dimension-max {
|
||||
// margin: 12rpx 0;
|
||||
// position: relative;
|
||||
// padding-left: 1.5em;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
}
|
||||
.dimension-div {
|
||||
margin: 12rpx 0;
|
||||
position: relative;
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
.dimension-line::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0.5rem; /* 对齐padding-left的起始位置 */
|
||||
top: 0.5rem;
|
||||
// transform: translateY(-50%);
|
||||
width: 16rpx; /* 圆点大小(默认是4px左右,调大到8px) */
|
||||
height: 16rpx; /* 和宽度一致,保证圆形 */
|
||||
border-radius: 50%; /* 圆形 */
|
||||
background-color: #333; /* 圆点颜色,可自定义 */
|
||||
|
||||
// padding-left: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.icon-img {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
.tr {
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
@@ -240,9 +245,10 @@
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.your_answer {
|
||||
padding-left: 42rpx;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
line-height: 46rpx;
|
||||
text-align: left;
|
||||
margin-top: 12rpx;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
:deep(.highlight) {
|
||||
color: #15b859;
|
||||
color: #333333;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
import { markIcon, feedbackIcon } from '@/common/imgSvg';
|
||||
import { SUBJECT_TYPE } from '@/enum.js';
|
||||
import common from '@/common/common';
|
||||
|
||||
import {ANSWER_METHOD_MAP} from '@/enum'
|
||||
// 多选的确定按钮的样式
|
||||
const customStyle = {
|
||||
borderRadius: '16rpx',
|
||||
@@ -149,12 +149,8 @@
|
||||
backgroundColor: '#0066FF',
|
||||
border: '1rpx solid rgb(12, 123, 245)'
|
||||
};
|
||||
const answerMethodMap = {
|
||||
'01': '不限制回答方式',
|
||||
'02': '仅文字回答',
|
||||
'03': '仅语音回答'
|
||||
};
|
||||
const answerMethod = computed(() => answerMethodMap[props.item?.answerMethod || ''] || '');
|
||||
|
||||
const answerMethod = computed(() => ANSWER_METHOD_MAP[props.item?.answerMethod || ''] || '');
|
||||
const emit = defineEmits(['subject_click', 'update:modelValue']);
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
||||
Reference in New Issue
Block a user