Commit 1a8f0ca9 authored by zhengke's avatar zhengke

修改

parent 01a77340
......@@ -48,3 +48,27 @@ export function SetStuExamStartTime(data) {
data
})
}
/**
* 查询考试数据
* @param {JSON参数} data
*/
export function queryQuestionPageList(data) {
return request({
url: '/Question/GetQuestionPageList',
method: 'post',
data
})
}
/**
* 获取阅读理解
* @param {JSON参数} data
*/
export function GetQuestionReading(data) {
return request({
url: '/Exam/GetQuestionReading',
method: 'post',
data
})
}
\ No newline at end of file
<template>
<view>
<!-- <van-nav-bar fixed>
<template #left>
<van-icon
name="cross"
style="font-size: 32rpx; color: #111"
@click="back"
/>
</template>
<template #title>
<view
style="
font-size: 32rpx;
color: #111;
font-family: PingFang SC;
font-weight: 800;
"
>答题卡</view
>
</template>
</van-nav-bar> -->
<view class="answer-sheets">
<view class="flex flex_wrap">
<view class="flex flex_wrap">
<view
v-for="(item, index) in questionList"
:key="index"
>
<view
class="item1"
:class="{ isRes: item.IsRes }"
@click="chooseTopic(index)"
>{{ index + 1 }}</view
>
</view>
</view>
</view>
</view>
<view class="submitBox">
<view class="submit" @click="savePaper">立即提交</view>
</view>
<van-toast id="van-toast" />
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { submitPaper } from "../../api/exam";
export default {
props: {
paperData: Array,
ExamStuId: Number,
SubmitTimes: Number,
StartTime: String,
ExamStatus: Number,
},
setup(props, ctx) {
let data = reactive({
questionList: props.paperData
});
let methods = {
chooseTopic(index) {
ctx.emit("chooseTopic", {
index
});
},
//隐藏答题卡
back() {
ctx.emit("hideAnswer");
},
getNowTime() {
let dateTime;
let yy = new Date().getFullYear();
let mm = new Date().getMonth() + 1;
let dd = new Date().getDate();
let hh = new Date().getHours();
let mf =
new Date().getMinutes() < 10
? "0" + new Date().getMinutes()
: new Date().getMinutes();
let ss =
new Date().getSeconds() < 10
? "0" + new Date().getSeconds()
: new Date().getSeconds();
dateTime = yy + "-" + mm + "-" + dd + " " + hh + ":" + mf + ":" + ss;
return dateTime;
},
//交卷
async savePaper() {
let obj = JSON.parse(JSON.stringify(props.paperData));
console.log(props.paperData,'paper');
// let res = await submitPaper(obj);
// if (res) {
// if (res.Code == 1) {
// uni.showToast({
// title: res.Message,
// icon: "none",
// });
// setTimeout(() => {
// uni.switchTab({
// url: "/pages/index/index",
// });
// }, 1000);
// }
// }
},
};
onMounted(() => {
console.log(data.questionList,'question');
});
return {
...toRefs(data),
...methods,
};
},
};
</script>
<style scoped>
.answer-sheets {
box-sizing: border-box;
padding: 30rpx;
height: calc(100vh - 300rpx);
overflow-y: auto;
}
.name,
.num {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
}
.num {
width: 100rpx;
text-align: center;
}
.item {
margin-bottom: 20rpx;
}
.item1-1 {
width: 690rpx;
margin: 22rpx 0 0 0;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #111111;
}
.item1 {
width: 55rpx;
height: 55rpx;
border: 1px solid #e2e2e2;
border-radius: 50%;
margin: 22rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #111111;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
.item2 {
width: 44rpx;
height: 44rpx;
border: 1px solid #e2e2e2;
border-radius: 50%;
text-align: center;
line-height: 44rpx;
margin-right: 55rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.choose {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.submitBox {
width: 750rpx;
height: 150rpx;
background-color: #e2e2e2;
position: fixed;
left: 0;
bottom: 0;
box-sizing: border-box;
padding-top: 40rpx;
}
.submit {
width: 600rpx;
height: 70rpx;
border-radius: 35rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #00acf9;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #fff;
margin: 0 auto;
}
.isRes {
background-color: #00acf9 !important;
color: #ffffff !important;
border: none !important;
}
</style>
<template>
<!-- 阅读理解 -->
<view>
<view class="item">
<view class="name">
<view>
{{ changeNumToHan(sortIndex) }}、阅读理解
<text class="Exam_Score">(共{{ data.length }}道)</text>
</view>
<view class="ExamIndex_Box">
<text class="Single_Before">{{ ExamIndex }}</text>/<text class="Exam_Total">{{ data.length }}</text>
</view>
</view>
<swiper class="swiper-box" :style="{
height: `calc(100vh - 200rpx)`,
}" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data" :key="index1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view class="num readTitle" v-html="item1.Title"></view>
</view>
<view :style="{maxHeight: `calc(100vh - 450rpx - ${statusBarHeight}px)`}"
style="overflow-y: auto;">
<view style="margin:30rpx;" class="Exam_Score">本阅读理解共{{item1.QuestionContentObj.length}}小题
</view>
<template v-if="isOperate">
<view class="questionView">
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2"
class="item2">
<view class="flex questionTitle">
<view style="white-space: nowrap">{{ index2 + 1 }}、({{
item2.QuestionName.slice(0, 2)
}})</view>
<view v-html="item2.SubTitle"></view><text
class="Exam_Score">{{item2.SubScore}}</text>
</view>
<view v-for="(item3, index3) in item2.SubAnwser" :key="index3">
<!-- 单选 、判断-->
<view class="flex flex_start_center item3" v-if="
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'||item2.QuestionKey === 'single-number'
">
<view class="chooseNum" :class="{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)">{{ item3.Name }}
</view>
<view class="chooseName" @click="singerChange(item2, item3)"
v-html="item3.Content"></view>
</view>
<!-- 多选 -->
<view class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'multiple'">
<view class="chooseNum" :class="{ myAnswer: item3.IsAnswer }"
@click="multipleChange(item2, item3)">{{ item3.Name }}
</view>
<view class="chooseName" @click="multipleChange(item2, item3)"
v-html="item3.Content"></view>
</view>
<!-- 填空 -->
<view class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'fill-in'">
<view style="margin-right:15rpx;">{{ index3 + 1 }} </view>
<input type="text" style="height:70rpx;" v-model="item3.Content"
class="chooseName chooseName2" placeholder="请填写答案"
@input="AnswerChange(item2)" />
</view>
<!-- 简答 -->
<view class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'short-answer'">
<textarea type="text" v-model="item3.Content"
class="chooseName chooseName2" placeholder="请填写答案"
@input="AnswerChange(item2)" />
</view>
</view>
</view>
</view>
</template>
<template v-else>
<view class="questionView">
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2"
class="item2">
<view class="flex questionTitle">
<view style="white-space: nowrap">
{{ index2 + 1 }}、({{item2.QuestionName.slice(0, 2)}})
</view>
<view v-html="item2.SubTitle"></view><text
class="Exam_Score">{{item2.SubScore}}</text>
</view>
<view v-for="(item3, index3) in item2.SubAnwser" :key="index3">
<!-- 单选 、判断-->
<view class="flex item3"
v-if="item2.QuestionKey === 'single' || item2.QuestionKey === 'judge'||item2.QuestionKey === 'single-number'">
<view class="chooseNum" :class="{ isTrueAnswer: item3.IsAnswer }">
{{ item3.Name }}
</view>
<view class="chooseName" :class="{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content"></view>
</view>
<!-- 多选 -->
<view class="flex item3" v-if="item2.QuestionKey === 'multiple'">
<view class="chooseNum" :class="{ isTrueAnswer: item3.IsAnswer }">
{{ item3.Name }}
</view>
<view class="chooseName" :class="{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content"></view>
</view>
<!-- 填空 -->
<view class="flex item3" v-if="item2.QuestionKey === 'fill-in'">
<view class="chooseNum">{{ index3 + 1 }} </view>
<view v-html="item3.Content" class="chooseName"></view>
</view>
<!-- 简答 -->
<view class="flex item3" v-if="item2.QuestionKey === 'short-answer'">
<view v-html="item3.Content" class="chooseName"></view>
</view>
</view>
<view class="AnswerContent">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text
class="isTrueAnswer">{{item1.QuestionAnswerList[index2].SubAnswer}}</text>
<text>您的答案:
<template v-if="item1.AnswerList[index2].SubAnswer!=''">
<text
v-if="item1.QuestionAnswerList[index2].SubAnswer == item1.AnswerList[index2].SubAnswer"
class="isTrueAnswer">
{{ item1.AnswerList[index2].SubAnswer }}
</text>
<text v-else
class="isNotAnswer">{{item1.AnswerList[index2].SubAnswer}},回答错误</text>
</template>
<template v-else>
<text class="isNotAnswer">未作答</text>
</template>
</text>
</view>
<view style="margin-top:20rpx;"
v-if="item1.AnswerList[index2].StudentScore!=''||item1.AnswerList[index2].StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer"
v-if="item1.AnswerList[index2].StudentScore>0">{{item1.AnswerList[index2].StudentScore}}</text>
<text class="isNotAnswer"
v-else>{{item1.AnswerList[index2].StudentScore}}</text>
</view>
</view>
</view>
<view
style="word-wrap: break-word; margin: 0 30rpx 30rpx 30rpx;display: flex;align-items: center;"
class="AnswerContent" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view style="color: #000" v-html="item1.AnswerParse"></view>
</view>
</view>
</template>
</view>
</view>
</swiper-item>
</swiper>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题
</view>
<view class="AnswerBtnSecond" v-if="ExamIndex != data.length" @click="getNextExam()">下一题</view>
</view>
</view>
<van-toast id="van-toast" />
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import {
changeNumToHan
} from "../../utils/index";
export default {
props: {
paperData: Array,
sort: Number,
isLast: Boolean,
startIndex: Number,
isOperate: Boolean,
ExamStatus: Number
},
setup(props, context) {
let {
ctx
} = getCurrentInstance();
let data = reactive({
autoplay: false,
sortIndex: props.sort+1,
data: props.paperData,
Score: 0, //总分
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
questionH: 500, //问题区域高度
timer: null,
timeOutEvent: false,
statusBarHeight: 0,
isOperate: props.isOperate,
ExamStatus: props.ExamStatus
});
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
}
watch(data.data, (newVal, oldVal) => {
if (newVal) {
context.emit("answerChange", newVal);
}
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange(item2, item3) {
item2.SubAnwser.map((e) => {
if (e.Name == item3.Name) {
e.IsAnswer = true;
item2.IsRes = true; //答题标记
} else {
e.IsAnswer = false;
}
});
},
// 多选
multipleChange(item2, item3) {
item3.IsAnswer = !item3.IsAnswer;
//标记已回答
item2.IsRes = item2.SubAnwser.some((e) => {
return e.IsAnswer;
});
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.sortIndex == 1) {
data.ExamIndex = e.detail.current + 1;
}
},
AnswerChange(item) {
item.IsRes = item.SubAnwser.some((e) => {
console.log(217, e.Content && e.Content != "");
return e.Content && e.Content != "";
});
console.log(218, item.IsRes);
},
//触摸事件
touchstart(e) {
clearTimeout(data.timer);
data.timer = setTimeout(() => {
data.timeOutEvent = true;
}, 100);
},
touchmove(e) {
if (data.timeOutEvent) {
let touches = e.touches[0];
let startTy = touches.clientY;
let screenHeight = uni.getSystemInfoSync().screenHeight;
data.questionH = (screenHeight - startTy) * 2;
}
},
touchend() {
data.timeOutEvent = false;
clearTimeout(data.timer);
},
//点击上一题
getBeforeExam() {
data.current = data.current - 1;
},
//点击下一题
getNextExam() {
data.current = data.current + 1;
}
};
onMounted(() => {
console.log(361, data.data);
data.data.forEach(x => {
x.Title = x.Title.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ')
})
if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
});
let that = methods;
return {
...toRefs(data),
...methods,
};
},
};
</script>
<style scoped>
.AnswerBtn {
margin-top: 30rpx;
padding: 0 40rpx;
}
.clear {
clear: both
}
.AnswerBtnFirst {
width: 250rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border: 1px solid #00ACF9;
color: #00ACF9;
float: left;
}
.AnswerBtnSecond {
width: 250rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color: #fff;
float: right;
}
.item {
/* margin-bottom: 40rpx; */
position: relative;
}
.name {
height: 90rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 30rpx;
}
.isTrueAnswer {
color: green !important;
}
.isNotAnswer {
color: red !important;
}
.ExamIndex_Box {
margin-right: 48rpx;
}
.Exam_Total {
font-size: 25rpx;
color: gray;
}
.swiper-box {
height: calc(100vh - 230rpx);
box-sizing: border-box;
overflow: auto;
}
.num {
font-size: 30rpx;
font-family: PingFang SC;
color: #111111;
box-sizing: border-box;
}
.readTitle img {
max-width: 100%;
}
.Single_Before {
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
.item1 {
height: 100%;
align-items: center;
/* overflow-y: auto; */
box-sizing: border-box;
padding: 0 30rpx;
}
.questionBox {
width: 100%;
min-height: 500rpx !important;
max-height: 800rpx !important;
/* background-color: #eee; */
position: absolute;
left: 0rpx;
bottom: 0rpx;
z-index: 9;
color: #000000;
transition: all 0.5;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
}
.questionView {
height: 100%;
/* overflow-y: auto; */
box-sizing: border-box;
padding-bottom: 80rpx;
}
.questionTotal {
text-align: center;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: bold;
color: #888888;
padding: 30rpx 0;
}
.questionTitle {
font-size: 28rpx;
font-family: PingFang SC;
color: #111111;
}
.item2 {
box-sizing: border-box;
margin-bottom: 50rpx;
padding: 0 30rpx;
}
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.myAnswerText {
color: #00acf9 !important;
}
.item3 {
padding-left: 25rpx;
margin: 20rpx 0;
align-items: center;
}
.chooseNum {
width: 50rpx;
height: 50rpx;
text-align: center;
line-height: 50rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.chooseName {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
}
.chooseName2 {
flex-grow: 1;
border-bottom: 1px solid #111;
color: #111111;
}
.isTrueAnswer {
color: green !important;
}
.isNotAnswer {
color: red !important;
}
.AnswerContent {
font-size: 30rpx;
padding: 25rpx;
background-color: #f4f4f4;
border-radius: 10rpx;
font-size: 28rpx;
}
.Exam_Score {
color: #999999;
font-size: 28rpx;
}
</style>
......@@ -19,8 +19,8 @@
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view class="num readTitle" v-html="item1.Title"></view><text
class="Exam_Score">{{item1.Score}}</text>
<view class="num readTitle" v-html="item1.Title"></view>
<!-- <text class="Exam_Score">{{item1.Score}}</text> -->
</view>
<!-- <view class="questionBox" :style="{ height: `${questionH}rpx` }">
<view class="questionTotal" @touchstart="touchstart" @touchmove="touchmove"
......@@ -308,6 +308,9 @@
};
onMounted(() => {
console.log(361, data.data);
data.data.DetailsList.forEach(x=>{
x.Title = x.Title.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ')
})
if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
......
......@@ -92,6 +92,12 @@
"style": {
"navigationStyle": "custom"
}
},{
"path": "MyExam"
},{
"path": "examStart"
},{
"path": "examGradeList"
}]
},
{
......
<style scoped>
.Question_Bank {
padding: 0 25rpx;
height: 100vh;
background-color: #F5F5F5;
}
.Question_Top {
display: flex;
align-items: center;
padding-top: 40rpx;
}
.Ques_Title {
font-size: 28rpx;
font-weight: bold;
color: #111111;
margin-right: 45rpx;
}
.Ques_Select {
padding: 5rpx;
width: 80rpx;
background-color: #FFF3F8;
color: #F27573;
border-radius: 20rpx;
font-size: 25rpx;
position: relative;
padding: 5rpx 0 5rpx 15rpx;
}
.Ques_CirContent {
width: 100%;
overflow-x: scroll;
white-space: nowrap;
margin-top: 40rpx;
}
.Ques_Circle {
width: 190rpx;
height: 200rpx;
text-align: center;
color: #fff;
margin-right: 25rpx;
display: inline-block;
border-radius: 24rpx;
background-color: #fff;
position: relative;
box-sizing: border-box;
}
.Ques_CirContent::-webkit-scrollbar {
display: none;
}
.Ques_Top {
font-weight: bold;
font-size: 35rpx;
margin-top: 30rpx;
color: #4C50E7;
}
.Ques_Num {
margin-top: 12rpx;
font-size: 25rpx;
color: #666666;
}
.Ques_Join {
display: flex;
margin-top: 30rpx;
flex-wrap: wrap;
}
.Janpa_Level {
margin-top: 40rpx;
}
.Ques_Inner {
width: 200rpx;
height: 140rpx;
background-color: #fff;
text-align: center;
color: #111111;
font-size: 28rpx;
margin: 0 25rpx 25rpx 0;
border-radius: 24rpx;
position: relative;
}
.Ques_level {
font-style: italic;
position: absolute;
font-size: 34rpx;
font-weight: bold;
left: 15rpx;
top: 10rpx;
z-index: 99;
}
.Ques_Big {
position: absolute;
font-style: italic;
font-size: 80rpx;
color: #F1F1FD;
left: 0;
font-weight: bold;
}
.Ques_Jnber {
position: absolute;
color: #A3A3A3;
font-size: 20rpx;
bottom: 16rpx;
right: 20rpx;
}
.JanpaTrueTi {
width: 100%;
height: 250rpx;
margin-top: 40rpx;
position: relative;
border-radius: 20rpx;
overflow: hidden;
}
.JanpaTrueTi img {
width: 100%;
height: 100%;
}
.Join_Content {
color: #333E52;
font-size: 28rpx;
position: absolute;
left: 55rpx;
bottom: 100rpx;
}
.Join_Linian {
color: #333E52;
font-size: 36rpx;
margin-bottom: 20rpx;
font-weight: bold;
}
.Ques_Circle img {
position: absolute;
bottom: 0;
width: 80rpx;
height: 48rpx;
left: 60rpx;
}
.triangle_Down {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #F27573;
display: inline-block;
margin-left: 10rpx;
position: absolute;
top: 17rpx;
}
.level_Choice{
color:#000000;
font-size:33rpx;
margin-top:40rpx;
font-weight: bold;
margin-bottom:50rpx;
}
.level_Content{
display:flex;
width:100%;
justify-content: space-between;
}
.level_Content view{
padding:10rpx 0;
background-color: #F1F1F1;
font-size:26rpx;
border-radius: 30rpx;
text-align: center;
margin:0 30rpx 30rpx 0;
width:180rpx;
}
.level_Content view:nth-child(3n){
margin-right:0;
}
</style>
<template>
<view class="Question_Bank">
<view class="Question_Top">
<view class="Ques_Title">日语专项练习</view>
<view class="Ques_Select" @click="showExambox()">
{{comNum}}<text class="triangle_Down"></text>
</view>
<view class="Ques_Reset">
</view>
</view>
<view class="Ques_CirContent">
<view class="Ques_Circle" @click="goExam()">
<view class="Ques_Top">单词</view>
<view class="Ques_Num">6/89</view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word1.png" alt="" />
</view>
<view class="Ques_Circle">
<view class="Ques_Top">语法</view>
<view class="Ques_Num">6/89</view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word2.png" alt="" />
</view>
<view class="Ques_Circle">
<view class="Ques_Top">听力</view>
<view class="Ques_Num">6/89</view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word3.png" alt="" />
</view>
<view class="Ques_Circle" style="margin-right:0;">
<view class="Ques_Top">阅读</view>
<view class="Ques_Num">6/89</view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word4.png" alt="" />
</view>
</view>
<view class="Janpa_Level">
<view class="Ques_Title">日语等级评测</view>
<view class="Ques_Join">
<view class="Ques_Inner" @click="goJpGrade()">
<text class="Ques_level">N5</text>
<text class="Ques_Big">N5</text>
<text class="Ques_Jnber">206人参与</text>
</view>
<view class="Ques_Inner">
<text class="Ques_level">N4</text>
<text class="Ques_Big">N4</text>
<view class="Ques_Jnber">206人参与</view>
</view>
<view class="Ques_Inner">
<text class="Ques_level">N3</text>
<text class="Ques_Big">N3</text>
<view class="Ques_Jnber">206人参与</view>
</view>
<view class="Ques_Inner">
<text class="Ques_level">N2</text>
<text class="Ques_Big">N2</text>
<view class="Ques_Jnber">206人参与</view>
</view>
<view class="Ques_Inner">
<text class="Ques_level">N1</text>
<text class="Ques_Big">N1</text>
<view class="Ques_Jnber">206人参与</view>
</view>
</view>
</view>
<view class="Janpa_Level" style="margin-top:20rpx;">
<view class="Ques_Title">日语真题演练</view>
<view class="JanpaTrueTi">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/trueTi.png"
alt="" />
<view class="Join_Content">
<view class="Join_Linian">历年真题演练</view>
<view>1人参与</view>
</view>
</view>
<view class="JanpaTrueTi" style="margin:26rpx 0 20rpx 0">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/true2.png" alt="" />
<view class="Join_Content">
<view class="Join_Linian">高考真题</view>
<view>1人参与</view>
</view>
</view>
</view>
<van-popup :show="showPop" @close="showPop=false" round>
<view style="
display: flex;
flex-direction: column;
align-items: center;
background: #fff;
width: 500rpx;
height: 400rpx;
padding:20rpx;
">
<view class="level_Choice">等级选择</view>
<view class="level_Content">
<view @click="getLevel('N5')">N5</view>
<view @click="getLevel('N4')">N4</view>
<view @click="getLevel('N3')">N3</view>
</view>
<view class="level_Content">
<view @click="getLevel('N2')">N2</view>
<view @click="getLevel('N1')">N1</view>
<view>高考真题</view>
</view>
<view class="level_Content">
<view>高考模拟</view>
</view>
</view>
</van-popup>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
export default {
props: {},
setup(props, ctx) {
let data = reactive({
msg: {},
showPop: false,
comNum:'N3'
});
let methods = {
//返回首页
goExam() {
uni.navigateTo({
url: '/pages/exam/examStart'
});
},
showExambox() {
console.log('1111');
data.showPop = true;
},
onClose() {
data.showPop = false;
},
//点击选择等级
getLevel(num){
console.log(num,'num');
data.comNum = num;
data.showPop = false;
},
//跳转到日语等级评测列表
goJpGrade(){
uni.navigateTo({
url: '/pages/exam/examGradeList'
});
}
};
let that = methods;
return {
...toRefs(data),
...methods,
};
},
onLoad(options) {},
};
</script>
<style>
</style>
<style scoped>
.GradeContent{
padding: 0 35rpx;
height: 100vh;
background-color: #F5F5F5;
}
.Grade_List{
height:380rpx;
background-color: #fff;
border-radius: 24rpx;
position: relative;
padding:30rpx;
}
.Grade_Title{
color:#111111;
font-size:32rpx;
width:100%;
text-align: center;
font-weight: bold;
margin:10rpx 0 40rpx 0;
}
.Grade_Join{
display:flex;
}
.Grade_Join view{
flex:1;
}
.Grade_TopNum{
color:#111111;
font-size:24rpx;
margin-bottom: 17rpx;
font-weight: bold;
}
.Grade_BtmText{
color:#888888;
font-size:22rpx;
}
.Grade_JoinFirst{
position: relative;
padding-left:35rpx;
}
.Grade_JoinFirst:after{
content: "";
margin-left: 15px;
padding-left: 15px;
border-left: 1px solid #c0c4cc;
height: 40rpx;
display: inline-block;
vertical-align: middle;
position: absolute;
right:0;
top:20rpx;
}
.Grade_JoinSecond{
text-align: center;
position: relative;
}
.Grade_JoinSecond:after{
content: "";
border-left: 1px solid #c0c4cc;
height: 40rpx;
display: inline-block;
vertical-align: middle;
position: absolute;
right:0;
top:20rpx;
}
.Grade_GongGu{
display:flex;
margin-top:40rpx;
/* justify-content: space-between;
*/ }
.Grade_Left{
width:425rpx;
height:145rpx;
background-color: #F6F6FE;
border-radius: 24rpx;
color:#4C50E7;
}
</style>
<template>
<view class="GradeContent">
<view class="Grade_List">
<view class="Grade_Title">N5模拟试题 1 </view>
<view class="Grade_Join">
<view class="Grade_JoinFirst">
<view class="Grade_TopNum">1523</view>
<view class="Grade_BtmText">参加人数</view>
</view>
<view class="Grade_JoinSecond">
<view class="Grade_TopNum">05′00″</view>
<view class="Grade_BtmText">最低用时</view>
</view>
<view>
<view style="margin-left:60rpx;">
<view class="Grade_TopNum">26</view>
<view class="Grade_BtmText">最高得分</view>
</view>
</view>
</view>
<view class="Grade_GongGu">
<view class="Grade_Left">
</view>
<view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
export default {
props: {},
setup(props, ctx) {
let data = reactive({
msg: {},
});
let methods = {
};
let that = methods;
return {
...toRefs(data),
...methods,
};
},
onLoad(options) {
uni.setNavigationBarTitle({
title: "日语等级测评"
});
},
};
</script>
<style>
</style>
<template>
<view>
<view class="exam-con" v-if="!isShowAnswer && !isShowNotice">
<i
class="iconfont icon-caidanzu answerSheet"
style="
position: absolute;
right: 30rpx;
z-index: 999;
margin-top: 26rpx;
"
@click="showAnswerSheet"
></i>
<view v-for="(item, index) in dataList" :key="index">
<!-- 阅读理解 -->
<readingCompre
:startIndex="item.startIndex"
:paperData="dataList"
:sort="index"
:isOperate="isOperate"
:ExamStatus="ExamStatus"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'reading-comprehensio' && index === changeIndex"
/>
</view>
</view>
<view v-if="isShowAnswer">
<view class="answer-con" v-if="!isShowAnswerSee">
<answer
:paperData="dataList"
:ExamStuId="Exam_Student_Id"
:StartTime="StartTime"
:ExamStatus="ExamStatus"
:SubmitTimes="SubmitTimes"
@hideAnswer="hideAnswerSheet"
@chooseTopic="jumpTopic"
ref="answer"
/>
</view>
<!-- 答题卡查看对错 -->
<answerSee
:paperData="peaperDetail"
@hideAnswer="hideAnswerSheet"
@chooseTopic="jumpTopic"
v-if="isShowAnswerSee"
/>
</view>
<view class="answer-con" v-if="isShowNotice">
<examNotice
:msg="msg"
:ExamStatus="ExamStatus"
@hideNotice="hideNotice"
/>
</view>
<van-toast id="van-toast" />
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { GetQuestionReading } from "../../api/exam";
import { changeNumToHan } from "../../utils/index";
import { submitPaper } from "../../api/exam";
import answer from "../../components/question/answer.vue"; //答题卡
import readingCompre from "../../components/question/readingCompre";
export default {
components: {
readingCompre,
answer
},
setup(props, context) {
let { refs } = getCurrentInstance();
console.log(refs);
let data = reactive({
statusBarHeight: 0,
msg: {
pageIndex: 1,
pageSize: 10 
},
dataList: [],
isShowAnswer: false, //是否显示答题卡
Exam_Student_Id: 0,
changeIndex: 0, //大题序号
isOperate: true, //考试状态 判断是考试还是查看答案
isAutoTime: false,
ExamStatus: -1,
SubmitTimes: 0, //后台设置几分钟后可提交
isShowAnswerSee: false,
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
async GetMyQuestionReading() {
let res = await GetQuestionReading(data.msg);
if (res) {
if (res.Code == 1) {
console.log(res,'数据');
this.dataList = res.Data.PageData;
}
}
},
//显示答题卡
showAnswerSheet() {
data.isShowAnswer = true;
},
//隐藏答题卡
hideAnswerSheet() {
data.isShowAnswer = false;
},
//隐藏考前提示
hideNotice() {
console.log("进入");
data.isShowNotice = false;
},
//获取答案改变后的数据
getAnswerChange(val, index) {
// data.peaperDetail.Paper.GroupList[index] = val;
},
//跳转到指定题目
jumpTopic(val) {
console.log(val);
this.changeIndex = val.index;
this.dataList[val.index].startIndex = val.index + 1;
data.isShowAnswer = false;
},
getNowTime() {
let dateTime;
let yy = new Date().getFullYear();
let mm = new Date().getMonth() + 1;
let dd = new Date().getDate();
let hh = new Date().getHours();
let mf =
new Date().getMinutes() < 10
? "0" + new Date().getMinutes()
: new Date().getMinutes();
let ss =
new Date().getSeconds() < 10
? "0" + new Date().getSeconds()
: new Date().getSeconds();
dateTime = yy + "-" + mm + "-" + dd + " " + hh + ":" + mf + ":" + ss;
return dateTime;
},
//交卷
async savePaper() {
let obj = JSON.parse(JSON.stringify(data.peaperDetail.Paper));
delete obj.Group_Id;
obj.Exam_Student_Id = parseInt(data.Exam_Student_Id);
let time1 = data.StartTime;
let time2 = methods.getNowTime();
var d1 = new Date(time1);
var d2 = new Date(time2);
let TimeDis = parseInt(d2 - d1) / 1000 / 60;
if (TimeDis < data.SubmitTimes) {
uni.showToast({
title: `开考不足${data.SubmitTimes}分钟禁止交卷哦~`,
icon: "none",
});
return;
}
let res = await submitPaper(obj);
if (res) {
if (res.Code == 1) {
uni.showToast({
title: res.Message,
icon: "none",
});
setTimeout(() => {
uni.navigateTo({
url: "/pages/index/index",
});
}, 1000);
}
}
},
};
onMounted(() => {
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
});
return {
...toRefs(data),
...methods,
};
},
async onLoad(options) {
await this.GetMyQuestionReading();
},
};
</script>
<style scoped>
.exam-con {
box-sizing: border-box;
}
.answerSheet {
font-size: 40rpx;
margin-left: 30rpx;
color: #000;
}
</style>
......@@ -45,6 +45,8 @@
<view class="wordTitle">
单词练习
</view>
<view @click="goWord()">跳转。。。</view>
<view class="flex_around_center ">
<view class="wordItem">
<text class="wordItemTitle">今日新词</text>
......@@ -188,6 +190,11 @@
url: url,
});
},
goWord(){
uni.navigateTo({
url: '/pages/exam/MyExam'
});
},
jumpTimetable() {
uni.switchTab({
url: '/pages/timetable/timeTable',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment