Commit 97cc6d7b authored by zhengke's avatar zhengke

1

parent 780bc6c4
...@@ -180,3 +180,15 @@ export function SetStudentStartExam(data) { ...@@ -180,3 +180,15 @@ export function SetStudentStartExam(data) {
data data
}) })
} }
/**
* 保存考试接口
* @param {JSON参数} data
*/
export function SetStudentExam(data) {
return request({
url: '/Exam/SetStudentExam',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -2,43 +2,28 @@ ...@@ -2,43 +2,28 @@
<view> <view>
<van-nav-bar fixed> <van-nav-bar fixed>
<template #left> <template #left>
<van-icon <van-icon name="cross" style="font-size: 32rpx; color: #111" @click="back" />
name="cross"
style="font-size: 32rpx; color: #111"
@click="back"
/>
</template> </template>
<template #title> <template #title>
<view <view style="
style="
font-size: 32rpx; font-size: 32rpx;
color: #111; color: #111;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 800; font-weight: 800;
" ">答题卡</view>
>答题卡</view
>
</template> </template>
</van-nav-bar> </van-nav-bar>
<view class="answer-sheets"> <view class="answer-sheets">
<view class="item"> <view class="item">
<view class="flex flex_wrap"> <view class="flex flex_wrap">
<view <view v-for="(item, index) in questionList" :key="index" class="flex flex_wrap">
v-for="(item, index) in questionList" <view class="item1" :class="{ isRes: item.StundetAnswer.length>0 }" @click="chooseTopic(index)">
:key="index" {{ index + 1 }}</view>
class="flex flex_wrap"
>
<view
class="item1"
:class="{ isRes: item.StundetAnswer.length>0 }"
@click="chooseTopic(index)"
>{{ index + 1 }}</view
>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="submitBox" v-if="ExamStatus === 2"> <view class="submitBox">
<view class="submit" @click="savePaper">立即提交</view> <view class="submit" @click="savePaper">立即提交</view>
</view> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
...@@ -46,7 +31,7 @@ ...@@ -46,7 +31,7 @@
</template> </template>
<script> <script>
import { import {
ref, ref,
reactive, reactive,
toRefs, toRefs,
...@@ -55,15 +40,22 @@ import { ...@@ -55,15 +40,22 @@ import {
watch, watch,
computed, computed,
onMounted, onMounted,
} from "vue"; } from "vue";
// import { submitPaper } from "../../api/exam"; import {
export default { SetStudentExam
} from "../../../api/exam";
export default {
props: { props: {
paperData: Array, paperData: Array,
saveId: Number
}, },
setup(props, ctx) { setup(props, ctx) {
let data = reactive({ let data = reactive({
questionList: props.paperData questionList: props.paperData,
saveMsg: {
Id: props.saveId,
ExamDetailsList: []
}
}); });
let methods = { let methods = {
chooseTopic(index) { chooseTopic(index) {
...@@ -75,7 +67,24 @@ export default { ...@@ -75,7 +67,24 @@ export default {
}, },
//交卷 //交卷
async savePaper() { async savePaper() {
console.log(data.questionList, 'questionList');
// data.questionList.forEach(x => {
// let obj = {
// DetailId: 0,
// ExamId: 0,
// QuestionId: 1,
// Title: "123",
// QuestionContent: "132131",
// QuestionTypeId: 1,
// QuestionTypeKey: "single",
// Answer: "",
// AnswerParse: "",
// IsAnswer: 1,
// IsWrong: 1,
// }
// })
console.log(data.saveMsg, 'saveMsg');
}, },
}; };
return { return {
...@@ -83,40 +92,45 @@ export default { ...@@ -83,40 +92,45 @@ export default {
...methods, ...methods,
}; };
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.answer-sheets { .answer-sheets {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx; padding: 30rpx;
height: calc(100vh - 300rpx); height: calc(100vh - 300rpx);
overflow-y: auto; overflow-y: auto;
margin-top:100rpx; margin-top: 100rpx;
} }
.name,
.num { .name,
.num {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 800; font-weight: 800;
color: #111111; color: #111111;
} }
.num {
.num {
width: 100rpx; width: 100rpx;
text-align: center; text-align: center;
} }
.item {
.item {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.item1-1 {
.item1-1 {
width: 690rpx; width: 690rpx;
margin: 22rpx 0 0 0; margin: 22rpx 0 0 0;
font-size: 26rpx; font-size: 26rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 600; font-weight: 600;
color: #111111; color: #111111;
} }
.item1 {
.item1 {
width: 55rpx; width: 55rpx;
height: 55rpx; height: 55rpx;
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
...@@ -130,8 +144,9 @@ export default { ...@@ -130,8 +144,9 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
} }
.item2 {
.item2 {
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
...@@ -143,12 +158,14 @@ export default { ...@@ -143,12 +158,14 @@ export default {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #111111; color: #111111;
} }
.choose {
.choose {
background-color: #00acf9 !important; background-color: #00acf9 !important;
color: #ffffff !important; color: #ffffff !important;
} }
.submitBox {
.submitBox {
width: 750rpx; width: 750rpx;
height: 150rpx; height: 150rpx;
background-color: #e2e2e2; background-color: #e2e2e2;
...@@ -157,8 +174,9 @@ export default { ...@@ -157,8 +174,9 @@ export default {
bottom: 0; bottom: 0;
box-sizing: border-box; box-sizing: border-box;
padding-top: 40rpx; padding-top: 40rpx;
} }
.submit {
.submit {
width: 600rpx; width: 600rpx;
height: 70rpx; height: 70rpx;
border-radius: 35rpx; border-radius: 35rpx;
...@@ -171,10 +189,11 @@ export default { ...@@ -171,10 +189,11 @@ export default {
font-weight: bold; font-weight: bold;
color: #fff; color: #fff;
margin: 0 auto; margin: 0 auto;
} }
.isRes {
.isRes {
background-color: #00acf9 !important; background-color: #00acf9 !important;
color: #ffffff !important; color: #ffffff !important;
border: none !important; border: none !important;
} }
</style> </style>
...@@ -225,27 +225,27 @@ ...@@ -225,27 +225,27 @@
<view class="Janpa_Level"> <view class="Janpa_Level">
<view class="Ques_Title">日语等级评测</view> <view class="Ques_Title">日语等级评测</view>
<view class="Ques_Join"> <view class="Ques_Join">
<view class="Ques_Inner" @click="goJpGrade()"> <view class="Ques_Inner" @click="goJpGrade(5)">
<text class="Ques_level">N5</text> <text class="Ques_level">N5</text>
<text class="Ques_Big">N5</text> <text class="Ques_Big">N5</text>
<text class="Ques_Jnber">206人参与</text> <text class="Ques_Jnber">206人参与</text>
</view> </view>
<view class="Ques_Inner"> <view class="Ques_Inner" @click="goJpGrade(4)">
<text class="Ques_level">N4</text> <text class="Ques_level">N4</text>
<text class="Ques_Big">N4</text> <text class="Ques_Big">N4</text>
<view class="Ques_Jnber">206人参与</view> <view class="Ques_Jnber">206人参与</view>
</view> </view>
<view class="Ques_Inner"> <view class="Ques_Inner" @click="goJpGrade(3)">
<text class="Ques_level">N3</text> <text class="Ques_level">N3</text>
<text class="Ques_Big">N3</text> <text class="Ques_Big">N3</text>
<view class="Ques_Jnber">206人参与</view> <view class="Ques_Jnber">206人参与</view>
</view> </view>
<view class="Ques_Inner"> <view class="Ques_Inner" @click="goJpGrade(2)">
<text class="Ques_level">N2</text> <text class="Ques_level">N2</text>
<text class="Ques_Big">N2</text> <text class="Ques_Big">N2</text>
<view class="Ques_Jnber">206人参与</view> <view class="Ques_Jnber">206人参与</view>
</view> </view>
<view class="Ques_Inner"> <view class="Ques_Inner" @click="goJpGrade(1)">
<text class="Ques_level">N1</text> <text class="Ques_level">N1</text>
<text class="Ques_Big">N1</text> <text class="Ques_Big">N1</text>
<view class="Ques_Jnber">206人参与</view> <view class="Ques_Jnber">206人参与</view>
...@@ -254,14 +254,6 @@ ...@@ -254,14 +254,6 @@
</view> </view>
<view class="Janpa_Level" style="margin-top:20rpx;"> <view class="Janpa_Level" style="margin-top:20rpx;">
<view class="Ques_Title">日语真题演练</view> <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"> <view class="JanpaTrueTi" style="margin:26rpx 0 20rpx 0">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/true2.png" alt="" /> <img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/true2.png" alt="" />
<view class="Join_Content"> <view class="Join_Content">
...@@ -353,9 +345,9 @@ ...@@ -353,9 +345,9 @@
} }
}, },
//跳转到日语等级评测列表 //跳转到日语等级评测列表
goJpGrade(){ goJpGrade(Type){
uni.navigateTo({ uni.navigateTo({
url: '/pages/exam/examGradeList?BankType='+data.TypeMsg.BankType url: '/pages/exam/examGradeList?BankType='+Type
}); });
} }
}; };
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<answer v-if="isShowAnswer" :paperData="dataList" @hideAnswer="hideAnswer" @chooseTopic="jumpTopic"></answer> <answer v-if="isShowAnswer" :paperData="dataList" @hideAnswer="hideAnswer" :saveId="saveId" @chooseTopic="jumpTopic"></answer>
</view> </view>
</template> </template>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
let data = reactive({ let data = reactive({
dataList: [], dataList: [],
msg: { msg: {
pageIndex: 4, pageIndex: 1,
pageSize: 20, pageSize: 20,
BankId: 0 BankId: 0
}, },
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
BankId:1, BankId:1,
StudentId:1 StudentId:1
}, },
saveId:0, //提交保存的时候用
current: 0, //默认从第几个开始-用于从快捷菜单点入 current: 0, //默认从第几个开始-用于从快捷菜单点入
isShowJx: false, isShowJx: false,
Count: 0, Count: 0,
...@@ -141,7 +142,9 @@ ...@@ -141,7 +142,9 @@
getStart(){ getStart(){
data.startMsg.StudentId = UserInfo.AccountId; data.startMsg.StudentId = UserInfo.AccountId;
SetStudentStartExam(data.startMsg).then(res=>{ SetStudentStartExam(data.startMsg).then(res=>{
if(res.Code==1){
data.saveId = res.Data.Id;
}
}) })
} }
}; };
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<van-empty description="暂无数据" v-if="dataList.length === 0" /> <van-empty description="暂无数据" v-if="dataList.length === 0" />
<scroll-view :scroll-top="0" scroll-y="true" class="scroll-box" @scrolltolower="lower" <scroll-view :scroll-top="0" scroll-y="true" class="scroll-box" @scrolltolower="lower"
v-if="dataList.length > 0"> v-if="dataList.length > 0">
<view class="Grade_List" v-for="(item,index) in dataList" :key="index" @click="getDetail(item.BankId)"> <view class="Grade_List" v-for="(item,index) in dataList" :key="index">
<view class="Grade_Title">{{item.BankName}}</view> <view class="Grade_Title">{{item.BankName}}</view>
<view class="Grade_Pingce">测评次数 1</view> <view class="Grade_Pingce">测评次数 1</view>
<view class="Grade_Join"> <view class="Grade_Join">
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
</view> </view>
</view> </view>
<view> <view>
<view class="Grade_Gonggu">巩固练习</view> <view class="Grade_Gonggu" @click="getDetail(item.BankId)">巩固练习</view>
<view class="Grade_jiexi">查看解析</view> <view class="Grade_jiexi">查看解析</view>
</view> </view>
</view> </view>
......
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