Merge branch 'dev-20250930' of http://25.13.9.101:9000/K17_AITS/tra-app into dev-20250930
@@ -23,7 +23,8 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.64.16.130:9602'
|
||||
# 线上
|
||||
|
||||
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
# VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
|
||||
#VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.140:9602'
|
||||
VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
|
||||
#VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
|
||||
#VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.138:9602'
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"dev:h5:uat": "uni -p h5 --mode uat",
|
||||
"dev:h5:production": "uni -p h5 --mode production",
|
||||
"build:app-plus:dev": "uni build -p app-plus --mode development",
|
||||
"build:app-plus:develop": "uni build -p app-plus --mode development",
|
||||
"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",
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
.pt-8 {
|
||||
padding-top: 8rpx;
|
||||
}
|
||||
.mb- {
|
||||
.mb-10 {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.mb-18 {
|
||||
|
||||
@@ -6,7 +6,16 @@ export const queryAllTraTaskInfoByUserId = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traTaskInfo/queryAllTraTaskInfoByUserId',
|
||||
method: 'post',
|
||||
toastErrors: true,
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 查询当前用户的课程完成情况
|
||||
export const queryAllTraTaskCrsInfo = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traTaskInfo/queryAllTraTaskCrsInfo',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
@@ -32,3 +32,28 @@ export const feedbackIcon = () : string => {
|
||||
`.trim();
|
||||
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`;
|
||||
};
|
||||
|
||||
// 通过考试
|
||||
export const passTheExamIcon = (color: string) : string => {
|
||||
const svgXml = `
|
||||
<svg t="1755670289043" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6974" width="64" height="64"><path d="M97.878 483.853c0-117.062-0.108-160.999-0.108-278.062 0-101.472 56.328-108.082 110.483-108.082h441.933c85.128 0 111.453 28.968 111.453 110.481v55.241c0 43.562-55.419 38.57-55.419 0V208.19c0-40.918-13.309-55.24-56.035-55.24H208.252c-45.746 0-55.241 6.203-55.241 55.24v552.407c0 30.278 16.572 55.241 55.241 55.241 67.004 0 43.482 0.026 110.484 0 33.77 0 36.252 55.241 0 55.241s-63.711 0.44-131.306 0.17c-39.867-0.163-72.883-23.774-84.643-60.322-3.292-10.223-4.694-21.525-4.694-32.34-0.323-116.658-0.215-178.076-0.215-294.734" fill="${color}" p-id="6975"></path><path d="M649.644 926.291c-152.344-0.027-275.666-123.537-275.666-276.122 0-152.586 123.915-276.259 276.529-276.042 152.616 0.215 275.884 124.022 275.722 276.878-0.16 152.236-123.807 275.314-276.585 275.286m0.756-496.868c-121.109-0.271-220.641 98.828-220.91 220.045-0.27 121.541 98.345 220.934 219.561 221.287 121.704 0.324 221.505-98.208 221.775-219.047 0.324-122.594-98.236-221.99-220.426-222.285m-55.455-166.362c44.02 0.027 37.978 55.979 0 55.979h-331.45c-41.431 0-39.704-55.979 0-55.979 108.756-0.027 289.155-0.027 331.45 0zM318.736 428.782c44.021 0.028 37.979 55.98 0 55.98h-55.242c-41.431 0-39.704-55.98 0-55.98 108.757-0.027 12.948-0.027 55.242 0z" fill="${color}" p-id="6976"></path><path d="M785.502 547.22c-12.496-12.498-32.758-12.498-45.254 0L602.151 685.316l-42.191-42.191c-12.498-12.496-32.758-12.496-45.256 0-12.496 12.497-12.496 32.759 0 45.256l64.818 64.818c6.249 6.248 14.438 9.372 22.628 9.372s16.379-3.124 22.628-9.372a32.424 32.424 0 0 0 2.402-2.695 32.304 32.304 0 0 0 2.689-2.397l155.633-155.633c12.497-12.496 12.497-32.758 0-45.254z" fill="${color}" p-id="6977"></path></svg>
|
||||
`.trim();
|
||||
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`;
|
||||
};
|
||||
|
||||
// 完成练习
|
||||
export const completeTheExercisesIcon = (color: string) : string => {
|
||||
const svgXml = `
|
||||
<svg t="1755670357132" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7127" width="64" height="64"><path d="M832 704a42.666667 42.666667 0 0 0-42.666667 42.666667v106.666666H170.666667V170.666667h618.666666v226.133333a42.666667 42.666667 0 0 0 85.333334 0V166.4A83.2 83.2 0 0 0 789.333333 85.333333H170.666667a83.2 83.2 0 0 0-85.333334 81.066667v691.2A83.413333 83.413333 0 0 0 170.666667 938.666667h618.666666a83.413333 83.413333 0 0 0 85.333334-81.066667V746.666667a42.666667 42.666667 0 0 0-42.666667-42.666667z" fill="${color}" p-id="7128"></path><path d="M682.666667 341.333333a42.666667 42.666667 0 0 0-42.666667-42.666666H298.666667a42.666667 42.666667 0 0 0 0 85.333333h341.333333a42.666667 42.666667 0 0 0 42.666667-42.666667zM298.666667 512a42.666667 42.666667 0 0 0 0 85.333333h213.333333a42.666667 42.666667 0 0 0 0-85.333333zM921.386667 491.733333a42.666667 42.666667 0 0 0-60.373334 0L649.813333 704l-60.16-60.373333A42.666667 42.666667 0 0 0 529.28 704l90.453333 90.453333a42.666667 42.666667 0 0 0 60.373334 0l241.28-242.346666a42.666667 42.666667 0 0 0 0-60.373334z" fill="${color}" p-id="7129"></path></svg>
|
||||
`.trim();
|
||||
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`;
|
||||
};
|
||||
|
||||
// 锁定
|
||||
export const lockIcon = (color: string) : string => {
|
||||
const svgXml = `
|
||||
<svg t="1755683025230" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6630" width="64" height="64"><path d="M787.136 395.466H373.113c0.036-0.579 0.173-1.128 0.173-1.716V267.63c0-81.153 72.891-147.174 162.483-147.174 86.561 0 162.488 64.414 162.488 137.851 0 15.446 12.523 27.969 27.969 27.969 15.446 0 27.969-12.523 27.969-27.969 0-105.043-100.027-193.789-218.426-193.789-120.439 0-218.422 91.118-218.422 203.112v126.12c0 0.588 0.137 1.138 0.173 1.716h-14.467c-82.25 0-149.168 66.918-149.168 149.168v284.402c0 71.971 58.551 130.522 130.522 130.522h502.728c71.971 0 130.522-58.551 130.522-130.522V525.988c0.001-71.971-58.55-130.522-130.521-130.522z m74.584 433.57c0 41.125-33.459 74.584-74.584 74.584H284.408c-41.125 0-74.584-33.459-74.584-74.584V544.634c0-51.409 41.822-93.23 93.23-93.23h484.082c41.125 0 74.584 33.459 74.584 74.584v303.048z" fill="${color}" p-id="6631"></path><path d="M613.108 649.541H458.436c-15.446 0-27.969 12.523-27.969 27.969 0 15.446 12.523 27.969 27.969 27.969h154.672c15.446 0 27.969-12.523 27.969-27.969 0-15.446-12.523-27.969-27.969-27.969z" fill="${color}" p-id="6632"></path></svg>
|
||||
`.trim();
|
||||
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgXml)}`;
|
||||
};
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
<view class="item">
|
||||
<view class="top">
|
||||
<view class="type">
|
||||
{{subject_type_text}}
|
||||
</view>
|
||||
<view class="score">
|
||||
5分
|
||||
</view>
|
||||
<view class="fl1">
|
||||
|
||||
{{ subject_type_text }}
|
||||
</view>
|
||||
<view class="score">5分</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="right">
|
||||
<view class="mark_and_feedback_div">
|
||||
<image :src="markIcon(props.item.mark?'#0066FF':'#ABABAB')" class="img" @click="mark_click()"></image>
|
||||
<image
|
||||
:src="markIcon(props.item.mark ? '#0066FF' : '#ABABAB')"
|
||||
class="img"
|
||||
@click="mark_click()"
|
||||
></image>
|
||||
<image :src="feedbackIcon()" class="img" @click="feedback_click()"></image>
|
||||
</view>
|
||||
<!-- <view class="right_text">展开</view>
|
||||
@@ -20,7 +20,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="question_text">
|
||||
{{subject_data.qnsContent}}
|
||||
{{ subject_data.qnsContent }}
|
||||
</view>
|
||||
<view class="option_div">
|
||||
<questionVue @changePlay="changePlay" :dataInfo="talkingInfo" :activeVoiceId="questionValue"></questionVue>
|
||||
@@ -28,103 +28,93 @@
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
nextTick,
|
||||
computed,
|
||||
toRaw,
|
||||
watch
|
||||
} from 'vue'
|
||||
import { ref, reactive, onMounted, nextTick, computed, toRaw, watch } from 'vue';
|
||||
import questionVue from './question.vue';
|
||||
import radioSubjectItem from './radio-subject-item.vue'
|
||||
import {
|
||||
markIcon,feedbackIcon
|
||||
} from '@/common/imgSvg'
|
||||
import {
|
||||
SUBJECT_TYPE
|
||||
} from '@/enum.js'
|
||||
const questionValue = ref('')
|
||||
import radioSubjectItem from './radio-subject-item.vue';
|
||||
import { markIcon, feedbackIcon } from '@/common/imgSvg';
|
||||
import { SUBJECT_TYPE } from '@/enum.js';
|
||||
const questionValue = ref('');
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: true,
|
||||
required: true
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
required: true,
|
||||
required: true
|
||||
},
|
||||
activeVoiceId: {
|
||||
type: String,
|
||||
required: true,
|
||||
required: true
|
||||
},
|
||||
voicePathValue: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
|
||||
required: true
|
||||
}
|
||||
});
|
||||
const emit = defineEmits(['subject_click'])
|
||||
const emit = defineEmits(['subject_click']);
|
||||
const talkingInfo = ref({
|
||||
id: '3',
|
||||
intrctWay: "02",
|
||||
intrctContent: "中的i id一二三。",
|
||||
intrctWay: '02',
|
||||
intrctContent: '中的i id一二三。',
|
||||
talkingText: '中的i id一二三。',
|
||||
talkingVoice: ''
|
||||
})
|
||||
|
||||
watch(() => props.voicePathValue, (val) => {
|
||||
if (val) {
|
||||
talkingInfo.value = {
|
||||
id: '3',
|
||||
intrctWay: "02",
|
||||
intrctContent: "中的i id一二三。",
|
||||
talkingText: '中的i id一二三。',
|
||||
talkingVoice: val
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.voicePathValue,
|
||||
(val) => {
|
||||
if (val) {
|
||||
talkingInfo.value = {
|
||||
id: '3',
|
||||
intrctWay: '02',
|
||||
intrctContent: '中的i id一二三。',
|
||||
talkingText: '中的i id一二三。',
|
||||
talkingVoice: val
|
||||
};
|
||||
}
|
||||
}
|
||||
})
|
||||
const feedback_click = () =>{
|
||||
emit('subject_click', 'feedback', props.item)
|
||||
}
|
||||
const mark_click = () =>{
|
||||
emit('subject_click', 'mark', props.item)
|
||||
}
|
||||
);
|
||||
const feedback_click = () => {
|
||||
emit('subject_click', 'feedback', props.item);
|
||||
};
|
||||
const mark_click = () => {
|
||||
emit('subject_click', 'mark', props.item);
|
||||
};
|
||||
|
||||
const customStyle = {
|
||||
borderRadius: '16rpx',
|
||||
width: '292rpx',
|
||||
backgroundColor: '#0066FF',
|
||||
border: '1rpx solid rgb(12, 123, 245)',
|
||||
}
|
||||
|
||||
border: '1rpx solid rgb(12, 123, 245)'
|
||||
};
|
||||
|
||||
const subject_data = reactive({
|
||||
qnsId: '',
|
||||
qnsContent: '',
|
||||
qnsTyp: '',
|
||||
})
|
||||
qnsTyp: ''
|
||||
});
|
||||
Object.assign(subject_data, {
|
||||
qnsId: props.item.qnsId,
|
||||
qnsContent: props.item.qnsContent,
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
})
|
||||
qnsTyp: props.item.qnsTyp
|
||||
});
|
||||
// 题类型
|
||||
const subject_type_text = computed(() => SUBJECT_TYPE.find(res => subject_data.qnsTyp === res.value)?.label || '')
|
||||
const subject_type_text = computed(() => SUBJECT_TYPE.find((res) => subject_data.qnsTyp === res.value)?.label || '');
|
||||
const changePlay = (id) => {
|
||||
console.log('changePlay');
|
||||
questionValue.value = id
|
||||
questionValue.value = id;
|
||||
// emit('handleEvents', 'changePlay', props.talkingInfo, id)
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.mark_and_feedback_div{
|
||||
.mark_and_feedback_div {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
.img{
|
||||
.img {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
margin-left: 4rpx;
|
||||
@@ -133,7 +123,6 @@
|
||||
}
|
||||
.option_div {
|
||||
padding-top: 46rpx;
|
||||
|
||||
}
|
||||
|
||||
.item {
|
||||
@@ -150,12 +139,12 @@
|
||||
.type {
|
||||
width: 108rpx;
|
||||
height: 46rpx;
|
||||
background: #267EFF;
|
||||
background: #267eff;
|
||||
border-radius: 8rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 25rpx;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
@@ -181,7 +170,6 @@
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,4 +184,4 @@
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
<view class="option_text">
|
||||
{{props.analysisVo.itemNo}}. {{props.analysisVo.itemContent}}
|
||||
</view>
|
||||
<!-- <image v-show="select_status==='primary'" class="img" src="@/static/images/common/primary.png" mode="heightFix">
|
||||
</image>
|
||||
<image v-show="select_status==='success'" class="img" src="@/static/images/common/success.png" mode="heightFix">
|
||||
</image>
|
||||
<image v-show="select_status==='error'" class="img" src="@/static/images/common/error.png" mode="heightFix">
|
||||
</image> -->
|
||||
<image :src="select_status_icon" class="img"></image>
|
||||
</view>
|
||||
</template>
|
||||
@@ -37,21 +31,22 @@
|
||||
required: false,
|
||||
},
|
||||
my_answer: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
backend_answer: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
});
|
||||
const select_status = computed(() => {
|
||||
if (props.backend_answer.length === 0) {
|
||||
return (props.my_answer||[]).includes(props.analysisVo.itemId) ? 'primary' : 'info';
|
||||
} else {
|
||||
return (props.my_answer||[]).includes(props.analysisVo.itemId) ? 'success' :
|
||||
'error';
|
||||
}
|
||||
// 只要是正确答案 就是绿色
|
||||
if (props.analysisVo.correctFlag === 'R') return 'success';
|
||||
// 是错误答案但是被用户错误选中的为红
|
||||
console.log('props.my_answer', props.my_answer);
|
||||
const my_answer_array = props.my_answer;
|
||||
if(my_answer_array.includes(props.analysisVo.itemId) && props.analysisVo.correctFlag === 'E') return 'error';
|
||||
|
||||
// 只有被我选中,不知是正确还是错误的为蓝
|
||||
if(my_answer_array.includes(props.analysisVo.itemId)) return 'primary';
|
||||
// 什么都不是者为灰色
|
||||
return 'info';
|
||||
})
|
||||
const select_status_icon = computed(() => {
|
||||
if (select_status.value === 'primary') {
|
||||
@@ -65,7 +60,6 @@
|
||||
})
|
||||
const click_option = () => {
|
||||
emit('click_option', props.analysisVo)
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
</view>
|
||||
<view class="option_div">
|
||||
<radioSubjectItem v-for="(analysisVo,index) in subject_data.itemVos" @click_option="click_option" :key="index"
|
||||
:analysisVo="analysisVo" :my_answer="props.item.my_answer" :backend_answer="props.item.backend_answer">
|
||||
:analysisVo="analysisVo" :my_answer="props.item.my_answer" :mode="props.mode">
|
||||
</radioSubjectItem>
|
||||
</view>
|
||||
<view class="option_div_button" v-if="subject_data.qnsTyp==='MU' && ['practice','study'].includes(props.mode)">
|
||||
<view class="option_div_button" v-if="subject_data.qnsTyp==='MU' && ['practice','study'].includes(props.mode) && !props.isPreview">
|
||||
<uv-button type="primary" class="send_evaluate" :custom-style="customStyle" :throttleTime="300"
|
||||
@click="muCheckbox" :hairline="false">确定</uv-button>
|
||||
</view>
|
||||
@@ -65,6 +65,11 @@
|
||||
mode: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
// 是否预览模式
|
||||
isPreview:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
@@ -81,8 +86,6 @@
|
||||
qnsTyp: '',
|
||||
itemVos: props.item.itemVos.map(res => ({
|
||||
...res,
|
||||
// 选择状态, 'info表示未选' , primary 表示蓝色, sunccess 表示绿色, error 表示红色
|
||||
select_status: 'info'
|
||||
})),
|
||||
})
|
||||
Object.assign(subject_data, {
|
||||
@@ -90,27 +93,30 @@
|
||||
qnsContent: props.item.qnsContent,
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
})
|
||||
|
||||
const item_answer = ref(props.item?.my_answer.split(','))
|
||||
// 题类型
|
||||
const subject_type_text = computed(() => SUBJECT_TYPE.find(res => subject_data.qnsTyp === res.value)?.label || '')
|
||||
// 点击答题
|
||||
const click_option = (analysisVo) => {
|
||||
|
||||
// // 无论什么类型如果表里已经有了,再次点击就是弹出
|
||||
if (props.item.my_answer.includes(analysisVo.itemId)) {
|
||||
props.item.my_answer = props.item.my_answer.filter(id => id !== analysisVo.itemId);
|
||||
// props.item.my_answer = props.item.my_answer.filter(id => id !== analysisVo.itemId);
|
||||
} else if (props.item.qnsTyp === 'SN') { // 单选
|
||||
// 单选插入,并且移除其他
|
||||
props.item.my_answer[0] = analysisVo.itemId
|
||||
// props.item.my_answer[0] = analysisVo.itemId
|
||||
muCheckbox()
|
||||
} else if (props.item.qnsTyp === 'MU') { // 多选题
|
||||
// 多选直接插入
|
||||
props.item.my_answer.push(analysisVo.itemId)
|
||||
// props.item.my_answer.push(analysisVo.itemId)
|
||||
} else if (props.item.qnsTyp === 'JD') { // 判断题
|
||||
// 判断插入,并且移除其他
|
||||
props.item.my_answer = [analysisVo.itemId]
|
||||
// props.item.my_answer = [analysisVo.itemId]
|
||||
muCheckbox()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const muCheckbox = () => {
|
||||
emit('subject_click', 'answer', {
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
|
||||
@@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<view class="item">
|
||||
<view class="top">
|
||||
<view class="type">{{ subject_type_text }}</view>
|
||||
<view class="score" v-if="['settlement', 'examination'].includes(props.mode)">{{ item.tgtGrade }}分</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="right">
|
||||
<!-- 反馈中心 -->
|
||||
<view class="mark_and_feedback_div" v-if="['examination'].includes(props.mode)">
|
||||
<image
|
||||
:src="markIcon(props.item.mark ? '#0066FF' : '#ABABAB')"
|
||||
class="img"
|
||||
@click="mark_click()"
|
||||
></image>
|
||||
<image :src="feedbackIcon()" class="img" @click="feedback_click()"></image>
|
||||
</view>
|
||||
<template v-if="['mistake'].includes(props.mode)">
|
||||
<view class="right_text">展开</view>
|
||||
<uv-icon class="arrow-icon" name="arrow-right" color="#0066FF"></uv-icon>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class="question_text">
|
||||
{{ subject_data.qnsContent }}
|
||||
</view>
|
||||
<view class="option_div">
|
||||
<template v-if="qnsTyp === 'ES'">
|
||||
<!-- <questionVue @changePlay="changePlay" :dataInfo="talkingInfo" :activeVoiceId="questionValue"></questionVue> -->
|
||||
</template>
|
||||
<template v-else>
|
||||
<radioSubjectItem
|
||||
v-for="(analysisVo, index) in subject_data.itemVos"
|
||||
@click_option="click_option"
|
||||
:key="index"
|
||||
:analysisVo="analysisVo"
|
||||
:my_answer="item_answer"
|
||||
></radioSubjectItem>
|
||||
</template>
|
||||
</view>
|
||||
<view
|
||||
class="option_div_button"
|
||||
v-if="qnsTyp === 'MU' && ['practice', 'study'].includes(props.mode) && !props.isPreview && clearResult"
|
||||
>
|
||||
<uv-button
|
||||
type="primary"
|
||||
class="send_evaluate"
|
||||
:custom-style="customStyle"
|
||||
:throttleTime="300"
|
||||
@click="muCheckbox('answer')"
|
||||
:hairline="false"
|
||||
>
|
||||
确定
|
||||
</uv-button>
|
||||
</view>
|
||||
<view class="analysis_div" v-if="!clearResult && ['study', 'mistake', 'settlement'].includes(props.mode)">
|
||||
<view class="analysis_title">
|
||||
<view class="success_answer">正确答案:{{ correctResultLabel.join('') }}</view>
|
||||
<view class="your_answer">
|
||||
你的答案:
|
||||
<text :class="right_or_wrong_class ? 'success' : 'error'">{{ myResultLabel.join('') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="analysis_note">题目解析:{{ subject_data?.analyContent }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, nextTick, computed, toRaw } from 'vue';
|
||||
import radioSubjectItem from './radio-subject-item.vue';
|
||||
import { markIcon, feedbackIcon } from '@/common/imgSvg';
|
||||
import { SUBJECT_TYPE } from '@/enum.js';
|
||||
const customStyle = {
|
||||
borderRadius: '16rpx',
|
||||
width: '292rpx',
|
||||
backgroundColor: '#0066FF',
|
||||
border: '1rpx solid rgb(12, 123, 245)'
|
||||
};
|
||||
|
||||
const emit = defineEmits(['subject_click']);
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
item: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
required: true,
|
||||
validator: (value) => {
|
||||
// 考试: examination 练习: practice 错题本: mistake 学习: study 考试结算页 settlement
|
||||
return ['examination', 'practice', 'mistake', 'study', 'settlement'].includes(value);
|
||||
}
|
||||
},
|
||||
// 是否预览模式
|
||||
isPreview: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否清除正确答案
|
||||
clearResult: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
});
|
||||
const modelValue = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emit('update:modelValue', val)
|
||||
});
|
||||
let answerText = props.item?.my_answer;
|
||||
const item_answer = ref(typeof answerText === 'string' ? answerText.split(',') : []);
|
||||
const feedback_click = () => {
|
||||
emit('subject_click', 'feedback', props.item);
|
||||
};
|
||||
const mark_click = () => {
|
||||
emit('subject_click', 'mark', props.item);
|
||||
};
|
||||
// 单选 SN, 多选 MU,判断题 JD,简答 ES
|
||||
const qnsTyp = computed(() => props.item.qnsTyp);
|
||||
// 正确答案选项
|
||||
const correctResultLabel = computed(() =>
|
||||
subject_data.itemVos.filter((res) => res.correctFlag === 'R').map((res) => res.itemNo)
|
||||
);
|
||||
// 我的答案选项
|
||||
const myResultLabel = computed(() => {
|
||||
const anserResultArray = props.item.anserResult.split(',');
|
||||
return subject_data.itemVos.filter((res) => anserResultArray.includes(res.itemId)).map((res) => res.itemNo);
|
||||
});
|
||||
// 判断选项是否完全正确
|
||||
const right_or_wrong_class = computed(
|
||||
() =>
|
||||
correctResultLabel.value.length === myResultLabel.value.length &&
|
||||
myResultLabel.value.every((res) => correctResultLabel.value.includes(res))
|
||||
);
|
||||
const subject_data = reactive({
|
||||
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
|
||||
}))
|
||||
});
|
||||
|
||||
// 题类型
|
||||
const subject_type_text = computed(() => SUBJECT_TYPE.find((res) => qnsTyp.value === res.value)?.label || '');
|
||||
// 点击答题
|
||||
const click_option = (analysisVo) => {
|
||||
if (props.isPreview || !props.clearResult) return;
|
||||
// 无论什么类型如果表里已经有了,再次点击就是弹出
|
||||
if (item_answer.value.includes(analysisVo.itemId)) {
|
||||
item_answer.value = item_answer.value.filter((id) => id !== analysisVo.itemId);
|
||||
if (!['study'].includes(props.mode)) {
|
||||
muCheckbox('choose');
|
||||
}
|
||||
} else if (props.item.qnsTyp === 'SN') {
|
||||
// 单选
|
||||
// 单选插入,并且移除其他
|
||||
item_answer.value[0] = analysisVo.itemId;
|
||||
muCheckbox('choose');
|
||||
} else if (props.item.qnsTyp === 'MU') {
|
||||
// 多选题
|
||||
// 多选直接插入
|
||||
item_answer.value.push(analysisVo.itemId);
|
||||
if (!['study'].includes(props.mode)) {
|
||||
muCheckbox('choose');
|
||||
}
|
||||
} else if (props.item.qnsTyp === 'JD') {
|
||||
// 判断题
|
||||
// 判断插入,并且移除其他
|
||||
item_answer.value = [analysisVo.itemId];
|
||||
muCheckbox('choose');
|
||||
}
|
||||
modelValue.value = item_answer.value;
|
||||
};
|
||||
const muCheckbox = (type = 'answer') => {
|
||||
emit('subject_click', type, {
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
qnsId: props.item.qnsId,
|
||||
answer: item_answer.value,
|
||||
answerItems: subject_data.itemVos.filter((t) => item_answer.value.includes(t.itemId))
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.mark_and_feedback_div {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
margin-left: 4rpx;
|
||||
padding: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.option_div_button {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
padding-top: 30rpx;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.analysis_div {
|
||||
.analysis_title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 32rpx 0 28rpx 0;
|
||||
|
||||
.success_answer {
|
||||
}
|
||||
|
||||
.your_answer {
|
||||
.success {
|
||||
color: #15b859;
|
||||
}
|
||||
.error {
|
||||
color: #f5212d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.analysis_note {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
.item {
|
||||
// height: 170rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.type {
|
||||
width: 108rpx;
|
||||
height: 46rpx;
|
||||
background: #267eff;
|
||||
border-radius: 8rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 25rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.score {
|
||||
margin-left: 24rpx;
|
||||
font-family: ArialMT;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.right_text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.question_text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -154,6 +154,7 @@
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
// #ifdef APP-PLUS
|
||||
recorderManager.onStop(function (res) {
|
||||
console.log('recorder stop' + JSON.stringify(res));
|
||||
console.log('录音文件临时位置', res.tempFilePath, isOut.value);
|
||||
@@ -177,6 +178,7 @@
|
||||
startTime = Date.now();
|
||||
recordingStatus.value = 'in_recording';
|
||||
});
|
||||
// #endif
|
||||
});
|
||||
|
||||
const touchY = ref(0);
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<template>
|
||||
<!-- <view class="nav-bar-div" >
|
||||
<view class="nav-bar" v-if="props.is_fixed" :style="{ backgroundColor: props.backgroundColor }"></view>
|
||||
<view class="nav-bar-seat" :style="{ backgroundColor: props.backgroundColor }"></view>
|
||||
</view> -->
|
||||
<view class="nav-bar-div" >
|
||||
<view class="nav-bar" v-if="is_fixed" :style="{ backgroundColor: backgroundColor }"></view>
|
||||
<view class="nav-bar-seat" v-if="is_seat" :style="{ backgroundColor: backgroundColor }"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// const windowInfo = uni.getWindowInfo()
|
||||
|
||||
const props = defineProps({
|
||||
is_fixed: {
|
||||
type: Boolean,
|
||||
@@ -37,8 +35,8 @@
|
||||
}
|
||||
|
||||
.nav-bar-div {
|
||||
z-index: 2001;
|
||||
z-index: 1900;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<view class="item">
|
||||
<view class="top">
|
||||
<view class="type">{{ subject_type_text }}</view>
|
||||
<view class="score">{{ item.tgtGrade }}分</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="right" v-if="[''].includes(props.mode)">
|
||||
<view class="right_text">展开</view>
|
||||
<uv-icon class="arrow-icon" name="arrow-right"></uv-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text">{{ item.qnsContent }}</view>
|
||||
<view class="additional_div">
|
||||
<view class="option_div">
|
||||
<radioSubjectItem v-for="(analysisVo,index) in item.itemVos" @click_option="click_option" :key="index"
|
||||
:analysisVo="analysisVo" :my_answer="props.item.anserResult" :backend_answer="[]">
|
||||
</radioSubjectItem>
|
||||
|
||||
<!-- <view class="option_item success">
|
||||
<view class="text">A.这里是选项 A 的内容</view>
|
||||
<image class="img" src="@/static/images/common/success.png" mode="heightFix"></image>
|
||||
</view>
|
||||
<view class="option_item success">
|
||||
<view class="text">B.这里是选项 B 的内容</view>
|
||||
<image class="img" src="@/static/images/common/success.png" mode="heightFix"></image>
|
||||
</view>
|
||||
<view class="option_item error">
|
||||
<view class="text">C.这里是选项 C 的内容</view>
|
||||
<image class="img" src="@/static/images/common/success.png" mode="heightFix"></image>
|
||||
</view>
|
||||
<view class="option_item info">D.这里是选项D的内容</view> -->
|
||||
</view>
|
||||
<view class="analysis_div">
|
||||
<view class="analysis_title">
|
||||
<view class="success_answer">正确答案:{{ correctResultLabel.join('') }}</view>
|
||||
|
||||
<view class="your_answer">
|
||||
你的答案:
|
||||
<text class="red_color">{{ myResultLabel.join('') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="analysis_note">
|
||||
题目解析:{{item.analyContent}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import radioSubjectItem from '@/components/examination/radio-subject-item.vue'
|
||||
import { SUBJECT_TYPE } from '@/enum.js';
|
||||
import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance } from 'vue';
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
required: true,
|
||||
validator: (value) => {
|
||||
// 考试: examination 练习: practice 错题本: mistake 学习: study
|
||||
return ['examination', 'practice', 'mistake', 'study'].includes(value);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 试题类型
|
||||
const qnsTyp = computed(() => props.item.qnsTyp);
|
||||
// 正确答案选项
|
||||
const correctResultLabel = computed(() =>
|
||||
props.item.itemVos.filter((res) => res.correctFlag === 'R').map((res) => res.itemNo)
|
||||
);
|
||||
// 我的答案选项
|
||||
const myResultLabel = computed(() => {
|
||||
const anserResultArray = props.item.anserResult.split(',');
|
||||
return props.item.itemVos.filter((res) => anserResultArray.includes(res.itemId)).map((res) => res.itemNo);
|
||||
});
|
||||
|
||||
console.log(myResultLabel.value, 'myResultLabel');
|
||||
|
||||
//
|
||||
|
||||
const subject_data = reactive({
|
||||
qnsId: '',
|
||||
qnsContent: '',
|
||||
qnsTyp: '',
|
||||
itemVos: props.item.itemVos.map((res) => ({
|
||||
...res,
|
||||
// 选择状态, 'info表示未选' , primary 表示蓝色, sunccess 表示绿色, error 表示红色
|
||||
select_status: 'info'
|
||||
}))
|
||||
});
|
||||
// 题目类型换成汉字
|
||||
const subject_type_text = computed(() => SUBJECT_TYPE.find((res) => qnsTyp.value === res.value)?.label || '');
|
||||
const click_option = () => {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.success {
|
||||
color: #15b859;
|
||||
background: #e7f8ed;
|
||||
}
|
||||
|
||||
.info {
|
||||
color: #333333;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #f5212d;
|
||||
background: #fce8e9;
|
||||
}
|
||||
|
||||
.option_item {
|
||||
width: 100%;
|
||||
height: 108rpx;
|
||||
|
||||
border-radius: 15rpx;
|
||||
margin-top: 32rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
line-height: 108rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
padding-left: 52rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
/* 强制不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.img {
|
||||
height: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.analysis_div {
|
||||
.analysis_title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 32rpx 0 28rpx 0;
|
||||
|
||||
.success_answer {
|
||||
}
|
||||
|
||||
.your_answer {
|
||||
}
|
||||
|
||||
.red_color {
|
||||
color: #f5212d;
|
||||
}
|
||||
}
|
||||
|
||||
.analysis_note {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
// height: 170rpx;
|
||||
border-radius: 16rpx;
|
||||
margin: 12rpx 0 50rpx 0;
|
||||
padding: 34rpx 30rpx 34rpx 36rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.type {
|
||||
width: 108rpx;
|
||||
height: 46rpx;
|
||||
background: #267eff;
|
||||
border-radius: 8rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 25rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.score {
|
||||
margin-left: 24rpx;
|
||||
font-family: ArialMT;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.right_text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -182,7 +182,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/wrong_question_record/index",
|
||||
"path": "pages/wrongQuestionRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "错题本",
|
||||
"app-plus": {
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
<!-- type: 0,纯文本信息不翻译 1,语音回答 , 2 文本回答 3, 段落信息 4 问题信息 5 统计信息 6: 发送loading状态 7: 教师反馈文本不翻译 -->
|
||||
<!-- type:
|
||||
0,纯文本信息不翻译
|
||||
1,语音回答 ,
|
||||
2 文本回答
|
||||
3 段落信息
|
||||
4 问题信息
|
||||
5 统计信息
|
||||
6 发送loading状态
|
||||
7 教师反馈文本不翻译
|
||||
8 问题反馈信息
|
||||
-->
|
||||
<template>
|
||||
<view :class="['ai-answer', props.class]" :id="props.id" v-if="[3,4,5].indexOf(type) >= 0">
|
||||
<view :class="['ai-answer', props.class]" :id="props.id" v-if="[3,4,5,8].indexOf(type) >= 0">
|
||||
<!-- 头像信息 -->
|
||||
<view class="user-info">
|
||||
<view class="avatar-box">
|
||||
<ImagePreview class="img-box" :imgId="teacherInfo?.imgAddr"></ImagePreview>
|
||||
@@ -10,12 +21,16 @@
|
||||
<view class="ai-name-desc">{{teacherInfo?.teacherDesc}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 对话信息 -->
|
||||
<view :class="['talking-info', [4].indexOf(type) >= 0 ? 'talking-info-less':''] ">
|
||||
<view :class="['talking-gif', !voiceLoading && (activeVoiceId === dataInfo.id)?'is-play':'']" v-if="type !== 5">
|
||||
<!-- 语音加载状态 -->
|
||||
<view :class="['talking-gif', !voiceLoading && (activeVoiceId === dataInfo.id)?'is-play':'']" v-if="!([5, 8].indexOf(type) >= 0)">
|
||||
<CommonLoading color="#06f" v-show="voiceLoading"/>
|
||||
</view>
|
||||
<view class="talking-cont">
|
||||
<!-- 加载状态 -->
|
||||
<CommonLoading color="#06f" v-show="dataInfo.isLoading"/>
|
||||
<!-- 题干/段落内容 -->
|
||||
<text class="talking-text" v-if="[3, 5, 6].indexOf(type) >= 0 && !dataInfo.isLoading">
|
||||
{{ showContent }}
|
||||
</text>
|
||||
@@ -23,25 +38,38 @@
|
||||
<!-- 请您思考并作答:<br> -->
|
||||
{{ showContent }}
|
||||
</text>
|
||||
<RadioSubject v-if="[4].indexOf(type) >= 0 && dataInfo.qnsTyp !== 'ES'" :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" /> -->
|
||||
<!-- 段落图片视频预览 -->
|
||||
<view v-if="type === 3" style="overflow: hidden;">
|
||||
<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.intrctGrade"/>
|
||||
<ChartThree v-if="dataInfo.evalDimens.length === 3" :dataList="dataInfo.evalDimens" :score="dataInfo.intrctGrade"/>
|
||||
<ChartFive v-if="dataInfo.evalDimens.length === 5" :dataList="dataInfo.evalDimens" :score="dataInfo.intrctGrade"/>
|
||||
</view>
|
||||
<view v-if="type === 3 && dataInfo.knoExampie " style="overflow: hidden;">
|
||||
<!-- 举例预览 -->
|
||||
<view class="talking-text" v-if="type === 3 && dataInfo.knoExampie " style="overflow: hidden;">
|
||||
举例:{{ dataInfo.knoExampie }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns-cont" v-show="!dataInfo.isLoading">
|
||||
<view class="replay-btn" @click.stop="restartPlay" v-if="!([5].indexOf(type) >= 0)">
|
||||
<!-- 重新回答 -->
|
||||
<view class="replay-btn" @click.stop="restartPlay" v-if="!([5, 8].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].indexOf(type) >= 0)">
|
||||
<!-- 停止回答 -->
|
||||
<view class="play-btn" v-if="!([5,8].indexOf(type) >= 0)">
|
||||
<image
|
||||
class="icon"
|
||||
src="@/static/images/course/play.png"
|
||||
@@ -58,7 +86,7 @@
|
||||
></image>
|
||||
</view>
|
||||
<view class="next-learn-btn"
|
||||
v-if="showNextBtn && [5].indexOf(type) >= 0 && isLast"
|
||||
v-if="showNextBtn && [5,8].indexOf(type) >= 0 && isLast"
|
||||
@click.stop="goOnRestartPrgh"
|
||||
>
|
||||
重新学
|
||||
@@ -66,7 +94,7 @@
|
||||
</view>
|
||||
<view
|
||||
class="next-learn-btn restart"
|
||||
v-if="showNextBtn && [5].indexOf(type) >= 0 && isLast"
|
||||
v-if="showNextBtn && [5,8].indexOf(type) >= 0 && isLast"
|
||||
@click.stop="goOnRestart"
|
||||
>
|
||||
重新答
|
||||
@@ -74,7 +102,7 @@
|
||||
</view>
|
||||
<view
|
||||
class="replay-study-btn next-learn-btn"
|
||||
v-if="showNextBtn && [5].indexOf(type) >= 0 && isLast && dataInfo.passStat === 'PS'"
|
||||
v-if="showNextBtn && [5,8].indexOf(type) >= 0 && isLast && (dataInfo.passStat === 'PS' || !!dataInfo.traQnsInfoVo?.judgeResult)"
|
||||
@click.stop="goOnGetQues"
|
||||
>
|
||||
继续学
|
||||
@@ -83,6 +111,7 @@
|
||||
<view class="next-btn" @click.stop="goOnGetQues" v-if="showGoonBtn">继续
|
||||
<image class="icon icon-iamge" src="@/static/images/course/goon.png" ></image></view>
|
||||
</view>
|
||||
<!-- 解析信息 -->
|
||||
<view class="talking-cont last-cont" v-if=" [5].indexOf(type) >= 0 && !dataInfo.isLoading">
|
||||
<view class="talking-text">
|
||||
{{ changeBr(dataInfo.suggestContent || '--') }}
|
||||
@@ -90,6 +119,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- ai回答 -->
|
||||
<view :class="['ai-answer', props.class]" :id="props.id" v-if="[7].indexOf(type) >= 0">
|
||||
<view class="user-info">
|
||||
<view class="avatar-box">
|
||||
@@ -108,6 +138,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户对话 -->
|
||||
<view :class="['user-answer', props.class]" :id="props.id" v-else-if="[1, 2].indexOf(type) >= 0">
|
||||
<view class="user-info">
|
||||
<view class="avatar-box">
|
||||
@@ -200,7 +231,8 @@ 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()
|
||||
const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
@@ -258,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(()=>{
|
||||
@@ -323,7 +361,6 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
const voiceTime = ref('')
|
||||
const itemInfo = ref({})
|
||||
onMounted(()=>{
|
||||
console.log()
|
||||
initVoice()
|
||||
})
|
||||
onUnload(()=>{
|
||||
@@ -378,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 || '',
|
||||
@@ -427,7 +463,6 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
success: cb,
|
||||
file: ()=>{
|
||||
voiceLoading.value = false
|
||||
console.log('文件保存失败!')
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -486,7 +521,7 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
return showNextBtn.value && [3, 6].indexOf(props.type) >= 0 && isLast.value // && !isPlaying.value
|
||||
})
|
||||
const goOnGetQues = () => {
|
||||
if(props.type === 5){
|
||||
if([5,8].indexOf(props.type) >= 0){
|
||||
// 完成问题
|
||||
emit('nextQuestion', unref(dataInfo))
|
||||
}else if(props.type === 3){
|
||||
@@ -503,7 +538,6 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
}
|
||||
// 撤回
|
||||
const withdraw = () => {
|
||||
console.log(unref(dataInfo))
|
||||
emit('withdraw', unref(dataInfo))
|
||||
}
|
||||
// 完成
|
||||
@@ -511,9 +545,12 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
emit('finishQuestion',data)
|
||||
}
|
||||
// 答题 选择
|
||||
const subject_click = (type,data) => {
|
||||
if(type === 'answer'){
|
||||
emit('answerQuestion', data)
|
||||
const subject_click = (type, data) => {
|
||||
if(['answer', 'choose'].includes(type)){
|
||||
emit('answerQuestion', {
|
||||
...data,
|
||||
...unref(dataInfo)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<view class="mr-10">已学</view>
|
||||
<view class="c-000">{{ form.styParaGraphNum || 0 }}</view>
|
||||
</view>
|
||||
<view class="num-item examination">
|
||||
<view class="num-item examination" @click="common.navigateTo('/pages/examRanking/index?crsId=' + crsId)">
|
||||
<image
|
||||
class="title-icon"
|
||||
src="/src/static/images/courseDetail/charts.png"
|
||||
@@ -104,7 +104,7 @@
|
||||
<uv-button
|
||||
type="primary"
|
||||
class="send_evaluate"
|
||||
@click="common.navigateTo('/pages/courseDetail/submit?crsNum=' + form.crsNum + '&imgId=' + form.imgId)"
|
||||
@click="common.navigateTo('/pages/courseDetail/submit?crsId=' + crsId + '&imgId=' + form.imgId)"
|
||||
>
|
||||
发布评价
|
||||
</uv-button>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
import common from '@/common/common';
|
||||
|
||||
const formData = reactive({
|
||||
"crsNum": null,
|
||||
"crsId": null,
|
||||
"imgIdList": [], // 发表图片ID列表,文件ID集
|
||||
"bbsGrade": 10, // 综合评分(最高10分)
|
||||
"bbsTag": 'SUG', // 评价标签 (SUG 建议 ASK 提问 )
|
||||
@@ -92,7 +92,7 @@
|
||||
})
|
||||
}
|
||||
onLoad((params) => {
|
||||
formData.crsNum = params.crsNum;
|
||||
formData.crsId = params.crsId;
|
||||
from.value = params.from;
|
||||
imgId.value = params.imgId;
|
||||
});
|
||||
|
||||
@@ -1,6 +1,61 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view class="exam-ranking">
|
||||
<image src="@/static/images/examRanking/bg.png" mode="aspectFit" class="bg-box"></image>
|
||||
<view class="ranking-box">
|
||||
|
||||
<view class="nav-div">
|
||||
<view class="back_div">
|
||||
<view class="back-icon"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-view">
|
||||
<!-- <view class="title-info">考试排行榜</view> -->
|
||||
<image class="title-image" src="@/static/images/examRanking/title.png" mode="aspectFit"></image>
|
||||
<view class="title-desc">吾日三省吾身,传不习乎?</view>
|
||||
<image class="cup-image" src="@/static/images/examRanking/cup.png" mode="aspectFit"></image>
|
||||
|
||||
</view>
|
||||
<view class="ranking-body">
|
||||
<view class="list-header list-item">
|
||||
<view class="rank-column">排名</view>
|
||||
<view class="user-column">用户名/所属机构</view>
|
||||
<view class="score-column">最高分</view>
|
||||
</view>
|
||||
<scroll-view :scroll-y="true" class="scroll-items-view">
|
||||
<view v-for="(item,index) in 60" :class="['list-item', 'item-'+(index+1)]">
|
||||
<view class="rank-column">
|
||||
{{index + 1}}
|
||||
</view>
|
||||
<view class="user-column">
|
||||
<view class="avatar-box">
|
||||
<image-preview class="avatar-image" :imgId="item" mode="aspectFit"></image-preview>
|
||||
</view>
|
||||
<view class="user-name">{{'李想'}}</view>
|
||||
<view class="user-org">{{'吉林银行白城分行'}}</view>
|
||||
</view>
|
||||
<view class="score-column">{{100 - index}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="ranking-self">
|
||||
<view class="list-header list-item">
|
||||
<view class="rank-column">我的排名</view>
|
||||
</view>
|
||||
<view class="list-item item-me">
|
||||
<view class="rank-column">
|
||||
{{21}}
|
||||
</view>
|
||||
<view class="user-column">
|
||||
<view class="avatar-box">
|
||||
<image-preview class="avatar-image" :imgId="item" mode="aspectFit"></image-preview>
|
||||
</view>
|
||||
<view class="user-name">{{'李想'}}</view>
|
||||
<view class="user-org">{{'吉林银行白城分行'}}</view>
|
||||
</view>
|
||||
<view class="score-column">{{22}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -8,15 +63,272 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
$top-height: var(--status-bar-height);
|
||||
|
||||
</style>
|
||||
.exam-ranking {
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding-top: $top-height;
|
||||
|
||||
// background:url(@/static/images/examRanking/bg.png) no-repeat top center;
|
||||
.bg-box {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 412rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.ranking-box {
|
||||
height: calc(100% - $top-height);
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: $top-height;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.nav-div {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
height: 70rpx;
|
||||
|
||||
.back_div {
|
||||
margin-right: 10rpx;
|
||||
position: absolute;
|
||||
left: 25rpx;
|
||||
top: 0;
|
||||
padding: 15rpx;
|
||||
|
||||
.back-icon {
|
||||
position: relative;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.back-icon::before,
|
||||
.back-icon::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.back-icon::after {
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
width: 40%;
|
||||
height: 40%;
|
||||
border-top: 4rpx solid #000;
|
||||
border-left: 4rpx solid #000;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title-view {
|
||||
height: 180rpx;
|
||||
position: relative;
|
||||
padding-left: 79rpx;
|
||||
padding-top: 20rpx;
|
||||
|
||||
.cup-image {
|
||||
position: absolute;
|
||||
right: 90rpx;
|
||||
bottom: 0;
|
||||
width: 178rpx;
|
||||
height: 159rpx;
|
||||
}
|
||||
|
||||
.title-desc {
|
||||
color: #666;
|
||||
line-height: 34rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.title-image {
|
||||
width: 308rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-body {
|
||||
height: calc(100% - 170rpx - 180rpx - 70rpx);
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
border-radius: 31rpx 31rpx 0 0;
|
||||
padding-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
.scroll-items-view{
|
||||
height: calc(100% - 54rpx);
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
height: 108rpx;
|
||||
border-bottom: 2rpx solid #efefef;
|
||||
overflow: hidden;
|
||||
|
||||
&.list-header {
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
color: #999;
|
||||
font-size: 25rpx;
|
||||
border-bottom: 0;
|
||||
.rank-column {
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
font-size: 25rpx;
|
||||
font-style: initial;
|
||||
text-indent: 0;
|
||||
}
|
||||
.user-column {
|
||||
padding: 0;
|
||||
}
|
||||
.score-column {
|
||||
line-height: 54rpx;
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&.item-1 {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 8rpx;
|
||||
background: linear-gradient(90deg, #fbf9f5 0%, #fffffd 100%);
|
||||
.rank-column{
|
||||
color: #ffffff00;
|
||||
background: url(@/static/images/examRanking/no-1.png) no-repeat ;
|
||||
background-position: 40rpx center;
|
||||
background-size: 44rpx 66rpx;
|
||||
text-indent: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&.item-2 {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 8rpx;
|
||||
background: linear-gradient(90deg, #f4f8f9 0%, #f7fbfe 100%);
|
||||
.rank-column{
|
||||
color: #ffffff00;
|
||||
background: url(@/static/images/examRanking/no-2.png) no-repeat ;
|
||||
background-position: 40rpx center;
|
||||
background-size: 44rpx 66rpx;
|
||||
text-indent: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&.item-3 {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 8rpx;
|
||||
background: linear-gradient(90deg, #faf6f5 0%, #fcfbfc 100%);
|
||||
.rank-column{
|
||||
color: #ffffff00;
|
||||
background: url(@/static/images/examRanking/no-3.png) no-repeat ;
|
||||
background-position: 40rpx center;
|
||||
background-size: 44rpx 66rpx;
|
||||
text-indent: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&.item-me{
|
||||
border-bottom: 0;
|
||||
.rank-column {
|
||||
color: #06f;
|
||||
}
|
||||
}
|
||||
|
||||
.rank-column {
|
||||
width: 170rpx;
|
||||
padding-left: 40rpx;
|
||||
float: left;
|
||||
font-weight: 600;
|
||||
line-height: 92rpx;
|
||||
height: 108rpx;
|
||||
color: #333;
|
||||
font-size: 38rpx;
|
||||
font-style: italic;
|
||||
text-indent: 8rpx;
|
||||
}
|
||||
|
||||
.user-column {
|
||||
width: 450rpx;
|
||||
float: left;
|
||||
padding: 15rpx 0;
|
||||
|
||||
.avatar-box{
|
||||
width: 77rpx;
|
||||
height: 77rpx;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
background-color: #eee;
|
||||
border-radius: 50%;
|
||||
.avatar-image{
|
||||
width: 77rpx;
|
||||
height: 77rpx;
|
||||
}
|
||||
}
|
||||
.user-name{
|
||||
float: left;
|
||||
width: calc(100% - 77rpx);
|
||||
padding-left: 18rpx;
|
||||
padding-right: 18rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 29rpx;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.user-org{
|
||||
float: left;
|
||||
width: calc(100% - 77rpx);
|
||||
padding-left: 18rpx;
|
||||
padding-right: 18rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
font-size: 25rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.score-column {
|
||||
width: 75rpx;
|
||||
text-align: right;
|
||||
float: left;
|
||||
font-weight: 600;
|
||||
line-height: 108rpx;
|
||||
color: #333;
|
||||
font-size: 31rpx;
|
||||
}
|
||||
}
|
||||
.ranking-self {
|
||||
height: 170rpx;
|
||||
overflow: hidden;
|
||||
background-color: #f5f9ff;
|
||||
padding-top: 4rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,15 +3,16 @@
|
||||
<nav-bar :is_seat="true"></nav-bar>
|
||||
<view class="nav-div">
|
||||
<view class="title ellipsis-text" @click="hand_in_paper_button_click()">
|
||||
{{paperData.papersName}}
|
||||
{{ paperData.papersName }}
|
||||
</view>
|
||||
<view class="back_div"></view>
|
||||
</view>
|
||||
<view class="countdown-and-question-number-div">
|
||||
<view class="top">
|
||||
<view class="countdown">
|
||||
<text class="grey">答题进度</text> <text class="bold">{{questionNumber + 1}}</text><text
|
||||
class="grey">/{{topicList.length}}</text>
|
||||
<text class="grey">答题进度</text>
|
||||
<text class="bold">{{ questionNumber + 1 }}</text>
|
||||
<text class="grey">/{{ topicList.length }}</text>
|
||||
</view>
|
||||
<view class="question">
|
||||
<view class="grey">剩余时间</view>
|
||||
@@ -19,164 +20,178 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="progress">
|
||||
<uv-line-progress :percentage="progress" :showText="false" activeColor="#FFFFFF" inactiveColor="#89B8FF"
|
||||
:height="8"></uv-line-progress>
|
||||
<uv-line-progress
|
||||
:percentage="progress"
|
||||
:showText="false"
|
||||
activeColor="#FFFFFF"
|
||||
inactiveColor="#89B8FF"
|
||||
:height="8"
|
||||
></uv-line-progress>
|
||||
</view>
|
||||
</view>
|
||||
<view class="scroll_div">
|
||||
<swiper class="swiper" :indicator-dots="false" @change="swiperChange" :current="questionNumber"
|
||||
easing-function="linear">
|
||||
<swiper-item v-for="(item,index) in topicList">
|
||||
<swiper
|
||||
class="swiper"
|
||||
:indicator-dots="false"
|
||||
@change="swiperChange"
|
||||
:current="questionNumber"
|
||||
easing-function="linear"
|
||||
>
|
||||
<swiper-item v-for="(item, index) in topicList">
|
||||
<view class="content">
|
||||
<view class="expose_shadow"></view>
|
||||
<scroll-view :scroll-y="true" class="scroll-Y" :show-scrollbar="false" :refresher-threshold="0">
|
||||
<RadioSubject :item="item" v-if="item.qnsTyp !== 'ES'" :mode="mode"
|
||||
@subject_click="subject_click">
|
||||
</RadioSubject>
|
||||
<CharactersSubject :item="item" v-if="item.qnsTyp === 'ES'" :mode="mode"
|
||||
<Subject :item="item" :mode="mode" @subject_click="subject_click" :clearResult="true" v-model="item.my_answer"></Subject>
|
||||
<!-- <CharactersSubject :item="item" v-if="item.qnsTyp === 'ES'" :mode="mode"
|
||||
:activeVoiceId="activeVoiceId" :voicePathValue="voicePathValue"
|
||||
@subject_click="subject_click">
|
||||
</CharactersSubject>
|
||||
</CharactersSubject> -->
|
||||
</scroll-view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<view class="fixed-box font_pf" :style="{marginBottom:popup_input_bottom}">
|
||||
<view class="fixed-box font_pf" :style="{ marginBottom: popup_input_bottom }">
|
||||
<view class="fixed-btn-box">
|
||||
<view class="sheet_button" @click="openSheet(true)">
|
||||
<image :src="examinationSheetIcon()" class="img"></image>
|
||||
<view class="sheet_text">答题卡</view>
|
||||
</view>
|
||||
<view class="button_div">
|
||||
<uv-button class="button" type="primary" :throttleTime="100" text="上一题" color="#E2EDFF"
|
||||
<uv-button
|
||||
class="button"
|
||||
type="primary"
|
||||
:throttleTime="100"
|
||||
text="上一题"
|
||||
color="#E2EDFF"
|
||||
custom-style="color:#0066FF;borderRadius:16rpx;height:92rpx;"
|
||||
@click="button_tab(-1)"></uv-button>
|
||||
<view style="width:46rpx"></view>
|
||||
<uv-button class="button" type="primary" :throttleTime="100" :text="next_question" color="#0066FF"
|
||||
@click="button_tab(-1)"
|
||||
></uv-button>
|
||||
<view style="width: 46rpx"></view>
|
||||
<uv-button
|
||||
class="button"
|
||||
type="primary"
|
||||
:throttleTime="100"
|
||||
:text="next_question"
|
||||
color="#0066FF"
|
||||
custom-style="color:#FFFFFF;borderRadius:16rpx;height:92rpx;"
|
||||
@click="button_tab(1)"></uv-button>
|
||||
@click="button_tab(1)"
|
||||
></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="touch-btn-div" :class="{'show':showTouchBtn}">
|
||||
<TouchBtn class="talk-btns" @submit="touchBtnSubmit"
|
||||
loadingText="问题回答中,请在问题回答结束后重试!" :isLoading="!answerIsOver" :isDisabled="false" />
|
||||
<view class="touch-btn-div" :class="{ show: showTouchBtn }">
|
||||
<TouchBtn
|
||||
class="talk-btns"
|
||||
@submit="touchBtnSubmit"
|
||||
loadingText="问题回答中,请在问题回答结束后重试!"
|
||||
:isLoading="!answerIsOver"
|
||||
:isDisabled="false"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-popup ref="popupRef" class="popup">
|
||||
<view class="sheet_popup_div" >
|
||||
<view class="sheet_popup_div">
|
||||
<view class="title_div">
|
||||
<view class="text">
|
||||
答题卡
|
||||
</view>
|
||||
<view class="text">答题卡</view>
|
||||
<view class="popup_back_div" @click="openSheet(false)">
|
||||
<image :src="optionErrorIcon('#000000')" class="img"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sheet_table">
|
||||
<view class="sheet_table_item" v-for="(item,index) in topicList" :class="{
|
||||
'current':index === questionNumber,
|
||||
'mark':markList.includes(item.qnsId),
|
||||
'completed':completedList.includes(item.qnsId),
|
||||
}" @click="clikc_sheet_item(index)">
|
||||
<view
|
||||
class="sheet_table_item"
|
||||
v-for="(item, index) in topicList"
|
||||
:class="{
|
||||
current: index === questionNumber,
|
||||
mark: markList.includes(item.qnsId),
|
||||
completed: completedList.includes(item.qnsId)
|
||||
}"
|
||||
@click="clikc_sheet_item(index)"
|
||||
>
|
||||
<view class="circle">
|
||||
{{index + 1}}
|
||||
{{ index + 1 }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sheet_button">
|
||||
<uv-button class="button" type="primary" :throttleTime="100" text="交卷" color="#0066FF"
|
||||
<uv-button
|
||||
class="button"
|
||||
type="primary"
|
||||
:throttleTime="100"
|
||||
text="交卷"
|
||||
color="#0066FF"
|
||||
custom-style="color:#FFFFFF;borderRadius:16rpx;height:92rpx;"
|
||||
@click="hand_in_paper_button_click()"></uv-button>
|
||||
@click="hand_in_paper_button_click()"
|
||||
></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- 反馈组件 -->
|
||||
<Feedback ref="feedbackRef"></Feedback>
|
||||
<!-- 结尾弹出层 -->
|
||||
<Dialog ref="dialogRef" :dialogConfiguration="dialogConfiguration" @button_click="result_click">
|
||||
|
||||
</Dialog>
|
||||
<Dialog ref="dialogRef" :dialogConfiguration="dialogConfiguration" @button_click="result_click"></Dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Feedback from './components/feedback.vue'
|
||||
import Dialog from './components/dialog.vue'
|
||||
import RadioSubject from '@/components/examination/radio-subject.vue'
|
||||
import CharactersSubject from '@/components/examination/characters-subject.vue'
|
||||
import TouchBtn from '@/components/examination/touchBtn.vue'
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
onMounted,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import Feedback from './components/feedback.vue';
|
||||
import Dialog from './components/dialog.vue';
|
||||
import Subject from '@/components/examination/subject.vue';
|
||||
import CharactersSubject from '@/components/examination/characters-subject.vue';
|
||||
import TouchBtn from '@/components/examination/touchBtn.vue';
|
||||
import { ref, reactive, computed, onMounted, nextTick } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import common from '@/common/common';
|
||||
import {
|
||||
getPageCache
|
||||
} from '@/common/common';
|
||||
import {
|
||||
commonUploadVoiceFile
|
||||
} from "@/api/common.js"
|
||||
import {
|
||||
optionErrorIcon,
|
||||
examinationSheetIcon
|
||||
} from '@/common/imgSvg'
|
||||
import {
|
||||
commitPaperExam,
|
||||
queryPaperExamScore
|
||||
} from '@/api/examination.js'
|
||||
import { getPageCache } from '@/common/common';
|
||||
import { commonUploadVoiceFile } from '@/api/common.js';
|
||||
import { optionErrorIcon, examinationSheetIcon } from '@/common/imgSvg';
|
||||
import { commitPaperExam, queryPaperExamScore } from '@/api/examination.js';
|
||||
|
||||
const answerIsOver = ref(true);
|
||||
const feedbackRef = ref(null);
|
||||
const dialogRef = ref(null);
|
||||
const popupRef = ref(null);
|
||||
|
||||
const answerIsOver = ref(true)
|
||||
const feedbackRef = ref(null)
|
||||
const dialogRef = ref(null)
|
||||
const popupRef = ref(null)
|
||||
|
||||
const mode = ref('examination') // 考试 examination 练习practice
|
||||
const mode = ref('examination'); // 考试 examination 练习practice
|
||||
const paperData = reactive({
|
||||
execId: '', // 执行ID
|
||||
examId: '', // 考试ID
|
||||
papersId: '', // 试卷ID
|
||||
limitTm: 0, // 考试限制时间
|
||||
papersName: '', // 试卷名称
|
||||
}) // 试卷信息
|
||||
const topicList = reactive([]) // 问题列表
|
||||
const popup_input_bottom = ref('0px')
|
||||
const questionNumber = ref(0) // 题号
|
||||
papersName: '' // 试卷名称
|
||||
}); // 试卷信息
|
||||
const topicList = reactive([]); // 问题列表
|
||||
const popup_input_bottom = ref('0px');
|
||||
const questionNumber = ref(0); // 题号
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
const showTouchBtn = computed(() => {
|
||||
return topicList[questionNumber.value]['qnsTyp'] === 'ES'
|
||||
})
|
||||
return topicList[questionNumber.value]['qnsTyp'] === 'ES';
|
||||
});
|
||||
const completedList = computed(() => {
|
||||
return []
|
||||
})
|
||||
return [];
|
||||
});
|
||||
|
||||
const markList = computed(() => topicList.filter(res => !!res.mark).map(res => res.qnsId)) // 标记列表
|
||||
const markList = computed(() => topicList.filter((res) => !!res.mark).map((res) => res.qnsId)); // 标记列表
|
||||
// 下一题按钮状态
|
||||
const next_question = computed(() => (topicList.length === questionNumber.value + 1) ? '交卷' : '下一题')
|
||||
const next_question = computed(() => (topicList.length === questionNumber.value + 1 ? '交卷' : '下一题'));
|
||||
|
||||
const progress = computed(() => { // 计算进度百分比(保留两位小数)
|
||||
const progress = computed(() => {
|
||||
// 计算进度百分比(保留两位小数)
|
||||
const total = topicList.length;
|
||||
if (total === 0) return 0;
|
||||
const completed = questionNumber.value + 1;
|
||||
return Math.min(Math.round((completed / total) * 10000) / 100, 100);
|
||||
})
|
||||
});
|
||||
// 弹出框配置
|
||||
const dialogConfiguration = reactive({})
|
||||
const dialogConfiguration = reactive({});
|
||||
|
||||
const activeVoiceId = ref('')
|
||||
const activeVoiceId = ref('');
|
||||
|
||||
const swiperChange = (item) => {
|
||||
questionNumber.value = item.detail.current
|
||||
}
|
||||
questionNumber.value = item.detail.current;
|
||||
};
|
||||
|
||||
// 按上一题下一题
|
||||
const button_tab = (num) => {
|
||||
@@ -185,81 +200,78 @@
|
||||
newNumber = 0;
|
||||
} else if (newNumber >= topicList.length) {
|
||||
newNumber = topicList.length - 1;
|
||||
hand_in_paper_button_click() // 调用交卷
|
||||
hand_in_paper_button_click(); // 调用交卷
|
||||
}
|
||||
questionNumber.value = newNumber;
|
||||
}
|
||||
};
|
||||
|
||||
// 打开或者关闭弹出层
|
||||
const openSheet = (status) => status ? popupRef.value.open('bottom') : popupRef.value.close();
|
||||
const openSheet = (status) => (status ? popupRef.value.open('bottom') : popupRef.value.close());
|
||||
|
||||
// 点击答题卡按钮
|
||||
const clikc_sheet_item = (index) => {
|
||||
questionNumber.value = index
|
||||
}
|
||||
questionNumber.value = index;
|
||||
};
|
||||
const subject_click = (type, params) => {
|
||||
if (type === 'mark') {
|
||||
topicList[questionNumber.value]['mark'] = !topicList[questionNumber.value]['mark']
|
||||
topicList[questionNumber.value]['mark'] = !topicList[questionNumber.value]['mark'];
|
||||
} else if (type === 'feedback') {
|
||||
console.log('feedbackRef.value', feedbackRef.value);
|
||||
feedbackRef.value.open()
|
||||
feedbackRef.value.open();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const voicePathValue = ref('');
|
||||
|
||||
const voicePathValue = ref('')
|
||||
|
||||
// 录音按钮提交
|
||||
const touchBtnSubmit = (type, submitObj) => {
|
||||
if (type === 'voice') {
|
||||
uploadRecordNow(submitObj)
|
||||
}else if (type === 'text') {
|
||||
|
||||
uploadRecordNow(submitObj);
|
||||
} else if (type === 'text') {
|
||||
}
|
||||
}
|
||||
};
|
||||
// 发送语音
|
||||
const uploadRecordNow = (voicePath) => {
|
||||
|
||||
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {}).then(res => {
|
||||
let _res = JSON.parse(res.data)
|
||||
voicePathValue.value = voicePath
|
||||
console.log('_res', _res, voicePath);
|
||||
if (_res.rtnCode === '0000') {
|
||||
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '系统异常,请联系管理员',
|
||||
icon: "none",
|
||||
duration: 1000
|
||||
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {})
|
||||
.then((res) => {
|
||||
let _res = JSON.parse(res.data);
|
||||
voicePathValue.value = voicePath;
|
||||
console.log('_res', _res, voicePath);
|
||||
if (_res.rtnCode === '0000') {
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
uni.showToast({
|
||||
title: '系统异常,请联系管理员',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
});
|
||||
})
|
||||
}
|
||||
};
|
||||
// 发送文本
|
||||
const submitAnswerNow = (val, cb = null) => {
|
||||
|
||||
}
|
||||
const submitAnswerNow = (val, cb = null) => {};
|
||||
// 初始化时检查
|
||||
onLoad(() => {
|
||||
const examination = getPageCache('examination')
|
||||
const examination = getPageCache('examination');
|
||||
if (!examination) {
|
||||
common.navigateBack()
|
||||
return
|
||||
common.navigateBack();
|
||||
return;
|
||||
}
|
||||
paperData.execId = examination.execId
|
||||
paperData.examId = examination.examId
|
||||
paperData.papersId = examination.papersId
|
||||
paperData.limitTm = examination.limitTm
|
||||
paperData.papersName = examination.papersName
|
||||
topicList.push(...examination.qnsInfoVos.map(res => ({
|
||||
...res,
|
||||
mark: false,
|
||||
my_answer: [],
|
||||
backend_answer: [],
|
||||
})))
|
||||
paperData.execId = examination.execId;
|
||||
paperData.examId = examination.examId;
|
||||
paperData.papersId = examination.papersId;
|
||||
paperData.limitTm = examination.limitTm;
|
||||
paperData.papersName = examination.papersName;
|
||||
topicList.push(
|
||||
...examination.qnsInfoVos.map((res) => ({
|
||||
...res,
|
||||
mark: false,
|
||||
my_answer: []
|
||||
}))
|
||||
);
|
||||
// 安全区域底部到屏幕底部的高度(即底部安全区域高度)
|
||||
const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom;
|
||||
uni.onKeyboardHeightChange(res => {
|
||||
|
||||
uni.onKeyboardHeightChange((res) => {
|
||||
let keyboardHeight = res.height;
|
||||
// 仅在iOS端补偿安全区域高度
|
||||
if (systemInfo.platform === 'ios') {
|
||||
@@ -270,125 +282,133 @@
|
||||
});
|
||||
});
|
||||
|
||||
const result_click = ({
|
||||
key
|
||||
}) => {
|
||||
const result_click = ({ key }) => {
|
||||
console.log('res', key);
|
||||
if (key === 'hand_in_paper') { // 现在交卷
|
||||
hand_in_paper()
|
||||
} else if (key === 'continue') { // 继续考试
|
||||
dialogRef.value.close()
|
||||
if (key === 'hand_in_paper') {
|
||||
// 现在交卷
|
||||
hand_in_paper();
|
||||
} else if (key === 'continue') {
|
||||
// 继续考试
|
||||
dialogRef.value.close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// 交卷按钮点击,打开交卷确认框
|
||||
const hand_in_paper_button_click = () => {
|
||||
console.log('点击交卷', paperData);
|
||||
// console.log('点击交卷topicList', topicList);
|
||||
// return;
|
||||
// 判断是否完成所有题目
|
||||
const completeList = topicList.filter(res => !!(Array.isArray(res.my_answer) ? res.my_answer.length : res
|
||||
.my_answer)).map(res => ({
|
||||
a: res.qnsId,
|
||||
b: res.my_answer,
|
||||
c: !!res.my_answer
|
||||
}))
|
||||
dialogConfiguration.title = '确认现在交卷吗?'
|
||||
const completeList = topicList
|
||||
.filter((res) => !!(Array.isArray(res.my_answer) ? res.my_answer.length : res.my_answer))
|
||||
.map((res) => ({
|
||||
a: res.qnsId,
|
||||
b: res.my_answer,
|
||||
c: !!res.my_answer
|
||||
}));
|
||||
dialogConfiguration.title = '确认现在交卷吗?';
|
||||
const style_button_1 = {
|
||||
color: '#FFFFFF',
|
||||
fontSize: '30rpx',
|
||||
backgroundColor: '#0066FF',
|
||||
borderRadius: '8rpx'
|
||||
}
|
||||
};
|
||||
const style_button_2 = {
|
||||
color: '#0066FF',
|
||||
fontSize: '30rpx',
|
||||
backgroundColor: '#E2EDFF',
|
||||
borderRadius: '8rpx'
|
||||
}
|
||||
const incompleteNumber = topicList.length - completeList.length
|
||||
if (incompleteNumber === 0) { // 完成
|
||||
dialogConfiguration.type = 'complete'
|
||||
dialogConfiguration.title = '确认现在交卷吗?'
|
||||
dialogConfiguration.buttonList = [{
|
||||
key: 'hand_in_paper',
|
||||
name: '现在交卷',
|
||||
style: style_button_1
|
||||
}, {
|
||||
key: 'continue',
|
||||
name: '继续考试',
|
||||
style: style_button_2
|
||||
}]
|
||||
};
|
||||
const incompleteNumber = topicList.length - completeList.length;
|
||||
if (incompleteNumber === 0) {
|
||||
// 完成
|
||||
dialogConfiguration.type = 'complete';
|
||||
dialogConfiguration.title = '确认现在交卷吗?';
|
||||
dialogConfiguration.buttonList = [
|
||||
{
|
||||
key: 'hand_in_paper',
|
||||
name: '现在交卷',
|
||||
style: style_button_1
|
||||
},
|
||||
{
|
||||
key: 'continue',
|
||||
name: '继续考试',
|
||||
style: style_button_2
|
||||
}
|
||||
];
|
||||
} else {
|
||||
dialogConfiguration.type = 'incomplete' // 未完成
|
||||
dialogConfiguration.html =
|
||||
`当前考试进度:<text style="color:#0066FF;font-weight:bold;">${completeList.length}/${topicList.length}</text> 题 还有<text style="color:#0066FF;font-weight:bold;">${incompleteNumber}</text>道题未作答,确认交卷吗?`
|
||||
dialogConfiguration.buttonList = [{
|
||||
key: 'continue',
|
||||
name: '继续考试',
|
||||
style: style_button_1
|
||||
}, {
|
||||
key: 'hand_in_paper',
|
||||
name: '现在交卷',
|
||||
style: style_button_2
|
||||
}]
|
||||
dialogConfiguration.type = 'incomplete'; // 未完成
|
||||
dialogConfiguration.html = `当前考试进度:<text style="color:#0066FF;font-weight:bold;">${completeList.length}/${topicList.length}</text> 题 还有<text style="color:#0066FF;font-weight:bold;">${incompleteNumber}</text>道题未作答,确认交卷吗?`;
|
||||
dialogConfiguration.buttonList = [
|
||||
{
|
||||
key: 'continue',
|
||||
name: '继续考试',
|
||||
style: style_button_1
|
||||
},
|
||||
{
|
||||
key: 'hand_in_paper',
|
||||
name: '现在交卷',
|
||||
style: style_button_2
|
||||
}
|
||||
];
|
||||
}
|
||||
dialogRef.value.open()
|
||||
}
|
||||
dialogRef.value.open();
|
||||
};
|
||||
// 执行交卷
|
||||
const hand_in_paper = () => {
|
||||
const answerDtoList = topicList.map(res => {
|
||||
const answerDtoList = topicList.map((res) => {
|
||||
let answerItem = {
|
||||
examId: paperData.examId,
|
||||
papersId: paperData.papersId,
|
||||
qnsId: res.qnsId,
|
||||
ossKey: '',
|
||||
anserResult: '',
|
||||
}
|
||||
if (res.qnsTyp === 'ES') { // 问答题特殊处理
|
||||
anserResult: ''
|
||||
};
|
||||
if (res.qnsTyp === 'ES') {
|
||||
// 问答题特殊处理
|
||||
return {
|
||||
...answerItem,
|
||||
anserResult: ''
|
||||
}
|
||||
} else { //其他题
|
||||
};
|
||||
} else {
|
||||
//其他题
|
||||
return {
|
||||
...answerItem,
|
||||
anserResult: res.my_answer.join(',')
|
||||
}
|
||||
};
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
console.log('answerDtoList', answerDtoList);
|
||||
dialogRef.value.close()
|
||||
common.loading('正在提交')
|
||||
dialogRef.value.close();
|
||||
common.loading('正在提交');
|
||||
commitPaperExam({
|
||||
examId: paperData.examId,
|
||||
execId: paperData.execId || '1',
|
||||
examLenTm: 1200,
|
||||
answerDtoStr: JSON.stringify(answerDtoList)
|
||||
}).then(res => {
|
||||
console.log('提交成功', res);
|
||||
if (res.body.flagQuery === 'Y') { // 需要查分
|
||||
common.redirectTo('/pages/examination/result?execId=' + res.body.execId)
|
||||
} else { // 不需要查分
|
||||
common.navigateBack()
|
||||
}
|
||||
|
||||
// const execId = res.body.execId
|
||||
// let timer = setInterval(() => {
|
||||
// queryPaperExamScore({
|
||||
// execId
|
||||
// }).then(res => {
|
||||
// console.log('分数返回', res);
|
||||
// clearInterval(timer)
|
||||
// })
|
||||
// }, 1000)
|
||||
}).catch((res) => {
|
||||
console.log('error', res);
|
||||
}).finally(() => {
|
||||
common.hideLoading().body
|
||||
})
|
||||
}
|
||||
.then((res) => {
|
||||
console.log('提交成功', res);
|
||||
// 判断是否需要查分
|
||||
if (res.body.flagQuery === 'Y') {
|
||||
// 需要查分
|
||||
const examLenTm = 678;
|
||||
common.redirectTo(
|
||||
`/pages/examination/result?execId=${res.body.execId}&examLenTm=${examLenTm}&papersName=${paperData.papersName}`
|
||||
);
|
||||
} else {
|
||||
// todo 此处应该有个弹窗交代下结果
|
||||
common.navigateBack();
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
console.log('error', res);
|
||||
})
|
||||
.finally(() => {
|
||||
common.hideLoading().body;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -404,10 +424,9 @@
|
||||
padding: 0 38rpx;
|
||||
|
||||
.sheet_popup_div {
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #FFFFFF;
|
||||
background-color: #ffffff;
|
||||
padding: 10rpx 34rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -425,7 +444,7 @@
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
border-bottom: 2rpx solid #EFEFEF;
|
||||
border-bottom: 2rpx solid #efefef;
|
||||
}
|
||||
|
||||
.popup_back_div {
|
||||
@@ -439,7 +458,6 @@
|
||||
justify-content: center;
|
||||
|
||||
.img {
|
||||
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
@@ -457,7 +475,7 @@
|
||||
width: calc((100vw - 108rpx) / 5 - 16rpx);
|
||||
height: calc((100vw - 108rpx) / 5 - 16rpx);
|
||||
margin: 8rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
border: 2rpx solid #e5e5e5;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -468,29 +486,29 @@
|
||||
|
||||
.current {
|
||||
background-color: rgba(0, 102, 255, 0.6);
|
||||
border-color: #0066FF;
|
||||
color: #FFFFFF;
|
||||
border-color: #0066ff;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.completed {
|
||||
// 已完成
|
||||
background-color: rgba(0, 102, 255, 0.1);
|
||||
border-color: #0066FF;
|
||||
color: #0066FF;
|
||||
border-color: #0066ff;
|
||||
color: #0066ff;
|
||||
}
|
||||
|
||||
.mark,
|
||||
.completed.mark {
|
||||
background-color: rgba(232, 181, 49, 0.1);
|
||||
color: #E8B531;
|
||||
border-color: #E8B531;
|
||||
color: #e8b531;
|
||||
border-color: #e8b531;
|
||||
}
|
||||
|
||||
.current.mark {
|
||||
// 已完成
|
||||
background-color: rgba(0, 102, 255, 0.6);
|
||||
color: #FFFFFF;
|
||||
border-color: #E8B531;
|
||||
color: #ffffff;
|
||||
border-color: #e8b531;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,11 +524,10 @@
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-radius: 16rpx 16rpx 0px 0px;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
background: #FFFFFF;
|
||||
border: 2rpx solid #e5e5e5;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
.touch-btn-div {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
@@ -527,7 +544,7 @@
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
|
||||
|
||||
.sheet_button {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -537,7 +554,6 @@
|
||||
.img {
|
||||
width: 38rpx;
|
||||
height: 40rpx;
|
||||
|
||||
}
|
||||
|
||||
.sheet_text {
|
||||
@@ -569,13 +585,12 @@
|
||||
|
||||
.swiper {
|
||||
// 状态栏 var(--status-bar-height)
|
||||
// 标题栏 70rpx
|
||||
// 进度时间栏 70rpx
|
||||
// 进度时间栏上下间距 40rpx = 20rpx + 20rpx
|
||||
// 标题栏 70rpx
|
||||
// 进度时间栏 70rpx
|
||||
// 进度时间栏上下间距 40rpx = 20rpx + 20rpx
|
||||
// 正文上下间距 64rpx
|
||||
height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx);
|
||||
// background-color: red;
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -592,7 +607,7 @@
|
||||
left: 0%;
|
||||
width: calc(100% - 66rpx);
|
||||
height: 28rpx;
|
||||
background-color: #FFFFFF;
|
||||
background-color: #ffffff;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
opacity: 0.4;
|
||||
z-index: 0;
|
||||
@@ -615,7 +630,7 @@
|
||||
justify-content: space-between;
|
||||
font-family: PingFangSC;
|
||||
font-size: 26rpx;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -632,14 +647,14 @@
|
||||
}
|
||||
|
||||
:deep(.uv-count-down__text) {
|
||||
color: #FFFFFF !important;
|
||||
color: #ffffff !important;
|
||||
font-weight: 600;
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: #B6E2FF;
|
||||
color: #b6e2ff;
|
||||
}
|
||||
|
||||
.bold {
|
||||
@@ -658,11 +673,10 @@
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
line-height: 70rpx;
|
||||
|
||||
}
|
||||
|
||||
.back_div {
|
||||
@@ -678,9 +692,9 @@
|
||||
.main_div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(to top, #3480FF, #0066FF);
|
||||
background: linear-gradient(to top, #3480ff, #0066ff);
|
||||
/* 确保背景占满整个视口高度 */
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -2,56 +2,60 @@
|
||||
<view class="main_div max_page">
|
||||
<nav-bar :is_seat="true"></nav-bar>
|
||||
<view class="nav-div">
|
||||
<view class="title ellipsis-text">
|
||||
考试结算
|
||||
</view>
|
||||
<view class="back_div">
|
||||
<view class="title ellipsis-text">考试结算</view>
|
||||
<view class="back_div" @click="common.navigateBack()">
|
||||
<view class="back-icon"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="sheet_table_div_fixed" v-if="sheet_table_status">
|
||||
<swiper :indicator-dots="false" class="sheet_swiper" :current="sheet_swiper_index" @change="sheet_swiper_change">
|
||||
<swiper-item v-for="(group, groupIndex) in groupedTopicList" :key="groupIndex">
|
||||
<uv-grid :col="5" class="sheet_table" @click="sheet_click">
|
||||
<uv-grid-item v-for="(item,index) in group" :key="index">
|
||||
<view class="circle">
|
||||
{{ groupIndex * 10 + index + 1 }}
|
||||
</view>
|
||||
</uv-grid-item>
|
||||
</uv-grid>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="swiper-dots">
|
||||
</view>
|
||||
</view> -->
|
||||
<scroll-view :scroll-y="true" @scroll="scroll" :scroll-top="scrollTop" class="scroll scroll-Y"
|
||||
:scroll-with-animation="true" :show-scrollbar="false">
|
||||
<scroll-view
|
||||
:scroll-y="true"
|
||||
@scroll="scroll"
|
||||
:scroll-top="scrollTop"
|
||||
class="scroll scroll-Y"
|
||||
:scroll-with-animation="true"
|
||||
:show-scrollbar="false"
|
||||
>
|
||||
<view class="information-details-div">
|
||||
<view class="top">
|
||||
<view class="left">
|
||||
<view class="top">得分</view>
|
||||
<view class="mid">
|
||||
<text v-if="pass_status===0" class="loading-pass">--</text>
|
||||
<text v-if="pass_status===-1" class="no-pass">40</text>
|
||||
<text v-if="pass_status===1" class="pass">50</text>
|
||||
|
||||
<text v-if="pass_status === 0" class="loading-pass">--</text>
|
||||
<text v-if="pass_status === -1" class="no-pass">{{ result.examGrade }}</text>
|
||||
<text v-if="pass_status === 1" class="pass">{{ result.examGrade }}</text>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<text v-if="pass_status===-1">失败乃成功之母,继续努力</text>
|
||||
<text v-if="pass_status===1">考的不错啊,继续加油</text>
|
||||
<text v-if="pass_status===0">考试结果计算中...</text>
|
||||
<image v-if="pass_status===1" src="@/static/images/login/clap.png" mode="widthFix"
|
||||
style="width: 32rpx;"></image>
|
||||
<text v-if="pass_status === -1">失败乃成功之母,继续努力</text>
|
||||
<text v-if="pass_status === 1">考的不错啊,继续加油</text>
|
||||
<text v-if="pass_status === 0">考试结果计算中...</text>
|
||||
<image
|
||||
v-if="pass_status === 1"
|
||||
src="@/static/images/login/clap.png"
|
||||
mode="widthFix"
|
||||
style="width: 32rpx"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="img">
|
||||
<image v-if="pass_status===1" src="@/static/images/examination/qualified.png"
|
||||
mode="widthFix" style="width: 270rpx;"></image>
|
||||
<image v-if="pass_status===-1" src="@/static/images/examination/unqualified.png"
|
||||
mode="widthFix" style="width: 270rpx;"></image>
|
||||
<image v-if="pass_status===0" src="@/static/images/examination/getting_in.gif"
|
||||
mode="widthFix" style="width: 270rpx;"></image>
|
||||
<view class="img_div">
|
||||
<image
|
||||
v-if="pass_status === 1"
|
||||
src="@/static/images/examination/qualified.png"
|
||||
mode="aspectFit"
|
||||
class="img"
|
||||
></image>
|
||||
<image
|
||||
v-if="pass_status === -1"
|
||||
src="@/static/images/examination/unqualified.png"
|
||||
mode="aspectFit"
|
||||
class="img"
|
||||
></image>
|
||||
<image
|
||||
v-if="pass_status === 0"
|
||||
src="@/static/images/examination/getting_in.gif"
|
||||
mode="aspectFit"
|
||||
class="img"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -59,41 +63,44 @@
|
||||
<!-- 考试标题 -->
|
||||
<view class="title-div">
|
||||
<view class="title-icon">
|
||||
<image src="@/static/images/examination/examination-icon.png" mode="widthFix" class="img">
|
||||
</image>
|
||||
</view>
|
||||
<view class="title ellipsis-text">
|
||||
考试:这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称这里是考试名称
|
||||
<image
|
||||
src="@/static/images/examination/examination-icon.png"
|
||||
mode="widthFix"
|
||||
class="img"
|
||||
></image>
|
||||
</view>
|
||||
<view class="title ellipsis-text">考试:{{ result.papersName }}</view>
|
||||
</view>
|
||||
<!-- 时间和考试按钮 -->
|
||||
<view class="time-and-exam-button">
|
||||
<view class="time-icon">
|
||||
<image src="@/static/images/examination/duration-icon.png" mode="widthFix" class="img">
|
||||
</image>
|
||||
<image src="@/static/images/examination/duration-icon.png" mode="widthFix" class="img"></image>
|
||||
</view>
|
||||
<view class="time">
|
||||
时长:12 分 15 秒
|
||||
</view>
|
||||
<view class="fl1">
|
||||
|
||||
<!-- 12 分 15 秒 -->
|
||||
时长:{{ result.examLenTm }}
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="examination">
|
||||
<view>考试排行榜</view>
|
||||
<view class="back-icon"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-div">
|
||||
<!-- <uv-sticky id='tabsDiv' class="sticky"> -->
|
||||
<view class="sheet_table_div">
|
||||
<swiper :indicator-dots="false" class="sheet_swiper" :current="sheet_swiper_index" @change="sheet_swiper_change">
|
||||
<view class="sheet_table_div" v-if="pass_status !== 0 && topicList.length > 0">
|
||||
<swiper
|
||||
:indicator-dots="false"
|
||||
class="sheet_swiper"
|
||||
:style="{ height: topicList.length > 5 ? '230rpx' : '115rpx' }"
|
||||
:current="sheet_swiper_index"
|
||||
@change="sheet_swiper_change"
|
||||
>
|
||||
<!-- 循环渲染分组后的数组 -->
|
||||
<swiper-item v-for="(group, groupIndex) in groupedTopicList" :key="groupIndex">
|
||||
<uv-grid :col="5" class="sheet_table" @click="sheet_click">
|
||||
<uv-grid-item v-for="(item,index) in group" :key="index">
|
||||
<uv-grid-item v-for="(item, index) in group" :key="index">
|
||||
<view class="circle">
|
||||
{{ groupIndex * 10 + index + 1 }}
|
||||
</view>
|
||||
@@ -101,70 +108,42 @@
|
||||
</uv-grid>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="swiper-dots">
|
||||
</view>
|
||||
<view class="swiper-dots"></view>
|
||||
</view>
|
||||
<!-- </uv-sticky> -->
|
||||
|
||||
<!-- 获取答题结果时候的图片 -->
|
||||
<view class="loading-pass-image-div" v-if="pass_status===0">
|
||||
<view class="loading-pass-image-div" v-if="pass_status === 0">
|
||||
<image src="@/static/images/examination/getting_robot.png" mode="widthFix" class="img"></image>
|
||||
<view class="tip">
|
||||
你的等待会有更精确的结果,要耐心哦~
|
||||
</view>
|
||||
<view class="tip">你的等待会有更精确的结果,要耐心哦~</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="item" :id="'id_'+index" :class="getStatusClass(index)" v-for="(item,index) in dataList">
|
||||
<view class="top">
|
||||
<view class="type">
|
||||
单选题
|
||||
</view>
|
||||
<view class="score">
|
||||
5分
|
||||
</view>
|
||||
<view class="fl1">
|
||||
|
||||
</view>
|
||||
<!-- <view class="right">
|
||||
<view class="right_text">
|
||||
展开
|
||||
</view>
|
||||
<uv-icon class="arrow-icon" name="arrow-right"></uv-icon>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="text">
|
||||
属于商业银行风险管理“三道防线”的哪些风险管理部门,为什么?
|
||||
</view>
|
||||
<view class="additional_div">
|
||||
<RadioSubject></RadioSubject>
|
||||
</view>
|
||||
<view class="" :id="'id_' + index" :class="getStatusClass(index)" v-for="(item, index) in topicList">
|
||||
<Subject :item="item" mode="settlement" :clearResult="false" :isPreview="true"></Subject>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
onMounted,
|
||||
nextTick,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import RadioSubject from '../wrong_question_record/components/radio-subject.vue'
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
const pass_status = ref(1)
|
||||
const sheet_swiper_index = ref(0)
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance } from 'vue';
|
||||
import { queryPaperExamScore } from '@/api/examination.js';
|
||||
import Subject from '@/components/examination/subject.vue';
|
||||
import common from '@/common/common';
|
||||
const pass_status = ref(0);
|
||||
const sheet_swiper_index = ref(0);
|
||||
const result = reactive({
|
||||
execId: '',
|
||||
papersName: '',
|
||||
examLenTm: '',
|
||||
examGrade: ''
|
||||
});
|
||||
|
||||
const sheet_swiper_change = (event) => {
|
||||
sheet_swiper_index.value = event.detail.current
|
||||
}
|
||||
const topicList = reactive([1, 2, 3, 4, 5, 6, 3, 4, 5, 6, 3, 4, 5, 6, 3, 4, 5, 6, 3, 4, 5, 6])
|
||||
const dataList = reactive([1, 2, 3, 4, 5, 6])
|
||||
sheet_swiper_index.value = event.detail.current;
|
||||
};
|
||||
|
||||
const topicList = reactive([]);
|
||||
// 答题卡计算属性
|
||||
const groupedTopicList = computed(() => {
|
||||
if (!topicList || topicList.length === 0) {
|
||||
@@ -178,30 +157,17 @@
|
||||
}
|
||||
return groups;
|
||||
});
|
||||
const sheet_table_status = ref(false)
|
||||
const scrollTop = ref(0)
|
||||
const scrollTop = ref(0);
|
||||
// 答题卡点击
|
||||
const sheet_click = (index) => {
|
||||
scrollTop.value = index * 200
|
||||
scrollTop.value = index * 200;
|
||||
|
||||
};
|
||||
|
||||
console.log('index', index);
|
||||
// sheet_table_status.value = false
|
||||
// nextTick(() => {
|
||||
// sss.value = 'id_' + index
|
||||
// nextTick(() => {
|
||||
// sheet_table_status.value = true
|
||||
// })
|
||||
// })
|
||||
}
|
||||
const scroll = (event) => {
|
||||
const top = event.detail.scrollTop
|
||||
console.log('top', top);
|
||||
if (top > 257) {
|
||||
sheet_table_status.value = true
|
||||
} else {
|
||||
sheet_table_status.value = false
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const getStatusClass = (index) => {
|
||||
const remainder = index % 3;
|
||||
if (remainder === 0) return 'in_progress';
|
||||
@@ -211,11 +177,29 @@
|
||||
const animationfinish = (event) => {
|
||||
console.log('event', event);
|
||||
};
|
||||
|
||||
const get_result = () => {
|
||||
setTimeout(() => {
|
||||
queryPaperExamScore({
|
||||
execId: result.execId
|
||||
}).then(({ body }) => {
|
||||
console.log('分数返回', body);
|
||||
if (body.isWait === 'Y') {
|
||||
get_result();
|
||||
} else if (body.isWait === 'N') {
|
||||
pass_status.value = body.examResult === 'P' ? 1 : -1; // p通过
|
||||
result.examGrade = body.examGrade;
|
||||
topicList.push(...body.qnsInfoVo);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
// 初始化时检查
|
||||
onMounted(() => {
|
||||
|
||||
|
||||
onLoad((e) => {
|
||||
result.execId = e.execId;
|
||||
result.papersName = e.papersName;
|
||||
result.examLenTm = e.examLenTm;
|
||||
get_result();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -223,15 +207,11 @@
|
||||
$bg-margin-left: 30rpx;
|
||||
|
||||
.scroll-Y {
|
||||
|
||||
// max-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx);
|
||||
height: calc(100vh - var(--status-bar-height) - 70rpx - 10rpx);
|
||||
// background-color: red;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.item {
|
||||
border-radius: 16rpx;
|
||||
margin: 18rpx 0;
|
||||
@@ -247,12 +227,12 @@
|
||||
.type {
|
||||
width: 108rpx;
|
||||
height: 46rpx;
|
||||
background: #267EFF;
|
||||
background: #267eff;
|
||||
border-radius: 8rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 25rpx;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
@@ -278,7 +258,6 @@
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,11 +271,10 @@
|
||||
font-style: normal;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sticky {}
|
||||
|
||||
.sticky {
|
||||
}
|
||||
|
||||
.sheet_table_div_fixed {
|
||||
position: absolute;
|
||||
@@ -318,9 +296,9 @@
|
||||
z-index: 600;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.sheet_swiper {
|
||||
height: 230rpx;
|
||||
// max-height: 230rpx;
|
||||
}
|
||||
|
||||
.swiper-dots {
|
||||
@@ -339,41 +317,40 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
border: 2rpx solid #e5e5e5;
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.current {
|
||||
background-color: rgba(0, 102, 255, 0.6);
|
||||
border-color: #0066FF;
|
||||
color: #FFFFFF;
|
||||
border-color: #0066ff;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.completed {
|
||||
// 已完成
|
||||
background-color: rgba(0, 102, 255, 0.1);
|
||||
border-color: #0066FF;
|
||||
color: #0066FF;
|
||||
border-color: #0066ff;
|
||||
color: #0066ff;
|
||||
}
|
||||
|
||||
.mark,
|
||||
.completed.mark {
|
||||
background-color: rgba(232, 181, 49, 0.1);
|
||||
color: #E8B531;
|
||||
border-color: #E8B531;
|
||||
color: #e8b531;
|
||||
border-color: #e8b531;
|
||||
}
|
||||
|
||||
.current.mark {
|
||||
// 已完成
|
||||
background-color: rgba(0, 102, 255, 0.6);
|
||||
color: #FFFFFF;
|
||||
border-color: #E8B531;
|
||||
color: #ffffff;
|
||||
border-color: #e8b531;
|
||||
}
|
||||
}
|
||||
|
||||
// 主内容框
|
||||
.main-div {
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 34rpx 0 30rpx 0;
|
||||
@@ -419,13 +396,10 @@
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 信息框
|
||||
.information-details-div {
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 34rpx 20rpx 30rpx 48rpx;
|
||||
@@ -433,15 +407,18 @@
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
opacity: .8;
|
||||
opacity: 0.8;
|
||||
box-shadow: 2rpx -2rpx 2rpx #fff;
|
||||
|
||||
&>.top {
|
||||
& > .top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
&>.left {
|
||||
&>.top {
|
||||
& > .left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
& > .top {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 700;
|
||||
font-size: 34rpx;
|
||||
@@ -451,17 +428,18 @@
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
&>.mid {
|
||||
& > .mid {
|
||||
font-weight: 700;
|
||||
font-size: 66rpx;
|
||||
line-height: 66rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-top: 34rpx;
|
||||
margin-bottom: 30rpx;
|
||||
height: 100rpx;
|
||||
// margin-top: 34rpx;
|
||||
// margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
&>.bottom {
|
||||
& > .bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: PingFangSC;
|
||||
@@ -471,18 +449,21 @@
|
||||
line-height: 24rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&>.right {
|
||||
& > .right {
|
||||
margin-left: 20rpx;
|
||||
.img_div {
|
||||
.img {
|
||||
width: 270rpx;
|
||||
height: 190rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&>.bottom {
|
||||
|
||||
& > .bottom {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
@@ -517,7 +498,7 @@
|
||||
.examination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #0066FF;
|
||||
color: #0066ff;
|
||||
|
||||
.back-icon {
|
||||
position: relative;
|
||||
@@ -538,8 +519,8 @@
|
||||
left: 25%;
|
||||
width: 40%;
|
||||
height: 40%;
|
||||
border-top: 4rpx solid #0066FF;
|
||||
border-left: 4rpx solid #0066FF;
|
||||
border-top: 4rpx solid #0066ff;
|
||||
border-left: 4rpx solid #0066ff;
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
}
|
||||
@@ -547,25 +528,23 @@
|
||||
}
|
||||
|
||||
.loading-pass {
|
||||
color: #0066FF;
|
||||
color: #0066ff;
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-weight: bold;
|
||||
font-size: 65rpx;
|
||||
color: #0066FF;
|
||||
letter-spacing: 12rpx
|
||||
color: #0066ff;
|
||||
letter-spacing: 12rpx;
|
||||
}
|
||||
|
||||
.no-pass {
|
||||
color: #D70C18;
|
||||
color: #d70c18;
|
||||
}
|
||||
|
||||
.pass {
|
||||
color: #0066FF;
|
||||
color: #0066ff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.nav-div {
|
||||
position: relative;
|
||||
|
||||
@@ -611,15 +590,14 @@
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.main_div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #F0F5F9;
|
||||
background-color: #f0f5f9;
|
||||
/* 添加30度角的斜向上渐变,高度限制为400px */
|
||||
background-image: linear-gradient(30deg, #F0F5F9, #EBF1FF);
|
||||
background-image: linear-gradient(30deg, #f0f5f9, #ebf1ff);
|
||||
/* 渐变背景高度400px,宽度充满容器 */
|
||||
background-size: 100% 600rpx;
|
||||
/* 防止渐变背景重复 */
|
||||
@@ -629,4 +607,4 @@
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<image class="icon" src="@/static/images/index/navigation_practice.png"></image>
|
||||
<view class="title">竞赛练习</view>
|
||||
</view>
|
||||
<view class="item" @click="common.navigateTo('/pages/wrong_question_record/index')">
|
||||
<view class="item" @click="common.navigateTo('/pages/wrongQuestionRecord/index')">
|
||||
<image class="icon" src="@/static/images/index/navigation_wrong_question.png"></image>
|
||||
<view class="title">错题本</view>
|
||||
</view>
|
||||
|
||||
@@ -1,125 +1,125 @@
|
||||
<template>
|
||||
<view class="scroll_div">
|
||||
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="scrolltolower" :show-scrollbar='false'>
|
||||
<view class="item" :class="getStatusClass(item.isFinish)" v-for="(item,index) in data_list">
|
||||
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="scrolltolower" :show-scrollbar="false">
|
||||
<view class="item" :class="getStatusClass(item.isFinish)" v-for="(item, index) in data_list" @click="click_item(item)">
|
||||
<view class="img_div">
|
||||
<image-preview class="img" :src="item.ossAddr" mode="scaleToFill"></image-preview>
|
||||
<view class="subscript" v-if="item.isFinish==='00'">
|
||||
进行中
|
||||
</view>
|
||||
<view class="subscript" v-if="item.isFinish==='01'">
|
||||
已完成
|
||||
</view>
|
||||
<view class="subscript" v-if="item.isFinish==='02'">
|
||||
已超时
|
||||
</view>
|
||||
<view class="subscript" v-if="item.isFinish === '00'">未完成</view>
|
||||
<view class="subscript" v-if="item.isFinish === '01'">已完成</view>
|
||||
</view>
|
||||
<view class="right_div">
|
||||
<view class="title ellipsis-text">
|
||||
{{item.taskName}}
|
||||
{{ item.taskName }}
|
||||
</view>
|
||||
<view class="time_div" v-if="item.limitTyp==='02'">
|
||||
起止时间:<text class="blod_color">{{item.startTm?.substr(0, 10)}}至{{item.endTm?.substr(0, 10)}}</text>
|
||||
<view class="time_div" v-if="item.limitTyp === '02'">
|
||||
起止时间:
|
||||
<text class="blod_color">{{ item.startTm?.substr(0, 10) }}至{{ item.endTm?.substr(0, 10) }}</text>
|
||||
</view>
|
||||
<view class="people_progress_div">
|
||||
<view class="mr-10">
|
||||
完成人数:<text class="">{{item.taskFinishSums ?? 0}}/{{item.taskSums ?? 0}}</text>
|
||||
完成人数:
|
||||
<text class="">{{ item.taskFinishSums ?? 0 }}/{{ item.taskSums ?? 0 }}</text>
|
||||
</view>
|
||||
<view>
|
||||
进度:<text class="">{{item.sumCrs ?? 0}}/{{item.sumCrs ?? 0}}门课程</text>
|
||||
进度:
|
||||
<text class="">{{ item.finishCrs ?? 0 }}/{{ item.sumCrs ?? 0 }}门课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<list-no-data v-if="total == 0 && status=='nomore'"></list-no-data>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
|
||||
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
const status = ref('loading') // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15
|
||||
const total = ref(-1)
|
||||
const page = ref(0)
|
||||
const data_list = reactive([])
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
nextTick
|
||||
} from 'vue'
|
||||
|
||||
import {
|
||||
queryAllTraTaskInfoByUserId,
|
||||
} from '@/api/learningTasks.js';
|
||||
setPageCache
|
||||
} from '@/common/common';
|
||||
import common from '@/common/common';
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
|
||||
import { queryAllTraTaskInfoByUserId } from '@/api/learningTasks.js';
|
||||
const props = defineProps({
|
||||
state: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
const getData = (from = '', searchText='') => {
|
||||
|
||||
const getData = (from = '', searchText = '') => {
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
status.value = 'loading'
|
||||
total.value = -1
|
||||
page.value = 1
|
||||
data_list.length = 0
|
||||
status.value = 'loading';
|
||||
total.value = -1;
|
||||
page.value = 1;
|
||||
data_list.length = 0;
|
||||
} else {
|
||||
if (status.value !== 'loadmore' && status.value !== '') return
|
||||
status.value = 'loading'
|
||||
page.value++
|
||||
if (status.value !== 'loadmore' && status.value !== '') return;
|
||||
status.value = 'loading';
|
||||
page.value++;
|
||||
}
|
||||
setTimeout(() => {
|
||||
queryAllTraTaskInfoByUserId({
|
||||
state: props.state,
|
||||
page: page.value,
|
||||
limit: limit,
|
||||
taskName:searchText
|
||||
}).then(res => {
|
||||
total.value = res.total
|
||||
data_list.push(...res.body)
|
||||
}).finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore'
|
||||
} else {
|
||||
status.value = 'loadmore'
|
||||
}
|
||||
console.log(status.value, '阿斯顿撒');
|
||||
taskName: searchText
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
.then((res) => {
|
||||
total.value = res.total;
|
||||
data_list.push(...res.body);
|
||||
})
|
||||
.finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore';
|
||||
} else {
|
||||
status.value = 'loadmore';
|
||||
}
|
||||
console.log(status.value, '阿斯顿撒');
|
||||
});
|
||||
}, 200);
|
||||
};
|
||||
const getStatusClass = (isFinish) => {
|
||||
// 00进行中、01已完成、02已超时
|
||||
if (isFinish === '00') return 'in_progress';
|
||||
if (isFinish === '01') return 'completed';
|
||||
return 'expired';
|
||||
};
|
||||
const scrolltolower = (item) => {
|
||||
getData()
|
||||
|
||||
// 跳转到详情
|
||||
const click_item = (item) => {
|
||||
setPageCache('learning_tasks_details', item)
|
||||
common.navigateTo('/pages/learningTasks/details');
|
||||
}
|
||||
const scrolltolower = (item) => {
|
||||
getData();
|
||||
};
|
||||
const search = (value) => {
|
||||
total.value = -1
|
||||
total.value = -1;
|
||||
console.log('value', value);
|
||||
getData('first', value)
|
||||
}
|
||||
getData('first', value);
|
||||
};
|
||||
defineExpose({
|
||||
getData, search
|
||||
})
|
||||
getData,
|
||||
search
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.scroll_div {
|
||||
background-color: #F1F5FA;
|
||||
background-color: #f1f5fa;
|
||||
padding: 22rpx;
|
||||
}
|
||||
|
||||
|
||||
.scroll-Y {
|
||||
|
||||
height: calc(100vh - var(--status-bar-height) - 88rpx - 80rpx - 88rpx - 20rpx - 30rpx);
|
||||
// height: calc(100vh - var(--status-bar-height) - 54rpx - 88rpx - 20rpx - 44rpx);
|
||||
background-color: #fff;
|
||||
@@ -128,41 +128,38 @@
|
||||
|
||||
.scroll-Y {
|
||||
.item.in_progress {
|
||||
|
||||
// 进行中
|
||||
.subscript {
|
||||
color: #0066FF;
|
||||
background-color: #DAF0FF;
|
||||
color: #0066ff;
|
||||
background-color: #daf0ff;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #0066FF;
|
||||
color: #0066ff;
|
||||
}
|
||||
}
|
||||
|
||||
.item.completed {
|
||||
|
||||
.item.completed {
|
||||
// 已完成
|
||||
.subscript {
|
||||
color: #FFFFFF;
|
||||
background-color: #33C583 !important;
|
||||
color: #ffffff;
|
||||
background-color: #33c583 !important;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #0066FF;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.item.expired {
|
||||
|
||||
// 已超时
|
||||
.subscript {
|
||||
color: #FFFFFF;
|
||||
background-color: #EF5705;
|
||||
color: #ffffff;
|
||||
background-color: #ef5705;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #D70C18;
|
||||
color: #d70c18;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,7 +196,6 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.right_div {
|
||||
@@ -227,6 +223,7 @@
|
||||
flex-wrap: nowrap;
|
||||
height: 23rpx;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
|
||||
.people_progress_div {
|
||||
@@ -244,4 +241,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="main_div max_page">
|
||||
<nav-bar :is_seat="true"></nav-bar>
|
||||
<view class="my-nav-bar"></view>
|
||||
<view class="body-title">
|
||||
<view class="back_div" @click="common.navigateBack()">
|
||||
<view class="back-icon"></view>
|
||||
@@ -8,92 +8,316 @@
|
||||
<view>任务详情</view>
|
||||
</view>
|
||||
<view class="detail_div" :class="'completed'">
|
||||
<view class="subscript" v-if="detailData.examStatText === 'N'">未完成</view>
|
||||
<view class="subscript" v-if="detailData.examStatText === 'Y'">已完成</view>
|
||||
<view class="left">
|
||||
<image src="/src/static/images/test/2.png" mode="aspectFill" class="img"></image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="title_div">
|
||||
<view class="title">
|
||||
JBank银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大
|
||||
{{ detailData.taskName }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="time">
|
||||
<text class="color_3">起止时间:</text>
|
||||
<text class="color_class">2025-05-13至2025-05-13</text>
|
||||
<text class="color_class">
|
||||
{{ detailData.startTm?.substr(0, 10) }}至{{ detailData.endTm?.substr(0, 10) }}
|
||||
</text>
|
||||
<view class="fl1"></view>
|
||||
<view class="num-item" @click="collect_click(detailData.collectionId)">
|
||||
<image
|
||||
v-if="detailData.collectionId"
|
||||
class="collect-icon"
|
||||
src="@/static/images/courseDetail/out_collect.png"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
class="collect-icon"
|
||||
src="@/static/images/courseDetail/in_collect.png"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num_div">
|
||||
<view class="num_div_item">
|
||||
<text class="color_3">完成人数:</text>
|
||||
<text class="color_2">34/125</text>
|
||||
<text class="color_2">{{ detailData.taskFinishSums ?? 0 }}/{{ detailData.taskSums ?? 0 }}</text>
|
||||
</view>
|
||||
<view class="num_div_item">
|
||||
<text class="color_3">进度:</text>
|
||||
<text class="color_2">2/4门课程</text>
|
||||
<text class="color_2">{{ detailData.finishCrs ?? 0 }}/{{ detailData.sumCrs ?? 0 }}门课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view
|
||||
ref="scrollRef"
|
||||
:scroll-y="true"
|
||||
class="scroll-Y"
|
||||
:show-scrollbar="false"
|
||||
@scrolltolower="scrolltolower"
|
||||
></scroll-view>
|
||||
<view class="scroll-div">
|
||||
<view class="paper_title_div">
|
||||
<image src="@/static/images/testingHall/testing.png" class="img" mode="aspectFit"></image>
|
||||
<view class="title">试卷信息</view>
|
||||
</view>
|
||||
<scroll-view
|
||||
ref="scrollRef"
|
||||
:scroll-y="true"
|
||||
class="scroll-Y"
|
||||
:show-scrollbar="false"
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<view class="item" v-for="item in data_list" @click="item_click(item)">
|
||||
<view class="progress_div">
|
||||
<view class="circle_div"></view>
|
||||
<view class="line_div"></view>
|
||||
</view>
|
||||
<view class="content_div">
|
||||
<view class="status_div">
|
||||
<text v-if="item.status === '01'">进行中</text>
|
||||
<text v-if="item.status === '02'">已完成</text>
|
||||
<text v-if="item.status === '03'">未解锁</text>
|
||||
</view>
|
||||
<view class="main_body_div">
|
||||
<view class="title">
|
||||
{{ item.crsName }}
|
||||
</view>
|
||||
<view class="button_div">
|
||||
<template v-if="item.isFinishStudy === '01' && item.isFinishExam === '01'">
|
||||
<image class="img" :src="lockIcon('#999999')"></image>
|
||||
<view class="button_text">暂无通过条件,可自动解锁</view>
|
||||
</template>
|
||||
<template v-if="item.isFinishStudy !== '01'">
|
||||
<image class="img" :src="passTheExamIcon('#0066FF')"></image>
|
||||
<view class="button_text">完成练习</view>
|
||||
</template>
|
||||
<template v-if="item.isFinishExam !== '01'">
|
||||
<image class="img" :src="completeTheExercisesIcon('#0066FF')"></image>
|
||||
<view class="button_text">通过考试</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
|
||||
<uv-load-more
|
||||
v-if="status === 'loading'"
|
||||
:status="status"
|
||||
loadmore-text="轻轻上拉加载"
|
||||
:height="30"
|
||||
></uv-load-more>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { reactive, computed } from 'vue';
|
||||
import { startTraExamPapersInfo } from '@/api/examination.js';
|
||||
|
||||
import { ref, reactive, computed, nextTick } from 'vue';
|
||||
import { queryAllTraTaskCrsInfo } from '@/api/learningTasks.js';
|
||||
import { passTheExamIcon, completeTheExercisesIcon, lockIcon } from '@/common/imgSvg';
|
||||
import { insertTraPersonalCollectionTask, deleteTraPersonalCollectionById } from '@/api/favorites.js';
|
||||
import common from '@/common/common';
|
||||
import { setPageCache, getPageCache } from '@/common/common';
|
||||
const detailData = reactive({
|
||||
papersId: '',
|
||||
papersName: '',
|
||||
examStartTm: '',
|
||||
examEndTm: '',
|
||||
execPersionNumer: '',
|
||||
planPersionNumber: '',
|
||||
judgeNumber: 0,
|
||||
singleNumber: 0,
|
||||
multiNumber: 0,
|
||||
essayNumber: 0,
|
||||
judgeGrade: 0,
|
||||
singleGrade: 0,
|
||||
multiGrade: 0,
|
||||
essayGrade: 0
|
||||
taskId: '',
|
||||
taskName: '',
|
||||
collectionId: '',
|
||||
taskFinishSums: '',
|
||||
taskSums: '',
|
||||
finishCrs: '',
|
||||
sumCrs: ''
|
||||
});
|
||||
|
||||
const total = ref(-1);
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const data_list = reactive([]);
|
||||
|
||||
const getData = () => {
|
||||
status.value = 'loading';
|
||||
|
||||
queryAllTraTaskCrsInfo({
|
||||
taskId: detailData.taskId
|
||||
// taskId: 'TASKINFO02506401613920250820161715000008095'
|
||||
})
|
||||
.then((res) => {
|
||||
data_list.push(...res.body);
|
||||
})
|
||||
.finally(() => {
|
||||
total.value = data_list.length;
|
||||
if (total.value === 0) {
|
||||
status.value = 'nomore';
|
||||
} else {
|
||||
status.value = 'loadmore';
|
||||
}
|
||||
});
|
||||
};
|
||||
const scrolltolower = () => {};
|
||||
|
||||
const item_click = (item) => {};
|
||||
const collect_click = async (collectId) => {
|
||||
console.log('学习', collectId);
|
||||
try {
|
||||
if (!collectId) {
|
||||
common.loading('收藏中');
|
||||
|
||||
const res = await insertTraPersonalCollectionTask({
|
||||
collectTyp: '02',
|
||||
collectBusId: detailData.taskId
|
||||
});
|
||||
detailData.collectionId = res.body;
|
||||
common.msg('收藏成功');
|
||||
} else {
|
||||
common.loading('取消收藏中');
|
||||
await deleteTraPersonalCollectionById({
|
||||
collectId: collectId
|
||||
});
|
||||
detailData.collectionId = null;
|
||||
|
||||
common.msg('取消成功');
|
||||
}
|
||||
} catch (e) {
|
||||
common.hideLoading();
|
||||
}
|
||||
};
|
||||
onLoad((e) => {
|
||||
const testing_hall_details = getPageCache('testing_hall_details');
|
||||
const learning_tasks_details = getPageCache('learning_tasks_details');
|
||||
Object.assign(detailData, {
|
||||
...testing_hall_details
|
||||
...learning_tasks_details
|
||||
});
|
||||
nextTick(() => {
|
||||
getData();
|
||||
});
|
||||
console.log('detailData', detailData);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.scroll-Y {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
height: calc(100vh - var(--status-bar-height) - 120rpx - 250rpx + 20rpx + 20rpx - 20rpx);
|
||||
width: calc(100% - 52rpx);
|
||||
margin: 0 auto;
|
||||
background: linear-gradient(180deg, #ebf2fe 0%, #f3f7fe 6%, #fafbfc 12%, #fafbfc 100%);
|
||||
$bg-margin-left: 30rpx;
|
||||
.scroll-Y .item {
|
||||
margin: 0 $bg-margin-left 0 $bg-margin-left;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.progress_div {
|
||||
width: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.circle_div {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 100%;
|
||||
border: 4rpx solid #0066ff;
|
||||
background-color: #0066ff;
|
||||
}
|
||||
.line_div {
|
||||
flex: 1;
|
||||
width: 4rpx;
|
||||
// border-left: 3rpx solid #0066FF;
|
||||
// border-left: 4rpx dashed gold;
|
||||
border-left: 4rpx dashed #0066ff;
|
||||
margin: 6rpx 0;
|
||||
}
|
||||
}
|
||||
.content_div {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
min-height: 140rpx;
|
||||
background-color: #fff;
|
||||
margin-bottom: 34rpx;
|
||||
padding: 4rpx 4rpx 4rpx 4rpx;
|
||||
// background-color: red;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
.status_div {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #ffffff;
|
||||
background-color: #4c93ff;
|
||||
writing-mode: vertical-rl;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 4rpx 4rpx;
|
||||
}
|
||||
.main_body_div {
|
||||
margin-left: 34rpx;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-right: 10rpx;
|
||||
.title {
|
||||
// background-color: red;
|
||||
margin-top: 10rpx;
|
||||
min-height: 30rpx;
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.button_div {
|
||||
// background-color: red;
|
||||
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
.img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
.button_text {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #0066ff;
|
||||
text-align: left;
|
||||
margin-right: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.paper_title_div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 20rpx 0 20rpx $bg-margin-left;
|
||||
height: 42rpx;
|
||||
.img {
|
||||
width: 32rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
|
||||
font-family: PingFangTC;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
}
|
||||
.scroll-div {
|
||||
background: linear-gradient(180deg, #ebf2fe 0%, #f3f7fe 6%, #f9fbff 12%, #f4f6f8 100%);
|
||||
|
||||
// background: linear-gradient(180deg, #ebf2fe 0%, #f3f7fe 6%, #fafbfc 12%, #fafbfc 100%);
|
||||
border-radius: 16rpx;
|
||||
margin-top: -20rpx;
|
||||
z-index: 2;
|
||||
box-shadow: 0 0 6rpx #fafbfc;
|
||||
border: 4rpx solid #FFFFFF;
|
||||
|
||||
box-shadow: 0 0 10rpx #f9fbff;
|
||||
|
||||
border: 2rpx solid #f9f9fa;
|
||||
margin: 0 auto;
|
||||
width: calc(100% - 52rpx);
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
height: calc(100vh - var(--status-bar-height) - 120rpx - 250rpx + 20rpx + 20rpx - 20rpx - 42rpx - 50rpx);
|
||||
}
|
||||
|
||||
.main_div {
|
||||
background-image: url('@/static/images/learningTasks/learningTasksBg.png');
|
||||
background-repeat: no-repeat;
|
||||
@@ -101,6 +325,10 @@
|
||||
background-position: top;
|
||||
background-color: #fff;
|
||||
}
|
||||
.my-nav-bar {
|
||||
width: 100%;
|
||||
height: calc(var(--status-bar-height) - 10rpx);
|
||||
}
|
||||
.body-title {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
@@ -119,7 +347,7 @@
|
||||
height: 250rpx;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
padding: 36rpx 40rpx 20rpx 40rpx;
|
||||
padding: 36rpx 26rpx 20rpx 26rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
position: relative;
|
||||
@@ -147,11 +375,14 @@
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.right {
|
||||
overflow: hidden;
|
||||
margin-left: 24rpx;
|
||||
width: 100%;
|
||||
.title_div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
|
||||
.title {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
@@ -169,20 +400,33 @@
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
line-height: 30rpx;
|
||||
font-family: Arial;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
margin-top: 12rpx;
|
||||
margin-bottom: 12rpx;
|
||||
height: 54rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.num-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
|
||||
.collect-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.num_div {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
font-size: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -44,22 +44,8 @@
|
||||
<script setup>
|
||||
import { LineBg } from '@/enum.js';
|
||||
import listItem from './components/list-item.vue';
|
||||
// 我的收藏
|
||||
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
|
||||
import common from '@/common/common.js';
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
// 静态样式配置
|
||||
const fixedCustomStyles = {
|
||||
backgroundColor: '#F1F5FA',
|
||||
paddingLeft: '40rpx',
|
||||
paddingTop: '5px',
|
||||
paddingBottom: '5px',
|
||||
border: 'none'
|
||||
};
|
||||
const suffixIconStyle = {
|
||||
color: '#2c8ef2',
|
||||
fontSize: '28px'
|
||||
};
|
||||
const listItemRefs = ref([]);
|
||||
const taskRef = ref(null);
|
||||
const tabAct = ref(0);
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<view class="main_div max_page">
|
||||
<view class="body-title">
|
||||
<view class="back_div">
|
||||
<view class="back_div" @click="common.navigateBack()">
|
||||
<view class="back-icon"></view>
|
||||
</view>
|
||||
<view>消息</view>
|
||||
<view class="delete_div">
|
||||
<view class="delete_div" @click="oneClickReadMessage">
|
||||
<image class="img" src="@/static/images/messageNotification/delete_icon.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-view">
|
||||
<!-- <view class="input-view">
|
||||
<uv-input
|
||||
shape="circle"
|
||||
placeholderStyle="color:#999999;font-size:28rpx"
|
||||
@@ -17,8 +17,10 @@
|
||||
suffixIcon="search"
|
||||
:customStyle="customStyle"
|
||||
:suffixIconStyle="suffixIconStyle"
|
||||
></uv-input>
|
||||
</view>
|
||||
>
|
||||
|
||||
</uv-input>
|
||||
</view> -->
|
||||
<scroll-view
|
||||
ref="scrollRef"
|
||||
:scroll-y="true"
|
||||
@@ -71,7 +73,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
|
||||
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
<uv-load-more :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</scroll-view>
|
||||
<uni-popup ref="popup" type="bottom">
|
||||
<view class="popup">
|
||||
@@ -79,9 +81,9 @@
|
||||
<view class="title">
|
||||
{{ popup_info.title }}
|
||||
</view>
|
||||
<view class="text">消正息内容正文,消息内容正文</view>
|
||||
<view class="text">{{ popup_info.text }}</view>
|
||||
<view class="button_div" @click.stop="readMessage">
|
||||
<uv-button class="button">我知道了</uv-button>
|
||||
<uv-button :loading="readLoading" class="button">我知道了</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -92,7 +94,8 @@
|
||||
<script setup>
|
||||
import { ref, reactive, nextTick, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { queryTraPersonalMessageNoticePaging, readNotice } from '@/api/messageNotification.js';
|
||||
import { queryTraPersonalMessageNoticePaging, readNotice, oneTimeRead } from '@/api/messageNotification.js';
|
||||
import common from '../../common/common';
|
||||
|
||||
const customStyle = {
|
||||
backgroundColor: '#ffffff',
|
||||
@@ -114,12 +117,14 @@
|
||||
const data_list = reactive([]);
|
||||
const triggered = ref(false);
|
||||
const _freshing = ref(false);
|
||||
const readLoading = ref(false);
|
||||
const offset = ref(0);
|
||||
const scrollRef = ref(null);
|
||||
const popup_info = reactive({
|
||||
id: '',
|
||||
title: '',
|
||||
text: ''
|
||||
text: '',
|
||||
isRead: ''
|
||||
});
|
||||
const popup = ref(null);
|
||||
|
||||
@@ -140,7 +145,7 @@
|
||||
_freshing.value = false;
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
|
||||
const getData = (from = '') => {
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) {
|
||||
@@ -155,7 +160,6 @@
|
||||
status.value = 'loading';
|
||||
page.value++;
|
||||
}
|
||||
console.log(status.value, '阿斯顿撒');
|
||||
queryTraPersonalMessageNoticePaging({
|
||||
page: page.value,
|
||||
limit: limit
|
||||
@@ -174,21 +178,55 @@
|
||||
};
|
||||
|
||||
const readMessage = () => {
|
||||
readNotice({ noticeId: popup_info.id }).then((res) => {
|
||||
if (popup_info.isRead === '02') {
|
||||
popup.value.close();
|
||||
data_list.forEach((item) => {
|
||||
if (item.noticeId === popup_info.id) {
|
||||
item.isRead = res.body.isRead;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
readLoading.value = true;
|
||||
readNotice({ noticeId: popup_info.id })
|
||||
.then((res) => {
|
||||
popup.value.close();
|
||||
readLoading.value = false;
|
||||
data_list.forEach((item) => {
|
||||
if (item.noticeId === popup_info.id) {
|
||||
item.isRead = res.body.isRead;
|
||||
return;
|
||||
}
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
readLoading.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
const oneClickReadMessage = () => {
|
||||
const state = data_list.every((res) => res.isRead === '02');
|
||||
if (state) {
|
||||
common.msg('暂无未读消息');
|
||||
return;
|
||||
}
|
||||
common.loading();
|
||||
oneTimeRead()
|
||||
.then((res) => {
|
||||
data_list.forEach((item) => {
|
||||
item.isRead = '02';
|
||||
});
|
||||
common.hideLoading();
|
||||
setTimeout(() => {
|
||||
common.msg('一键读取成功');
|
||||
}, 10);
|
||||
})
|
||||
.catch(() => {
|
||||
common.hideLoading();
|
||||
});
|
||||
};
|
||||
|
||||
// 读取消息
|
||||
const readMessageOpen = (item) => {
|
||||
console.log('item', item);
|
||||
popup_info.id = item.noticeId;
|
||||
popup_info.title = item.noticeTitle;
|
||||
popup_info.text = item.noticeContent;
|
||||
popup_info.isRead = item.isRead;
|
||||
popup.value.open();
|
||||
};
|
||||
const scrolltolower = (item) => {
|
||||
@@ -254,13 +292,14 @@
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: calc(100vh - 70rpx - var(--status-bar-height) - 78rpx - 40rpx);
|
||||
// 70rpx 改成100 78没了
|
||||
height: calc(100vh - 100rpx - var(--status-bar-height) - 40rpx);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 6rpx #b3d6ff;
|
||||
box-shadow: 0 -12rpx 12rpx #c3dbff;
|
||||
|
||||
.item {
|
||||
height: 154rpx;
|
||||
@@ -357,22 +396,24 @@
|
||||
|
||||
.body-title {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
height: 100rpx;
|
||||
// 80改成100
|
||||
font-size: 33rpx;
|
||||
padding-top: 10rpx;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
.delete_div {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 17rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
|
||||
top: 7rpx;
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
.img {
|
||||
margin-top: 10rpx;
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
@@ -381,8 +422,8 @@
|
||||
.back_div {
|
||||
position: absolute;
|
||||
left: 26rpx;
|
||||
height: 34rpx;
|
||||
top: 17rpx;
|
||||
padding: 0 14rpx 14rpx 0;
|
||||
|
||||
.back-icon {
|
||||
position: relative;
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<view class="title-note">
|
||||
考试时长:<text class="bold">{{detailData.totalGrade}}</text>分钟
|
||||
</view>
|
||||
|
||||
<view class="title-table">
|
||||
<view class="title-table-item">
|
||||
<view class="top">
|
||||
@@ -209,7 +208,6 @@
|
||||
Object.assign(detailData, {
|
||||
...testing_hall_details
|
||||
})
|
||||
console.log('detailData', detailData);
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<view class="scroll_div">
|
||||
<scroll-view :scroll-y="true" class="scroll-Y" :show-scrollbar="false" @scrolltolower="scrolltolower">
|
||||
<!-- <view class="item" :class="getStatusClass(index)" v-for="(item, index) in data_list">
|
||||
|
||||
</view> -->
|
||||
<subject v-for="(item, index) in data_list" :item="item" mode="mistake"></subject>
|
||||
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import { queryTraCrsBbsInfoByCrsId } from '@/api/courseDetail.js';
|
||||
import { queryTraMistakesCollectionPaging } from '@/api/wrongQuestionRecord.js';
|
||||
import Subject from '@/components/examination/subject.vue';
|
||||
const getData = (from = '') => {
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
status.value = 'loading';
|
||||
total.value = -1;
|
||||
page.value = 1;
|
||||
data_list.length = 0;
|
||||
} else {
|
||||
if (status.value !== 'loadmore' && status.value !== '') return;
|
||||
status.value = 'loading';
|
||||
page.value++;
|
||||
}
|
||||
setTimeout(() => {
|
||||
queryTraMistakesCollectionPaging({
|
||||
isCorrect: 'N',
|
||||
page: page.value,
|
||||
limit: limit
|
||||
})
|
||||
.then((res) => {
|
||||
total.value = res.total;
|
||||
data_list.push(...res.body);
|
||||
})
|
||||
.finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore';
|
||||
} else {
|
||||
status.value = 'loadmore';
|
||||
}
|
||||
});
|
||||
}, 200);
|
||||
};
|
||||
const getStatusClass = (index) => {
|
||||
const remainder = index % 3;
|
||||
if (remainder === 0) return 'in_progress';
|
||||
if (remainder === 1) return 'completed';
|
||||
return 'expired';
|
||||
};
|
||||
const scrolltolower = (item) => {
|
||||
getData();
|
||||
};
|
||||
defineExpose({
|
||||
getData
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.scroll_div {
|
||||
background-color: #f1f5fa;
|
||||
padding: 22rpx;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: calc(100vh - var(--status-bar-height) - 54rpx - 88rpx - 20rpx - 44rpx - 156rpx);
|
||||
// background-color: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -9,11 +9,17 @@
|
||||
</view>
|
||||
<view class="detail-body">
|
||||
<view class="body-tab">
|
||||
<uv-tabs class="font_pf my_tabs" :current="tabAct" :list="tabList" @change="tabChange"
|
||||
:scrollable="false" line-color="#0066FF"
|
||||
:inactive-style="{ color: '#333333', fontSize: '30rpx', fontWeight:'600'}"
|
||||
:activeStyle="{color:'#0066FF',fontSize:'30rpx', fontWeight:'600'}"
|
||||
:lineColor="`url(${LineBg}) 10% 10%`"></uv-tabs>
|
||||
<uv-tabs
|
||||
class="font_pf my_tabs"
|
||||
:current="tabAct"
|
||||
:list="tabList"
|
||||
@change="tabChange"
|
||||
:scrollable="false"
|
||||
line-color="#0066FF"
|
||||
:inactive-style="{ color: '#333333', fontSize: '30rpx', fontWeight: '600' }"
|
||||
:activeStyle="{ color: '#0066FF', fontSize: '30rpx', fontWeight: '600' }"
|
||||
:lineColor="`url(${LineBg}) 10% 10%`"
|
||||
></uv-tabs>
|
||||
</view>
|
||||
<view class="uni-margin-wrap no-overflow">
|
||||
<swiper class="swiper" :current="tabAct" :indicator-dots="false" @change="swiperChange">
|
||||
@@ -26,43 +32,47 @@
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed-box">
|
||||
<uv-button
|
||||
type="primary"
|
||||
class="send_evaluate"
|
||||
color="#0066FF"
|
||||
:throttleTime="100"
|
||||
text='重做错题'
|
||||
:custom-style="customStyle"
|
||||
|
||||
>
|
||||
|
||||
</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Correct from './components/correct.vue'
|
||||
import FavoritesCourse from './components/favorites-course.vue'
|
||||
import Correct from './components/correct.vue';
|
||||
import FavoritesCourse from './components/favorites-course.vue';
|
||||
// 我的收藏
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
computed,
|
||||
nextTick,
|
||||
onMounted,
|
||||
watch
|
||||
} from 'vue';
|
||||
import {
|
||||
LineBg
|
||||
} from '@/enum.js'
|
||||
import {
|
||||
queryTraCrsBbsInfoByCrsId,
|
||||
replyTraCrsBbsInfo,
|
||||
qryChildTraCrsBbsInfo
|
||||
} from '@/api/courseDetail.js';
|
||||
|
||||
|
||||
|
||||
import common from '@/common/common';
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
|
||||
import { LineBg } from '@/enum.js';
|
||||
import { queryTraCrsBbsInfoByCrsId, replyTraCrsBbsInfo, qryChildTraCrsBbsInfo } from '@/api/courseDetail.js';
|
||||
|
||||
import common from '@/common/common';
|
||||
const customStyle = {
|
||||
borderRadius: '16rpx'
|
||||
}
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
|
||||
const courseRef = ref(null);
|
||||
const correctRef = ref(null);
|
||||
const tabAct = ref(0);
|
||||
const tabList = ref([{
|
||||
name: '当前错题'
|
||||
}, {
|
||||
name: '已订正'
|
||||
}]);
|
||||
const tabList = ref([
|
||||
{
|
||||
name: '当前错题'
|
||||
},
|
||||
{
|
||||
name: '已订正'
|
||||
}
|
||||
]);
|
||||
|
||||
const tabChange = (item) => {
|
||||
tabAct.value = item.index;
|
||||
@@ -71,23 +81,43 @@
|
||||
tabAct.value = item.detail.current;
|
||||
};
|
||||
onMounted(() => {
|
||||
watch(tabAct, (newValue, oldValue) => {
|
||||
if (newValue === 0) {
|
||||
courseRef.value?.getData('first')
|
||||
} else if (newValue === 1) {
|
||||
correctRef.value?.getData('first')
|
||||
watch(
|
||||
tabAct,
|
||||
(newValue, oldValue) => {
|
||||
if (newValue === 0) {
|
||||
courseRef.value?.getData('first');
|
||||
} else if (newValue === 1) {
|
||||
correctRef.value?.getData('first');
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
}, {
|
||||
immediate: true
|
||||
}) // 这里的immediate会在onMounted之后执行
|
||||
})
|
||||
); // 这里的immediate会在onMounted之后执行
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$bg-margin-left: 50rpx;
|
||||
|
||||
|
||||
.fixed-box {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-radius: 16rpx 16rpx 0px 0px;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
background: #FFFFFF;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 2rpx #E5E5E5;
|
||||
.send_evaluate{
|
||||
padding: 38rpx 52rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.my_tabs {
|
||||
|
||||
// 解决这个圆角的图片,开穿透
|
||||
:deep(.uv-tabs__wrapper__nav__line) {
|
||||
height: 26rpx !important;
|
||||
@@ -98,7 +128,7 @@
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: calc(100vh - var(--status-bar-height) - 54rpx - 88rpx - 20rpx - 10rpx);
|
||||
height: calc(100vh - var(--status-bar-height) - 54rpx - 88rpx - 20rpx - 10rpx - 156rpx);
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
@@ -120,7 +150,7 @@
|
||||
}
|
||||
|
||||
.detail-main {
|
||||
background-color: #F6F8FF;
|
||||
background-color: #f6f8ff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -173,4 +203,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -1,175 +0,0 @@
|
||||
<template>
|
||||
<view class="scroll_div">
|
||||
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="scrolltolower">
|
||||
<view class="item" :class="getStatusClass(index)" v-for="(item,index) in data_list">
|
||||
<view class="top">
|
||||
<view class="type">
|
||||
单选题
|
||||
</view>
|
||||
<view class="score">
|
||||
5分
|
||||
</view>
|
||||
<view class="fl1">
|
||||
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="right_text">
|
||||
展开
|
||||
</view>
|
||||
<uv-icon class="arrow-icon" name="arrow-right"></uv-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text">
|
||||
属于商业银行风险管理“三道防线”的哪些风险管理部门,为什么?
|
||||
</view>
|
||||
<view class="additional_div">
|
||||
<RadioSubject></RadioSubject>
|
||||
</view>
|
||||
</view>
|
||||
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
import RadioSubject from './radio-subject.vue'
|
||||
const status = ref('loading') // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15
|
||||
const total = ref(-1)
|
||||
const page = ref(0)
|
||||
const data_list = reactive([])
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
nextTick
|
||||
} from 'vue'
|
||||
import {
|
||||
queryTraCrsBbsInfoByCrsId
|
||||
} from '@/api/courseDetail.js';
|
||||
import {
|
||||
queryTraMistakesCollectionPaging,
|
||||
} from '@/api/wrong_question_record.js';
|
||||
const getData = (from = '') => {
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) {
|
||||
return
|
||||
}
|
||||
status.value = 'loading'
|
||||
total.value = -1
|
||||
page.value = 1
|
||||
data_list.length = 0
|
||||
} else {
|
||||
if (status.value !== 'loadmore' && status.value !== '') return
|
||||
status.value = 'loading'
|
||||
page.value++
|
||||
}
|
||||
console.log(status.value, '阿斯顿撒');
|
||||
|
||||
setTimeout(() => {
|
||||
queryTraMistakesCollectionPaging({
|
||||
isCorrect: 'N',
|
||||
page: page.value,
|
||||
limit: limit
|
||||
}).then(res => {
|
||||
total.value = res.total
|
||||
data_list.push(...res.body)
|
||||
}).finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore'
|
||||
} else {
|
||||
status.value = 'loadmore'
|
||||
}
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
const getStatusClass = (index) => {
|
||||
const remainder = index % 3;
|
||||
if (remainder === 0) return 'in_progress';
|
||||
if (remainder === 1) return 'completed';
|
||||
return 'expired';
|
||||
};
|
||||
const scrolltolower = (item) => {
|
||||
getData()
|
||||
};
|
||||
defineExpose({
|
||||
getData
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.scroll_div {
|
||||
background-color: #F1F5FA;
|
||||
padding: 22rpx;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: calc(100vh - var(--status-bar-height) - 54rpx - 88rpx - 20rpx - 44rpx);
|
||||
// background-color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.scroll-Y .item {
|
||||
// height: 170rpx;
|
||||
border-radius: 16rpx;
|
||||
margin: 32rpx 0;
|
||||
padding: 34rpx 30rpx 34rpx 36rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.type {
|
||||
width: 108rpx;
|
||||
height: 46rpx;
|
||||
background: #267EFF;
|
||||
border-radius: 8rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 25rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.score {
|
||||
margin-left: 24rpx;
|
||||
font-family: ArialMT;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.right_text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,117 +0,0 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="option_div">
|
||||
<view class="option_item success">
|
||||
<view class="text">
|
||||
A.这里是选项 A 的内容
|
||||
</view>
|
||||
<image class="img" src="@/static/images/common/success.png" mode="heightFix"></image>
|
||||
</view>
|
||||
<view class="option_item success">
|
||||
<view class="text">
|
||||
B.这里是选项 B 的内容
|
||||
</view>
|
||||
<image class="img" src="@/static/images/common/success.png" mode="heightFix"></image>
|
||||
</view>
|
||||
<view class="option_item error">
|
||||
<view class="text">
|
||||
C.这里是选项 C 的内容
|
||||
</view>
|
||||
<image class="img" src="@/static/images/common/success.png" mode="heightFix"></image>
|
||||
</view>
|
||||
<view class="option_item info">
|
||||
D.这里是选项D的内容
|
||||
</view>
|
||||
</view>
|
||||
<view class="analysis_div">
|
||||
<view class="analysis_title">
|
||||
<view class="success_answer">
|
||||
正确答案:ABC
|
||||
</view>
|
||||
|
||||
<view class="your_answer">
|
||||
你的答案:<text class="red_color">AB</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="analysis_note">
|
||||
题目解析:属于商业银行风险管理“三道防线的是A部门,B部门和C部门银行风险管理“三道防线的是A部门,B部,银行风险管理“三道防线的是A部门,B部银行风险管理“三道防线的是A部门,B部
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.success {
|
||||
color: #15B859;
|
||||
background: #E7F8ED;
|
||||
}
|
||||
|
||||
.info {
|
||||
color: #333333;
|
||||
background: #F9F9F9 ;
|
||||
}
|
||||
.error {
|
||||
color: #F5212D;
|
||||
background: #FCE8E9;
|
||||
}
|
||||
|
||||
.option_item {
|
||||
width: 100%;
|
||||
height: 108rpx;
|
||||
|
||||
border-radius: 15rpx;
|
||||
margin-top: 32rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
line-height: 108rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
padding-left: 52rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
/* 强制不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.img {
|
||||
height: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
}
|
||||
.analysis_div{
|
||||
.analysis_title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 32rpx 0 28rpx 0;
|
||||
.success_answer{
|
||||
|
||||
}
|
||||
.your_answer{
|
||||
|
||||
}
|
||||
.red_color{
|
||||
color: #F5212D;
|
||||
}
|
||||
}
|
||||
.analysis_note{
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -118,7 +118,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/wrong_question_record/index",
|
||||
"path": "pages/wrongQuestionRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "错题本",
|
||||
"app-plus": {
|
||||
|
||||
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 5.6 KiB |