Browse Source

20250426 优化

贾小兵 10 hours ago
parent
commit
b1e7927e5e

+ 1 - 0
application/admin/controller/student/Exercise.php

@@ -89,6 +89,7 @@ class Exercise extends Backend
                         'exam_collection_name' => $params['exam_collection_name'],
                         'exam_collection_type' =>$params['exam_collection_type'],
                         'sim_type' => $params['sim_type'],
+                        'question_setting_method'=>1,
                         'seat_id' =>0,
                         'sim_id' =>0,
                         'exam_status'=>1,

+ 7 - 1
application/admin/model/teacher/Collection.php

@@ -2,9 +2,9 @@
 
 namespace app\admin\model\teacher;
 
+use app\admin\model\teacher\Exams;
 use think\Model;
 use traits\model\SoftDelete;
-use app\admin\model\teacher\Exams;
 
 class Collection extends Model
 {
@@ -28,6 +28,7 @@ class Collection extends Model
     protected $append = [
         'sim_type_text',
         'yikao_count',
+        'yikao_xl_count',
         'user_count'
     ];
 
@@ -70,6 +71,11 @@ class Collection extends Model
         return Exams::where(['exam_collection_id'=>$data['exam_collection_id'],'exam_collection_type'=>3,'starttime'=>['>',0]])->count();
     }
 
+    public function getYikaoXlCountAttr($value, $data)
+    {
+        return Exams::where(['exam_collection_id'=>$data['exam_collection_id'],'exam_collection_type'=>1,'starttime'=>['>',0]])->count();
+    }
+
     public function getUserCountAttr($value, $data)
     {
         return Exams::where(['exam_collection_id'=>$data['exam_collection_id']])->count();

+ 6 - 1
public/assets/js/backend/student/exercise.js

@@ -187,9 +187,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
             });
         },
         analysis: function () {
+
+
             Form.api.bindevent($("form[role=form]"), function(data, ret) {
                 if(ret.code==1){
-                    Backend.api.addtabs( ret.url);
+                    Backend.api.closetabs('/admin/student/exercise/analysis');
+                    // Backend.api.addtabs( ret.url);
+                    Backend.api.addtabs('/admin/student/exercise/index');
+
                 }
             });
         },

+ 1 - 1
public/assets/js/backend/teacher/practice.js

@@ -56,7 +56,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','editable'], function
                         {field: 'create_by', title: __('Create_by'), operate: 'LIKE'},
                         // {field: 'qudui_count', title: __('区队数量'), operate: false},
                         {field: 'xueyuan_count', title: __('应考人数'), operate: false},
-                        {field: 'yikao_count', title: __('已考人数'), operate: false},
+                        {field: 'yikao_xl_count', title: __('已考人数'), operate: false},
                         {field: 'createtime', title: __('Create_time'),  operate:'RANGE', addclass:'datetimerange', autocomplete:false,formatter: Table.api.formatter.datetime},
                         {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
                             // formatter: Table.api.formatter.operate