diff --git a/app/chengji/controller/Bjtongji.php b/app/chengji/controller/Bjtongji.php index 24f4e1f8..e3db35c6 100644 --- a/app/chengji/controller/Bjtongji.php +++ b/app/chengji/controller/Bjtongji.php @@ -442,4 +442,214 @@ class Bjtongji extends AdminBase return json($data); } + + // 班级任课教师列表 + public function renke($kaoshi_id) + { + // 获取考试信息 + $ks = new \app\kaoshi\model\Kaoshi; + $ksinfo = $ks->where('id', $kaoshi_id) + ->field('id, title') + ->find(); + // 获取参与学校 + $cy = new \app\kaohao\model\SearchCanyu; + $src['kaoshi_id'] = $kaoshi_id; + $list['school_id'] = $cy->school($src); + + // 获取年级与学科 + $ksset = new \app\kaoshi\model\KaoshiSet; + $list['nianji'] = $ksset->srcGrade($kaoshi_id); + $list['subject_id'] = $ksset->srcSubject($src); + // 设置要给模板赋值的信息 + $list['webtitle'] = '任课教师'; + $list['kaoshi_id'] = $kaoshi_id; + $list['kaoshititle'] = $ksinfo->title; + $list['dataurl'] = '/chengji/bjtj/renkedata'; + + // 模板赋值 + $this->view->assign('list', $list); + + // 渲染模板 + return $this->view->fetch(); + } + + + // 查询任课教师 + // 获取年级成绩统计结果 + public function ajaxDataRenke() + { + // 获取参数 + $src = $this->request + ->only([ + 'page' => '1' + ,'limit' => '10' + ,'kaoshi_id' => '' + ,'ruxuenian' => '' + ,'school_id' => array() + ,'banji_id' => array() + ], 'POST'); + + if (count($src['banji_id'])==0) { + // 获取参与考试的班级 + $cy = new \app\kaohao\model\SearchCanyu; + $src['banji_id']= array_column($cy->class($src),'id'); + } + + // 统计成绩 + $btj = new BTJ; + $data = $btj->renke($src); + + // 获取记录总数 + $cnt = count($data); + // 截取当前页数据 + $data = array_slice($data, ($src['page'] - 1) * $src['limit'], $src['limit']); + // 重组返回内容 + $data = [ + 'code'=> 0 , // ajax请求次数,作为标识符 + 'msg'=>"", // 获取到的结果数(每页显示数量) + 'count'=>$cnt, // 符合条件的总数据量 + 'data'=>$data, //获取到的数据结果 + ]; + + return json($data); + } + + + // 编辑任课教师 + public function renkeEdit($id) + { + // 获取考试ID和班级ID + $info = BTJ::field('kaoshi_id, banji_id') + ->find($id); + + // 查询该班级各学科任课教师 + $btj = new BTJ; + $list['data'] = $btj->where('kaoshi_id', $info->kaoshi_id) + ->where('banji_id', $info->banji_id) + ->where('subject_id', '>', 0) + ->field('id, teacher_id, kaoshi_id, banji_id, subject_id') + ->with([ + 'bjTeacher' => function ($query) { + $query->field('id, xingming'); + }, + 'bjSubject' => function ($query) { + $query ->field('id, title, jiancheng'); + } + ]) + ->select(); + + // 设置页面标题 + $list['set'] = array( + 'webtitle'=>'设置任课教师' + ,'butname'=>'设置' + ,'formpost'=>'PUT' + ,'url'=>'/chengji/bjtj/renkeupdate/'.$id, + ); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + + + // 更新任课教师 + public function renkeUpdate($id) + { + // 获取参数 + $src = $this->request + ->only([ + 'teacher_id' => array() + ,'id' => array() + ], 'POST'); + + // 验证表单数据 + $validate = new \app\chengji\validate\RenKe; + $result = $validate->scene('edit')->check($src); + $msg = $validate->getError(); + if(!$result){ + return json(['msg'=>$msg,'val'=>0]);; + } + + // 整理数据 + $list = array(); + foreach ($src['id'] as $key => $value) { + $list[$key] = [ + 'id' => $value + ,'teacher_id' => $src['teacher_id'][$key] + ]; + } + + $btj = new BTJ; + $data = $btj->saveAll($list); + $data ? $data = ['msg' => '设置成功', 'val' => 1] + : $data = ['msg' => '数据处理错误', 'val' => 0]; + + // 返回信息 + return json($data); + } + + + + // 根据教师姓名设置任课教师 + public function renkeEditTeacher($kaoshi_id) + { + $list['data']['kaoshi_id'] = $kaoshi_id; + $list['data']['subject_id'] = 'a'; + $sbj = new \app\teach\model\Subject; + $list['data']['subject_id'] = $sbj->kaoshi(); + // halt($list); + // 设置页面标题 + $list['set'] = array( + 'webtitle'=>'设置任课教师' + ,'butname'=>'设置' + ,'formpost'=>'PUT' + ,'url'=>'/chengji/bjtj/renkeupdateteaher', + ); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + + // 更新任课教师 + public function renkeUpdateteacher() + { + // 获取参数 + $src = $this->request + ->only([ + 'teacher_id' => '' + ,'id' => array() + ], 'POST'); + + // 验证表单数据 + $validate = new \app\chengji\validate\RenKe; + $result = $validate->scene('edit')->check($src); + $msg = $validate->getError(); + if(!$result){ + return json(['msg'=>$msg,'val'=>0]);; + } + + // 整理数据 + $list = array(); + foreach ($src['id'] as $key => $value) { + $list[$key] = [ + 'id' => $value + ,'teacher_id' => $src['teacher_id'] + ]; + } + + $btj = new BTJ; + $data = $btj->saveAll($list); + $data ? $data = ['msg' => '设置成功', 'val' => 1] + : $data = ['msg' => '数据处理错误', 'val' => 0]; + + // 返回信息 + return json($data); + } + + } diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index d5d047b7..5360fb43 100644 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -122,7 +122,7 @@ class TongjiBj extends BaseModel $src['school_id'] = strToArray($src['school_id']); // 实例化学生成绩统计类 - $tj = new TJ; + $tj = new TJ(); $more = new More(); $cy = new Canyu(); $ksset = new ksset(); @@ -217,49 +217,8 @@ class TongjiBj extends BaseModel // 根据条件查询各班级成绩 public function search($srcfrom) { - // 初始化参数 - $src = array( - 'kaoshi_id' => '' - ,'banji_id' => array() - ); - $src = array_cover($srcfrom, $src); - $src['banji_id'] = strToarray($src['banji_id']); - $kaoshi_id = $src['kaoshi_id']; - - if(count($src['banji_id']) == 0){ - return array(); - } - - $tongjiJg = $this - ->where('kaoshi_id', $src['kaoshi_id']) - ->where('banji_id', 'in', $src['banji_id']) - ->field('banji_id, kaoshi_id') - ->with([ - 'bjBanji'=>function($query){ - $query - ->field('id, school_id, paixu, ruxuenian, alias') - ->with([ - 'glSchool'=>function($query){ - $query->field('id, jiancheng, paixu'); - }, - ]); - - }, - 'bjJieguo'=>function($query){ - $query->field('subject_id, banji_id, stu_cnt, - chengji_cnt, avg, youxiu, jige, biaozhuncha, - max, min, q1, q2, q3') - ->with([ - 'bjSubject' => function($query){ - $query->field('id, lieming, jiancheng, title'); - }, - ]) - ->order(['subject_id']); - } - ]) - ->group('banji_id, kaoshi_id') - ->append(['banjiTitle']) - ->select(); + // 查询数据 + $tongjiJg = $this->searchBase($srcfrom); // 重组数据 $data = array(); @@ -296,7 +255,139 @@ class TongjiBj extends BaseModel ,'jige' => $val->jige ]; } + } + } + if(count($data)>0) + { + $data = \app\facade\Tools::sortArrByManyField($data, 'school_paixu', SORT_ASC, 'banji_paixu', SORT_ASC); + } + return $data; + } + + + // 根据条件查询各班级成绩 + public function searchBase($srcfrom) + { + // 初始化参数 + $src = array( + 'kaoshi_id' => '' + ,'banji_id' => array() + ); + $src = array_cover($srcfrom, $src); + $src['banji_id'] = strToarray($src['banji_id']); + $kaoshi_id = $src['kaoshi_id']; + + if(count($src['banji_id']) == 0){ + return array(); + } + + $tongjiJg = $this + ->where('kaoshi_id', $src['kaoshi_id']) + ->where('banji_id', 'in', $src['banji_id']) + ->field('banji_id, kaoshi_id') + ->with([ + 'bjBanji '=> function ($query) { + $query + ->field('id, school_id, paixu, ruxuenian, alias') + ->with([ + 'glSchool' => function($query){ + $query->field('id, jiancheng, paixu'); + }, + ]); + + }, + 'bjJieguo' => function ($query) { + $query->field('id, teacher_id, subject_id, banji_id, stu_cnt, + chengji_cnt, avg, youxiu, jige, biaozhuncha, + max, min, q1, q2, q3') + ->with([ + 'bjSubject' => function($q){ + $q->field('id, lieming, jiancheng, title'); + }, + 'bjTeacher' => function ($q) { + $q->field('id, xingming'); + } + ]) + ->order(['subject_id']); + } + ]) + ->group('banji_id, kaoshi_id') + ->append(['banjiTitle']) + ->select(); + + return $tongjiJg; + } + + + + // 查询成绩统计结果(没有分组) + public function searchSubjedt($srcfrom) + { + // 初始化参数 + $src = array( + 'kaoshi_id' => '' + ,'banji_id' => array() + ,'subject_id' => array() + ,'school_id' => '' + ,'ruxuenian' => '' + ); + $src = array_cover($srcfrom, $src); + $src['banji_id'] = strToarray($src['banji_id']); + $src['subject_id'] = strToarray($src['subject_id']); + + $data = $this->where('kaoshi_id', $src['kaoshi_id']) + ->when(count($src['banji_id']) > 0, function ($query) use($src) { + $query->where('banji_id', 'in', $src['banji_id']); + }) + ->where('banji_id', 'in', function ($query) use($src) { + $query->name('banji') + ->when(strlen($src['school_id']) > 0, function ($q) use ($src) { + $q->where('school_id', $src['school_id']); + }) + ->when(strlen($src['school_id']) > 0, function ($q) use ($src) { + $q->where('ruxuenian', $src['ruxuenian']); + }) + ->field('id'); + }) + ->when(count($src['subject_id']) > 0, function ($query) use($src) { + $query->where('subject_id', 'in', $src['subject_id']); + }) + ->field('id, banji_id, kaoshi_id') + ->append(['banTitle']) + ->select(); + + return $data; + } + + + // 查询任课教师 + public function renke($srcfrom) + { + // 查询数据 + $tongjiJg = $this->searchBase($srcfrom); + + // 重组数据 + $data = array(); + foreach ($tongjiJg as $key => $value) { + $data[$value->banji_id] = [ + 'school_paixu' =>$value->school_paixu + ,'school_jiancheng' => $value->bjBanji->glSchool->jiancheng + ,'banji_title' => $value->banjiTitle + ,'banji_paixu' => $value->banji_paixu + + ]; + foreach ($value->bjJieguo as $k => $val) { + if($val->subject_id > 0){ + if(isset($val->bjTeacher->xingming)) + { + $data[$value->banji_id][$val->bjSubject->lieming] = $val->bjTeacher->xingming; + }else{ + $data[$value->banji_id][$val->bjSubject->lieming] = ''; + } + + $data[$value->banji_id]['id'] = $val->id; + } } } if(count($data)>0) @@ -453,6 +544,13 @@ class TongjiBj extends BaseModel } + // 教师关联 + public function bjTeacher() + { + return $this->belongsTo('\app\teacher\model\Teacher', 'teacher_id', 'id'); + } + + // 获取班级名称 public function getBanjiTitleAttr() { @@ -462,23 +560,22 @@ class TongjiBj extends BaseModel $njlist = nianJiNameList('str', $ks->getData('enddate')); $njname = $njlist[$bj->ruxuenian]; - $sys = \app\facade\System::sysClass(); - $classalias = $sys->classalias; + $bjname = $bj->banTitle; - $bjobj = new \app\teach\model\Banji; + $title = $njname . $bjname; - if($sys->classalias) - { - $bjname = $bj->alias; - if($bjname == '') - { - $bjname = $bjobj->numToWord($bj->paixu); - } - }else{ - $bjname = $bjobj->numToWord($bj->paixu); - } + return $title; + } - $title = $njname . $bjname . '班'; + + // 获取班级名称 + public function getBanTitleAttr() + { + $bj = $this->getAttr('bjBanji'); + + $bjname = $bj->banTitle; + + $title = $bjname; return $title; } diff --git a/app/chengji/route/chengji.php b/app/chengji/route/chengji.php index 1f9e467d..bef4573b 100644 --- a/app/chengji/route/chengji.php +++ b/app/chengji/route/chengji.php @@ -46,9 +46,15 @@ Route::group('bjtj', function () { Route::rule('tongji','Bjtongji/tongji','post'); # 统计各班级成绩 Route::rule('myavg','Bjtongji/myAvg','post'); # 扫码界面 Route::rule('myxiangti','Bjtongji/myXiangti','post'); # 扫码界面 - Route::rule('myfenshuduan','Bjtongji/myFenshuduan','post'); # 扫码界面 + Route::rule('myfenshuduan','Bjtongji/myFenshuduan','post'); # 扫码界面 Route::rule('bjorder','Bjtongji/bjOrder','post'); # 统计各班级成绩 Route::rule('fenshuduan/','Bjtongji/fenshuduan','get'); # 班级表格 + Route::rule('renke/','Bjtongji/renke','get'); # 班级表格 + Route::rule('renkedata','Bjtongji/ajaxDataRenke','post'); # 班级表格 + Route::rule('renkeedit/','Bjtongji/renkeEdit','get'); # 更新任课教师 + Route::rule('renkeupdate/','Bjtongji/renkeUpdate','put'); # 班级表格 + Route::rule('renkeeditteacher/','Bjtongji/renkeEditTeacher','get'); # 设置任课教师 + Route::rule('renkeupdateteaher','Bjtongji/renkeUpdateTeacher','put'); # 更新任课教师 }); @@ -76,14 +82,14 @@ Route::group('schtj', function () { // 录入 Route::group('luru', function () { - Route::rule('malu','Luru/malu','get'); # 扫码界面 - Route::rule('malusave','Luru/malusave','put'); # 扫码保存 - Route::rule('read','Luru/read','post'); # 扫码后读取成绩 - Route::rule('biaolu','Luru/biaolu','get'); # 表格录入界面 - Route::rule('saveall','Luru/saveAll','post'); # 保存表格录入信息 - Route::rule('edit/','Luru/edit','get'); # 修改信息 - Route::rule('update/','Luru/update','put'); # 更新信息 - Route::rule('index','Luru/index','get'); # 成绩获取 - Route::rule('data','Luru/ajaxData','post'); # 成绩获取 + Route::rule('malu', 'Luru/malu', 'get'); # 扫码界面 + Route::rule('malusave', 'Luru/malusave', 'put'); # 扫码保存 + Route::rule('read', 'Luru/read', 'post'); # 扫码后读取成绩 + Route::rule('biaolu', 'Luru/biaolu', 'get'); # 表格录入界面 + Route::rule('saveall', 'Luru/saveAll', 'post'); # 保存表格录入信息 + Route::rule('edit/', 'Luru/edit', 'get'); # 修改信息 + Route::rule('update/', 'Luru/update', 'put'); # 更新信息 + Route::rule('index', 'Luru/index', 'get'); # 成绩获取 + Route::rule('data', 'Luru/ajaxData', 'post'); # 成绩获取 }); diff --git a/app/chengji/validate/RenKe.php b/app/chengji/validate/RenKe.php new file mode 100644 index 00000000..381e63c2 --- /dev/null +++ b/app/chengji/validate/RenKe.php @@ -0,0 +1,35 @@ + ['规则1','规则2'...] + * + * @var array + */ + protected $rule = [ + 'id|ID' => 'require|array', + 'teacher_id|教师' => 'require', + ]; + + /** + * 定义错误信息 + * 格式:'字段名.规则名' => '错误信息' + * + * @var array + */ + protected $message = []; + + protected $scene = [ + 'edit' => [ + 'id' + ,'teacher_id' + ] + ]; +} diff --git a/app/chengji/view/bjtongji/renke.html b/app/chengji/view/bjtongji/renke.html new file mode 100644 index 00000000..4123d547 --- /dev/null +++ b/app/chengji/view/bjtongji/renke.html @@ -0,0 +1,164 @@ + +{extend name=".././view/list.html" /} +{block name="jsset"} +{load href="__STATIC__/echarts/echarts.js" /} +{load href="__STATIC__/echarts/infographic.js" /} +{/block} +{block name="nav"} + + 考试管理 + 更多操作 + 前期操作 + 任课教师 + {$list['kaoshititle']} + +{/block} +{block name="search"} +
+ +
+ + {volist name="$list.school_id" id="vo"} + + {/volist} +
+
+
+ +
+ {volist name="$list.nianji" id="vo"} + + {/volist} +
+
+
+ +
+
+
+ +{/block} +{block name="table"} +
+{/block} + +{block name="myjs"} + + + + + + + {/block} diff --git a/app/chengji/view/bjtongji/renke_edit.html b/app/chengji/view/bjtongji/renke_edit.html new file mode 100644 index 00000000..4b737a66 --- /dev/null +++ b/app/chengji/view/bjtongji/renke_edit.html @@ -0,0 +1,123 @@ +{extend name=".././view/create.html" /} + +{block name="form"} +
+ {volist name="list.data" id="vo"} +
+ +
+ + + +
+
+
+ {/volist} +
+ +
+
+{/block} + +{block name="myjs"} + + + +{/block} + diff --git a/app/chengji/view/bjtongji/renke_edit_teacher.html b/app/chengji/view/bjtongji/renke_edit_teacher.html new file mode 100644 index 00000000..07bbaed6 --- /dev/null +++ b/app/chengji/view/bjtongji/renke_edit_teacher.html @@ -0,0 +1,217 @@ +{extend name=".././view/create.html" /} + +{block name="form"} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+ + +
+
+
+ +
+ +
+
+{/block} + +{block name="myjs"} + + + +{/block} + diff --git a/app/kaoshi/controller/KaoshiSet.php b/app/kaoshi/controller/KaoshiSet.php index 388088ae..6fbbb403 100644 --- a/app/kaoshi/controller/KaoshiSet.php +++ b/app/kaoshi/controller/KaoshiSet.php @@ -287,5 +287,4 @@ class KaoshiSet extends AdminBase // 返回信息 return json($data); } - } diff --git a/app/kaoshi/view/index/index.html b/app/kaoshi/view/index/index.html index 3b04dc43..018d9d3a 100644 --- a/app/kaoshi/view/index/index.html +++ b/app/kaoshi/view/index/index.html @@ -96,8 +96,6 @@ endate = d.bfdate + '~' + endate; return endate; }}, - - ]]; // 提交搜索条件后重载表格 diff --git a/app/kaoshi/view/index/more_action.html b/app/kaoshi/view/index/more_action.html index 87c8cf92..6abe9c85 100644 --- a/app/kaoshi/view/index/more_action.html +++ b/app/kaoshi/view/index/more_action.html @@ -61,13 +61,6 @@
生成考号
- -
- -
任课教师
-
-
@@ -162,6 +155,13 @@
检测统计结果是否是最新结果
+ +
+ +
任课教师
+
+
diff --git a/app/middleware/Auth.php b/app/middleware/Auth.php index 34d8c084..5592615e 100644 --- a/app/middleware/Auth.php +++ b/app/middleware/Auth.php @@ -89,6 +89,7 @@ class Auth 'chengji/bjtongji/myavg', # 获取单项成绩数据 'chengji/bjtongji/myxiangti', # 获取成绩箱体图数据 'chengji/bjtongji/myfenshuduan', # 获取成绩各分数段折线统计图数据 + 'chengji/bjtongji/ajaxdatarenke', # 获取成绩各分数段折线统计图数据 'chengji/njtongji/dwnianjixlsx', # 下载年级成绩统计表 'chengji/njtongji/myavg', # 获取单项成绩数据 'chengji/njtongji/myxiangti', # 获取成绩箱体图数据 diff --git a/app/student/view/index/deletes.html b/app/student/view/index/deletes.html index 010b43fd..5bfa3ad5 100644 --- a/app/student/view/index/deletes.html +++ b/app/student/view/index/deletes.html @@ -42,7 +42,7 @@ layui.use('upload', function(){ layer.msg(res.msg); } ,data: { - category_id: '1011102' + category_id: '11102' ,serurl:'student' } diff --git a/app/teacher/controller/Index.php b/app/teacher/controller/Index.php index a75c6ef0..d4cfb206 100644 --- a/app/teacher/controller/Index.php +++ b/app/teacher/controller/Index.php @@ -409,41 +409,25 @@ class Index extends AdminBase // 根据教师姓名、首拼、全拼搜索教师信息 public function srcTeacher() { - // 声明结果数组 - $data = array(); - $str = input("post.str"); - - // 判断是否存在数据,如果没有数据则返回。 - if(strlen($str) <= 0){ - return json($data); - } + // 获取参数 + $src = $this->request + ->only([ + 'str' => '' + ,'danwei_id' => '' + ,'field' => 'id' + ,'order' => 'desc' + ,'teacher_id' => '' + ], 'POST'); $teacher = new TC(); - $list = $teacher->strSrcTeachers($str); + $data = $teacher->strSrcTeachers($src); - return json($list); + $data = reSetObject($data, $src); + + return json($data); } - // // 上传文件 - // public function upload() - // { - // // 获取表单数据 - // $list = request()->only([ - // 'serurl' - // ,'category_id' - // ], 'post'); - - // // 获取表单上传文件 - // $file = request()->file('file'); - // // 上传文件并返回结果 - // $fileObj = new File(); - // $data = $fileObj->saveFileInfo($file, $list, true); - - // return json($data); - // } - - // 下载表格模板 public function downloadXls() { diff --git a/app/teacher/model/Teacher.php b/app/teacher/model/Teacher.php index 4cee83f7..19d39a4e 100644 --- a/app/teacher/model/Teacher.php +++ b/app/teacher/model/Teacher.php @@ -168,12 +168,20 @@ class Teacher extends BaseModel // 根据姓名、首拼查询教师 - public function strSrcTeachers($str) + public function strSrcTeachers($srcfrom) { + $src = [ + 'str' => '' + ,'danwei_id' => '' + ]; + $src = array_cover($srcfrom, $src); // 如果有数据则查询教师信息 $list = self::field('id, xingming, danwei_id, shengri, sex') - ->whereOr('xingming', 'like', '%' . $str . '%') - ->whereOr('shoupin', 'like', $str . '%') + ->whereOr('xingming', 'like', '%' . $src['str'] . '%') + ->whereOr('shoupin', 'like', $src['str'] . '%') + ->when(strlen($src['danwei_id']) > 0, function ($query) use($src) { + $query->where('danwei_id', $src['danwei_id']); + }) ->with( [ 'jsDanwei' => function($query){ diff --git a/app/tools/controller/CanKao.php b/app/tools/controller/CanKao.php index 211ef666..d9b36c84 100644 --- a/app/tools/controller/CanKao.php +++ b/app/tools/controller/CanKao.php @@ -5,7 +5,7 @@ namespace app\zhengli\controller; use app\base\controller\ToolsBase; -class CanKao extends BaseController +class CanKao1 extends BaseController { // 获取参考学科 public function subjectIdLieming($srcfrom) diff --git a/app/tools/controller/KsCanyu.php b/app/tools/controller/KsCanyu.php index 476dd452..36993819 100644 --- a/app/tools/controller/KsCanyu.php +++ b/app/tools/controller/KsCanyu.php @@ -64,6 +64,27 @@ class KsCanYu extends BaseController } + // 根据考试ID和年级获取参加考试班级 + public function tjClass() + { + // 获取参数 + $src = $this->request + ->only([ + 'school_id' => '' + ,'ruxuenian' => '' + ,'kaoshi_id' => '' + ,'subject_id' => '' + ,'limit' => 100 + ], 'POST'); + + $khSrc = new \app\chengji\model\TongjiBj; + $bj = $khSrc->searchSubjedt($src); + $bj = reSetObject($bj, $src); + + return json($bj); + } + + // 根据考试ID和年级获取参加考试学科 public function subject() { diff --git a/app/tools/route/tools.php b/app/tools/route/tools.php index 5006f2d3..5dddb0d3 100644 --- a/app/tools/route/tools.php +++ b/app/tools/route/tools.php @@ -15,6 +15,7 @@ Route::group('kscy', function () { Route::rule('school','KsCanyu/school','post'); # 参与学科 Route::rule('grade','KsCanyu/grade','post'); # 参与学科 Route::rule('class','KsCanyu/class','post'); # 参与学科 + Route::rule('tjclass','KsCanyu/tjClass','post'); # 参与学科 Route::rule('subject','KsCanyu/subject','post'); # 参与学科 }); diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index 16afad8c..fbf14faa 100644 --- a/database/seeds/Rule.php +++ b/database/seeds/Rule.php @@ -234,8 +234,38 @@ class Rule extends Seeder ,'paixu' => 2 ,'pid' => 3020102 ], - ['id' => 3020103 + ,'title' => '任课教师' + ,'name' => 'chengji/bjtongji/renke' + ,'paixu' => 1 + ,'pid' => 30201 + ], + ['id' => 302010301 + ,'title' => '编辑' + ,'name' => 'chengji/bjtongji/renkeedit' + ,'paixu' => 2 + ,'pid' => 3020103 + ], + ['id' => 302010302 + ,'title' => '更新编辑' + ,'name' => 'chengji/bjtongji/renkeupdate' + ,'paixu' => 2 + ,'pid' => 3020103 + ], + ['id' => 302010303 + ,'title' => '设置' + ,'name' => 'chengji/bjtongji/renkeeditteacher' + ,'paixu' => 2 + ,'pid' => 3020103 + ], + ['id' => 302010304 + ,'title' => '更新设置' + ,'name' => 'chengji/bjtongji/renkeupdateteacher' + ,'paixu' => 2 + ,'pid' => 3020103 + ], + + ['id' => 3020104 ,'title' => '下载试卷标签信息' ,'name' => 'kaohao/excel/biaoqian' ,'paixu' => 4 @@ -243,9 +273,9 @@ class Rule extends Seeder ], ['id' => 290000000 ,'title' => '生成考号备用' - ,'name' => 'zhanwei_302010301' + ,'name' => 'zhanwei_302010401' ,'paixu' => 2 - ,'pid' => 3020102 + ,'pid' => 3020104 ], ['id' => 30202 ,'title' => '成绩录入' diff --git a/public/static/x-admin2.2/js/cjgl.js b/public/static/x-admin2.2/js/cjgl.js index 678b7ea5..a74d53a9 100644 --- a/public/static/x-admin2.2/js/cjgl.js +++ b/public/static/x-admin2.2/js/cjgl.js @@ -181,7 +181,7 @@ layui.define(['table'],function(exports){ //提示:模块也可以依赖其它 "str":val, }, function(data,status){ - + data = data.data; if($.isEmptyObject(data)) { return true;