Commit a8eec79b authored by zhengke's avatar zhengke

修改

parent 87b4acf9
......@@ -125,7 +125,8 @@
export default {
props: {
paperData: Array,
Count: Number
Count: Number,
Times: Number
},
setup(props, context) {
let {
......@@ -219,7 +220,8 @@
LevelType: data.dataList[data.current].LevelType,
Answer: data.dataList[data.current].QuestionAnswerList.toString(),
IsAnswer: 0,
IsWrong: 0
IsWrong: 0,
Times: props.Times
}
if (data.dataList[data.current].StudentAnswer.length > 0) {
msg.IsAnswer = 1;
......
......@@ -123,7 +123,8 @@
export default {
props: {
paperData: Array,
Count: Number
Count: Number,
Times: Number
},
setup(props, context) {
let {
......@@ -207,7 +208,8 @@
LevelType:data.dataList[data.current].LevelType,
Answer:data.dataList[data.current].Answer,
IsAnswer: 0,
IsWrong: 0
IsWrong: 0,
Times: props.Times
}
if(data.dataList[data.current].StudentAnswer.length>0){
msg.IsAnswer=1;
......
......@@ -75,7 +75,7 @@
getCurrentInstance,
watch,
computed,
onMounted,
onMounted
} from "vue";
import {
SetStudentPractice
......@@ -83,7 +83,8 @@
export default {
props: {
paperData: Array,
Count: Number
Count: Number,
Times: Number
},
setup(props, context) {
let {
......@@ -93,10 +94,9 @@
dataList: [],
current: 0, //默认从第几个开始-用于从快捷菜单点入
statusBarHeight: 0,
isDati: false
isDati: false,
});
let UserInfo = uni.getStorageSync('userInfo');
watch(() => [...props.paperData], (val) => {
data.dataList = [...data.dataList, ...val];
})
......@@ -108,9 +108,6 @@
uni.navigateBack();
},
onchange(e) {
// if(data.dataList[]){
// }
data.current = e.detail.current;
if(data.current+1==data.dataList.length){
console.log('翻页');
......@@ -139,7 +136,8 @@
AnswerParse: item1.AnswerParse,
LevelType:item1.LevelType,
IsAnswer: 0,
IsWrong: 0
IsWrong: 0,
Times: props.Times
}
if(item1.StudentAnswer.length>0){
msg.IsAnswer=1;
......
......@@ -201,22 +201,22 @@
</view>
</view>
<view class="Ques_CirContent" v-if="Object.keys(TypeObj).length>0">
<view class="Ques_Circle" @click="goExam(1,TypeObj.wordsStartId)">
<view class="Ques_Circle" @click="goExam(1,TypeObj.wordsStartId,TypeObj.wordsTimes)">
<view class="Ques_Top">单词</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_Circle" @click="goExam(2,TypeObj.grammarStartId,TypeObj.grammarTimes)">
<view class="Ques_Top">语法</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_Circle" @click="goExam(3,TypeObj.listeningStartId,TypeObj.listeningTimes)">
<view class="Ques_Top">听力</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_Circle" style="margin-right:0;" @click="goExam(4,TypeObj.readingStartId,TypeObj.readingTimes)">
<view class="Ques_Top">阅读</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="" />
......@@ -225,7 +225,7 @@
<view class="Janpa_Level">
<view class="Ques_Title">日语等级评测</view>
<view class="Ques_Join">
<view class="Ques_Inner" v-for="(sItem,sIndex) in JoinArr" v-if="sIndex!=JoinArr.length-1" :key="sIndex" @click="goJpGrade(sItem.Id)">
<view class="Ques_Inner" v-for="(sItem,sIndex) in JoinArr" v-if="getIsExist(sItem.Id)&&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>
......@@ -233,13 +233,15 @@
</view>
</view>
<view class="Janpa_Level" style="margin-top:20rpx;">
<view class="Ques_Title">日语真题演练</view>
<view class="JanpaTrueTi" style="margin:26rpx 0 20rpx 0" @click="goJpGrade(6)">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/trueTi.png" alt="" />
<view class="Join_Content">
<view v-if="JoinArr&&JoinArr.length>0">{{JoinArr[5].JoinNum}}人参与</view>
<template v-if="getIsExist(6)">
<view class="Ques_Title">日语真题演练</view>
<view class="JanpaTrueTi" style="margin:26rpx 0 20rpx 0" @click="goJpGrade(6)">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/trueTi.png" alt="" />
<view class="Join_Content">
<view v-if="JoinArr&&JoinArr.length>0">{{JoinArr[5].JoinNum}}人参与</view>
</view>
</view>
</view>
</template>
<view class="Ques_Title">日语错题</view>
<view class="JanpaTrueTi" style="margin:26rpx 0 20rpx 0" @click="goWrong()">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/wrong.png" alt="" />
......@@ -283,9 +285,9 @@
msg: {},
showPop: false,
LevelData: [],
comNum:'N3',
comNum:'',
TypeMsg:{
BankType:3,
BankType:'',
StudentId:1
},
TypeObj:{},
......@@ -297,18 +299,41 @@
let res = await GetBankTypeList({});
if (res) {
if (res.Code == 1) {
this.LevelData = res.Data;
let UserInfo = uni.getStorageSync('indexData');
let tempData = res.Data;
this.LevelData=[];
if(tempData&&tempData.length>0&&UserInfo.BankTypeList&&UserInfo.BankTypeList.length>0){
tempData.forEach(x=>{
UserInfo.BankTypeList.forEach(y=>{
if(x.Id==y){
this.LevelData.push(x);
}
})
})
}
if(this.LevelData.length>0){
this.comNum = this.LevelData[0].Name;
this.TypeMsg.BankType = this.LevelData[0].Id;
this.getLevelTotal();
}
}
}
},
//判断是否存在
getIsExist(Id){
for(let i=0;i<data.LevelData.length;i++){
if(Id==data.LevelData[i].Id){
return true;
}
}
},
//返回首页
goExam(Type,startId) {
goExam(Type,startId,Times) {
uni.navigateTo({
url: '/pages/exam/examStart?Type='+Type+'&&BankType='+data.TypeMsg.BankType+'&&StartId='+startId
url: '/pages/exam/examStart?Type='+Type+'&&BankType='+data.TypeMsg.BankType+'&&StartId='+startId+'&&Times='+Times
});
},
showExambox() {
console.log('1111');
data.showPop = true;
},
onClose() {
......@@ -322,11 +347,12 @@
this.getLevelTotal();
},
//获取等级切换数据
async getLevelTotal(){
let res = await GetAppQuestionStatic(data.TypeMsg);
if (res) {
data.TypeObj = res.Data;
}
getLevelTotal(){
GetAppQuestionStatic(data.TypeMsg).then(res=>{
if(res){
data.TypeObj = res.Data;
}
});
},
//获取评测人数
GetPincePeople(){
......@@ -363,7 +389,7 @@
async onShow(){
let UserInfo = uni.getStorageSync('userInfo');
this.TypeMsg.StudentId = UserInfo.AccountId;
await this.getLevelTotal();
this.getLevelTotal();
this.GetPincePeople();
}
};
......
......@@ -176,7 +176,7 @@
<view class="Grade_Score">
{{item.MyUseTime?item.MyUseTime:'-'}}
</view>
<view class="Grade_Name">我的课耗</view>
<view class="Grade_Name">我的耗时</view>
</view>
<view>
<view class="Grade_Score">
......
......@@ -10,11 +10,11 @@
</van-nav-bar>
<view class="exam-con">
<!-- 单词 语法-->
<word :paperData="dataList" v-if="Type==1||Type==2" :Count="Count" @getAfter="getAfter()" />
<word :paperData="dataList" v-if="Type==1||Type==2" :Count="Count" :Times="Times" @getAfter="getAfter()" />
<!-- 听力 -->
<listen :paperData="dataList" v-if="Type==3" :Count="Count" @getAfter="getAfter()" />
<listen :paperData="dataList" v-if="Type==3" :Count="Count" :Times="Times" @getAfter="getAfter()" />
<!-- 阅读理解 -->
<readingCompre :paperData="dataList" v-if="Type==4" :Count="Count" @getAfter="getAfter()" />
<readingCompre :paperData="dataList" v-if="Type==4" :Count="Count" :Times="Times" @getAfter="getAfter()" />
</view>
</view>
</template>
......@@ -28,7 +28,7 @@
getCurrentInstance,
watch,
computed,
onMounted,
onMounted
} from "vue";
import {
submitPaper,
......@@ -65,7 +65,8 @@
},
Count: 0, //题目总数
Type: 1, //1单词 2语法 3听力 4阅读
});
Times: 0
});
let methods = {
//返回
goBack() {
......@@ -149,7 +150,7 @@
...methods,
};
},
async onLoad(options) {
onLoad(options) {
console.log(options, 'options');
if (options && options.Type) {
this.Type = options.Type;
......@@ -160,6 +161,9 @@
if (options && options.StartId) {
this.examMsg.StartId = options.StartId;
}
if (options && options.Times){
this.Times = options.Times;
}
//获取单词
if (this.Type == 1) {
this.GetWords();
......
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