|
@@ -1,7 +1,5 @@
|
|
|
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
|
|
-
|
|
|
var Controller = {
|
|
|
-
|
|
|
index: function () {
|
|
|
$('.btn-add').data('area',['85%','85%']);
|
|
|
$('.btn-edit').data('area',['85%','85%']);
|
|
@@ -27,7 +25,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
sortName: 'exam_collection_id',
|
|
|
fixedColumns: true,
|
|
|
fixedRightNumber: 1,
|
|
|
+ singleSelect : true, //
|
|
|
searchFormVisible:true,
|
|
|
+ search:false,
|
|
|
columns: [
|
|
|
[
|
|
|
{checkbox: true},
|
|
@@ -70,6 +70,20 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
extend: 'data-area=\'["85%","85%"]\'',
|
|
|
url: 'teacher/collection/edit',
|
|
|
},
|
|
|
+ {
|
|
|
+ name: 'dispatch',
|
|
|
+ text: '',
|
|
|
+ icon: 'fa fa-hand-pointer-o',
|
|
|
+ title: '进入考试',
|
|
|
+ visible: function (rr) {
|
|
|
+ if(rr.exam_collection_state == 2){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ classname: 'btn btn-info btn-xs btn-magic btn-addtabs',
|
|
|
+ url: 'teacher/exams/persent',
|
|
|
+ },
|
|
|
// {
|
|
|
// name: 'dispatch',
|
|
|
// text: '',
|
|
@@ -94,6 +108,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
|
|
|
// 为表格绑定事件
|
|
|
Table.api.bindevent(table);
|
|
|
+
|
|
|
+ $(document).on('click', '.btn-start', function () {
|
|
|
+ var ids = Table.api.selectedids(table);
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: "teacher/collection/start/ids/"+ids,
|
|
|
+ type: "post",
|
|
|
+ }, function () {
|
|
|
+ table.bootstrapTable('refresh', {});
|
|
|
+ Layer.close(index);
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
task: function () {
|
|
|
// 初始化表格参数配置
|