Commit 1a8f0ca9 authored by zhengke's avatar zhengke

修改

parent 01a77340
......@@ -47,4 +47,28 @@ export function SetStuExamStartTime(data) {
method: 'post',
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>
This diff is collapsed.
......@@ -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