Commit 97cc6d7b authored by zhengke's avatar zhengke

1

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