diff --git a/.example.env b/.example.env index 625de91f..c686bf51 100644 --- a/.example.env +++ b/.example.env @@ -19,6 +19,3 @@ default_lang = zh-cn [SESSION] EXPIRE = 1200 - -[SHANGMA] -CLASSMAX = 30 diff --git a/app/kaohao/model/Kaohao.php b/app/kaohao/model/Kaohao.php index 87ba1644..50eccc4d 100644 --- a/app/kaohao/model/Kaohao.php +++ b/app/kaohao/model/Kaohao.php @@ -61,7 +61,24 @@ class Kaohao extends BaseModel public function getBanTitleAttr() { $bj = new \app\teach\model\Banji; - $title = $bj->numToWord($this->getAttr('paixu')) . '班'; + + // 获取班级名显示样式 + $sys = new \app\system\model\SystemBase; + $alias = $sys->order('id')->value('classalias'); + if($alias == true) + { + $bj = new \app\teach\model\Banji; + $title = $bj->where('id', $this->getAttr('banji_id'))->value('alias'); + + if($title == '') + { + $title = $bj->numToWord($this->getAttr('paixu')) . '班'; + }else{ + $title = $title . '班'; + } + }else{ + $title = $bj->numToWord($this->getAttr('paixu')) . '班'; + } return $title; } diff --git a/app/system/controller/SystemBase.php b/app/system/controller/SystemBase.php index 05f0ae95..86995144 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, classmax') + $list['data'] = sysbasemod::field('id, keywords, description, thinks, danwei, grademax, classmax, classalias') ->order(['id' => 'desc']) ->find(); @@ -44,6 +44,9 @@ class SystemBase extends AdminBase ,'description' ,'thinks' ,'danwei' + ,'grademax' + ,'classmax' + ,'classalias' ], 'put'); $list['id'] = $id; diff --git a/app/system/view/system_base/edit.html b/app/system/view/system_base/edit.html index 70cac788..90982097 100644 --- a/app/system/view/system_base/edit.html +++ b/app/system/view/system_base/edit.html @@ -22,6 +22,48 @@
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+