From 71490cd94fa2252ad14a4c92e98ca41b0f62c734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E5=AE=9D=E4=B9=A6=E8=AE=B0?= Date: Tue, 1 Jun 2021 22:08:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=90=E7=BB=A9=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E9=AA=8C=E8=AF=81=E9=94=99=E8=AF=AF=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=88=90=E7=BB=A9=E5=BD=95=E5=85=A5=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=AD=A6=E7=A7=91=E4=B8=BA=E5=A4=8D=E9=80=89,=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AD=A6=E7=94=9F=E6=88=90=E7=BB=A9=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/view/index/index.html | 1 - app/luru/view/index/biaolu.html | 6 ++--- public/static/x-admin2.2/js/canyuKaoshi.js | 28 ++++++++++++++++++++++ view/list.html | 3 ++- 4 files changed, 32 insertions(+), 6 deletions(-) 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({