Pārlūkot izejas kodu

20250208 优化调整

贾小兵 2 mēneši atpakaļ
vecāks
revīzija
c003ecd755

+ 3 - 0
application/admin/controller/student/Exam.php

@@ -87,6 +87,9 @@ class Exam extends Backend
         {
             $row['fangfa_content_name'] = json_decode($row['fangfa_content'],true);
         }
+        $other_report = !empty($row['other_report']) ? json_decode($row['other_report'],true):[];
+        $this->view->assign('other_report', $other_report);
+        
         $this->view->assign('row', $row);
         return $this->view->fetch();
     }

+ 2 - 1
application/admin/controller/teacher/Exams.php

@@ -287,9 +287,10 @@ class Exams extends Backend
         //     ->where($this->whereExtend)->with($this->relationtTable)
         //     ->order($sort, $order)
         //     ->paginate($limit);
+        $sim_type = Db::name('real_exam_collection')->where('exam_collection_id',$ids)->value('sim_type');
         $list = Db::name('seat')->select();
         foreach ($list as $key => $value) {
-            $sim = Db::name('sim')->where('seat_id',$value['seat_id'])->find();
+            $sim = Db::name('sim')->where('seat_id',$value['seat_id'])->where('sim_type',$sim_type)->find();
             if(!empty($sim['sim_state'])){
                 switch ($sim['sim_state']) {
                     case '1':

+ 24 - 3
application/admin/view/student/exam/view.html

@@ -88,6 +88,30 @@
                         <td>{$row.fault_name_three|htmlentities}</td>
                     </tr>
                     <tr>
+                        <td colspan="5" style="text-align: left;padding-left: 1%">二.修理报告表(15分)</td>
+                    </tr>
+                    <tr>
+                        <td colspan="5" style="text-align: left;padding-left: 1%">学员答作答情况</td>
+                    </tr>
+                    <tr>
+                        <td style="width:5%">序号</td>
+                        <td style="width:15%">故障现象</td>
+                        <td style="width:20%">可能原因</td>
+                        <td style="width:10%">故障部位</td>
+                        <td style="width:35%">排除方法</td>
+                    </tr>
+                    {if $other_report}
+                    {volist name="other_report" id="vo2"}
+                    <tr style="height: 60px">    
+                        <td>{++$key}</td>
+                        <td>{$vo2.xx_name|htmlentities}</td>
+                        <td>{$vo2.yy_name|htmlentities}</td>
+                        <td>{$vo2.bw_name|htmlentities}</td>
+                        <td>{$vo2.pc_name|htmlentities}</td>
+                    </tr>
+                    {/volist}
+                    {/if}
+                    <tr>
                         <td style="width:5%">序号</td>
                         <td style="width:25%">评分标准</td>
                         <td style="width:10%">扣分</td>
@@ -95,9 +119,6 @@
                         <td style="width:45%">扣分原因</td>
                     </tr>
                     <tr>
-                        <td colspan="5" style="text-align: left;padding-left: 1%">二.修理报告表(15分)</td>
-                    </tr>
-                    <tr>
                         <td>1</td>
                         <td>故障现象少写或错写1条扣1分</td>
                         <td>{$row.xianxian_score|htmlentities}</td>

+ 1 - 1
public/assets/js/backend/student/exam.js

@@ -53,7 +53,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
             $(document).on('click', '.btn-view', function () {
                 var ids = Table.api.selectedids(table);
                 var title = '成绩详情';
-                Fast.api.open(Fast.api.fixurl("student/exam/view/ids/"+ids), title, { area: ["60%", "95%"] });
+                Fast.api.open(Fast.api.fixurl("student/exam/view/ids/"+ids), title, { area: ["75%", "95%"] });
             });
         },
         add: function () {