Commit 97cc6d7b authored by zhengke's avatar zhengke

1

parent 780bc6c4
...@@ -179,4 +179,16 @@ export function SetStudentStartExam(data) { ...@@ -179,4 +179,16 @@ export function SetStudentStartExam(data) {
method: 'post', method: 'post',
data data
}) })
}
/**
* 保存考试接口
* @param {JSON参数} data
*/
export function SetStudentExam(data) {
return request({
url: '/Exam/SetStudentExam',
method: 'post',
data
})
} }
\ No newline at end of file
<template> <template>
<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" </template>
style="font-size: 32rpx; color: #111" <template #title>
@click="back" <view style="
/>
</template>
<template #title>
<view
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>
> </van-nav-bar>
</template> <view class="answer-sheets">
</van-nav-bar> <view class="item">
<view class="answer-sheets"> <view class="flex flex_wrap">
<view class="item"> <view v-for="(item, index) in questionList" :key="index" class="flex flex_wrap">
<view class="flex flex_wrap"> <view class="item1" :class="{ isRes: item.StundetAnswer.length>0 }" @click="chooseTopic(index)">
<view {{ index + 1 }}</view>
v-for="(item, index) in questionList" </view>
:key="index" </view>
class="flex flex_wrap" </view>
> </view>
<view <view class="submitBox">
class="item1" <view class="submit" @click="savePaper">立即提交</view>
:class="{ isRes: item.StundetAnswer.length>0 }" </view>
@click="chooseTopic(index)" <van-toast id="van-toast" />
>{{ index + 1 }}</view </view>
>
</view>
</view>
</view>
</view>
<view class="submitBox" v-if="ExamStatus === 2">
<view class="submit" @click="savePaper">立即提交</view>
</view>
<van-toast id="van-toast" />
</view>
</template> </template>
<script> <script>
import { import {
ref, ref,
reactive, reactive,
toRefs, toRefs,
toRef, toRef,
getCurrentInstance, getCurrentInstance,
watch, watch,
computed, computed,
onMounted, onMounted,
} from "vue"; } from "vue";
// import { submitPaper } from "../../api/exam"; import {
export default { SetStudentExam
props: { } from "../../../api/exam";
paperData: Array, export default {
}, props: {
setup(props, ctx) { paperData: Array,
let data = reactive({ saveId: Number
questionList: props.paperData },
}); setup(props, ctx) {
let methods = { let data = reactive({
chooseTopic(index) { questionList: props.paperData,
ctx.emit("chooseTopic", index); saveMsg: {
}, Id: props.saveId,
//隐藏答题卡 ExamDetailsList: []
back() { }
ctx.emit("hideAnswer"); });
}, let methods = {
//交卷 chooseTopic(index) {
async savePaper() { ctx.emit("chooseTopic", index);
},
}, //隐藏答题卡
}; back() {
return { ctx.emit("hideAnswer");
...toRefs(data), },
...methods, //交卷
}; 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 {
...toRefs(data),
...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,
font-size: 28rpx; .num {
font-family: PingFang SC; font-size: 28rpx;
font-weight: 800; font-family: PingFang SC;
color: #111111; font-weight: 800;
} color: #111111;
.num { }
width: 100rpx;
text-align: center; .num {
} width: 100rpx;
.item { text-align: center;
margin-bottom: 20rpx; }
}
.item1-1 { .item {
width: 690rpx; margin-bottom: 20rpx;
margin: 22rpx 0 0 0; }
font-size: 26rpx;
font-family: PingFang SC; .item1-1 {
font-weight: 600; width: 690rpx;
color: #111111; margin: 22rpx 0 0 0;
} font-size: 26rpx;
.item1 { font-family: PingFang SC;
width: 55rpx; font-weight: 600;
height: 55rpx; color: #111111;
border: 1px solid #e2e2e2; }
border-radius: 50%;
margin: 22rpx; .item1 {
font-size: 26rpx; width: 55rpx;
font-family: PingFang SC; height: 55rpx;
font-weight: 600; border: 1px solid #e2e2e2;
color: #111111; border-radius: 50%;
display: flex; margin: 22rpx;
justify-content: center; font-size: 26rpx;
align-items: center; font-family: PingFang SC;
box-sizing: border-box; font-weight: 600;
} color: #111111;
.item2 { display: flex;
width: 44rpx; justify-content: center;
height: 44rpx; align-items: center;
border: 1px solid #e2e2e2; box-sizing: border-box;
border-radius: 50%; }
text-align: center;
line-height: 44rpx; .item2 {
margin-right: 55rpx; width: 44rpx;
font-size: 26rpx; height: 44rpx;
font-family: PingFang SC; border: 1px solid #e2e2e2;
font-weight: bold; border-radius: 50%;
color: #111111; text-align: center;
} line-height: 44rpx;
.choose { margin-right: 55rpx;
background-color: #00acf9 !important; font-size: 26rpx;
color: #ffffff !important; font-family: PingFang SC;
} font-weight: bold;
.submitBox { color: #111111;
width: 750rpx; }
height: 150rpx;
background-color: #e2e2e2; .choose {
position: fixed; background-color: #00acf9 !important;
left: 0; color: #ffffff !important;
bottom: 0; }
box-sizing: border-box;
padding-top: 40rpx; .submitBox {
} width: 750rpx;
.submit { height: 150rpx;
width: 600rpx; background-color: #e2e2e2;
height: 70rpx; position: fixed;
border-radius: 35rpx; left: 0;
display: flex; bottom: 0;
justify-content: center; box-sizing: border-box;
align-items: center; padding-top: 40rpx;
background-color: #00acf9; }
font-size: 28rpx;
font-family: PingFang SC; .submit {
font-weight: bold; width: 600rpx;
color: #fff; height: 70rpx;
margin: 0 auto; border-radius: 35rpx;
} display: flex;
.isRes { justify-content: center;
background-color: #00acf9 !important; align-items: center;
color: #ffffff !important; background-color: #00acf9;
border: none !important; 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> </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