|
@@ -2,14 +2,25 @@
|
|
|
<view class="report_content">
|
|
|
<view class="header">
|
|
|
<view class="header_content">
|
|
|
- <view class="title">本次{{ type == "exam" ? "测评" : "学习" }}概览</view>
|
|
|
+ <view class="title"
|
|
|
+ >本次{{ type == "exam" ? "测评" : "学习" }}概览</view
|
|
|
+ >
|
|
|
<view class="content">
|
|
|
<view class="content_row">
|
|
|
- <view class="main">{{ reportInfo.exam_time }}</view>
|
|
|
+ <view class="main">{{
|
|
|
+ type == "exam"
|
|
|
+ ? reportInfo.exam_time
|
|
|
+ : (
|
|
|
+ (reportInfo.video_lasttime - reportInfo.video_inittime) /
|
|
|
+ 60
|
|
|
+ ).toFixed(2)
|
|
|
+ }}</view>
|
|
|
<view class="tip">学习时长(分钟)</view>
|
|
|
</view>
|
|
|
<view class="content_row">
|
|
|
- <view class="main">{{ reportInfo.isanswer_total + "/" + reportInfo.answer_total }}</view>
|
|
|
+ <view class="main">{{
|
|
|
+ reportInfo.isanswer_total + "/" + reportInfo.answer_total
|
|
|
+ }}</view>
|
|
|
<view class="tip">答对题目</view>
|
|
|
</view>
|
|
|
<view class="content_row">
|
|
@@ -22,10 +33,22 @@
|
|
|
<view class="content">
|
|
|
<view class="title">答题情况</view>
|
|
|
<view class="content_list">
|
|
|
- <view class="conent_main" v-for="(item, index) in queston_list" :key="index">
|
|
|
+ <view
|
|
|
+ class="conent_main"
|
|
|
+ v-for="(item, index) in queston_list"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
<view class="item_num">
|
|
|
- <view class="item_answer"><icon :type="item.is_answer == 0 ? 'cancel' : 'success'" size="20" /> 第{{ index + 1 }}题</view>
|
|
|
- <view :style="item.get_score > 0 ? 'color:green' : 'color:red'">+{{ item.get_score }} 积分</view>
|
|
|
+ <view class="item_answer"
|
|
|
+ ><icon
|
|
|
+ :type="item.is_answer == 0 ? 'cancel' : 'success'"
|
|
|
+ size="20"
|
|
|
+ />
|
|
|
+ 第{{ index + 1 }}题</view
|
|
|
+ >
|
|
|
+ <view :style="item.get_score > 0 ? 'color:green' : 'color:red'"
|
|
|
+ >+{{ item.get_score }} 积分</view
|
|
|
+ >
|
|
|
</view>
|
|
|
<view class="item_title">{{ item.question_title }}</view>
|
|
|
</view>
|
|
@@ -33,7 +56,9 @@
|
|
|
</view>
|
|
|
<view class="bottom_btn">
|
|
|
<view class="submit_btn defult" @click="_backList">返回课程列表</view>
|
|
|
- <view class="submit_btn" @click="_continue">{{ type == "exam" ? "重新练习" : "继续课后评测" }}</view>
|
|
|
+ <view class="submit_btn" @click="_continue">{{
|
|
|
+ type == "exam" ? "重新练习" : "继续课后评测"
|
|
|
+ }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -81,24 +106,32 @@ export default {
|
|
|
},
|
|
|
_continue() {
|
|
|
uni.redirectTo({
|
|
|
- url: `/pages/video/exam?id=${this.record_id}`,
|
|
|
+ url: `/pages/video/exam?id=${this.reportInfo.course_id}`,
|
|
|
});
|
|
|
},
|
|
|
_getRecord(type) {
|
|
|
- this.$http.request(`api/video_${type}_record/get_report`, { record_id: this.record_id }).then((re) => {
|
|
|
- if (re.code == "success") {
|
|
|
- console.log(re.data);
|
|
|
- this.reportInfo = re.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.$http
|
|
|
+ .request(`api/video_${type}_record/get_report`, {
|
|
|
+ record_id: this.record_id,
|
|
|
+ })
|
|
|
+ .then((re) => {
|
|
|
+ if (re.code == "success") {
|
|
|
+ console.log(re.data);
|
|
|
+ this.reportInfo = re.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
_getAnswerList(type) {
|
|
|
- this.$http.request(`api/video_${type}_answer/get_list`, { record_id: this.record_id }).then((re) => {
|
|
|
- if (re.code == "success") {
|
|
|
- console.log(re.data);
|
|
|
- this.queston_list = re.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.$http
|
|
|
+ .request(`api/video_${type}_answer/get_list`, {
|
|
|
+ record_id: this.record_id,
|
|
|
+ })
|
|
|
+ .then((re) => {
|
|
|
+ if (re.code == "success") {
|
|
|
+ console.log(re.data);
|
|
|
+ this.queston_list = re.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|