|
@@ -43,23 +43,8 @@
|
|
|
<view class="btn" v-if="record.status == 1">解析</view>
|
|
|
</navigator>
|
|
|
<navigator hover-class="none" :url="'/pages2/bank/question_report?goodsId='+record.goodsId+'&chapterId='+record.chapterExamId+'&moduleId='+record.moduleExamId+'&examId='+record.examId+'&id=' + record.recordId"><view class="btn" v-if="record.status == 1">报告</view></navigator>
|
|
|
- <navigator
|
|
|
- :url="
|
|
|
- '/pages2/bank/questionBankContinue?recordId=' +
|
|
|
- record.recordId +
|
|
|
- '&id=' +
|
|
|
- record.examId +
|
|
|
- '&goodsid=' +
|
|
|
- record.goodsId +
|
|
|
- '&moduleId=' +
|
|
|
- record.moduleExamId +
|
|
|
- '&chapterId=' +
|
|
|
- record.chapterExamId +
|
|
|
- ''
|
|
|
- "
|
|
|
- >
|
|
|
- <view class="btn continue" v-if="record.status == 0 && record.historyExamJson">继续答题</view>
|
|
|
- </navigator>
|
|
|
+
|
|
|
+ <view class="btn continue" @click="doContinue(record,index)" v-if="record.status == 0 && record.historyExamJson">继续答题</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -101,6 +86,7 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
},
|
|
|
+ isRepeat:false,
|
|
|
total: 0,
|
|
|
activeIndex: 0,
|
|
|
typeIndex:0,
|
|
@@ -130,17 +116,32 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
- if(this.itemIndex !== '') {
|
|
|
- this.refreshByIndex();
|
|
|
+ if(this.isRepeat) {
|
|
|
+ this.addRecord();
|
|
|
+ } else {
|
|
|
+ if(this.itemIndex !== '') {
|
|
|
+ this.refreshByIndex();
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
+ addRecord() {
|
|
|
+ this.$api.examRecordList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1
|
|
|
+ }).then(res => {
|
|
|
+ this.recordList.unshift(res.data.rows[0])
|
|
|
+ });
|
|
|
+ this.isRepeat = false;
|
|
|
+ },
|
|
|
refreshByIndex() {
|
|
|
this.$api.examRecordList({
|
|
|
pageNum: this.itemIndex+1,
|
|
|
pageSize: 1
|
|
|
}).then(res => {
|
|
|
this.$set(this.recordList,this.itemIndex,res.data.rows[0])
|
|
|
+ this.itemIndex = ''
|
|
|
});
|
|
|
},
|
|
|
getExamRecordList() {
|
|
@@ -152,12 +153,32 @@ export default {
|
|
|
this.total = res.data.total;
|
|
|
});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 继续做题
|
|
|
+ */
|
|
|
+ doContinue(record,index) {
|
|
|
+ this.itemIndex = index;
|
|
|
+ this.isRepeat = false;
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages2/bank/questionBankContinue?recordId=' +
|
|
|
+ record.recordId +
|
|
|
+ '&id=' +
|
|
|
+ record.examId +
|
|
|
+ '&goodsid=' +
|
|
|
+ record.goodsId +
|
|
|
+ '&moduleId=' +
|
|
|
+ record.moduleExamId +
|
|
|
+ '&chapterId=' +
|
|
|
+ record.chapterExamId
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* 去做题
|
|
|
*/
|
|
|
async doRepeat(id, goodsId, moduleId = 0, chapterId = 0,index) {
|
|
|
// await this.getDetail(goodsId);
|
|
|
- this.itemIndex = index;
|
|
|
+ this.itemIndex = '';
|
|
|
+ this.isRepeat = true;
|
|
|
let count = await this.examRecordCount(id,goodsId);
|
|
|
let answerNum = await this.getExamDetail(id);
|
|
|
//超过答题次数
|
|
@@ -292,22 +313,21 @@ page {
|
|
|
.record {
|
|
|
margin-top: 80rpx;
|
|
|
padding: 16rpx 8rpx;
|
|
|
- -moz-column-count: 2; /* Firefox */
|
|
|
- -webkit-column-count: 2; /* Safari 和 Chrome */
|
|
|
- column-count: 2;
|
|
|
- -moz-column-gap: 16rpx;
|
|
|
- -webkit-column-gap: 16rpx;
|
|
|
- column-gap: 16rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
.item {
|
|
|
margin-bottom: 16rpx;
|
|
|
- -moz-page-break-inside: avoid;
|
|
|
- -webkit-column-break-inside: avoid;
|
|
|
- break-inside: avoid;
|
|
|
+ width:359rpx;
|
|
|
background: #ffffff;
|
|
|
border-radius: 16rpx;
|
|
|
padding: 65rpx 20rpx 22rpx;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
+
|
|
|
+ &:nth-of-type(2n) {
|
|
|
+ margin-left:16rpx;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
.note {
|
|
|
color: #fff;
|