Commit 4f23c371 authored by zhengke's avatar zhengke

修改

parent 8c5c65a1
......@@ -191,4 +191,16 @@ export function SetStudentExam(data) {
method: 'post',
data
})
}
/**
* 获取评测人数
* @param {JSON参数} data
*/
export function GetAppBankStatic(data) {
return request({
url: '/Exam/GetAppBankStatic',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -16,7 +16,7 @@
poster="http://pic.pimg.tw/pam86591/1408719752-3322564110_n.jpg" :src="item1.Src" name="日语听力"
:action="audioAction" controls></audio>
<view class="item1" :style="{ height: `calc(100vh - 460rpx)` }">
<template v-if="item1.StundetAnswer.length<item1.QuestionContentObj.length">
<template v-if="item1.StudentAnswer.length<item1.QuestionContentObj.length">
<view class="questionView">
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2" class="item2">
<view class="flex questionTitle">
......@@ -28,11 +28,11 @@
<view class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'single'">
<view class="chooseNum"
:class="{ 'myAnswer': item1.StundetAnswer[index2]==item3.Name }"
:class="{ 'myAnswer': item1.StudentAnswer[index2]==item3.Name }"
@click="singerChange(item1, index2, item3)">{{ item3.Name }}
</view>
<view class="chooseName"
:class="{ 'myAnswer': item1.StundetAnswer[index2]==item3.Name }"
:class="{ 'myAnswer': item1.StudentAnswer[index2]==item3.Name }"
@click="singerChange(item1, index2, item3)" v-html="item3.Content">
</view>
</view>
......@@ -66,14 +66,14 @@
<text class="isTrueAnswer">{{item1.QuestionAnswerList[index2]}}</text>
<text>
您的答案:
<template v-if="item1.StundetAnswer.length>0">
<template v-if="item1.StudentAnswer.length>0">
<text
v-if="item1.StundetAnswer[index2] == item1.QuestionAnswerList[index2]"
v-if="item1.StudentAnswer[index2] == item1.QuestionAnswerList[index2]"
class="isTrueAnswer">
{{ item1.StundetAnswer[index2] }},回答正确
{{ item1.StudentAnswer[index2] }},回答正确
</text>
<text v-else class="isNotAnswer">
{{ item1.StundetAnswer[index2] }},回答错误
{{ item1.StudentAnswer[index2] }},回答错误
</text>
</template>
<template v-else>
......@@ -93,7 +93,7 @@
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="current!=0">上一题</view>
<view class="AnswerBtnSecond" :class="{'isCanNext':item1.StundetAnswer.length==0}" v-if="current!=dataList.length"
<view class="AnswerBtnSecond" :class="{'isCanNext':item1.StudentAnswer.length==0}" v-if="current!=dataList.length"
@click="getNextExam(item1)">下一题</view>
</view>
</swiper-item>
......@@ -162,10 +162,10 @@
//----------------------------------------选题----------------------------------
// 单选
singerChange(item1, index, item3) {
item1.StundetAnswer[index] = item3.Name;
item1.StudentAnswer[index] = item3.Name;
},
getErrorAnswer(item1, index, name) {
if (item1.StundetAnswer[index] == name) {
if (item1.StudentAnswer[index] == name) {
return true
} else {
return false
......@@ -184,7 +184,7 @@
},
//点击下一题
getNextExam(item) {
if (item.StundetAnswer.length>0) {
if (item.StudentAnswer.length>0) {
data.isShow = false
let msg = {
Id: 0,
......@@ -195,21 +195,21 @@
QuestionContent: data.dataList[data.current].QuestionContentObj,
QuestionTypeId: data.dataList[data.current].QuestionTypeId,
QuestionTypeKey: data.dataList[data.current].QuestionTypeKey,
StudentAnswer: data.dataList[data.current].StundetAnswer,
StudentAnswer: data.dataList[data.current].StudentAnswer,
AnswerParse: data.dataList[data.current].AnswerParse,
LevelType: data.dataList[data.current].LevelType,
Answer: data.dataList[data.current].QuestionAnswerList.toString(),
IsAnswer: 0,
IsWrong: 0
}
if (data.dataList[data.current].StundetAnswer.length > 0) {
if (data.dataList[data.current].StudentAnswer.length > 0) {
msg.IsAnswer = 1;
} else {
msg.IsAnswer = 0;
}
if (data.dataList[data.current].StundetAnswer.length == data.dataList[data.current]
if (data.dataList[data.current].StudentAnswer.length == data.dataList[data.current]
.QuestionAnswerList.length) {
if (data.dataList[data.current].StundetAnswer.toString() == data.dataList[data.current]
if (data.dataList[data.current].StudentAnswer.toString() == data.dataList[data.current]
.QuestionAnswerList.toString()) {
msg.IsWrong = 0
} else {
......
......@@ -20,7 +20,7 @@
style="overflow-y: auto;">
<view style="margin:30rpx;" class="Exam_Score">本阅读理解共{{item1.QuestionContentObj.length}}小题
</view>
<template v-if="item1.StundetAnswer.length<item1.QuestionContentObj.length">
<template v-if="item1.StudentAnswer.length<item1.QuestionContentObj.length">
<view class="questionView">
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2"
class="item2">
......@@ -32,7 +32,7 @@
<!-- 单选 -->
<view class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'single' || item2.QuestionKey === 'single-number'">
<view class="chooseNum" :class="{ myAnswer: item1.StundetAnswer[index2]==item3.Name }"
<view class="chooseNum" :class="{ myAnswer: item1.StudentAnswer[index2]==item3.Name }"
@click="singerChange(item1,index2,item3)">{{ item3.Name }}
</view>
<view class="chooseName" @click="singerChange(item1,index2,item3)"
......@@ -69,14 +69,14 @@
<text
class="isTrueAnswer">{{item1.QuestionAnswerList[index2]}}</text>
<text>您的答案:
<template v-if="item1.StundetAnswer.length>0">
<template v-if="item1.StudentAnswer.length>0">
<text
v-if="item1.QuestionAnswerList[index2] == item1.StundetAnswer[index2]"
v-if="item1.QuestionAnswerList[index2] == item1.StudentAnswer[index2]"
class="isTrueAnswer">
{{ item1.StundetAnswer[index2] }},回答正确
{{ item1.StudentAnswer[index2] }},回答正确
</text>
<text v-else
class="isNotAnswer">{{item1.StundetAnswer[index2]}},回答错误</text>
class="isNotAnswer">{{item1.StudentAnswer[index2]}},回答错误</text>
</template>
<template v-else>
<text class="isNotAnswer">未作答</text>
......@@ -152,7 +152,7 @@
uni.navigateBack();
},
getErrorAnswer(item1,index,name){
if (item1.StundetAnswer[index] ==name) {
if (item1.StudentAnswer[index] ==name) {
return true
}else{
return false
......@@ -161,9 +161,9 @@
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange(item1,index,item3) {
item1.StundetAnswer[index] = item3.Name;
item1.StudentAnswer[index] = item3.Name;
//判断题数已经全做
if(item1.StundetAnswer.length==item1.QuestionContentObj.length){
if(item1.StudentAnswer.length==item1.QuestionContentObj.length){
data.isCanNext=true;
}
},
......@@ -189,20 +189,20 @@
QuestionContent: data.dataList[data.current].QuestionContentObj,
QuestionTypeId: data.dataList[data.current].QuestionTypeId,
QuestionTypeKey: data.dataList[data.current].QuestionTypeKey,
StudentAnswer: data.dataList[data.current].StundetAnswer,
StudentAnswer: data.dataList[data.current].StudentAnswer,
AnswerParse: data.dataList[data.current].AnswerParse,
LevelType:data.dataList[data.current].LevelType,
Answer:data.dataList[data.current].Answer,
IsAnswer: 0,
IsWrong: 0
}
if(data.dataList[data.current].StundetAnswer.length>0){
if(data.dataList[data.current].StudentAnswer.length>0){
msg.IsAnswer=1;
}else{
msg.IsAnswer=0;
}
if(data.dataList[data.current].StundetAnswer.length==data.dataList[data.current].QuestionAnswerList.length){
if(data.dataList[data.current].StundetAnswer.toString()==data.dataList[data.current].QuestionAnswerList.toString()){
if(data.dataList[data.current].StudentAnswer.length==data.dataList[data.current].QuestionAnswerList.length){
if(data.dataList[data.current].StudentAnswer.toString()==data.dataList[data.current].QuestionAnswerList.toString()){
msg.IsWrong = 0
}else{
msg.IsWrong = 1
......
......@@ -17,7 +17,7 @@
<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)">
<view class="item1" :class="{ isRes: item.StudentAnswer.length>0 }" @click="chooseTopic(index)">
{{ index + 1 }}</view>
</view>
</view>
......@@ -81,14 +81,14 @@
AnswerParse: x.AnswerParse,
IsAnswer: 0,
IsWrong: 1,
StundetAnswer:x.StundetAnswer,
StudentAnswer:x.StudentAnswer,
Score:x.Score
}
if(obj.StundetAnswer.length>0){
if(obj.StudentAnswer.length>0){
obj.IsAnswer=1;
}
if(obj.StundetAnswer.length>0){
if(obj.StundetAnswer.toString()==obj.Answer){
if(obj.StudentAnswer.length>0){
if(obj.StudentAnswer.toString()==obj.Answer){
obj.IsWrong = 0
}else{
obj.IsWrong = 1
......
......@@ -18,11 +18,11 @@
<!-- 单选 、判断-->
<view class="flex flex_start_center item3" v-if="item.QuestionKey === 'single'">
<view class="chooseNum"
:class="{ 'myAnswer': dataObj.StundetAnswer[index]==item2.Name }"
:class="{ 'myAnswer': dataObj.StudentAnswer[index]==item2.Name }"
@click="singerChange(dataObj, index, item2)">{{ item2.Name }}
</view>
<view class="chooseName"
:class="{ 'myAnswer': item1.StundetAnswer[index2]==item2.Name }"
:class="{ 'myAnswer': item1.StudentAnswer[index2]==item2.Name }"
@click="singerChange(dataObj, index, item2)" v-html="item2.Content">
</view>
</view>
......@@ -54,13 +54,13 @@
<text class="isTrueAnswer">{{dataObj.QuestionAnswerList[index]}}</text>
<text>
您的答案:
<template v-if="dataObj.StundetAnswer.length>0">
<text v-if="dataObj.StundetAnswer[index] == dataObj.QuestionAnswerList[index]"
<template v-if="dataObj.StudentAnswer.length>0">
<text v-if="dataObj.StudentAnswer[index] == dataObj.QuestionAnswerList[index]"
class="isTrueAnswer">
{{ dataObj.StundetAnswer[index] }},回答正确
{{ dataObj.StudentAnswer[index] }},回答正确
</text>
<text v-else class="isNotAnswer">
{{ dataObj.StundetAnswer[index] }},回答错误
{{ dataObj.StudentAnswer[index] }},回答错误
</text>
</template>
<template v-else>
......@@ -114,11 +114,11 @@
let methods = {
// 单选
singerChange(item1, index, item3) {
item1.StundetAnswer[index] = item3.Name;
item1.StudentAnswer[index] = item3.Name;
context.emit("answerChange", data.dataObj);
},
getErrorAnswer(item1, index, name) {
if (item1.StundetAnswer[index] == name) {
if (item1.StudentAnswer[index] == name) {
return true
} else {
return false
......
......@@ -22,7 +22,7 @@
<!-- 单选 -->
<view class="flex flex_start_center item3"
v-if="item.QuestionKey === 'single' || item.QuestionKey === 'single-number'">
<view class="chooseNum" :class="{ myAnswer: dataObj.StundetAnswer[index]==item2.Name }"
<view class="chooseNum" :class="{ myAnswer: dataObj.StudentAnswer[index]==item2.Name }"
@click="singerChange(dataObj,index,item2)">{{ item2.Name }}
</view>
<view class="chooseName" @click="singerChange(dataObj,index,item2)"
......@@ -58,14 +58,14 @@
<text
class="isTrueAnswer">{{dataObj.QuestionAnswerList[index2]}}</text>
<text>您的答案:
<template v-if="dataObj.StundetAnswer.length>0">
<template v-if="dataObj.StudentAnswer.length>0">
<text
v-if="dataObj.QuestionAnswerList[index2] == dataObj.StundetAnswer[index2]"
v-if="dataObj.QuestionAnswerList[index2] == dataObj.StudentAnswer[index2]"
class="isTrueAnswer">
{{ dataObj.StundetAnswer[index2] }},回答正确
{{ dataObj.StudentAnswer[index2] }},回答正确
</text>
<text v-else
class="isNotAnswer">{{dataObj.StundetAnswer[index2]}},回答错误</text>
class="isNotAnswer">{{dataObj.StudentAnswer[index2]}},回答错误</text>
</template>
<template v-else>
<text class="isNotAnswer">未作答</text>
......@@ -114,7 +114,7 @@
});
let methods = {
getErrorAnswer(item1,index,name){
if (item1.StundetAnswer[index] ==name) {
if (item1.StudentAnswer[index] ==name) {
return true
}else{
return false
......@@ -123,7 +123,7 @@
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange(item1,index,item3) {
item1.StundetAnswer[index] = item3.Name;
item1.StudentAnswer[index] = item3.Name;
context.emit("answerChange", data.dataObj);
}
};
......
......@@ -9,7 +9,7 @@
</view>
<view v-for="(item2, index2) in dataObj.QuestionContentObj" :key="index2"
class="flex item2 flex_start_center">
<view class="chooseNum" :class="{ 'isMyChoose': item2.ShowName==dataObj.StundetAnswer[0]}"
<view class="chooseNum" :class="{ 'isMyChoose': item2.ShowName==dataObj.StudentAnswer[0]}"
@click="change(dataObj, item2)">{{ item2.ShowName }}
</view>
<view class="chooseName" @click="change(dataObj, item2)" v-html="item2.Content"></view>
......@@ -19,12 +19,12 @@
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ dataObj.QuestionAnswerList[0] }}</text>
<text>您的答案是:
<template v-if="dataObj.StundetAnswer.length>0">
<text v-if="dataObj.StundetAnswer[0] == dataObj.QuestionAnswerList[0]"
<template v-if="dataObj.StudentAnswer.length>0">
<text v-if="dataObj.StudentAnswer[0] == dataObj.QuestionAnswerList[0]"
class="isTrueAnswer">
{{ dataObj.StundetAnswer }},回答正确
{{ dataObj.StudentAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">{{ dataObj.StundetAnswer[0] }},回答错误</text>
<text v-else class="isNotAnswer">{{ dataObj.StudentAnswer[0] }},回答错误</text>
</template>
<template v-else>
<text>未作答</text>
......@@ -70,7 +70,7 @@
let UserInfo = uni.getStorageSync('userInfo');
let methods = {
change(item1,item2){
item1.StundetAnswer[0] = item2.Name;
item1.StudentAnswer[0] = item2.Name;
context.emit("answerChange", data.dataObj);
}
};
......
......@@ -200,55 +200,35 @@
</view>
</view>
<view class="Ques_CirContent" v-if="TypeObj">
<view class="Ques_CirContent" v-if="Object.keys(TypeObj).length>0">
<view class="Ques_Circle" @click="goExam(1,TypeObj.wordsStartId)">
<view class="Ques_Top">单词</view>
<view class="Ques_Num" v-if="TypeObj">{{TypeObj.wordsFinishCount}}/{{TypeObj.wordsTotalCount}}</view>
<view class="Ques_Num">{{TypeObj.wordsFinishCount}}/{{TypeObj.wordsTotalCount}}</view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word1.png" alt="" />
</view>
<view class="Ques_Circle" @click="goExam(2,TypeObj.grammarStartId)">
<view class="Ques_Top">语法</view>
<view class="Ques_Num" v-if="TypeObj">{{TypeObj.grammarFinishCount}}/{{TypeObj.grammarTotalCount}}</view>
<view class="Ques_Num">{{TypeObj.grammarFinishCount}}/{{TypeObj.grammarTotalCount}}</view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word2.png" alt="" />
</view>
<view class="Ques_Circle" @click="goExam(3,TypeObj.listeningStartId)">
<view class="Ques_Top">听力</view>
<view class="Ques_Num" v-if="TypeObj">{{TypeObj.listeningFinishCount}}/{{TypeObj.listeningTotalCount}}</view>
<view class="Ques_Num">{{TypeObj.listeningFinishCount}}/{{TypeObj.listeningTotalCount}}</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;" @click="goExam(4,TypeObj.readingStartId)">
<view class="Ques_Top">阅读</view>
<view class="Ques_Num" v-if="TypeObj">{{TypeObj.readingFinishCount}}/{{TypeObj.readingTotalCount}}</view>
<view class="Ques_Num">{{TypeObj.readingFinishCount}}/{{TypeObj.readingTotalCount}}</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(5)">
<text class="Ques_level">N5</text>
<text class="Ques_Big">N5</text>
<text class="Ques_Jnber">206人参与</text>
</view>
<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" @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" @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" @click="goJpGrade(1)">
<text class="Ques_level">N1</text>
<text class="Ques_Big">N1</text>
<view class="Ques_Jnber">206人参与</view>
<view class="Ques_Inner" v-for="(sItem,sIndex) in JoinArr" v-if="sIndex!=JoinArr.length-1" :key="sIndex" @click="goJpGrade(sItem.Id)">
<text class="Ques_level">{{sItem.Name}}</text>
<text class="Ques_Big">{{sItem.Name}}</text>
<text class="Ques_Jnber">{{sItem.JoinNum}}人参与</text>
</view>
</view>
</view>
......@@ -258,7 +238,7 @@
<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 v-if="JoinArr&&JoinArr.length>0">{{JoinArr[5].JoinNum}}人参与</view>
</view>
</view>
</view>
......@@ -292,7 +272,7 @@
computed,
onMounted,
} from "vue";
import { GetBankTypeList,GetAppQuestionStatic } from "../../api/exam";
import { GetBankTypeList,GetAppQuestionStatic,GetAppBankStatic } from "../../api/exam";
export default {
props: {},
setup(props, ctx) {
......@@ -305,7 +285,8 @@
BankType:3,
StudentId:1
},
TypeObj:{}
TypeObj:{},
JoinArr:[] //测评数据
});
let methods = {
//获取等级
......@@ -344,6 +325,14 @@
data.TypeObj = res.Data;
}
},
//获取评测人数
GetPincePeople(){
GetAppBankStatic({}).then(res=>{
if(res.Code==1){
data.JoinArr = res.Data;
}
})
},
//跳转到日语等级评测列表
goJpGrade(Type){
uni.navigateTo({
......@@ -366,6 +355,7 @@
let UserInfo = uni.getStorageSync('userInfo');
this.TypeMsg.StudentId = UserInfo.AccountId;
await this.getLevelTotal();
this.GetPincePeople();
}
};
</script>
......
......@@ -67,7 +67,8 @@
msg: {
pageIndex: 1,
pageSize: 1000,
BankId: 0
BankId: 0,
StudentId:0
},
startMsg: {
Id:0,
......@@ -92,6 +93,7 @@
}
},
getList() {
data.msg.StudentId = UserInfo.AccountId;
GetAppBankDetails(data.msg).then(res => {
if (res) {
if (res.Code == 1) {
......@@ -156,8 +158,17 @@
this.msg.BankId = options.BankId;
this.startMsg.BankId = options.BankId;
}
if (options && options.Type){
// 1开始考试 2产看解析
if(options.Type==1){
this.getStart();
this.isShowJx=false;
}
if(options.Type==2){
this.isShowJx=true;
}
}
this.getList();
this.getStart();
}
};
</script>
......
......@@ -190,8 +190,8 @@
</view>
</view>
<view>
<view class="Grade_Gonggu" @click="getDetail(item.BankId)">巩固练习</view>
<view class="Grade_jiexi">查看解析</view>
<view class="Grade_Gonggu" @click="getDetail(item.BankId,1)">巩固练习</view>
<view class="Grade_jiexi" @click="getDetail(item.BankId,2)">查看解析</view>
</view>
</view>
</view>
......@@ -264,9 +264,10 @@
}
}
},
getDetail(BankId){
getDetail(BankId,Type){
// Type 1考试 2 查看解析
uni.navigateTo({
url: "/pages/exam/examGongu?BankId="+BankId,
url: "/pages/exam/examGongu?BankId="+BankId+'&&Type='+Type
});
}
};
......
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