diff --git a/application/teach/controller/Banji.php b/application/teach/controller/Banji.php index afa95989..b1a21bd3 100644 --- a/application/teach/controller/Banji.php +++ b/application/teach/controller/Banji.php @@ -51,7 +51,7 @@ class Banji extends Base $cnt = BJ::count(); //查询数据 $data =BJ::field('id,school,ruxuenian,paixu,status') - ->order([$order_field=>$order]) + ->order([$order_field=>$order,'ruxuenian','paixu']) ->limit($limit_start,$limit_length) ->all(); diff --git a/application/teach/view/banji/index.html b/application/teach/view/banji/index.html index bde601a7..1d1ae70d 100644 --- a/application/teach/view/banji/index.html +++ b/application/teach/view/banji/index.html @@ -36,6 +36,7 @@ + ID 班级名称 学校 入学年 @@ -64,6 +65,7 @@ // 定义列参数 var mycolumns = [ { "data": "id" }, + { "data": "id" }, { "data": "title" }, { "data": "school" }, { "data": "ruxuenian"}, @@ -97,9 +99,9 @@ endbut = ''; if(row.status == '已停用') { - buts = startbut + editbut + bfbut + endbut; + buts = startbut + bfbut + endbut; }else{ - buts = stopbut + editbut + bfbut + endbut; + buts = stopbut + bfbut + endbut; } return buts; @@ -136,6 +138,17 @@ }, dataType: 'json', success: function(data){ + if(data.val == true && caozuo == -1) + { + yd = $(obj).parents("tr").html(); + $(obj).parents("tr").prev().before('' + yd + ''); + $(obj).parents("tr").remove(); + }else{ + yd = $(obj).parents("tr").html(); + $(obj).parents("tr").next().after('' + yd + ''); + $(obj).parents("tr").remove(); + } + layer.alert(data.msg); }, error:function(data) { diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index e722d24c..0c5c3e3a 100644 --- a/database/seeds/Rule.php +++ b/database/seeds/Rule.php @@ -76,10 +76,12 @@ class Rule extends Seeder ['title'=>'状态','name'=>'teach/Index/status','paixu'=>5,'pid'=>41], // 学生管理权限 ['title'=>'添加','name'=>'teach/Student/create','paixu' =>1,'pid'=>42], - ['title'=>'删除','name'=>'teach/Student/delete','paixu'=>2,'pid'=>42], - ['title'=>'编辑','name'=>'teach/Student/edit','paixu'=>3,'pid'=>42,], - ['title'=>'查看','name'=>'teach/Student/read','paixu'=>4,'pid'=>42,], - ['title'=>'状态','name'=>'teach/Student/status','paixu'=>5,'pid'=>42], + ['title'=>'状态','name'=>'teach/Student/status','paixu'=>2,'pid'=>42], + ['title'=>'移动','name'=>'teach/Student/yidong','paixu'=>3,'pid'=>42], + // ['title'=>'删除','name'=>'teach/Student/delete','paixu'=>2,'pid'=>42], + // ['title'=>'编辑','name'=>'teach/Student/edit','paixu'=>3,'pid'=>42,], + // ['title'=>'查看','name'=>'teach/Student/read','paixu'=>4,'pid'=>42,], + // ['title'=>'状态','name'=>'teach/Student/status','paixu'=>5,'pid'=>42], // 系统设置