pull/4/head
脆皮鸭 1 year ago
parent bbf7cc3692
commit d76bff73ae
  1. 7
      src/pages.json
  2. 68
      src/pages/questionBank/components/GradesChart.vue
  3. 57
      src/pages/questionBank/components/Question.vue
  4. 119
      src/pages/questionBank/examResult.vue
  5. 7
      src/pages/questionBank/practiceExams.vue

@ -35,6 +35,13 @@
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/questionBank/examResult",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
],

@ -10,37 +10,53 @@
<script>
export default {
props:{
color:{
type:String,
default:'#05C341'
},
titleName:{
type:String,
default:'80%'
},
actualValue:{
type:Number,
default:0.8
}
},
data() {
return {
chartData: {},
// config-ucharts.js ['arcbar'] opts opts
opts: {
color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
padding: undefined,
title: {
name: "80%",
fontSize: 35,
color: "#05C341"
},
subtitle: {
name: "",
fontSize: 25,
color: "#05C341"
},
extra: {
arcbar: {
type: "default",
width: 18,
backgroundColor: "#E9E9E9",
startAngle: 0.95,
endAngle: 0.05,
gap: 2
}
}
}
opts: {}
};
},
onReady() {
this.opts={
color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
padding: undefined,
title: {
name: this.titleName,
fontSize: 35,
color: this.color
},
subtitle: {
name: "",
fontSize: 25,
color: this.color
},
extra: {
arcbar: {
type: "default",
width: 18,
backgroundColor: "#E9E9E9",
startAngle: 0.95,
endAngle: 0.05,
gap: 2
}
}
}
console.log(this.opts);
this.getServerData();
},
methods: {
@ -52,8 +68,8 @@ export default {
series: [
{
name: "正确率",
color: "#05C341",
data: 0.8
color: this.color,
data: this.actualValue
}
]
};

@ -42,8 +42,8 @@
<view class="wp100 flex jc-sb ai-c p14 bc-fff" style="position: fixed;bottom: 0;left: 0;">
<view style="width: 220rpx;">
<button v-if="type==='practice'" class="btn">四步学科一</button>
<view v-else class="btn" style="text-align: center;">
<u-count-down :time="1 * 60 * 60 * 1000" format="HH:mm:ss"></u-count-down>
<view v-else class="btn" style="text-align: center;" @tap="submitPaper">
<u-count-down ref="countDown_1" :time="1 * 60 * 60 * 1000" format="HH:mm:ss"></u-count-down>
<text>交卷</text>
</view>
</view>
@ -81,13 +81,40 @@
</view>
</template>
</u-modal>
<u-modal :show="isSubmit">
<view class="wp100">
<view class="text-center">
<text>确认交卷</text>
<view class="mt20 flex ai-c jc-sb">
<view class="text-center">
<text style="color:#FF6E02">99</text>
<view class="cor-333">未答题数</view>
</view>
<view class="text-center">
<u-count-down ref="countDown_3" class="balckColor" :time="1 * 60 * 60 * 1000" format="HH:mm:ss"></u-count-down>
<view>剩余时间</view>
</view>
<view class="text-center">
<text style="color:#333">9</text>
<view class="cor-333">考试得分</view>
</view>
</view>
</view>
</view>
<template #confirmButton>
<view class="p10" >
<u-button :customStyle="{width:'45%',marginRight:'10px',height:'68rpx',lineHeight:'68rpx',borderRadius:'34rpx',color:'#666',border:'1px solid #666',display:'inline-block'}" @click="continueExam">继续考试</u-button>
<u-button :customStyle="{width:'45%',marginLeft:'10px',height:'68rpx',lineHeight:'68rpx',borderRadius:'34rpx',color:'#fff',backgroundColor:'#05C341',display:'inline-block'}" @click="toSubmit">现在交卷</u-button>
</view>
</template>
</u-modal>
<u-popup :show="popupShow" mode="bottom" :closeOnClickOverlay="true" @close="popupShow=false">
<view>
<view class="wp100 flex jc-sb p14 bc-fff">
<view style="width: 220rpx;">
<button v-if="type==='practice'" class="btn">四步学科一</button>
<view v-else class="btn" style="text-align: center;">
<u-count-down :time="1 * 60 * 60 * 1000" format="HH:mm:ss"></u-count-down>
<view v-else class="btn" style="text-align: center;" @tap="submitPaper">
<u-count-down ref="countDown_2" :time="1 * 60 * 60 * 1000" format="HH:mm:ss"></u-count-down>
<text>交卷</text>
</view>
</view>
@ -134,6 +161,10 @@ export default {
type:{
type:String,
default:'practice'
},
isSubmit:{
type:Boolean,
default:false
}
},
data() {
@ -160,11 +191,29 @@ export default {
this.renderSwiper(0)
},
methods: {
submitPaper(){
this.$refs.countDown_1.pause();
this.$refs.countDown_2.pause();
this.$refs.countDown_3.pause();
this.$emit('update:isSubmit',true)
},
continueExam(){
this.$refs.countDown_1.start();
this.$refs.countDown_2.start();
this.$refs.countDown_3.start();
this.$emit('update:isSubmit',false)
},
//
chooseQueston(index){
this.popupShow=false
this.pickerTopic(index)
},
//
toSubmit(){
uni.navigateTo({
url:"/pages/questionBank/examResult"
})
},
//
toResult(){
uni.navigateTo({

@ -0,0 +1,119 @@
<template>
<view>
<u-navbar title="本次成绩" @rightClick="rightClick" :autoBack="true"></u-navbar>
<view style="margin-top: 100px;" class="p14 wp100">
<GradesChart color="#FF6E02" titleName="32分" :actualValue="0.32" />
<view class="top_box flex jc-c" style="flex-direction: column;">
<view class="wp100 text-center" style="margin-top: -153rpx;">
<text>太棒了正确率很高了</text>
<button class="centerBtn">马上提分</button>
<view class="flex ai-c jc-c mt10">
<view class="text-center wp33">
<view>99</view>
<text>未做题</text>
</view>
<view class="text-center wp33">
<view>12</view>
<text>看错题</text>
</view>
<view class="text-center wp33 flex jc-c ai-c" style="flex-direction: column;">
<u-icon name="edit-pen" size="28"></u-icon>
<text>重新考试</text>
</view>
</view>
</view>
</view>
</view>
<view class="p14">
<view class="bc-fff p14" style="border-radius: 20rpx;">
<view class="flex ai-c jc-sb">
<text class="fs18 cor-000 fw600">考试情况</text>
</view>
<view class="charts-box">
<qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
</view>
</view>
</view>
</view>
</template>
<script>
import GradesChart from "./components/GradesChart.vue"
export default {
components: {
GradesChart
},
data() {
return {
chartData: {},
// config-ucharts.js ['line'] opts opts
opts: {
color: ["#FAC858"],
padding: [15, 10, 0, 15],
enableScroll: false,
legend: {},
xAxis: {
disableGrid: true
},
yAxis: {
gridType: "dash",
dashLength: 2
},
extra: {
line: {
type: "straight",
width: 2,
activeType: "hollow"
}
}
}
};
},
onReady() {
this.getServerData();
},
methods: {
getServerData() {
//
setTimeout(() => {
//
let res = {
categories: [],
series: [{
data: [32]
},
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 500);
},
}
}
</script>
<style scoped>
.top_box {
padding: 15px;
background-color: #fdfdfd;
border-radius: 20rpx;
}
.centerBtn {
width: 349rpx;
height: 76rpx;
background: #DEEFE5;
border-radius: 38rpx;
line-height: 76rpx;
text-align: center;
color: #00B74F;
margin-top: 10px
}
.charts-box {
width: 100%;
height: 346rpx;
background-color: #fdfdfd;
border-radius: 20rpx;
ppadding-top: 20rpx;
}
</style>

@ -2,7 +2,7 @@
<view>
<u-navbar title="模拟考试" @rightClick="rightClick" :autoBack="true">
</u-navbar>
<Question :tabsList="tabsList" type="exam" />
<Question :tabsList="tabsList" v-model:isSubmit="isSubmit" type="exam" />
</view>
</template>
@ -19,6 +19,7 @@
},
data() {
return {
isSubmit:false,
tabsList:[{
label:"模拟考试",
value:0
@ -52,4 +53,8 @@
font-size: 28rpx;
color:#fff !important;
}
::v-deep .balckColor .u-count-down__text{
font-size: 28rpx;
color:#333 !important;
}
</style>

Loading…
Cancel
Save