提交
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
<!-- <u-navbar title="本次练题结果" @rightClick="rightClick" :autoBack="true"></u-navbar>-->
|
||||
<j-navbar backPath="/pages/index/index">本次练题结果</j-navbar>
|
||||
<view class="p14 wp100">
|
||||
<GradesChart />
|
||||
<GradesChart :titleName="rightPencentDesc" :actualValue="Number(rightPencent)" />
|
||||
<view class="top_box flex jc-c" style="flex-direction: column;">
|
||||
<view class="wp100 text-center" >
|
||||
<text>太棒了!正确率很高了!</text>
|
||||
<view class="flex ai-c jc-c mt10">
|
||||
<view class="text-center wp50">
|
||||
<view>1/3</view>
|
||||
<view class="text-center wp50" @tap="toQuestionBank">
|
||||
<view>{{wrongList.length}}/{{allDoNum}}</view>
|
||||
<text>本次错题</text>
|
||||
</view>
|
||||
<view class="text-center wp50 flex jc-c ai-c" style="flex-direction: column;">
|
||||
<view class="text-center wp50 flex jc-c ai-c" style="flex-direction: column;" @tap="toContiune">
|
||||
<u-icon name="file-text" size="28"></u-icon>
|
||||
<text>继续做题</text>
|
||||
</view>
|
||||
@@ -27,10 +27,10 @@
|
||||
<text class="fs18 cor-000 fw600">累计练题</text>
|
||||
<text class="fs14 cor-666 ml10">33题</text>
|
||||
</view>
|
||||
<text class="fs14 cor-666">未做题2311题</text>
|
||||
<text class="fs14 cor-666">未做题{{getNotDoNum}}题</text>
|
||||
</view>
|
||||
<view class="mt10">
|
||||
<u-line-progress :percentage="20" activeColor="#05C341" height="16"></u-line-progress>
|
||||
<u-line-progress :percentage="percent" activeColor="#05C341" height="16"></u-line-progress>
|
||||
</view>
|
||||
<view class="p14 mt10 flex ai-c jc-sb" style="border-radius: 20rpx;background-color: rgb(253,249,238);">
|
||||
<view>
|
||||
@@ -47,6 +47,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapActions
|
||||
} from 'pinia' //引入映射函数
|
||||
import storage from '@/jtools/storage';
|
||||
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||
import GradesChart from "./components/GradesChart.vue"
|
||||
export default {
|
||||
components: {
|
||||
@@ -54,11 +60,54 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
rightPencent:0,
|
||||
rightPencentDesc:'',
|
||||
allDoNum:0,
|
||||
wrongList:[],
|
||||
subject:1,
|
||||
allRightList:[],
|
||||
allWrongList:[],
|
||||
percent:undefined,
|
||||
navTitle:'顺序练习',
|
||||
}
|
||||
},
|
||||
onLoad(op){
|
||||
if(op.allDoNum){
|
||||
this.allDoNum=op.allDoNum
|
||||
}
|
||||
if(op.navTitle){
|
||||
this.navTitle=op.navTitle
|
||||
}
|
||||
if(op.wrongList){
|
||||
this.wrongList=JSON.parse(op.wrongList)
|
||||
this.rightPencent=((this.allDoNum-this.wrongList.length)/this.allDoNum).toFixed(2)
|
||||
this.rightPencentDesc=(this.rightPencent*100).toFixed(0)+'%'
|
||||
}
|
||||
if(op.subject){
|
||||
this.subject=op.subject
|
||||
this.allRightList=storage.get(`rightList_subject${this.subject}`) || []
|
||||
this.allWrongList=storage.get(`wrongList_subject${this.subject}`) || []
|
||||
this.percent=(((this.allRightList.length+this.wrongList.length) / this.orderQuestion.length)*100).toFixed(0)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(useQuestionStore, ["orderQuestion"]), //映射函数,取出tagslist
|
||||
getNotDoNum(){
|
||||
return this.orderQuestion.length-(this.allRightList.length+this.allWrongList.length)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
toQuestionBank(){
|
||||
const list =JSON.stringify(this.wrongList)
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle=错题&subject="+this.subject+"&questionList="+list
|
||||
})
|
||||
},
|
||||
toContiune(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+this.navTitle+"&subject="+this.subject
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user