Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
杨航
2025-09-24 15:35:36 +08:00
8 changed files with 34 additions and 25 deletions
+1 -2
View File
@@ -13,14 +13,13 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# app入口
# 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'
# h5专用地址x2
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.92:9786'
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
+5
View File
@@ -0,0 +1,5 @@
# 开发环境
ENV = 'development'
# 'development'
VITE_APP_BASE_API_Url = ''
+1 -1
View File
@@ -2,4 +2,4 @@
ENV = 'production'
# base api
VITE_APP_BASE_API_Url = 'http://localhost:7000'
VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
+1
View File
@@ -12,6 +12,7 @@
"build:app-plus:sit": "uni build -p app-plus --mode sit",
"build:app-plus:uat": "uni build -p app-plus --mode uat",
"build:app-plus:prod": "uni build -p app-plus",
"build:h5:dev": "uni build -p app-plus --mode development_h5",
"build:h5": "uni build"
},
"dependencies": {
-1
View File
@@ -6,7 +6,6 @@ import common from '@/common/common.js'
const ENV = import.meta.env
export const get_base_url = (url = '') => {
if (ENV.MODE === 'development') { // 开发环境
// #ifdef H5
if (url) {
+21 -17
View File
@@ -11,9 +11,8 @@
<view class="line" v-for="item in evalSettingVos">
<text class="tr">{{ item.gradeDimens }}</text>
<text class="td">{{ item.anlyGrade }}</text>
<view class="your_answer" v-if="item.dimensCode === '01' && passKeyword">
关键词{{ passKeyword }}
<!-- <rich-text :nodes="highlightedText" class="content" /> -->
<view class="your_answer" v-if="item.dimensCode === '01'">
<rich-text :nodes="highlightedText" class="content" />
</view>
</view>
</view>
@@ -34,9 +33,13 @@
type: Boolean,
default: false,
required: false
},
anserResult: {
type: String,
required: true
}
});
const passKeyword = computed(() => props.value.passKeyword);
const evalSettingVos = computed(() => props.value.evalSettingVos);
const status = computed(() => (props.judgeResult ? 'success' : 'error'));
const select_status_icon = computed(() => {
@@ -46,24 +49,25 @@
return optionErrorIcon();
}
});
const keywords = computed(() => {
if (!props.value.relKeyword) return [];
return props.value.relKeyword.split(/[,、]/).map((key) => key.trim());
return props.value.relKeyword.split(/[,、/]/).map((key) => key.trim());
});
const highlightedText = computed(() => {
// 如果没有关键词,直接返回原文本
if (!keywords.value.length) return '你的答案:' + props.anserResult;
// 构建正则表达式,匹配所有关键词(不区分大小写)
// 对关键词进行转义,避免特殊字符影响正则
const escapedKeywords = keywords.value.map((keyword) => keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
// const highlightedText = computed(() => {
// // 如果没有关键词,直接返回原文本
// if (!keywords.value.length) return '你的答案:' + props.answerText;
// // 构建正则表达式,匹配所有关键词(不区分大小写)
// // 对关键词进行转义,避免特殊字符影响正则
// const escapedKeywords = keywords.value.map((keyword) => keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
// 创建正则表达式,g表示全局匹配,i表示不区分大小写
const regex = new RegExp(`(${escapedKeywords.join('|')})`, 'gi');
// // 创建正则表达式,g表示全局匹配,i表示不区分大小写
// const regex = new RegExp(`(${escapedKeywords.join('|')})`, 'gi');
// // 替换匹配到的关键词,用span包裹并添加高亮样式
// return '你的答案:' + props.answerText.replace(regex, (match) => `<span class="highlight">${match}</span>`);
// });
// 替换匹配到的关键词,用span包裹并添加高亮样式
return '你的答案:' + props.anserResult.replace(regex, (match) => `<span class="highlight">${match}</span>`);
});
const dimension_all_score = computed(() => {
return (
evalSettingVos.value
+1
View File
@@ -98,6 +98,7 @@
v-if="qnsTyp === 'ES'"
:value="subject_data.itemVos[0]"
:judgeResult="judgeResultStatus"
:anserResult="subject_data.anserResult"
></esAnalysis>
<!-- 问答题专属参考答案 -->
+4 -4
View File
@@ -2,16 +2,16 @@
"name" : "tra-app",
"appid" : "__UNI__EDE0E52",
"description" : "",
"versionName" : "0.0.1",
"versionCode" : 1,
"versionName" : "0.0.2",
"versionCode" : 2,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"renderer": "auto",
"orientation": ["portrait-primary"],
"renderer" : "auto",
"orientation" : [ "portrait-primary" ],
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : false,