|
@@ -5,7 +5,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
// 初始化表格参数配置
|
|
// 初始化表格参数配置
|
|
Table.api.init({
|
|
Table.api.init({
|
|
extend: {
|
|
extend: {
|
|
- index_url: 'student/collection/index' + location.search,
|
|
|
|
|
|
+ index_url: 'student/practice/index' + location.search,
|
|
table: 'teacher_collection',
|
|
table: 'teacher_collection',
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -24,32 +24,55 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
[
|
|
[
|
|
{checkbox: true},
|
|
{checkbox: true},
|
|
{field: 'exam_collection_id', title: __('编号')},
|
|
{field: 'exam_collection_id', title: __('编号')},
|
|
|
|
+ {field: 'exam_collection_name', title: __('Exam_collection_name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
{field: 'sim_type', title: __('Sim_type'),searchList:{"0001":"FZD04B型侦毒器","0002":"FZB006型毒剂报警器","0003":"防化兵用毒剂报警器"},formatter: Table.api.formatter.simtype},
|
|
{field: 'sim_type', title: __('Sim_type'),searchList:{"0001":"FZD04B型侦毒器","0002":"FZB006型毒剂报警器","0003":"防化兵用毒剂报警器"},formatter: Table.api.formatter.simtype},
|
|
{field: 'question_setting_method', title: __('Question_setting_method'),searchList:{"1":"系统随机","2":"教师自选","3":"任务自选"},formatter: Table.api.formatter.simmethod},
|
|
{field: 'question_setting_method', title: __('Question_setting_method'),searchList:{"1":"系统随机","2":"教师自选","3":"任务自选"},formatter: Table.api.formatter.simmethod},
|
|
- {field: 'exam_collection_type', title: __('Exam_collection_type'),operate: false,formatter: function (value, row, index) {
|
|
|
|
- return '练习';
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- field: 'exam_collection_state',searchList:{"2":"打开","3":"关闭"},
|
|
|
|
- title: __('Exam_collection_state'),
|
|
|
|
- align: 'center',
|
|
|
|
- table: table,disable:true,
|
|
|
|
- formatter: Table.api.formatter.collectonstate
|
|
|
|
- },
|
|
|
|
- {field: 'exam_collection_name', title: __('Exam_collection_name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
|
|
- // {field: 'task_id', title: __('Task_id')},
|
|
|
|
|
|
+ // {field: 'exam_collection_type', title: __('Exam_collection_type'),operate: false,formatter: function (value, row, index) {
|
|
|
|
+ // return '考试';
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // field: 'exam_collection_state',searchList:{"2":"打开","3":"关闭"},
|
|
|
|
+ // title: __('Exam_collection_state'),
|
|
|
|
+ // align: 'center',
|
|
|
|
+ // table: table,disable:true,
|
|
|
|
+ // formatter: Table.api.formatter.collectonstate
|
|
|
|
+ // },
|
|
|
|
+
|
|
{field: 'limit_duration', title: __('Limit_duration')},
|
|
{field: 'limit_duration', title: __('Limit_duration')},
|
|
{field: 'start_time', title: __('Start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
|
{field: 'start_time', title: __('Start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
|
{field: 'end_time', title: __('End_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
|
{field: 'end_time', title: __('End_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
|
// {field: 'create_user_id', title: __('Create_user_id')},
|
|
// {field: 'create_user_id', title: __('Create_user_id')},
|
|
{field: 'create_by', title: __('Create_by'), operate: 'LIKE'},
|
|
{field: 'create_by', title: __('Create_by'), operate: 'LIKE'},
|
|
- {field: 'createtime', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
|
|
|
|
|
+ // {field: 'createtime', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
|
// {field: 'update_by', title: __('Update_by'), operate: 'LIKE'},
|
|
// {field: 'update_by', title: __('Update_by'), operate: 'LIKE'},
|
|
// {field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
|
// {field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
|
// {field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
// {field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
- {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
|
|
|
+ // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
|
+ {field: 'operate', title: __('Operate'), table: table,
|
|
|
|
+ events: Table.api.events.operate,
|
|
|
|
+ // formatter: Table.api.formatter.operate,
|
|
|
|
+ formatter: Table.api.formatter.buttons,
|
|
|
|
+ buttons: [
|
|
|
|
+ {
|
|
|
|
+ name: 'dispatch',
|
|
|
|
+ text: '进入',
|
|
|
|
+ icon: 'fa fa-hand-pointer-o',
|
|
|
|
+ title: '进入',
|
|
|
|
+ // visible: function (row){
|
|
|
|
+ // if(row.is_user_examed==0){
|
|
|
|
+ // return true;
|
|
|
|
+ // }
|
|
|
|
+ // return false;
|
|
|
|
+ // },
|
|
|
|
+ classname: 'btn btn-info btn-xs btn-magic btn-addtabs',
|
|
|
|
+ extend: 'data-area=\'["85%","85%"]\'',
|
|
|
|
+ url: 'student/practice/into',
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ }
|
|
]
|
|
]
|
|
|
|
+
|
|
]
|
|
]
|
|
});
|
|
});
|
|
|
|
|
|
@@ -59,6 +82,47 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
add: function () {
|
|
add: function () {
|
|
Controller.api.bindevent();
|
|
Controller.api.bindevent();
|
|
},
|
|
},
|
|
|
|
+ into: function () {
|
|
|
|
+ // Controller.api.bindevent();
|
|
|
|
+ Form.api.bindevent($("form[role=form]"), function(data, ret) {
|
|
|
|
+ if(ret.code==1){
|
|
|
|
+ Backend.api.addtabs( ret.url,'正在练习');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ examing: function () {
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
+ var countdownTime = Config.timer; // 倒计时时间,单位为秒
|
|
|
|
+ var display = $('#timer');
|
|
|
|
+
|
|
|
|
+ var timer = setInterval(function() {
|
|
|
|
+ var minutes = parseInt(countdownTime / 60, 10);
|
|
|
|
+ var seconds = parseInt(countdownTime % 60, 10);
|
|
|
|
+
|
|
|
|
+ minutes = minutes < 10 ? "0" + minutes : minutes;
|
|
|
|
+ seconds = seconds < 10 ? "0" + seconds : seconds;
|
|
|
|
+
|
|
|
|
+ display.text(minutes + "分" + seconds+'秒');
|
|
|
|
+
|
|
|
|
+ if (--countdownTime < 0) {
|
|
|
|
+ clearInterval(timer);
|
|
|
|
+ display.text("时间到!");
|
|
|
|
+ }
|
|
|
|
+ }, 1000);
|
|
|
|
+ });
|
|
|
|
+ Form.api.bindevent($("form[role=form]"), function(data, ret) {
|
|
|
|
+ if(ret.code==1){
|
|
|
|
+ Backend.api.addtabs( ret.url,'得分分析');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ analysis: function () {
|
|
|
|
+ Form.api.bindevent($("form[role=form]"), function(data, ret) {
|
|
|
|
+ if(ret.code==1){
|
|
|
|
+ Backend.api.addtabs( ret.url);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
edit: function () {
|
|
edit: function () {
|
|
Controller.api.bindevent();
|
|
Controller.api.bindevent();
|
|
},
|
|
},
|