Merge branch 'dev-20250930' of http://25.13.9.101:9000/K17_AITS/tra-app into dev-20250930
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
</view>
|
||||
<view
|
||||
class="option_div_button"
|
||||
v-if="qnsTyp === 'MU' && ['practice', 'study'].includes(props.mode) && !props.isPreview"
|
||||
v-if="qnsTyp === 'MU' && ['practice', 'study'].includes(props.mode) && !props.isPreview && clearResult"
|
||||
>
|
||||
<uv-button
|
||||
type="primary"
|
||||
@@ -105,13 +105,14 @@
|
||||
clearResult: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
});
|
||||
const modelValue = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emit('update:modelValue', val)
|
||||
});
|
||||
const item_answer = ref(typeof props?.my_answer === 'string' ? props.my_answer.split(',') : []);
|
||||
let answerText = props.item?.my_answer
|
||||
const item_answer = ref(typeof answerText === 'string' ? answerText.split(',') : []);
|
||||
const feedback_click = () => {
|
||||
emit('subject_click', 'feedback', props.item);
|
||||
};
|
||||
@@ -133,6 +134,7 @@
|
||||
qnsId: props.item.qnsId,
|
||||
qnsContent: props.item.qnsContent,
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
analyContent: props.item.analyContent,
|
||||
itemVos: (props.item.itemVos??[]).map((res) => ({
|
||||
...res,
|
||||
correctFlag: props.clearResult ? '' : res.correctFlag
|
||||
@@ -143,7 +145,7 @@
|
||||
const subject_type_text = computed(() => SUBJECT_TYPE.find((res) => qnsTyp.value === res.value)?.label || '');
|
||||
// 点击答题
|
||||
const click_option = (analysisVo) => {
|
||||
if (props.isPreview) return;
|
||||
if (props.isPreview || !props.clearResult) return;
|
||||
// 无论什么类型如果表里已经有了,再次点击就是弹出
|
||||
if (item_answer.value.includes(analysisVo.itemId)) {
|
||||
item_answer.value = item_answer.value.filter((id) => id !== analysisVo.itemId);
|
||||
|
||||
@@ -39,7 +39,12 @@
|
||||
{{ showContent }}
|
||||
</text>
|
||||
<!-- 试题问题 -->
|
||||
<RadioSubject v-if="[4].indexOf(type) >= 0 && dataInfo.qnsTyp !== 'ES'" :isPreview="!isLast" :item="dataInfo" :mode="mode" @subject_click="subject_click" />
|
||||
<Subject v-if="[4, 8].indexOf(type) >= 0 && dataInfo.qnsTyp !== 'ES'"
|
||||
:isPreview="!isLast"
|
||||
:item="subjectInfo"
|
||||
:mode="mode"
|
||||
:clearResult="type === 4"
|
||||
@subject_click="subject_click" />
|
||||
<!-- 试题问题反馈 -->
|
||||
<!-- <RadioSubjectRequest v-if="[8].indexOf(type) >= 0 && dataInfo.qnsTyp !== 'ES'" :item="dataInfo" :mode="mode" @subject_click="subject_click" /> -->
|
||||
<!-- 段落图片视频预览 -->
|
||||
@@ -97,7 +102,7 @@
|
||||
</view>
|
||||
<view
|
||||
class="replay-study-btn next-learn-btn"
|
||||
v-if="showNextBtn && [5,8].indexOf(type) >= 0 && isLast && (dataInfo.passStat === 'PS' || dataInfo.traQnsInfoVo?.judgeResult === 'P')"
|
||||
v-if="showNextBtn && [5,8].indexOf(type) >= 0 && isLast && (dataInfo.passStat === 'PS' || !!dataInfo.traQnsInfoVo?.judgeResult)"
|
||||
@click.stop="goOnGetQues"
|
||||
>
|
||||
继续学
|
||||
@@ -226,7 +231,7 @@ import { getUserInfo } from '@/common/common';
|
||||
import { useStorageStore } from "@/store/storage.js"
|
||||
import { onUnload } from '@dcloudio/uni-app'
|
||||
|
||||
import RadioSubject from '@/components/examination/radio-subject.vue'
|
||||
import Subject from '@/components/examination/subject.vue'
|
||||
// import RadioSubjectRequest from '@/pages/wrong_question_record/components/radio-subject.vue'
|
||||
|
||||
const storageStore = useStorageStore()
|
||||
@@ -285,7 +290,13 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
talkVoiceObj.value.playbackRate = Number(props.voiceRate)
|
||||
const userInfo = computed(() => getUserInfo())
|
||||
const itemVoice = ref('')
|
||||
|
||||
const subjectInfo = computed(()=>{
|
||||
return {
|
||||
...dataInfo.value,
|
||||
...(dataInfo.value?.traQnsInfoVo||{}),
|
||||
my_answer: dataInfo.value?.traQnsInfoVo?.anserResult||''
|
||||
}
|
||||
})
|
||||
const mode = ref('study') // 考试 examination 练习practice 学习study
|
||||
|
||||
const showWithdraw = computed(()=>{
|
||||
@@ -350,7 +361,6 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
const voiceTime = ref('')
|
||||
const itemInfo = ref({})
|
||||
onMounted(()=>{
|
||||
console.log()
|
||||
initVoice()
|
||||
})
|
||||
onUnload(()=>{
|
||||
@@ -405,7 +415,6 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
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 : ''
|
||||
console.log(unref(dataInfo))
|
||||
let _params = {
|
||||
crsId: unref(dataInfo)?.crsId || '',
|
||||
pgrphId: unref(dataInfo)?.pgrphId || '',
|
||||
@@ -454,7 +463,6 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
success: cb,
|
||||
file: ()=>{
|
||||
voiceLoading.value = false
|
||||
console.log('文件保存失败!')
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -530,7 +538,6 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
}
|
||||
// 撤回
|
||||
const withdraw = () => {
|
||||
console.log(unref(dataInfo))
|
||||
emit('withdraw', unref(dataInfo))
|
||||
}
|
||||
// 完成
|
||||
@@ -538,9 +545,12 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
emit('finishQuestion',data)
|
||||
}
|
||||
// 答题 选择
|
||||
const subject_click = (type,data) => {
|
||||
if(type === 'answer'){
|
||||
emit('answerQuestion', data, unref(dataInfo))
|
||||
const subject_click = (type, data) => {
|
||||
if(['answer', 'choose'].includes(type)){
|
||||
emit('answerQuestion', {
|
||||
...data,
|
||||
...unref(dataInfo)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+30
-24
@@ -431,6 +431,7 @@
|
||||
const qstLogId = ref('')
|
||||
// 获取问题
|
||||
const getQuestionInfoUnStudy = (pgrphId) => {
|
||||
console.log(pgrphId)
|
||||
textChartApi({
|
||||
processType: 'QSN-ANSER',
|
||||
requestBody: JSON.stringify({
|
||||
@@ -438,7 +439,7 @@
|
||||
stdyId: unref(stdyId),
|
||||
stdyBatch: unref(stdyBatch),
|
||||
logId: unref(logId),
|
||||
pgrphId
|
||||
pgrphId: pgrphId
|
||||
})
|
||||
})
|
||||
.then(res => {
|
||||
@@ -492,6 +493,7 @@
|
||||
|
||||
// 继续 执行方法
|
||||
const nextQuestionSuccess = (info, type = 'next') => {
|
||||
console.log(info)
|
||||
let _id = new Date().getTime() + 'id'
|
||||
if (type === 'next') {
|
||||
talkingList.value.push({
|
||||
@@ -533,26 +535,29 @@
|
||||
// 重新回答
|
||||
textChartApi({
|
||||
processType: 'NEW-ANSER', //NEW-KNOW
|
||||
requestBody: info.qstLogId
|
||||
requestBody: info.qnsId
|
||||
}).then(res => {
|
||||
let _body = res.body || {}
|
||||
if (!_body.chatBody) {
|
||||
return
|
||||
}
|
||||
console.log(info, 222222)
|
||||
lastTalkingInfo.value = {
|
||||
crsId: info.crsId,
|
||||
qstLogId: _body.chatBody,
|
||||
pgrphId: info.pgrphId,
|
||||
chatContent: _body.chatContent,
|
||||
userInfo: {
|
||||
...choiceTeacherInfo.value
|
||||
},
|
||||
..._body.chatBody,
|
||||
pgrphId: info.pgrphId,
|
||||
type: Number(_body.bodyTyp) || 0,
|
||||
id: _id,
|
||||
isQuestion: true
|
||||
isQuestion: true,
|
||||
my_answer: [],
|
||||
backend_answer: []
|
||||
}
|
||||
talkingList.value.push(lastTalkingInfo.value)
|
||||
talkingList.value.push(JSON.parse(JSON.stringify(lastTalkingInfo.value)))
|
||||
qstLogId.value = _body.chatBody.qstLogId
|
||||
scrollToBottomNow()
|
||||
})
|
||||
@@ -588,7 +593,7 @@
|
||||
id: _id,
|
||||
isQuestion: true
|
||||
}
|
||||
talkingList.value.push(lastTalkingInfo.value)
|
||||
talkingList.value.push(JSON.parse(JSON.stringify(lastTalkingInfo.value)))
|
||||
logId.value = _body.chatBody.logId
|
||||
qstLogId.value = _body.chatBody.qstLogId || qstLogId.value
|
||||
scrollToBottomNow()
|
||||
@@ -684,7 +689,9 @@
|
||||
scrollToBottomNow()
|
||||
}
|
||||
onHide(() => {
|
||||
//#ifdef APP-PLUS
|
||||
uni.offKeyboardHeightChange(setHeight)
|
||||
// #endif
|
||||
if (watchFlag.value === 1) return
|
||||
changePlayItemId('')
|
||||
socketStore.closeSocket()
|
||||
@@ -693,7 +700,9 @@
|
||||
// }).finally(() => {})
|
||||
})
|
||||
onShow(() => {
|
||||
//#ifdef APP-PLUS
|
||||
uni.onKeyboardHeightChange(setHeight)
|
||||
// #endif
|
||||
if (watchFlag.value === 1) return
|
||||
// getData('2');
|
||||
initsocketTask()
|
||||
@@ -836,10 +845,7 @@
|
||||
talkingList.value.push({
|
||||
..._data,
|
||||
chatContent: _body.chatContent,
|
||||
userInfo: {
|
||||
...choiceTeacherInfo.value
|
||||
},
|
||||
intrctId: _body.chatBody || '',
|
||||
recordId: _body.chatBody || '',
|
||||
talkingContent: val,
|
||||
talkingVoice: '',
|
||||
type: 2,
|
||||
@@ -860,17 +866,24 @@
|
||||
textChartApi({
|
||||
processType: 'ANSER-WITHDRAW',
|
||||
requestBody: JSON.stringify({
|
||||
intrctId: data.intrctId
|
||||
recordId : data.recordId
|
||||
})
|
||||
})
|
||||
.then(res => {
|
||||
// 删除撤回的数据item
|
||||
common.msg('撤回成功!')
|
||||
talkingList.value = talkingList.value.filter(t => t.intrctId !== data.intrctId)
|
||||
talkingList.value = talkingList.value.filter(t => t.recordId !== data.recordId )
|
||||
})
|
||||
}
|
||||
const loadingQstLogId = ref('')
|
||||
const answerQuestionNow = (data, item) => {
|
||||
const answerQuestionNow = (data) => {
|
||||
let _data = {
|
||||
qnsId: data.qnsId, // 问题ID 必输项:true 类型:String
|
||||
pgrphId: data.pgrphId, // 段落ID 必输项:true 类型:String
|
||||
crsId: crsId.value, // 课程ID 必输项:true 类型:String
|
||||
stdyBatch: stdyBatch.value, // 学习批次 必输项:true 类型:String
|
||||
ansterContent: data.answer.join(',') // 回答文本内容 必输项:false 类型:String
|
||||
}
|
||||
// 发出答案
|
||||
let _answer = data.answerItems.map(t => t.itemNo).join(',')
|
||||
let _id1 = new Date().getTime() + '3d'
|
||||
@@ -883,13 +896,6 @@
|
||||
type: 0
|
||||
})
|
||||
scrollToBottomNow(0)
|
||||
let _data = {
|
||||
qnsId: item.qnsId, // 问题ID 必输项:true 类型:String
|
||||
pgrphId: item.pgrphId, // 段落ID 必输项:true 类型:String
|
||||
crsId: crsId.value, // 课程ID 必输项:true 类型:String
|
||||
stdyBatch: stdyBatch.value, // 学习批次 必输项:true 类型:String
|
||||
ansterContent: data.answer.join(',') // 回答文本内容 必输项:false 类型:String
|
||||
}
|
||||
textChartApi({
|
||||
processType: 'ANSER-CHOICE',
|
||||
requestBody: JSON.stringify(_data)
|
||||
@@ -901,8 +907,8 @@
|
||||
stdyId: unref(stdyId),
|
||||
stdyBatch: unref(stdyBatch),
|
||||
logId: unref(logId),
|
||||
pgrphId: item.pgrphId,
|
||||
qnsId: item.qnsId,
|
||||
pgrphId: data.pgrphId,
|
||||
qnsId: data.qnsId,
|
||||
chatContent: _body.chatContent || '',
|
||||
...(_body.chatBody || {}),
|
||||
type: Number(_body.bodyTyp || 8),
|
||||
@@ -914,7 +920,7 @@
|
||||
my_answer: [],
|
||||
backend_answer: []
|
||||
}
|
||||
talkingList.value.push(lastTalkingInfo.value)
|
||||
talkingList.value.push(JSON.parse(JSON.stringify(lastTalkingInfo.value)))
|
||||
scrollToBottomNow(0)
|
||||
})
|
||||
}
|
||||
@@ -953,7 +959,7 @@
|
||||
},
|
||||
type: 5
|
||||
}
|
||||
talkingList.value.push(lastTalkingInfo.value)
|
||||
talkingList.value.push(JSON.parse(JSON.stringify(lastTalkingInfo.value)))
|
||||
scrollToBottomNow(0)
|
||||
getQuestionEvalateRequest(_id, data, 1)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user