diff --git a/app/chengji/view/index/index.html b/app/chengji/view/index/index.html index 3babb2e1..3815be43 100755 --- a/app/chengji/view/index/index.html +++ b/app/chengji/view/index/index.html @@ -192,7 +192,6 @@ layui.use(['table', 'mytable', 'form', 'canyuKaoshi', 'createInput'], function() data = form.val("search"); if (data.school_id > 0 && data.ruxuenian > 0) { data.auth = {}; - console.log(data); canyu.banjiCheckbox('banji_id', data); } }); diff --git a/app/luru/view/index/biaolu.html b/app/luru/view/index/biaolu.html index 4a8d7613..7348d4b1 100755 --- a/app/luru/view/index/biaolu.html +++ b/app/luru/view/index/biaolu.html @@ -45,9 +45,7 @@ -
- +
@@ -125,7 +123,7 @@ layui.use(['form', 'upload', 'canyuKaoshi', 'createInput'], function() { data = form.val("dwform"); delete data.subject_id; if (data.kaoshi_id > 0 && data.school_id > 0 && data.ruxuenian > 0) { - canyu.lrSubjectSelect('subject_id', data); + canyu.lrSubjectCheckbox('subject_id', data); canyu.lrBanjiCheckbox('banji_id', data); } }); diff --git a/public/static/x-admin2.2/js/canyuKaoshi.js b/public/static/x-admin2.2/js/canyuKaoshi.js index 8ae9161a..3b3a94e7 100644 --- a/public/static/x-admin2.2/js/canyuKaoshi.js +++ b/public/static/x-admin2.2/js/canyuKaoshi.js @@ -284,6 +284,34 @@ layui.define(['table', 'form', 'upload'], function(exports) { }, + // 参与本次考试学科 + lrSubjectCheckbox: function(myid, data, hasAll = true) { + $('#' + myid).children().remove(); + $.ajax({ + url: '/kaoshi/lrfg/subject', + type: 'POST', + data: data, + success: function(result) { + if (hasAll == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + temp = ''; + str = str + temp; + }); + $('#' + myid).append(str); + form.render('checkbox'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, + + // 班级统计结果学科 btjSubjectSelect: function(myid, data, value = '', hasNull = true) { $('#' + myid).children().remove(); diff --git a/view/list.html b/view/list.html index 6974497d..6c45b944 100755 --- a/view/list.html +++ b/view/list.html @@ -114,7 +114,8 @@ layui.use(['table', 'form', 'mytable'], function() { //监听排序 table.on('sort(mytable)', function(obj) { - val = form.val(); + val = form.val("search"); + console.log(val); val.field = obj.field; val.order = obj.type; userTable.reload({