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 @@
+ 增加表格操作是否参加考试状态,增加相对应的权限。
+
+ 修复考号生成错误
+
+ env配置文件中增加session设置
+
修复缺少字段错误
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/