Commit 0abf3f4e authored by Facius's avatar Facius

fix: 【ID1001502】 【小程序-首页-学练记录】:点击模拟考试没有跳转到成绩页面

parent 71a72f48
<template> <template>
<view class="record-cell"> <view class="record-cell" @click="$u.throttle(handleClick, 500)">
<view class="time-view">{{ timeText }}</view> <view class="time-view">{{ timeText }}</view>
<view class="detail-view"> <view class="detail-view">
<view v-for="(value, key) in labels" :key="key" class="item-view"> <view v-for="(value, key) in labels" :key="key" class="item-view">
...@@ -79,7 +79,11 @@ export default { ...@@ -79,7 +79,11 @@ export default {
return this.passed ? '及格' : '不及格' return this.passed ? '及格' : '不及格'
}, },
}, },
methods: {}, methods: {
handleClick() {
this.$emit('click', this.info.id)
},
},
} }
</script> </script>
......
...@@ -84,7 +84,13 @@ ...@@ -84,7 +84,13 @@
background="none" background="none"
:opts="{ :opts="{
enableScroll: true, enableScroll: true,
xAxis: { enableScroll:true, scrollShow: true, itemCount: 3, disableGrid: true, boundaryGap: 'center'}, xAxis: {
enableScroll: true,
scrollShow: true,
itemCount: 3,
disableGrid: true,
boundaryGap: 'center',
},
}" }"
:ontouch="true" :ontouch="true"
:disableScroll="true" :disableScroll="true"
...@@ -99,6 +105,7 @@ ...@@ -99,6 +105,7 @@
v-for="(item, index) in lists" v-for="(item, index) in lists"
:key="index" :key="index"
:info="item" :info="item"
@click="handleClickRecord"
></RecordCell> ></RecordCell>
<!-- <view class="show-more" @click="showAll = true" v-if="!showAll"> <!-- <view class="show-more" @click="showAll = true" v-if="!showAll">
...@@ -230,16 +237,16 @@ export default { ...@@ -230,16 +237,16 @@ export default {
this.chartData.series[0].data = [] this.chartData.series[0].data = []
this.chartData.series[1].data = [] this.chartData.series[1].data = []
this.chartData.categories = [] this.chartData.categories = []
let keys = [] let keys = []
Object.keys(res).forEach(v => { Object.keys(res).forEach((v) => {
keys.push(v) keys.push(v)
}) })
keys.sort() keys.sort()
for (let index = 0; index < keys.length; index++) { for (let index = 0; index < keys.length; index++) {
const ele = keys[index] const ele = keys[index]
console.log("ele", ele) console.log('ele', ele)
this.chartData.categories.push(ele.replace(/\-/g, '.')) this.chartData.categories.push(ele.replace(/\-/g, '.'))
this.chartData.series[0].data.push(res[ele].totalCount) this.chartData.series[0].data.push(res[ele].totalCount)
this.chartData.series[1].data.push(res[ele].rightCount) this.chartData.series[1].data.push(res[ele].rightCount)
...@@ -301,6 +308,14 @@ export default { ...@@ -301,6 +308,14 @@ export default {
} }
this.studyRecord(param) this.studyRecord(param)
}, },
handleClickRecord(id) {
this.$u.route({
url: '/pages/learn/score',
params: {
id: id,
},
})
},
handleConform(e, index) { handleConform(e, index) {
this['rangeDay' + index] = e.target.value this['rangeDay' + index] = e.target.value
console.log(this.rangeDay0, this.rangeDay1) console.log(this.rangeDay0, this.rangeDay1)
......
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