From 47bdb82291a006ce1027409f16b2f1afda0b7bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Mon, 16 Mar 2020 15:37:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=A2=9E=E5=8A=A0=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8F=82=E5=8A=A0=E8=80=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- app/chengji/view/index/index.html | 2 +- app/kaoshi/controller/Kaohao.php | 2 +- app/kaoshi/view/kaohao/create.html | 3 ++- app/login/view/index/shangma_log.html | 15 ++++++++++++++- app/renshi/controller/Student.php | 27 +++++++++++++++++++++++++++ app/renshi/model/Student.php | 2 +- app/renshi/route/renshi.php | 1 + app/renshi/view/student/index.html | 4 ++++ config/session.php | 4 +++- database/seeds/Rule.php | 13 +++++++------ 11 files changed, 64 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9162d2ff..e9eed0a4 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,9 @@ ## 演示地址 [http://www.dl-sm.cn](http://www.dl-sm.cn) 时间到2023年 或 -[http://www.lncxd.cn](http://www.lncxd.cn) 服务器3月21日到期 +[http://www.lncxd.cn](http://www.lncxd.cn) +或 +[154.8.193.178](154.8.193.178) 帐号 test1 密码 123456 diff --git a/app/chengji/view/index/index.html b/app/chengji/view/index/index.html index a18e0d50..114a2c87 100644 --- a/app/chengji/view/index/index.html +++ b/app/chengji/view/index/index.html @@ -123,7 +123,7 @@ table.on('toolbar(mytable)', function(obj){ switch(obj.event){ case 'add': - cjgl.add('添加考号','/kaoshi/kaohao/add/{$list.kaoshi}','650','400'); + cjgl.add('添加考号','/kaoshi/kaohao/create/{$list.kaoshi}','650','400'); break; case 'dels': var checkStatus = table.checkStatus('mytable'); //idmytable 即为基础参数 id 对应的值 diff --git a/app/kaoshi/controller/Kaohao.php b/app/kaoshi/controller/Kaohao.php index 9ed2e21d..ef5b2a69 100644 --- a/app/kaoshi/controller/Kaohao.php +++ b/app/kaoshi/controller/Kaohao.php @@ -74,7 +74,7 @@ class Kaohao extends BaseController // 获取参加考试学生名单 $stulist = $stu::where('school',$list['school']) ->where('banji','in',$list['banjiids']) - ->where('status',1) + ->where('kaoshi',1) ->field('id,school,banji') ->with([ 'stuBanji'=>function($query){ diff --git a/app/kaoshi/view/kaohao/create.html b/app/kaoshi/view/kaohao/create.html index a6514a86..711324be 100644 --- a/app/kaoshi/view/kaohao/create.html +++ b/app/kaoshi/view/kaohao/create.html @@ -115,7 +115,8 @@ "/renshi/student/srcstudent", { "str":str, - "banji":banji + "banji":banji, + "kaoshi":1 }, function(data,status){ $('#list').children("span[name='aa']").remove(); diff --git a/app/login/view/index/shangma_log.html b/app/login/view/index/shangma_log.html index b8ceb025..3f0a150f 100644 --- a/app/login/view/index/shangma_log.html +++ b/app/login/view/index/shangma_log.html @@ -47,7 +47,20 @@
  • -

    V1.3.2 2020-03-09

    +

    V1.3.2 2020-03-16

    +

    + 增加表格操作是否参加考试状态,增加相对应的权限。 +
    + 修复考号生成错误 +
    + env配置文件中增加session设置 +

    +
    +
  • +
  • + +
    +

    V1.3.2 2020-03-12

    修复缺少字段错误
    diff --git a/app/renshi/controller/Student.php b/app/renshi/controller/Student.php index 16ec1b9a..fc25bded 100644 --- a/app/renshi/controller/Student.php +++ b/app/renshi/controller/Student.php @@ -18,6 +18,8 @@ class Student extends BaseController // 设置要给模板赋值的信息 $list['webtitle'] = '学生列表'; $list['dataurl'] = 'student/data'; + $list['status'] = '/reshi/student/status'; + $list['kaoshi'] = '/renshi/student/kaoshi'; // 模板赋值 $this->view->assign('list',$list); @@ -457,6 +459,27 @@ class Student extends BaseController } + // 设置学生状态 + public function setKaoshi() + { + + // 获取id变量 + $id = request()->post('id'); + $value = request()->post('value'); + + // 获取学生信息 + $data = STU::where('id',$id)->update(['kaoshi'=>$value]); + + // 根据更新结果设置返回提示信息 + $data ? $data=['msg'=>'状态设置成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0]; + + // 返回信息 + return json($data); + } + + + + // 使用上传的表格进行校对,表格中不存在的数据删除 public function createAll() { @@ -755,6 +778,7 @@ class Student extends BaseController $str = input("post.str"); $banji = input("post.banji"); + $kaoshi = input("post.kaoshi"); // 判断是否存在数据,如果没有数据则返回。 if(strlen($str) <= 0){ @@ -767,6 +791,9 @@ class Student extends BaseController ->when(strlen($banji),function($query)use($banji){ $query->where('banji',$banji); }) + ->when(strlen($kaoshi),function($query)use($kaoshi){ + $query->where('kaoshi',$kaoshi); + }) ->with( [ 'stuSchool'=>function($query){ diff --git a/app/renshi/model/Student.php b/app/renshi/model/Student.php index d5acdc9d..9eb829d2 100644 --- a/app/renshi/model/Student.php +++ b/app/renshi/model/Student.php @@ -96,7 +96,7 @@ class Student extends Base $query->field('id,ruxuenian,paixu')->append(['banjiTitle']); } ]) - ->field('id,xingming,school,sex,shengri,banji,status') + ->field('id,xingming,school,sex,shengri,banji,kaoshi,status') ->append(['age']) ->select(); diff --git a/app/renshi/route/renshi.php b/app/renshi/route/renshi.php index e25d7225..84a3d4f8 100644 --- a/app/renshi/route/renshi.php +++ b/app/renshi/route/renshi.php @@ -28,6 +28,7 @@ Route::group('student', function () { Route::rule('download','Student/download','get'); # 批量保存 Route::rule('srcstudent','Student/srcStudent','post'); # 获取学生成绩 Route::rule('redel/','Student/reDel','delete'); # 恢复删除的学生 + Route::rule('kaoshi','Student/setKaoshi','post'); # 删除信息 }); diff --git a/app/renshi/view/student/index.html b/app/renshi/view/student/index.html index ea52e983..7dab8e48 100644 --- a/app/renshi/view/student/index.html +++ b/app/renshi/view/student/index.html @@ -79,6 +79,9 @@

    +