diff --git a/.env.development b/.env.development index 0676c220..641e1570 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' diff --git a/certificate/ios/苹果账号.txt b/certificate/ios/苹果账号.txt index 2ca46d78..54a427ed 100644 --- a/certificate/ios/苹果账号.txt +++ b/certificate/ios/苹果账号.txt @@ -3,6 +3,7 @@ xiangyuanhua@126.com Xiang@1987 你的 App 专用密码:wais-pyeh-cmww-zqvc +法人实体名称:BANK OF JILIN CO.,LTD 田岩UDID: 00008101-001911401152001E diff --git a/src/App.vue b/src/App.vue index 55b9b3ad..49758a7c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -66,6 +66,9 @@ .max_page { min-height: 100vh; } + .no-touch { + touch-action: none !important; + } // #endif .mr-10 { @@ -176,4 +179,5 @@ margin-right: 8rpx; margin-left: 2rpx; } - + + \ No newline at end of file diff --git a/src/common/common.js b/src/common/common.js index e5416482..45127627 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -284,38 +284,38 @@ function isLogin() { * @returns {string} 最终的额外高度值(带单位) */ export const getExtraHeight = () => { - // 所有常量移入函数内部定义,TARGET_DEVICE_MODEL 改为数组类型 - const TARGET_DEVICE_MODEL = ['XT2321-2']; // 目标设备型号数组(摩托罗拉razr 40 Ultra) - const EXTRA_HEIGHT_TARGET = '15rpx'; // 目标设备额外高度 - const EXTRA_HEIGHT_DEFAULT = '2rpx'; // 默认额外高度 - try { - // 1. 优先读取缓存 - const cachedHeight = getValue('extra_height', ''); - if (cachedHeight) { - console.log('缓存有值直接返回', cachedHeight); - return cachedHeight; // 缓存有值直接返回 - } - // 2. 缓存无值时,获取设备信息 - const deviceInfo = uni.getDeviceInfo(); - // 校验设备信息有效性 - if (!deviceInfo || !deviceInfo.deviceModel) { - throw new Error('设备信息获取失败'); - } - - // 3. 判断设备型号(数组包含判断,适配多型号) - const isTargetDevice = TARGET_DEVICE_MODEL.includes(deviceInfo.deviceModel); - const finalHeight = isTargetDevice ? EXTRA_HEIGHT_TARGET : EXTRA_HEIGHT_DEFAULT; + // 所有常量移入函数内部定义,TARGET_DEVICE_MODEL 改为数组类型 + const TARGET_DEVICE_MODEL = ['XT2321-2']; // 目标设备型号数组(摩托罗拉razr 40 Ultra) + const EXTRA_HEIGHT_TARGET = '15rpx'; // 目标设备额外高度 + const EXTRA_HEIGHT_DEFAULT = '2rpx'; // 默认额外高度 + try { + // 1. 优先读取缓存 + const cachedHeight = getValue('extra_height', ''); + if (cachedHeight) { + console.log('缓存有值直接返回', cachedHeight); + return cachedHeight; // 缓存有值直接返回 + } + // 2. 缓存无值时,获取设备信息 + const deviceInfo = uni.getDeviceInfo(); + // 校验设备信息有效性 + if (!deviceInfo || !deviceInfo.deviceModel) { + throw new Error('设备信息获取失败'); + } - // 4. 缓存结果(后续复用) - setValue('extra_height', finalHeight); - return finalHeight; // 返回计算后的高度 + // 3. 判断设备型号(数组包含判断,适配多型号) + const isTargetDevice = TARGET_DEVICE_MODEL.includes(deviceInfo.deviceModel); + const finalHeight = isTargetDevice ? EXTRA_HEIGHT_TARGET : EXTRA_HEIGHT_DEFAULT; - } catch (error) { - // 5. 异常兜底:返回默认值并缓存 - console.warn('获取/设置额外高度失败:', error.message); - setValue('extra_height', EXTRA_HEIGHT_DEFAULT); - return EXTRA_HEIGHT_DEFAULT; - } + // 4. 缓存结果(后续复用) + setValue('extra_height', finalHeight); + return finalHeight; // 返回计算后的高度 + + } catch (error) { + // 5. 异常兜底:返回默认值并缓存 + console.warn('获取/设置额外高度失败:', error.message); + setValue('extra_height', EXTRA_HEIGHT_DEFAULT); + return EXTRA_HEIGHT_DEFAULT; + } }; @@ -327,20 +327,27 @@ export function setupKeyboardHeightListener(updateCallback) { return () => {}; // #endif // #ifdef APP-PLUS - // 获取系统信息 - const systemInfo = uni.getSystemInfoSync(); - // 计算安全区域底部高度 - const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom; + // 校验回调函数类型,避免非函数传入导致报错 + if (typeof updateCallback !== 'function') { + console.error('setupKeyboardHeightListener: updateCallback 必须是函数'); + return () => {}; + } // 定义处理函数 const handleKeyboardHeightChange = (res) => { + // 获取系统信息 + const systemInfo = uni.getSystemInfoSync(); + console.log('systemInfo', systemInfo); + // 计算安全区域底部高度 + const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom; + console.log('计算安全区域底部高度', safeAreaBottomHeight); let keyboardHeight = res.height; - + console.log('软键盘高度', keyboardHeight); // 仅在iOS端补偿安全区域高度 if (systemInfo.platform === 'ios') { - keyboardHeight = Math.max(0, keyboardHeight - safeAreaBottomHeight); // 避免负数 + keyboardHeight = Math.max(0, keyboardHeight); // 避免负数 } - + console.log('keyboardHeight', keyboardHeight); // 通过回调函数更新外部的响应式变量 updateCallback(keyboardHeight); }; 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 220ed4f5..b127e869 100644 --- a/src/components/examination/subject.vue +++ b/src/components/examination/subject.vue @@ -1,5 +1,5 @@