diff --git a/.example.env b/.example.env index 31eba874..39a5af55 100644 --- a/.example.env +++ b/.example.env @@ -17,6 +17,3 @@ default_lang = zh-cn [SESSION] EXPIRE = 1200 - -[SHANGMA] -CLASSMAX = 25 diff --git a/app/common.php b/app/common.php index 0484e10f..8a5268e8 100644 --- a/app/common.php +++ b/app/common.php @@ -23,11 +23,11 @@ } - function nianJiNameList($riqi=0) + function nianJiNameList($value = 'str', $riqi = 0) { // 实例化年级控制器 $bj = new \app\teach\model\Banji; - $njList= $bj->gradeName($riqi); + $njList= $bj->gradeName($value, $riqi); return $njList; } @@ -42,16 +42,6 @@ } - /** - * $date是时间戳 - * $type为1的时候是虚岁,2的时候是周岁 - */ - function getAgeByBirth($date = 0, $type = 1){ - $tearch = new \app\teacher\model\Tearcher; - $age = $tearch->fBirth($data, $type); - return $age; - } - // EXCEL表格列名 function excelColumnName() diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index ff8e312b..17599c5a 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -93,6 +93,8 @@ class Index extends BaseController // 课题数 $con = new \app\keti\model\KetiInfo; $list['keti'] = $con->count(); + // 缓存时间 + $list['cacheExpire'] = config('cache.stores.file.expire') . 's'; $view = app('view'); // 模版赋值 diff --git a/app/index/view/index/welcome.html b/app/index/view/index/welcome.html index a9d63849..af747033 100644 --- a/app/index/view/index/welcome.html +++ b/app/index/view/index/welcome.html @@ -137,8 +137,11 @@ 上传附件限制 2M - 执行时间限制 + SESSION时间限制 {$list.session} + + 缓存时间限制 + {$list.cacheExpire} 剩余空间 {$list.kongjian} diff --git a/app/login/view/index/shangma_log.html b/app/login/view/index/shangma_log.html index eb316d77..c9d9d059 100644 --- a/app/login/view/index/shangma_log.html +++ b/app/login/view/index/shangma_log.html @@ -49,19 +49,21 @@

V1.3.5 2020-05-7

- 增加角色中分配用户。 + 增加角色中分配用户
升级框架ThinkPHP V6.0.3
分离教师、学生应用
- 修改考试列表显示、班级名称生成算法 + 修改部分上传和列表的页面显示、班级名称生成算法、模型继承
修复已知错误
增加各分数段统计、增加学生成绩查询、增加班级最大数量配置
取消录入成绩时对十分位的验证 +
+ 重新整理自定义方法,将不常用的方法归类到相应的模型或控制器中

diff --git a/app/student/model/Student.php b/app/student/model/Student.php index 47e41c24..e8f8dd22 100644 --- a/app/student/model/Student.php +++ b/app/student/model/Student.php @@ -19,10 +19,13 @@ class Student extends BaseModel // 年龄获取器 public function getAgeAttr() { - if(strlen($this->getData('shengri')) == 0){ + $shengri = $this->getData('shengri'); + if(strlen($shengri) == 0 ){ return ''; }; - return getAgeByBirth($this->getData('shengri'), 2); + $tearch = new \app\teacher\model\Teacher; + $age = $tearch->fBirth($shengri, 1); + return $age; } diff --git a/app/student/view/index/by_list.html b/app/student/view/index/by_list.html index cdd5d580..0cda3abe 100644 --- a/app/student/view/index/by_list.html +++ b/app/student/view/index/by_list.html @@ -30,14 +30,14 @@
- +
{php} $thisTime = strtotime("-6 year"); - $njlist = nianJiNameList($thisTime); + $njlist = nianJiNameList('str', $thisTime); {/php} {volist name="njlist" id="vo"} - + {/volist}
diff --git a/app/student/view/index/index.html b/app/student/view/index/index.html index f1904bd4..a977ed17 100644 --- a/app/student/view/index/index.html +++ b/app/student/view/index/index.html @@ -122,13 +122,13 @@ cjgl.add('添加学生','/student/index/create','','',true); break; case 'upload': - cjgl.add('校对导入','/student/index/createall','','',true); + cjgl.add('校对导入','/student/index/createall','600','300',false); break; case 'download': window.open("/student/index/download"); break; case 'jdsc': - cjgl.add('表格删除','/student/index/deletes'); + cjgl.add('表格删除','/student/index/deletes', '600', '300', false); break; }; }); diff --git a/app/system/controller/SystemBase.php b/app/system/controller/SystemBase.php index 232003b1..05f0ae95 100644 --- a/app/system/controller/SystemBase.php +++ b/app/system/controller/SystemBase.php @@ -14,7 +14,7 @@ class SystemBase extends AdminBase public function edit() { // 获取用户信息 - $list['data'] = sysbasemod::field('id, keywords, description, thinks, danwei') + $list['data'] = sysbasemod::field('id, keywords, description, thinks, danwei, classmax') ->order(['id' => 'desc']) ->find(); diff --git a/app/system/view/system_base/edit.html b/app/system/view/system_base/edit.html index 48998ee5..70cac788 100644 --- a/app/system/view/system_base/edit.html +++ b/app/system/view/system_base/edit.html @@ -58,6 +58,15 @@ autocomplete="off" class="layui-input" value="{$list.data.danwei|default=''}"> +
+ +
+ +
+