Commit a8eec79b authored by zhengke's avatar zhengke

修改

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