diff --git a/app/common.php b/app/common.php index 07b7df86..0df2d8fb 100755 --- a/app/common.php +++ b/app/common.php @@ -100,19 +100,6 @@ } - // /** - // * 把重新整理从数据模型中返回的对象 - // * @access public - // * @param str或array $str 表单中获取的参数 - // * @return array 返回类型 - // */ - // function reset_array($arr, $srcfrom) - // { - // $data = \app\facade\Tools::reset_data($arr, $srcfrom); - // return $data; - // } - - // 定义EXCEL列名 function excel_column_name() { @@ -121,14 +108,6 @@ } - // // 多字段排序 - // function sort_arr_by_many_field($arr, $srcfrom) - // { - // $data = \app\facade\Tools::sortArrByManyField($arr, $srcfrom); - // return $data; - // } - - // 已知密码进行验证 function login_check($inputPassword, $serverPassword) { diff --git a/app/kaohao/model/SearchMore.php b/app/kaohao/model/SearchMore.php index 2a91b2d5..07a94642 100755 --- a/app/kaohao/model/SearchMore.php +++ b/app/kaohao/model/SearchMore.php @@ -266,6 +266,9 @@ class SearchMore extends BaseModel ); // 用新值替换初始值 $src = array_cover($srcfrom, $src); + $field = $src['field']; + $order = $src['order']; + unset($src['field'], $src['order']); $khlist = $this->searchLuruBase($src); if($khlist->isEmpty()) { @@ -306,6 +309,10 @@ class SearchMore extends BaseModel } } } + + $order == 'asc' ? $order = SORT_ASC : $order = SORT_DESC; + $data = \app\facade\Tools::sortArrByManyField($data, $field, $order); + return $data; } diff --git a/app/luru/controller/Index.php b/app/luru/controller/Index.php index 0a2ad8e2..1364f885 100755 --- a/app/luru/controller/Index.php +++ b/app/luru/controller/Index.php @@ -796,7 +796,7 @@ class Index extends AdminBase ->only([ 'page' ,'limit' - ,'field' => 'id' + ,'field' => 'student_xingming' ,'order' => 'asc' ,'kaoshi_id' ,'banji_id' => array() @@ -806,7 +806,6 @@ class Index extends AdminBase // 实例化并查询成绩 $cj = new \app\kaohao\model\SearchMore; $data = $cj->srcOnlineEdit($src); - // halt($data); $data = reset_data($data, $src); return json($data); @@ -816,13 +815,6 @@ class Index extends AdminBase // 统计已经录入成绩数量--选择页面 public function yiluCnt() { - // $ks = new \app\kaoshi\model\Kaoshi; - // // 获取参考年级 - // $list['data'] = $ks::order(['id' => 'desc']) - // ->field('id, title') - // ->where('status', 1) - // ->select(); - // 设置页面标题 $list['set'] = array( 'webtitle' => '已录统计' diff --git a/app/studentSearchChengji/controller/Index.php b/app/studentSearchChengji/controller/Index.php index a0c23843..7fa94e0e 100755 --- a/app/studentSearchChengji/controller/Index.php +++ b/app/studentSearchChengji/controller/Index.php @@ -40,9 +40,6 @@ class Index extends StudentSearchBase $list['banjiTitle'] = $stuInfo->stuBanji->banjiTitle; $list['student_id'] = session('user_id'); $subject = new \app\teach\model\Subject; - $list['sbj'] = $subject->search(['kaoshi' => 1]); - $list['tjxm'] = src_tjxm(12207); - // 查询学生成绩 // 获取表单参数 @@ -63,9 +60,15 @@ class Index extends StudentSearchBase // 获取学生成绩 $stucj = new \app\tools\model\OneStudentChengji; $khList = $stucj->oldList($src); - // $data = reset_data($khList, $src); - // halt($data); + $sbj = new \app\teach\model\Subject; + $list['subject'] = $sbj + ->where('kaoshi', 1) + ->column('title', 'lieming'); + + $list['chengji'] = $khList; + + // halt($list->toArray()); // 模板赋值 $this->view->assign('list', $list); diff --git a/app/studentSearchChengji/view/index/index.html b/app/studentSearchChengji/view/index/index.html index b5564001..e2b79235 100755 --- a/app/studentSearchChengji/view/index/index.html +++ b/app/studentSearchChengji/view/index/index.html @@ -40,44 +40,79 @@
- -- 您现在使用的是默认密码,为了您的信息不被漏,请及时修改密码。 --{/if} -
- 感谢{$list.thinks}提供技术支持。+ {if (session('password') == 123456) } +
-
+ 您现在使用的是默认密码,为了您的信息安全,请及时修改密码。 ++ {/if} +
| 学科 | +得分 | +
|---|---|
| {$sbj} | +{$vo[$key]} | +
+ 感谢{$list.thinks}提供技术支持。+
+