|
@@ -238,11 +238,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{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},
|
|
|
|
|
|
+ // {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},
|
|
]
|
|
]
|
|
]
|
|
]
|
|
});
|
|
});
|
|
@@ -300,6 +300,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
fixedColumns: true,
|
|
fixedColumns: true,
|
|
fixedRightNumber: 1,
|
|
fixedRightNumber: 1,
|
|
searchFormVisible:false,
|
|
searchFormVisible:false,
|
|
|
|
+ pageSize: 30,
|
|
Search:false,
|
|
Search:false,
|
|
columns: [
|
|
columns: [
|
|
[
|
|
[
|
|
@@ -330,50 +331,77 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
$(".qudui_input").val(qudui_total);
|
|
$(".qudui_input").val(qudui_total);
|
|
$(".xueyuan_input").val(xueyuan_total);
|
|
$(".xueyuan_input").val(xueyuan_total);
|
|
},
|
|
},
|
|
- });
|
|
|
|
-
|
|
|
|
- // 为表格绑定事件
|
|
|
|
- Table.api.bindevent(table);
|
|
|
|
|
|
+ // 点击每一个单选框时触发的操作
|
|
|
|
+ onCheck:function(row){
|
|
|
|
+ rel_Ids.push(row.id);
|
|
|
|
+ qudui_total = qudui_total+1;
|
|
|
|
+ xueyuan_total = xueyuan_total+row.department_admin_count;
|
|
|
|
|
|
- table.on('click-row.bs.table', function (e, row, element) {
|
|
|
|
- console.log(rel_Ids)
|
|
|
|
- // console.log('row')
|
|
|
|
- if(!$.inArray(row.id,rel_Ids)){
|
|
|
|
- if(Config.row_info.starttime>0){
|
|
|
|
- Layer.alert('考试正在进行中,只可增加区队不可取消区队');
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- arr = $.grep(rel_Ids, function(value) {
|
|
|
|
- return value != row["id"];
|
|
|
|
- });
|
|
|
|
- rel_Ids = arr;
|
|
|
|
- qudui_total = qudui_total-1;
|
|
|
|
- xueyuan_total = xueyuan_total-row.department_admin_count;
|
|
|
|
- }else if(rel_Ids.indexOf(row.id)>-1){
|
|
|
|
- if(Config.row_info.starttime>0){
|
|
|
|
- Layer.alert('考试正在进行中,只可增加区队不可取消区队');
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ $(".depart_ids").val(rel_Ids.join());
|
|
|
|
+ $(".qudui_total").html(qudui_total);
|
|
|
|
+ $(".xueyuan_total").html(xueyuan_total);
|
|
|
|
+ $(".qudui_input").val(qudui_total);
|
|
|
|
+ $(".xueyuan_input").val(xueyuan_total);
|
|
|
|
+ },
|
|
|
|
+ // 取消每一个单选框时对应的操作;
|
|
|
|
+ onUncheck:function(row){
|
|
var index = rel_Ids.indexOf(row.id);
|
|
var index = rel_Ids.indexOf(row.id);
|
|
if(index > -1) {
|
|
if(index > -1) {
|
|
rel_Ids.splice(index, 1);
|
|
rel_Ids.splice(index, 1);
|
|
}
|
|
}
|
|
qudui_total = qudui_total-1;
|
|
qudui_total = qudui_total-1;
|
|
xueyuan_total = xueyuan_total-row.department_admin_count;
|
|
xueyuan_total = xueyuan_total-row.department_admin_count;
|
|
- }else{
|
|
|
|
- qudui_total = qudui_total+1;
|
|
|
|
- xueyuan_total = xueyuan_total+row.department_admin_count;
|
|
|
|
- rel_Ids.push(row.id);
|
|
|
|
|
|
+
|
|
|
|
+ $(".depart_ids").val(rel_Ids.join());
|
|
|
|
+ $(".qudui_total").html(qudui_total);
|
|
|
|
+ $(".xueyuan_total").html(xueyuan_total);
|
|
|
|
+ $(".qudui_input").val(qudui_total);
|
|
|
|
+ $(".xueyuan_input").val(xueyuan_total);
|
|
}
|
|
}
|
|
- console.log(qudui_total);
|
|
|
|
- console.log(xueyuan_total);
|
|
|
|
- $(".depart_ids").val(rel_Ids.join());
|
|
|
|
- $(".qudui_total").html(qudui_total);
|
|
|
|
- $(".xueyuan_total").html(xueyuan_total);
|
|
|
|
- $(".qudui_input").val(qudui_total);
|
|
|
|
- $(".xueyuan_input").val(xueyuan_total);
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ // 为表格绑定事件
|
|
|
|
+ Table.api.bindevent(table);
|
|
|
|
+
|
|
|
|
+ // table.on('click-row.bs.table', function (e, row, element) {
|
|
|
|
+ // console.log(rel_Ids)
|
|
|
|
+ // // console.log('row')
|
|
|
|
+ // if(!$.inArray(row.id,rel_Ids)){
|
|
|
|
+ // if(Config.row_info.starttime>0){
|
|
|
|
+ // Layer.alert('考试正在进行中,只可增加区队不可取消区队');
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
|
|
+ // arr = $.grep(rel_Ids, function(value) {
|
|
|
|
+ // return value != row["id"];
|
|
|
|
+ // });
|
|
|
|
+ // rel_Ids = arr;
|
|
|
|
+ // qudui_total = qudui_total-1;
|
|
|
|
+ // xueyuan_total = xueyuan_total-row.department_admin_count;
|
|
|
|
+ // }else if(rel_Ids.indexOf(row.id)>-1){
|
|
|
|
+ // if(Config.row_info.starttime>0){
|
|
|
|
+ // Layer.alert('考试正在进行中,只可增加区队不可取消区队');
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
|
|
+ // var index = rel_Ids.indexOf(row.id);
|
|
|
|
+ // if(index > -1) {
|
|
|
|
+ // rel_Ids.splice(index, 1);
|
|
|
|
+ // }
|
|
|
|
+ // qudui_total = qudui_total-1;
|
|
|
|
+ // xueyuan_total = xueyuan_total-row.department_admin_count;
|
|
|
|
+ // }else{
|
|
|
|
+ // qudui_total = qudui_total+1;
|
|
|
|
+ // xueyuan_total = xueyuan_total+row.department_admin_count;
|
|
|
|
+ // rel_Ids.push(row.id);
|
|
|
|
+ // }
|
|
|
|
+ // console.log(qudui_total);
|
|
|
|
+ // console.log(xueyuan_total);
|
|
|
|
+ // $(".depart_ids").val(rel_Ids.join());
|
|
|
|
+ // $(".qudui_total").html(qudui_total);
|
|
|
|
+ // $(".xueyuan_total").html(xueyuan_total);
|
|
|
|
+ // $(".qudui_input").val(qudui_total);
|
|
|
|
+ // $(".xueyuan_input").val(xueyuan_total);
|
|
|
|
+ // });
|
|
|
|
+
|
|
$(document).on('change', '#c-question_setting_method', function () {
|
|
$(document).on('change', '#c-question_setting_method', function () {
|
|
if($(this).val()==1){
|
|
if($(this).val()==1){
|
|
$(".btn-sm,.btn-task").css('display','none');
|
|
$(".btn-sm,.btn-task").css('display','none');
|