1
This commit is contained in:
@@ -73,14 +73,13 @@
|
||||
<uv-button type="primary"
|
||||
@click="common.navigateTo('/pages/course/study?crsNum='+crsNum+'&crsId='+form.crsId + '&imgId=' + form.imgId)">去学习</uv-button>
|
||||
<uv-button type="primary">去练习</uv-button>
|
||||
<uv-button type="primary">去考试</uv-button>
|
||||
<uv-button type="primary" @click="goto_examination()">去考试</uv-button>
|
||||
</template>
|
||||
<template v-if="tabAct == 2">
|
||||
<uv-button type="primary" class="send_evaluate"
|
||||
@click="common.navigateTo('/pages/courseDetail/submit?crsNum='+crsNum+'&imgId='+form.imgId)">发布评价</uv-button>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -161,7 +160,15 @@
|
||||
const swiper_change = (res) => {
|
||||
tabAct.value = res.detail.current
|
||||
}
|
||||
|
||||
// 去考试
|
||||
const goto_examination = () => {
|
||||
// papersId.value = e.papersId
|
||||
// paperData.value = setPageCache('examination_'+papersId.value)
|
||||
// if (!papersId.value || !paperData.value) {
|
||||
// common.navigateBack()
|
||||
// return
|
||||
// }
|
||||
}
|
||||
// const getElementPosition = () => {
|
||||
// return new Promise((resolve) => {
|
||||
// uni.createSelectorQuery()
|
||||
@@ -181,6 +188,7 @@
|
||||
tabAct.value = 2
|
||||
})
|
||||
})
|
||||
|
||||
onLoad((params) => {
|
||||
crsNum.value = params.crsNum;
|
||||
});
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
<template>
|
||||
<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>
|
||||
</view>
|
||||
<view class="countdown-and-question-number-div">
|
||||
<view class="top">
|
||||
<view class="countdown">
|
||||
<text class="grey">答题进度</text> <text class="bold">2</text><text class="grey">/10</text>
|
||||
</view>
|
||||
<view class="question">
|
||||
<view class="grey">剩余时间</view>
|
||||
<uv-count-down :time="30 * 60 * 60 * 1000" format="HH:mm:ss"></uv-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="progress">
|
||||
<uv-line-progress :percentage="30" :showText="false" activeColor="#FFFFFF" inactiveColor="#89B8FF"
|
||||
:height="8"></uv-line-progress>
|
||||
</view>
|
||||
</view>
|
||||
<view class="scroll_div">
|
||||
<swiper class="swiper" :current="tabAct" :indicator-dots="false" :disable-touch="true">
|
||||
<swiper-item>
|
||||
<view class="content">
|
||||
<view class="expose_shadow"></view>
|
||||
<scroll-view :scroll-y="true" class="scroll-Y" :show-scrollbar="false" :refresher-threshold="0">
|
||||
<RadioSubject></RadioSubject>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import RadioSubject from '@/components/examination/radio-subject.vue'
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
onMounted,
|
||||
nextTick,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance() // 获取当前组件实例
|
||||
// 用于存储尺寸信息的响应式变量
|
||||
const dimensions = ref({
|
||||
containerHeight: 0,
|
||||
contentHeight: 0
|
||||
});
|
||||
// 检查尺寸并更新
|
||||
const checkDimensions = async () => {
|
||||
await nextTick(); // 确保DOM已更新
|
||||
// 创建查询
|
||||
const query = uni.createSelectorQuery().in(proxy);
|
||||
// 添加内容高度查询
|
||||
query.select('.content').boundingClientRect(data => {
|
||||
dimensions.value.contentHeight = data?.height || 0;
|
||||
});
|
||||
// 添加容器高度查询(注意这里没有调用.exec())
|
||||
query.select('.scroll_div').boundingClientRect(data => {
|
||||
dimensions.value.containerHeight = data?.height || 0;
|
||||
});
|
||||
// 执行所有查询(只调用一次exec())
|
||||
query.exec();
|
||||
};
|
||||
|
||||
// 计算属性:判断是否需要开启滚动
|
||||
const isScrollable = computed(() => {
|
||||
return dimensions.value.contentHeight > dimensions.value.containerHeight - 20;
|
||||
});
|
||||
// 初始化时检查
|
||||
onMounted(() => {
|
||||
checkDimensions();
|
||||
// 监听窗口尺寸变化(可选)
|
||||
uni.onWindowResize(() => {
|
||||
checkDimensions();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
$bg-margin-left: 30rpx;
|
||||
|
||||
.scroll-Y {
|
||||
max-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx);
|
||||
min-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx - 380rpx);
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
margin: 32rpx $bg-margin-left;
|
||||
border-radius: 16rpx;
|
||||
padding: 34rpx 30rpx 34rpx 36rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.expose_shadow {
|
||||
margin-left: 36rpx;
|
||||
position: absolute;
|
||||
bottom: -26rpx;
|
||||
left: 0%;
|
||||
width: calc(100% - 66rpx);
|
||||
height: 28rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
opacity: 0.4;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.countdown-and-question-number-div {
|
||||
margin: 20rpx $bg-margin-left;
|
||||
height: 70rpx;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
z-index: 10;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: PingFangSC;
|
||||
font-size: 26rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.question {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
width: 242rpx;
|
||||
color: red;
|
||||
|
||||
.grey {
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
:deep(.uv-count-down__text) {
|
||||
color: #FFFFFF !important;
|
||||
font-weight: 600;
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: #B6E2FF;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-div {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
// padding-top:var(--status-bar-height);
|
||||
// padding: 0 30rpx;
|
||||
margin: 0 calc($bg-margin-left + 70rpx);
|
||||
height: 70rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
line-height: 70rpx;
|
||||
|
||||
}
|
||||
|
||||
.back_div {
|
||||
position: absolute;
|
||||
right: $bg-margin-left;
|
||||
top: 0;
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
// background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.main_div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(to top, #3480FF, #0066FF);
|
||||
/* 确保背景占满整个视口高度 */
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,304 @@
|
||||
<template>
|
||||
<view class="main_div max_page">
|
||||
<nav-bar :is_seat="true"></nav-bar>
|
||||
<view class="nav-div">
|
||||
<view class="title ellipsis-text" @click="hand_in_paper()">
|
||||
{{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>
|
||||
</view>
|
||||
<view class="question">
|
||||
<view class="grey">剩余时间</view>
|
||||
<uv-count-down :time="paperData.limitTm * 1000" format="HH:mm:ss"></uv-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<view class="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">
|
||||
<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">
|
||||
</RadioSubject>
|
||||
<CharactersSubject :item="item" v-if="item.qnsTyp === 'ES'" :mode="mode">
|
||||
</CharactersSubject>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<view class="fixed-btn-box font_pf">
|
||||
<view class="sheet">
|
||||
<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"
|
||||
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="下一题" color="#0066FF"
|
||||
custom-style="color:#FFFFFF;borderRadius:16rpx;height:92rpx;" @click="button_tab(1)"></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import RadioSubject from '@/components/examination/radio-subject.vue'
|
||||
import CharactersSubject from '@/components/examination/characters-subject.vue'
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
onMounted,
|
||||
nextTick,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import {
|
||||
examinationSheetIcon
|
||||
} from '@/common/imgSvg'
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import common from '@/common/common';
|
||||
import {
|
||||
getPageCache
|
||||
} from '@/common/common';
|
||||
|
||||
const examId = ref('')
|
||||
const mode = ref('examination') // 考试 examination 练习practice
|
||||
const paperData = reactive({
|
||||
papersId: '',
|
||||
limitTm: 0,
|
||||
papersName: '',
|
||||
}) // 试卷信息
|
||||
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 topicList = reactive([]) // 问题列表
|
||||
const questionNumber = ref(0) // 题号
|
||||
const swiperChange = (item) => {
|
||||
questionNumber.value = item.detail.current
|
||||
}
|
||||
// 按上一题下一题
|
||||
const button_tab = (num) => {
|
||||
let newNumber = questionNumber.value + num;
|
||||
if (newNumber < 0) {
|
||||
newNumber = 0;
|
||||
} else if (newNumber >= topicList.length) {
|
||||
newNumber = topicList.length - 1;
|
||||
}
|
||||
questionNumber.value = newNumber;
|
||||
}
|
||||
|
||||
// 初始化时检查
|
||||
onLoad(() => {
|
||||
const examination = getPageCache('examination')
|
||||
if (!examination) {
|
||||
common.navigateBack()
|
||||
return
|
||||
}
|
||||
paperData.papersId = examination.papersId
|
||||
paperData.limitTm = examination.limitTm
|
||||
paperData.papersName = examination.papersName
|
||||
topicList.push(...examination.qnsInfoVos.map(res => ({
|
||||
...res,
|
||||
my_answer: [],
|
||||
backend_answer: [],
|
||||
})))
|
||||
});
|
||||
const hand_in_paper = () => {
|
||||
console.log('点击交卷', topicList);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
$bg-margin-left: 30rpx;
|
||||
|
||||
.fixed-btn-box {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 154rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx 16rpx 0px 0px;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
|
||||
.sheet {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 0 70rpx;
|
||||
|
||||
.img {
|
||||
width: 38rpx;
|
||||
height: 40rpx;
|
||||
|
||||
}
|
||||
|
||||
.sheet_text {
|
||||
margin-top: 8rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.button_div {
|
||||
flex: 1;
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.button {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
max-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx);
|
||||
min-height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx - 68rpx - 60rpx - 380rpx);
|
||||
// background-color: yellow;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
// 状态栏 var(--status-bar-height)
|
||||
// 标题栏 70rpx
|
||||
// 进度时间栏 70rpx
|
||||
// 进度时间栏上下间距 40rpx = 20rpx + 20rpx
|
||||
// 正文上下间距 64rpx
|
||||
height: calc(100vh - var(--status-bar-height) - 70rpx - 70rpx - 40rpx - 64rpx);
|
||||
// background-color: red;
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
margin: 32rpx $bg-margin-left;
|
||||
border-radius: 16rpx;
|
||||
padding: 34rpx 30rpx 34rpx 36rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.expose_shadow {
|
||||
margin-left: 36rpx;
|
||||
position: absolute;
|
||||
bottom: -26rpx;
|
||||
left: 0%;
|
||||
width: calc(100% - 66rpx);
|
||||
height: 28rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
opacity: 0.4;
|
||||
z-index: 0;
|
||||
// background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.countdown-and-question-number-div {
|
||||
margin: 20rpx $bg-margin-left;
|
||||
height: 70rpx;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
z-index: 10;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: PingFangSC;
|
||||
font-size: 26rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.question {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
width: 242rpx;
|
||||
color: red;
|
||||
|
||||
.grey {
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
:deep(.uv-count-down__text) {
|
||||
color: #FFFFFF !important;
|
||||
font-weight: 600;
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: #B6E2FF;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-div {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
// padding-top:var(--status-bar-height);
|
||||
// padding: 0 30rpx;
|
||||
margin: 0 calc($bg-margin-left + 70rpx);
|
||||
height: 70rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
line-height: 70rpx;
|
||||
|
||||
}
|
||||
|
||||
.back_div {
|
||||
position: absolute;
|
||||
right: $bg-margin-left;
|
||||
top: 0;
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
// background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.main_div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(to top, #3480FF, #0066FF);
|
||||
/* 确保背景占满整个视口高度 */
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -88,7 +88,8 @@
|
||||
<image class="icon" src="@/static/images/index/navigation_question_answering.png"></image>
|
||||
<view class="title">AI问答</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
|
||||
<view class="item" @click="common.navigateTo('/pages/examination/index')">
|
||||
<image class="icon" src="@/static/images/index/navigation_ai.png"></image>
|
||||
<view class="title">AI陪练</view>
|
||||
</view>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</view>
|
||||
<view>消息</view>
|
||||
<view class="delete_div" @click="common.navigateBack()">
|
||||
<image class="img" src="@/static/images/message_notification/delete_icon.png" mode="aspectFit">
|
||||
<image class="img" src="@/static/images/messageNotification/delete_icon.png" mode="aspectFit">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -76,6 +76,7 @@
|
||||
|
||||
}
|
||||
const getData = (from = '') => {
|
||||
console.log('getDatagetDatagetDatagetDatagetDatagetDatagetData');
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) return;
|
||||
status.value = 'loading'
|
||||
@@ -100,8 +101,11 @@
|
||||
params.examStat = 'N'
|
||||
}
|
||||
queryTraExamPapersPage(params).then(res => {
|
||||
console.log('resresresresres', res);
|
||||
total.value = res.total
|
||||
data_list.push(...res.body)
|
||||
}).catch(res => {
|
||||
console.log('谢谢谢谢谢谢', res);
|
||||
}).finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore'
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<view>考试详情</view>
|
||||
</view>
|
||||
<view class="detail_div completed incomplete">
|
||||
<view class="subscript">已完成</view>
|
||||
<view class="title_div">
|
||||
<view class="title ellipsis-text">{{detailData.papersName}}萨达萨达萨达萨达萨达阿斯顿萨达萨达萨达</view>
|
||||
<view class="title ellipsis-text">{{detailData.papersName}}</view>
|
||||
<!-- <view class="subscript" >未完成</view> -->
|
||||
<view class="subscript" >已完成</view>
|
||||
</view>
|
||||
<view class="time">
|
||||
<text class="color_3">起止时间:</text><text
|
||||
@@ -24,30 +24,58 @@
|
||||
<view class="paper_div">
|
||||
<view class="paper">
|
||||
<!-- 试卷信息 -->
|
||||
<view class="title">
|
||||
试卷信息
|
||||
<view class="paper_title_div">
|
||||
<image src="@/static/images/testingHall/testing.png" mode="heightFix" class="img"></image>
|
||||
<view class="title">
|
||||
试卷信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-note">
|
||||
试卷总分:{{detailData.totalGrade}}分
|
||||
考试时长:<text class="bold">{{detailData.totalGrade}}</text>分钟
|
||||
</view>
|
||||
<view class="title-note">
|
||||
通过分数:{{detailData.passGrade}}分
|
||||
</view>
|
||||
<view class="title-note">
|
||||
考试次数:不限制
|
||||
</view>
|
||||
<view class="title-note">
|
||||
试卷类型:随机试卷
|
||||
</view>
|
||||
<!-- 试卷结构 -->
|
||||
<view class="title">
|
||||
试卷结构
|
||||
</view>
|
||||
<view class="table">
|
||||
<view class="table_tr">
|
||||
<view class="table_td">
|
||||
类型
|
||||
|
||||
<view class="title-table">
|
||||
<view class="title-table-item">
|
||||
<view class="top">
|
||||
<text class="text_2">{{detailData.passGrade}}</text><text class="text_1">分</text>
|
||||
</view>
|
||||
<view class="bottom text_1">
|
||||
试卷总分
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-table-item">
|
||||
<view class="top">
|
||||
<text class="text_2">{{detailData.passGrade}}</text><text class="text_1">分</text>
|
||||
</view>
|
||||
|
||||
<view class="bottom text_1">
|
||||
通过分数
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-table-item">
|
||||
<view class="top text_2">
|
||||
不限制
|
||||
</view>
|
||||
<view class="bottom text_1">
|
||||
通过次数
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-table-item">
|
||||
<view class="top text_2">
|
||||
随机
|
||||
</view>
|
||||
<view class="bottom text_1">
|
||||
试卷类型
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="table">
|
||||
<view class="table_th">
|
||||
<view class="table_td">
|
||||
题型
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
数量
|
||||
</view>
|
||||
@@ -59,6 +87,7 @@
|
||||
<view class="table_td">
|
||||
判断题
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{detailData.judgeNumber}}
|
||||
</view>
|
||||
@@ -66,10 +95,11 @@
|
||||
{{detailData.judgeGrade}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_tr">
|
||||
<view class="table_tr table_tr_dark">
|
||||
<view class="table_td">
|
||||
单选题
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{detailData.singleNumber}}
|
||||
</view>
|
||||
@@ -81,6 +111,7 @@
|
||||
<view class="table_td">
|
||||
多选题
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{detailData.multiNumber}}
|
||||
</view>
|
||||
@@ -88,10 +119,11 @@
|
||||
{{detailData.multiGrade}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_tr">
|
||||
<view class="table_tr table_tr_dark">
|
||||
<view class="table_td">
|
||||
问答题
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{detailData.essayNumber}}
|
||||
</view>
|
||||
@@ -103,6 +135,7 @@
|
||||
<view class="table_td">
|
||||
总计
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
20
|
||||
</view>
|
||||
@@ -116,8 +149,7 @@
|
||||
</view>
|
||||
<view class="fixed_button_div">
|
||||
<uv-button type="primary" class="send_evaluate" :custom-style="customStyle" :throttleTime="300"
|
||||
:hairline="false"
|
||||
@click="common.navigateTo('/pages/courseDetail/submit?crsNum='+crsNum+'&imgId='+form.imgId)">发布评价</uv-button>
|
||||
:hairline="false" @click="goto_examination()">开始考试</uv-button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -131,6 +163,12 @@
|
||||
import {
|
||||
reactive
|
||||
} from 'vue'
|
||||
import {
|
||||
startTraExamPapersInfo
|
||||
} from '@/api/examination.js'
|
||||
|
||||
import common from '@/common/common';
|
||||
import {setPageCache, getPageCache} from '@/common/common';
|
||||
const detailData = reactive({
|
||||
papersId: '',
|
||||
papersName: '',
|
||||
@@ -140,14 +178,30 @@
|
||||
planPersionNumber: '',
|
||||
})
|
||||
const customStyle = {
|
||||
borderRadius: '40rpx', //圆角
|
||||
backgroundColor: 'rgb(12, 123, 245)',
|
||||
backgroundColor: '#0066FF',
|
||||
border: '1px solid rgb(12, 123, 245)',
|
||||
}
|
||||
const goto_examination = async () => {
|
||||
common.loading()
|
||||
startTraExamPapersInfo({
|
||||
examId : "1"
|
||||
}).then(res => {
|
||||
setPageCache('examination', res.body)
|
||||
common.navigateTo('/pages/examination/index')
|
||||
}).finally(() => {
|
||||
common.hideLoading()
|
||||
})
|
||||
// papersId.value = e.papersId
|
||||
// paperData.value = setPageCache('examination_'+papersId.value)
|
||||
// if (!papersId.value || !paperData.value) {
|
||||
// common.navigateBack()
|
||||
// return
|
||||
// }
|
||||
}
|
||||
onLoad((e) => {
|
||||
console.log(e);
|
||||
const testing_hall_details = getPageCache('testing_hall_details')
|
||||
Object.assign(detailData, {
|
||||
...e
|
||||
...testing_hall_details
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@@ -156,30 +210,89 @@
|
||||
.fixed_button_div {
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
width: 80vw;
|
||||
width: calc(100vw - 60rpx);
|
||||
}
|
||||
|
||||
.title-table {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
|
||||
background-color: #F4F6F9;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx 28rpx 26rpx 28rpx;
|
||||
margin: 32rpx 0 48rpx 0;
|
||||
|
||||
.title-table-item {
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 96rpx;
|
||||
}
|
||||
|
||||
.text_1 {
|
||||
font-family: PingFangTC;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.text_2 {
|
||||
font-family: Arial, Arial;
|
||||
font-weight: normal;
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.text_3 {}
|
||||
}
|
||||
|
||||
.paper_div {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
background-color: rgb(130, 142, 244);
|
||||
flex: 1;
|
||||
|
||||
.paper {
|
||||
// width: 100%;
|
||||
background-color: red;
|
||||
height: 100%;
|
||||
margin: 24rpx 24rpx 0 24rpx;
|
||||
background-color: #fff;
|
||||
margin: 24rpx 30rpx 0 30rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 16rpx;
|
||||
background-color: #FFFFFF;
|
||||
// /* 顶部100px区域设置渐变 */
|
||||
background-image: linear-gradient(to bottom, #EBF2FE, #FFFFFF);
|
||||
// /* 只显示顶部100px的渐变 */
|
||||
background-size: 100% 100px;
|
||||
background-repeat: no-repeat;
|
||||
box-shadow: 0 23rpx 38rpx 0px rgba(0, 0, 0, 0.06);
|
||||
border: 2rpx solid #fff;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
color: rgb(0, 0, 0);
|
||||
font-weight: 600;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
.paper_title_div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-family: PingFangTC;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
margin-left: 12rpx;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.title-note {
|
||||
@@ -197,18 +310,42 @@
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 0 80rpx 0;
|
||||
|
||||
.table_th {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
background-color: #F4F6F9;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.table_tr_dark {
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
|
||||
.table_th>.table_td {
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.table_tr {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.table_td {
|
||||
padding: 14rpx 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: PingFangSC;
|
||||
font-size: 30rpx;
|
||||
line-height: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table_tr>.table_td {
|
||||
color: #666666;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,17 +355,55 @@
|
||||
align-items: center;
|
||||
padding-top: var(--status-bar-height);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.body-title {
|
||||
background-color: #337FFF;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
height: 140rpx;
|
||||
line-height: 140rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 38rpx;
|
||||
color: #FFFFFF;
|
||||
font-style: normal;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.detail_div {
|
||||
margin-top: -20rpx;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
padding: 48rpx 40rpx 20rpx 40rpx;
|
||||
|
||||
.title_div{
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.subscript {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 102rpx;
|
||||
height: 42rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
line-height: 42rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 0 0 0 28rpx;
|
||||
}
|
||||
|
||||
.title_div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
|
||||
.title {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
@@ -238,21 +413,11 @@
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.subscript {
|
||||
width: 102rpx;
|
||||
height: 42rpx;
|
||||
border-radius: 10rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
line-height: 42rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
@@ -283,29 +448,65 @@
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.incomplete {
|
||||
|
||||
|
||||
// 进行中
|
||||
.subscript {
|
||||
color: #FFFFFF;
|
||||
background-color: #EF5705;
|
||||
}
|
||||
|
||||
|
||||
.color_class {
|
||||
color: #D70C18;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.completed {
|
||||
|
||||
|
||||
// 已完成
|
||||
.subscript {
|
||||
color: #FFFFFF;
|
||||
background-color: #33C583;
|
||||
}
|
||||
|
||||
|
||||
.color_class {
|
||||
color: #0066FF;
|
||||
}
|
||||
}
|
||||
|
||||
.back_div {
|
||||
position: absolute;
|
||||
left: 26rpx;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.back-icon {
|
||||
position: relative;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.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 #fff;
|
||||
border-left: 4rpx solid #fff;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -47,6 +47,7 @@
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import {setPageCache} from '@/common/common';
|
||||
import common from '@/common/common';
|
||||
const customStyle = {
|
||||
backgroundColor: "#F1F5FA",
|
||||
@@ -96,21 +97,16 @@
|
||||
console.log('搜索', searchText.value);
|
||||
}
|
||||
const gotoDetails = (item) => {
|
||||
|
||||
const detailData = {
|
||||
...item
|
||||
};
|
||||
const params = new URLSearchParams();
|
||||
for (const key in detailData) {
|
||||
params.append(key, detailData[key]);
|
||||
}
|
||||
const urlParams = params.toString();
|
||||
common.navigateTo(`/pages/testingHall/details?${urlParams}`);
|
||||
|
||||
setPageCache('testing_hall_details', item)
|
||||
common.navigateTo('/pages/testingHall/details');
|
||||
}
|
||||
onMounted(() => {
|
||||
|
||||
triggered.value = true
|
||||
watch(tabAct, (newValue, oldValue) => {
|
||||
console.log('resresresresresxxxxxxxxxx', contentRefs.value);
|
||||
console.log('resresresresresxxxxxxxxxx', newValue);
|
||||
console.log('resresresresresxxxxxxxxxx', contentRefs.value[newValue]);
|
||||
typeof contentRefs.value[newValue]?.getData === 'function' && contentRefs.value[newValue]
|
||||
?.getData('first')
|
||||
}, {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
computed,
|
||||
nextTick,
|
||||
onMounted,
|
||||
watch
|
||||
watch
|
||||
} from 'vue';
|
||||
import {
|
||||
LineBg
|
||||
@@ -51,7 +51,7 @@
|
||||
} from '@/api/courseDetail.js';
|
||||
import common from '@/common/common';
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
|
||||
|
||||
const courseRef = ref(null);
|
||||
const correctRef = ref(null);
|
||||
const tabAct = ref(0);
|
||||
@@ -60,7 +60,7 @@
|
||||
}, {
|
||||
name: '已订正'
|
||||
}]);
|
||||
|
||||
|
||||
const tabChange = (item) => {
|
||||
tabAct.value = item.index;
|
||||
};
|
||||
@@ -68,13 +68,15 @@
|
||||
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')
|
||||
}
|
||||
}, { immediate: true }) // 这里的immediate会在onMounted之后执行
|
||||
watch(tabAct, (newValue, oldValue) => {
|
||||
if (newValue === 0) {
|
||||
courseRef.value?.getData('first')
|
||||
} else if (newValue === 1) {
|
||||
correctRef.value?.getData('first')
|
||||
}
|
||||
}, {
|
||||
immediate: true
|
||||
}) // 这里的immediate会在onMounted之后执行
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -82,6 +84,7 @@
|
||||
$bg-margin-left: 50rpx;
|
||||
|
||||
.my_tabs {
|
||||
|
||||
// 解决这个圆角的图片,开穿透
|
||||
:deep(.uv-tabs__wrapper__nav__line) {
|
||||
height: 26rpx !important;
|
||||
@@ -90,7 +93,7 @@
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.swiper {
|
||||
height: calc(100vh - var(--status-bar-height) - 54rpx - 88rpx - 20rpx - 10rpx);
|
||||
}
|
||||
@@ -134,6 +137,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #fff;
|
||||
|
||||
.back_div {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
|
||||
Reference in New Issue
Block a user