fix:bug语音读题解析

This commit is contained in:
杨航
2025-09-02 18:11:51 +08:00
parent 9bbd2b1df4
commit e71ab74127
2 changed files with 76 additions and 24 deletions
+28 -17
View File
@@ -31,9 +31,19 @@
<view class="talking-cont">
<!-- 加载状态 -->
<CommonLoading color="#06f" v-show="dataInfo.isLoading"/>
<!-- 参考答案 -->
<view class="talking-text" v-if="type === 5 && !dataInfo.isLoading" style="overflow: hidden;">
参考答案{{ dataInfo.itemAnswer }}
</view>
<!-- 维度信息预览 -->
<view v-if="type === 5 && !dataInfo.isLoading" style="padding-top: 16rpx;">
<ChartFour v-if="dataInfo.evalDimens.length === 4" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
<ChartThree v-if="dataInfo.evalDimens.length === 3" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
<ChartFive v-if="dataInfo.evalDimens.length === 5" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
</view>
<!-- 题干/段落内容 -->
<text class="talking-text" v-if="[3, 5, 6, 9].indexOf(type) >= 0 && !dataInfo.isLoading">
{{ showContent }}
{{type === 5?'试题解析':''}}{{ showContent }}
</text>
<text class="talking-text" v-if="[4].indexOf(type) >= 0 && dataInfo.qnsTyp === 'ES'">
<!-- 请您思考并作答:<br> -->
@@ -53,16 +63,6 @@
<ImagePreview class="cont-img-box" v-if="(dataInfo.imageAddrs||[]).length>0" :imgId="dataInfo.imageAddrs[0]" :previewDetail="true"></ImagePreview>
<VideoPreview class="cont-img-box" v-if="(dataInfo.vidoAddrs||[]).length>0" :fileId="dataInfo.vidoAddrs[0]"></VideoPreview>
</view>
<!-- 维度信息预览 -->
<view v-if="type === 5 && !dataInfo.isLoading" style="padding-top: 16rpx;">
<ChartFour v-if="dataInfo.evalDimens.length === 4" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
<ChartThree v-if="dataInfo.evalDimens.length === 3" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
<ChartFive v-if="dataInfo.evalDimens.length === 5" :dataList="dataInfo.evalDimens" :score="dataInfo.asrGrade"/>
</view>
<!-- 参考答案 -->
<view class="talking-text" v-if="type === 5 && !dataInfo.isLoading" style="overflow: hidden;">
参考答案{{ dataInfo.itemAnswer }}
</view>
<!-- 举例预览 -->
<view class="talking-text" v-if="type === 3 && dataInfo.exampie " style="overflow: hidden;">
举例{{ dataInfo.exampie }}
@@ -70,11 +70,11 @@
</view>
<view class="btns-cont" v-show="!dataInfo.isLoading">
<!-- 重新播放 -->
<view class="replay-btn" @click.stop="restartPlay" v-if="!([5, 8, 9].indexOf(type) >= 0)">
<view class="replay-btn" @click.stop="restartPlay" v-if="!([9].indexOf(type) >= 0)">
<image class="icon" src="@/static/images/course/replay.png" style="width: 100%;height: 100%;"></image>
</view>
<!-- 播放/暂停 -->
<view class="play-btn" v-if="!([5, 8, 9].indexOf(type) >= 0)">
<view class="play-btn" v-if="!([9].indexOf(type) >= 0)">
<image
class="icon"
src="@/static/images/course/play.png"
@@ -434,8 +434,18 @@ const audioCacheObj = computed(() => storageStore.audioObj)
},100)
}else{
voiceLoading.value = true
let _type = props.type == 2 ? 'ans' : props.type == 3 ? 'pgrh' : props.type == 4 ? 'qns' : ''
let _readId = props.type == 2 ? unref(dataInfo)?.intrctId : props.type == 3 ? unref(dataInfo)?.pgrphId : props.type == 4 ? unref(dataInfo)?.qnsId : ''
let _type = props.type == 2 ? 'ans'
: props.type == 3 ? 'pgrh'
: props.type == 4 ? 'qns'
: props.type == 5 ? 'analysis'
: props.type == 8 ? 'stemAnalysis'
: ''
let _readId = props.type == 2 ? unref(dataInfo)?.intrctId
: props.type == 3 ? unref(dataInfo)?.pgrphId
: props.type == 4 ? unref(dataInfo)?.qnsId
: props.type == 5 ? unref(dataInfo)?.qnsId
: props.type == 8 ? unref(dataInfo)?.qnsId
: ''
let _params = {
crsId: unref(dataInfo)?.crsId || '',
pgrphId: unref(dataInfo)?.pgrphId || '',
@@ -704,10 +714,10 @@ const audioCacheObj = computed(() => storageStore.audioObj)
}
.next-learn-btn{
float: left;
padding: 0 60rpx 0 20rpx;
padding: 0 60rpx 0 15rpx;
height: 62rpx;
line-height: 62rpx;
font-size: 30rpx;
font-size: 28rpx;
background-color: #06f;
color: #fff;
border-radius: 8rpx;
@@ -716,6 +726,7 @@ const audioCacheObj = computed(() => storageStore.audioObj)
position: relative;
&.replay-study-btn{
float: right;
margin-right: 0;
}
&.restart{
background-color: #eaf2ff;
+48 -7
View File
@@ -21,14 +21,15 @@
{{ hasMore ? '滚动加载更多' : '加载完成' }}
</view>
</view>
<view class="view-result" v-show="courseList.length === 0">暂无数据</view>
<!-- <view class="view-result" v-show="courseList.length === 0">暂无数据</view> -->
<list-no-data v-show="courseList.length == 0">暂无数据</list-no-data>
</scroll-view>
</view>
<view class="search_content" v-else>
<view class="tabs-view">
<uv-tabs :list="tabList" @click="changeTab" :scrollable="false" active-style="font-weight:bold; color:#000;" line-color="#06f"></uv-tabs>
</view>
<scroll-view class="lists-view" :scroll-y="true">
<scroll-view class="lists-view" :scroll-y="true" @scrolltolower="scrolltolower">
<view class="ability-view model-view" v-show="showModelList('ability')">
<view class="view-title">
<image src="@/static/images/search/result/ability.png" class="view-title-img"></image>
@@ -58,6 +59,9 @@
<view class="view-list course-list">
<course-item class="course-item" v-for="itemC in courseList" :key="itemC.crsNum" :itemInfo="itemC" @clickItem="toCourseDetail(itemC)" />
</view>
<view class="view-tips" v-if="activeTab === 'course'">
{{ hasMore ? '滚动加载更多' : '加载完成' }}
</view>
<view class="view-result" v-show="courseList.length === 0">暂无数据</view>
</view>
<view class="task-view model-view" v-show="showModelList('task')">
@@ -219,22 +223,29 @@ const changeTab = item => {
if (!item) return
activeTab.value = item.type
console.log(item)
switch (item.name) {
switch (item.type) {
case 'all':
pageInfo.value.limit = 3
break
case 'ability':
break
case 'course':
pageInfo.value.limit = 15
break
case 'task':
pageInfo.value.limit = 15
break
case 'test':
pageInfo.value.limit = 15
break
case 'exam':
pageInfo.value.limit = 15
break
default:
pageInfo.value.limit = 3
break
}
getData(1)
}
const clickAbility = item => {
if (item.isTab) {
@@ -262,23 +273,53 @@ const search = () => {
getData(1)
}
const getMore = () => {
if(activeTab.value && activeTab.value !== 'all'){
getData()
}
}
const getData = (flag = null) => {
if (flag) {
pageInfo.value.page = 1
courseList.value = []
examList.value = []
taskList.value = []
}
let _isCourse = fromType.value === 'course' || activeTab.value==='course'
appSearchCrsApi({
type: fromType.value === 'course' ? '01' : '00', //00 首页搜索 01课程搜索
type: _isCourse ? '01' : '00', //00 首页搜索 01课程搜索
searchName: searchValue.value,
page: pageInfo.value.page,
limit: pageInfo.value.limit
}).then(res => {
pageInfo.value.total = res.total || 0
courseList.value = courseList.value.concat(res.body.traCrsInfoVoList || [])
if (fromType.value !== 'course') {
examList.value = res.body.traExamPapersExtVoList || []
taskList.value = res.body.traTaskInfoExtVoList || []
examList.value = examList.value.concat(res.body.traExamPapersExtVoList || [])
taskList.value = taskList.value.concat(res.body.traTaskInfoExtVoList || [])
}
switch (activeTab.value) {
case 'all':
break
case 'ability':
break
case 'course':
pageInfo.value.total = res.total || 0
break
case 'task':
pageInfo.value.total = res.total || 0
break
case 'test':
pageInfo.value.total = res.total || 0
break
case 'exam':
pageInfo.value.total = res.total || 0
break
default:
pageInfo.value.total = res.total || 0
break
}
})
}
const hasMore = computed(() => {