Bladeren bron

后台科普调整

lizhen 2 dagen geleden
bovenliggende
commit
ebaeff02ea
2 gewijzigde bestanden met toevoegingen van 12 en 26 verwijderingen
  1. 2 1
      application/admin/controller/exam/Grade.php
  2. 10 25
      application/admin/view/exam/grade/detail.html

+ 2 - 1
application/admin/controller/exam/Grade.php

@@ -56,6 +56,7 @@ class Grade extends Backend
             $list = $this->model
                 ->with(['cate', 'paper', 'user'])
                 ->where($where)
+                ->where('grade_model.status',2)
                 ->order($sort, $order)
                 ->paginate($limit);
 
@@ -90,7 +91,7 @@ class Grade extends Backend
 
         $this->view->assign("row", $row);
         $this->view->engine->layout(false);
-        return $this->view->fetch('detailnew');
+        return $this->view->fetch();
     }
 
     /**

+ 10 - 25
application/admin/view/exam/grade/detail.html

@@ -8,7 +8,7 @@
 <div id="app">
     <el-card class="box-card" style="margin-bottom: 20px;">
         <div slot="header" class="clearfix">
-            <span>考试用户信息</span>
+            <span>用户信息</span>
         </div>
         <el-descriptions title="" :column="2" border>
             <el-descriptions-item label="用户名">{{row.user.nickname}}</el-descriptions-item>
@@ -18,40 +18,30 @@
 
     <el-card class="box-card" style="margin-bottom: 20px;">
         <div slot="header" class="clearfix">
-            <span>考卷信息</span>
+            <span>科普信息</span>
         </div>
         <el-descriptions title="" :column="3" border>
-            <el-descriptions-item label="考卷分类">{{row.cate.name}}</el-descriptions-item>
-            <el-descriptions-item label="考卷名称">{{row.paper.title}}</el-descriptions-item>
-            <el-descriptions-item label="出题模式">
-                <el-tag size="small" v-if="row.paper.mode == 'RANDOM'">随机模式</el-tag>
-                <el-tag size="small" v-else-if="row.paper.mode == 'FIX'" type="success">固定模式</el-tag>
-            </el-descriptions-item>
+            <el-descriptions-item label="科普标题">{{row.paper.title}}</el-descriptions-item>
+
             <el-descriptions-item label="题目数量">{{row.paper.quantity}}题</el-descriptions-item>
-            <el-descriptions-item label="试卷总分">{{row.paper.total_score}}分</el-descriptions-item>
-            <el-descriptions-item label="及格线">
-                <span style="font-weight: bold;">{{row.paper.pass_score}}</span>分
-            </el-descriptions-item>
-            <el-descriptions-item label="考试限时">{{formatSecond(row.paper.limit_time)}}分</el-descriptions-item>
+            <el-descriptions-item label="题目总分">{{row.paper.total_score}}分</el-descriptions-item>
+
         </el-descriptions>
     </el-card>
 
     <el-card class="box-card" style="margin-bottom: 20px;">
         <div slot="header" class="clearfix">
-            <span>用户考试情况</span>
+            <span>用户答题情况</span>
             <!--<el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
         </div>
 
         <el-descriptions title="" :column="3" border style="margin-bottom: 30px;">
-            <el-descriptions-item label="考试分数">
+            <el-descriptions-item label="分数">
                 <span style="margin-right: 10px;">{{row.score}}分</span>
-                <el-tag size="small" v-if="row.is_pass" type="success">及格</el-tag>
-                <el-tag size="small" v-else type="danger">不及格</el-tag>
+
             </el-descriptions-item>
             <el-descriptions-item label="答对数" content-class-name="answer-right">{{row.right_count}}题</el-descriptions-item>
             <el-descriptions-item label="答错数" content-class-name="answer-fail">{{row.error_count}}题</el-descriptions-item>
-            <el-descriptions-item label="交卷时间">{{row.finishtime_text}}</el-descriptions-item>
-            <el-descriptions-item label="考试用时">{{formatSecond(row.grade_time)}}</el-descriptions-item>
         </el-descriptions>
     </el-card>
 
@@ -96,12 +86,7 @@
                                     <el-tag size="small" effect="plain" v-else-if="question.kind == 'SHORT'" type="warning">简答题</el-tag>
                                 </td>
 
-                                <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label th-fix-width">难度</th>
-                                <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content th-fix-width">
-                                    <el-tag size="small" effect="dark" v-if="question.difficulty == 'EASY'" type="success">简单</el-tag>
-                                    <el-tag size="small" effect="dark" v-else-if="question.difficulty == 'GENERAL'" type="warning">普通</el-tag>
-                                    <el-tag size="small" effect="dark" v-else-if="question.difficulty == 'HARD'" type="danger">困难</el-tag>
-                                </td>
+
                                 <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label th-fix-width">正确答案</th>
                                 <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content">
                                     <div v-if="question.kind == 'JUDGE' || question.kind == 'SINGLE' || question.kind == 'MULTI'">{{question.answer}}</div>