|
@@ -28,6 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
fixedColumns: true,
|
|
|
fixedRightNumber: 1,
|
|
|
searchFormVisible:true,
|
|
|
+ search:false,
|
|
|
columns: [
|
|
|
[
|
|
|
{checkbox: true},
|
|
@@ -126,8 +127,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
persent: function () {
|
|
|
Table.api.init({
|
|
|
extend: {
|
|
|
- index_url: 'teacher/practice/persent' + location.search,
|
|
|
- indexed_url: 'teacher/practice/examing' + location.search,
|
|
|
+ index_url: 'teacher/practice/persent/ids/'+Config.ids + location.search,
|
|
|
+ indexed_url: 'teacher/practice/examing/ids/'+ Config.ids+ location.search,
|
|
|
table: 'teacher_exams',
|
|
|
}
|
|
|
});
|
|
@@ -136,8 +137,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
// 初始化表格
|
|
|
table.bootstrapTable({
|
|
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
|
- pk: 'exam_id',
|
|
|
- sortName: 'exam_id',
|
|
|
+ pk: 'rel_id',
|
|
|
+ sortName: 'rel_id',
|
|
|
toolbar: '#toolbar',
|
|
|
fixedColumns: true,
|
|
|
fixedRightNumber: 1,
|
|
@@ -168,7 +169,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
buttons: [
|
|
|
{
|
|
|
name: 'dispatch',
|
|
|
- text: '',
|
|
|
+ text: '已送',
|
|
|
icon: 'fa fa-check',
|
|
|
title: '已送',
|
|
|
classname: 'btn btn-success btn-xs btn-magic btn-ajax',
|
|
@@ -184,7 +185,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
},
|
|
|
},{
|
|
|
name: 'dispatch',
|
|
|
- text: '',
|
|
|
+ text: '驳回',
|
|
|
icon: 'fa fa-reply-all',
|
|
|
title: '驳回',
|
|
|
classname: 'btn btn-danger btn-xs btn-magic btn-ajax',
|
|
@@ -231,18 +232,48 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
},
|
|
|
{field: 'user_username', title: __('学员学号')},
|
|
|
{field: 'user_nickname', title: __('学员姓名')},
|
|
|
- {field: '', title: __('状态'),
|
|
|
+ {field: '', title: __('考试状态'),
|
|
|
formatter: function(value, row,index) {
|
|
|
return '<span class="text-success">已交卷</span>';
|
|
|
}
|
|
|
},
|
|
|
- {field: 'total_score', title: __('模拟成绩')},
|
|
|
+ {field: 'total_score', title: __('考试成绩')},
|
|
|
+ {field: 'fault_names', title: __('出题题目'),formatter: Table.api.formatter.faultname},
|
|
|
+ {field: 'xianxiang_names', title: __('故障现象'),formatter: Table.api.formatter.faultname},
|
|
|
+ {field: 'yuanyin_names', title: __('可能原因'),formatter: Table.api.formatter.faultname},
|
|
|
+ {field: 'buwei_names', title: __('故障部位'),formatter: Table.api.formatter.faultname},
|
|
|
+ {field: 'fangfa_names', title: __('排除方法'),formatter: Table.api.formatter.faultname},
|
|
|
]
|
|
|
]
|
|
|
});
|
|
|
|
|
|
// 为表格绑定事件
|
|
|
Table.api.bindevent(table1);
|
|
|
+
|
|
|
+
|
|
|
+ //关闭考试 并且
|
|
|
+ $(document).on('click', '.btn-closes', function () {
|
|
|
+ var ids = Config.ids;
|
|
|
+ Backend.api.closetabs('/ZQOtIMLKud.php/teacher/practice/persent/ids/'+Config.ids)
|
|
|
+ // Backend.api.addtabs('teacher/practice','练习列表');
|
|
|
+ // $.ajax({
|
|
|
+ // type:'post',
|
|
|
+ // url:'teacher/collection/multi',
|
|
|
+ // data:{ids:ids,params:'exam_collection_state=3'}, //重点必须为一个变量如:data
|
|
|
+ // success:function(data){
|
|
|
+ // if(data.code==1){
|
|
|
+ // Backend.api.closetabs('/ZQOtIMLKud.php/teacher/exams/persent/ids/'+Config.ids)
|
|
|
+ // Backend.api.addtabs('teacher/collection','考试列表');
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // error:function(){
|
|
|
+ // layer.alert("操作失败");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
add: function () {
|
|
|
Controller.api.bindevent();
|