@ -3,16 +3,16 @@
<!-- < u -navbar title = "本次练题结果" @rightClick ="rightClick" :autoBack ="true" > < / u - n a v b a r > - - >
<!-- < u -navbar title = "本次练题结果" @rightClick ="rightClick" :autoBack ="true" > < / u - n a v b a r > - - >
< j -navbar backPath = "/pages/index/index" > 本次练题结果 < / j - n a v b a r >
< j -navbar backPath = "/pages/index/index" > 本次练题结果 < / j - n a v b a r >
< view class = "p14 wp100" >
< view class = "p14 wp100" >
< GradesChart / >
< GradesChart :titleName ="rightPencentDesc" :actualValue ="Number(rightPencent)" / >
< view class = "top_box flex jc-c" style = "flex-direction: column;" >
< view class = "top_box flex jc-c" style = "flex-direction: column;" >
< view class = "wp100 text-center" >
< view class = "wp100 text-center" >
< text > 太棒了 ! 正确率很高了 ! < / text >
< text > 太棒了 ! 正确率很高了 ! < / text >
< view class = "flex ai-c jc-c mt10" >
< view class = "flex ai-c jc-c mt10" >
< view class = "text-center wp50" >
< view class = "text-center wp50" @tap ="toQuestionBank" >
< view > 1 / 3 < / view >
< view > { { wrongList . length } } / { { allDoNum } } < / view >
< text > 本次错题 < / text >
< text > 本次错题 < / text >
< / view >
< / 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 - i c o n >
< u -icon name = "file-text" size = "28" > < / u - i c o n >
< text > 继续做题 < / text >
< text > 继续做题 < / text >
< / view >
< / view >
@ -27,10 +27,10 @@
< text class = "fs18 cor-000 fw600" > 累计练题 < / text >
< text class = "fs18 cor-000 fw600" > 累计练题 < / text >
< text class = "fs14 cor-666 ml10" > 33 题 < / text >
< text class = "fs14 cor-666 ml10" > 33 题 < / text >
< / view >
< / view >
< text class = "fs14 cor-666" > 未做题2311 题 < / text >
< text class = "fs14 cor-666" > 未做题 { { getNotDoNum } } 题 < / text >
< / view >
< / view >
< view class = "mt10" >
< view class = "mt10" >
< u -line -progress :percentage ="20 " activeColor = "#05C341" height = "16" > < / u - l i n e - p r o g r e s s >
< u -line -progress :percentage ="percent " activeColor = "#05C341" height = "16" > < / u - l i n e - p r o g r e s s >
< / view >
< / view >
< view class = "p14 mt10 flex ai-c jc-sb" style = "border-radius: 20rpx;background-color: rgb(253,249,238);" >
< view class = "p14 mt10 flex ai-c jc-sb" style = "border-radius: 20rpx;background-color: rgb(253,249,238);" >
< view >
< view >
@ -47,6 +47,12 @@
< / template >
< / template >
< script >
< script >
import {
mapState ,
mapActions
} from 'pinia' / / 引 入 映 射 函 数
import storage from '@/jtools/storage' ;
import useQuestionStore from '@/jtools/store/question' / / 引 入 s t o r e
import GradesChart from "./components/GradesChart.vue"
import GradesChart from "./components/GradesChart.vue"
export default {
export default {
components : {
components : {
@ -54,11 +60,54 @@
} ,
} ,
data ( ) {
data ( ) {
return {
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" ] ) , / / 映 射 函 数 , 取 出 t a g s l i s t
getNotDoNum ( ) {
return this . orderQuestion . length - ( this . allRightList . length + this . allWrongList . length )
}
}
} ,
} ,
methods : {
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 >
< / script >