From a4e9780c3cb6cd4305134fcc7488e6497d025438 Mon Sep 17 00:00:00 2001 From: win10 Date: Wed, 17 Jun 2020 08:53:21 +0800 Subject: [PATCH] 0 --- app/Update/common.php | 43 -- app/Update/controller/Admin.php | 573 ------------------ app/Update/event.php | 5 - app/Update/middleware.php | 5 - app/Update/model/Admin.php | 15 - app/Update/model/Banji.php | 15 - app/Update/model/Category.php | 15 - app/Update/model/Chengji.php | 15 - app/Update/model/DwRongyu.php | 15 - app/Update/model/DwRongyuCanyu.php | 15 - app/Update/model/Fields.php | 15 - app/Update/model/JsRongyu.php | 15 - app/Update/model/JsRongyuCanyu.php | 15 - app/Update/model/JsRongyuInfo.php | 15 - app/Update/model/Kaohao.php | 15 - app/Update/model/Kaoshi.php | 16 - app/Update/model/Keti.php | 15 - app/Update/model/KetiCanyu.php | 15 - app/Update/model/KetiInfo.php | 15 - app/Update/model/School.php | 15 - app/Update/model/Student.php | 15 - app/Update/model/Subject.php | 15 - app/Update/model/Teacher.php | 15 - app/Update/model/Xueqi.php | 15 - app/Update/route/update.php | 36 -- app/Update/view/admin/index.html | 223 ------- app/admin/view/index/create.html | 2 +- app/chengji/controller/Index.php | 2 +- app/chengji/controller/Luru.php | 2 +- app/chengji/model/Chengji.php | 2 +- app/chengji/view/luru/biaolu.html | 2 +- app/common.php | 3 +- app/index/controller/Index.php | 8 +- app/kaohao/model/Kaohao.php | 2 +- app/kaohao/model/Search.php | 6 +- app/keti/model/KetiCanyu.php | 2 +- app/keti/view/keti_info/create.html | 12 +- app/keti/view/keti_info/jie_ti.html | 11 +- app/rongyu/model/JsRongyuCanyu.php | 2 +- app/rongyu/model/JsRongyuInfo.php | 6 +- app/rongyu/view/danwei/create.html | 2 +- app/rongyu/view/js_rongyu_info/create.html | 4 +- .../controller/Myexcel.php | 2 +- .../controller/Student.php | 22 +- .../controller/StudentChengji.php | 0 app/{renshi => student}/model/Student.php | 2 +- .../model/StudentChengji.php | 0 .../renshi.php => student/route/student.php} | 2 +- app/{renshi => student}/validate/Student.php | 0 .../view/student/by_list.html | 0 .../view/student/create.html | 0 .../view/student/create_all.html | 2 +- .../view/student/del_list.html | 0 .../view/student/deletes.html | 0 .../view/student/index.html | 0 .../view/student/read.html | 0 .../view/student_chengji/index.html | 0 app/teach/model/Banji.php | 2 +- .../controller/Index.php} | 24 +- app/{renshi => teacher}/model/Teacher.php | 8 +- app/teacher/route/teacher.php | 34 ++ app/{renshi => teacher}/validate/Teacher.php | 2 +- .../view/index}/create.html | 0 .../view/index}/create_all.html | 2 +- .../view/index}/del_list.html | 0 .../teacher => teacher/view/index}/index.html | 24 +- .../teacher => teacher/view/index}/read.html | 4 +- .../20200616052125_teacher_zhiwu.php | 45 ++ public/static/x-admin2.2/js/cjgl.js | 25 +- 69 files changed, 174 insertions(+), 1280 deletions(-) delete mode 100644 app/Update/common.php delete mode 100644 app/Update/controller/Admin.php delete mode 100644 app/Update/event.php delete mode 100644 app/Update/middleware.php delete mode 100644 app/Update/model/Admin.php delete mode 100644 app/Update/model/Banji.php delete mode 100644 app/Update/model/Category.php delete mode 100644 app/Update/model/Chengji.php delete mode 100644 app/Update/model/DwRongyu.php delete mode 100644 app/Update/model/DwRongyuCanyu.php delete mode 100644 app/Update/model/Fields.php delete mode 100644 app/Update/model/JsRongyu.php delete mode 100644 app/Update/model/JsRongyuCanyu.php delete mode 100644 app/Update/model/JsRongyuInfo.php delete mode 100644 app/Update/model/Kaohao.php delete mode 100644 app/Update/model/Kaoshi.php delete mode 100644 app/Update/model/Keti.php delete mode 100644 app/Update/model/KetiCanyu.php delete mode 100644 app/Update/model/KetiInfo.php delete mode 100644 app/Update/model/School.php delete mode 100644 app/Update/model/Student.php delete mode 100644 app/Update/model/Subject.php delete mode 100644 app/Update/model/Teacher.php delete mode 100644 app/Update/model/Xueqi.php delete mode 100644 app/Update/route/update.php delete mode 100644 app/Update/view/admin/index.html rename app/{renshi => student}/controller/Myexcel.php (95%) rename app/{renshi => student}/controller/Student.php (97%) rename app/{renshi => student}/controller/StudentChengji.php (100%) rename app/{renshi => student}/model/Student.php (99%) rename app/{renshi => student}/model/StudentChengji.php (100%) rename app/{renshi/route/renshi.php => student/route/student.php} (99%) rename app/{renshi => student}/validate/Student.php (100%) rename app/{renshi => student}/view/student/by_list.html (100%) rename app/{renshi => student}/view/student/create.html (100%) rename app/{renshi => student}/view/student/create_all.html (97%) rename app/{renshi => student}/view/student/del_list.html (100%) rename app/{renshi => student}/view/student/deletes.html (100%) rename app/{renshi => student}/view/student/index.html (100%) rename app/{renshi => student}/view/student/read.html (100%) rename app/{renshi => student}/view/student_chengji/index.html (100%) rename app/{renshi/controller/Teacher.php => teacher/controller/Index.php} (95%) rename app/{renshi => teacher}/model/Teacher.php (97%) create mode 100644 app/teacher/route/teacher.php rename app/{renshi => teacher}/validate/Teacher.php (98%) rename app/{renshi/view/teacher => teacher/view/index}/create.html (100%) rename app/{renshi/view/teacher => teacher/view/index}/create_all.html (97%) rename app/{renshi/view/teacher => teacher/view/index}/del_list.html (100%) rename app/{renshi/view/teacher => teacher/view/index}/index.html (84%) rename app/{renshi/view/teacher => teacher/view/index}/read.html (98%) create mode 100644 database/migrations/20200616052125_teacher_zhiwu.php diff --git a/app/Update/common.php b/app/Update/common.php deleted file mode 100644 index 95f24abd..00000000 --- a/app/Update/common.php +++ /dev/null @@ -1,43 +0,0 @@ -where('id', $old_id)->value('title'); - $new_id = $new->where('title', $title)->value('id'); - - $new_id > 0 ? $new_id : $new_id = 0; - - return $new_id; -} - - -// Subject -function getNewSubject($old_id) -{ - $new = new \app\update\model\Subject; - $old = new \app\teach\model\Subject; - - $title = $old->where('id', $old_id)->value('title'); - $new_id = $new->where('title', $title)->value('id'); - - return $new_id; -} - - -// 鉴定等级 -function getNewDengji($dengji) -{ - $dj = [ - 0 => 11801 - ,1 => 11802 - ,2 => 11803 - ,3 => 11804 - ]; - return $dj[$dengji]; -} - diff --git a/app/Update/controller/Admin.php b/app/Update/controller/Admin.php deleted file mode 100644 index a873ddfd..00000000 --- a/app/Update/controller/Admin.php +++ /dev/null @@ -1,573 +0,0 @@ -select(); - $new->where('id', '>', 0)->delete(); - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['school_id'] = $oldList['school']; - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - dump('Admin : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Admin : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // Banji - public function banji() - { - $new = new \app\update\model\Banji; - $old = new \app\teach\model\Banji; - - // 整理数据 - $oldId = $old::withTrashed()->select(); - $new->where('id', '>', 0)->delete(); - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['school_id'] = $oldList['school']; - $oldList['xueduan_id'] = 10302; - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - dump('Banji : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Banji : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // Chengji - public function chengji() - { - set_time_limit(0); - $new = new \app\update\model\Chengji; - $old = new \app\chengji\model\Chengji; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - unset($oldList['id']); - $oldList['defenlv'] = $oldList['defen']; - $oldList['subject_id'] = getNewSubject($oldList['subject_id']); - $newList[] = $oldList; - } - - $newList = $new->saveAll($newList); - $i = $newList->count(); - - dump('Chengji : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Chengji : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // DwRongyu - public function dwrongyu() - { - $new = new \app\update\model\DwRongyu; - $old = new \app\rongyu\model\DwRongyu; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['hjschool_id'] = $oldList['hjschool']; - $oldList['fzschool_id'] = $oldList['fzschool']; - $oldList['jiangxiang_id'] = getNewCategory($oldList['jiangxiang']); - $oldList['category_id'] = getNewCategory($oldList['category']); - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('DwRongyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'DwRongyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // DwRongyu - public function dwrongyucanyu() - { - $new = new \app\update\model\DwRongyuCanyu; - $old = new \app\rongyu\model\DwRongyuCanyu; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - unset($oldList['id']); - unset($oldList['update_time']); - unset($oldList['create_time']); - unset($oldList['delete_time']); - $oldList['rongyu_id'] = $oldList['rongyuid']; - $oldList['teacher_id'] = $oldList['teacherid']; - $newList[] = $oldList; - } - - $newList = $new->saveAll($newList); - $i = $newList->count(); - - dump('DwRongyuCanyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'DwRongyuCanyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // DwRongyu - public function fields() - { - $new = new \app\update\model\Fields; - $old = new \app\system\model\Fields; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - unset($oldList['id']); - $oldList['user_id'] = $oldList['userid']; - $newList[] = $oldList; - } - - $newList = $new->saveAll($newList); - $i = $newList->count(); - - dump('Fields : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Fields : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // JsRongyu - public function jsrongyu() - { - $new = new \app\update\model\JsRongyu; - $old = new \app\rongyu\model\JsRongyu; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['fzschool_id'] = $oldList['fzschool']; - $oldList['category_id'] = getNewCategory($oldList['category']); - $oldList['subject_id'] = getNewSubject($oldList['subject']); - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('JsRongyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'JsRongyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // JsRongyuCanyu - public function jsrongyucanyu() - { - $new = new \app\update\model\JsRongyuCanyu; - $old = new \app\rongyu\model\JsRongyuCanyu; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - unset($oldList['id']); - unset($oldList['update_time']); - unset($oldList['create_time']); - unset($oldList['delete_time']); - $oldList['category'] == 1 ? $oldList['category_id'] = 11901 - : $oldList['category_id'] = 11902; - $oldList['rongyu_id'] = $oldList['rongyuid']; - $oldList['teacher_id'] = $oldList['teacherid']; - $newList[] = $oldList; - } - - $newList = $new->saveAll($newList); - $i = $newList->count(); - - dump('JsRongyuCanyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'JsRongyuCanyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // JsRongyuInfo - public function jsrongyuinfo() - { - $new = new \app\update\model\JsRongyuInfo; - $old = new \app\rongyu\model\JsRongyuInfo; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['rongyuce_id'] = $oldList['rongyuce']; - $oldList['hjschool_id'] = $oldList['hjschool']; - $oldList['subject_id'] = getNewSubject($oldList['subject']); - $oldList['jiangxiang_id'] = getNewCategory($oldList['jiangxiang']); - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('JsRongyuInfo : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'JsRongyuInfo : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // Kaohao - public function kaohao($page) - { - set_time_limit(0); - $new = new \app\update\model\Kaohao; - $old = new \app\kaohao\model\Kaohao; - - // 整理数据 - dump('第'.$page.'页'); - $oldId = $old::withTrashed() - ->page($page, 500) - ->select(); - // $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['kaoshi_id'] = $oldList['kaoshi']; - $oldList['school_id'] = $oldList['school']; - $oldList['banji_id'] = $oldList['banji']; - $oldList['student_id'] = $oldList['student']; - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('Kaohao : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Kaohao : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // Kaoshi - public function kaoshi() - { - $new = new \app\update\model\Kaoshi; - $old = new \app\Kaoshi\model\Kaoshi; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['zuzhi_id'] = $oldList['zuzhi']; - $oldList['xueqi_id'] = $oldList['xueqi']; - $oldList['category_id'] = $oldList['category']; - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('Kaoshi : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Kaoshi : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - - // Keti - public function Keti() - { - $new = new \app\update\model\Keti; - $old = new \app\Keti\model\Keti; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['lxdanwei_id'] = $oldList['lxdanweiid']; - $oldList['category_id'] = getNewCategory($oldList['category']); - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('Keti : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Keti : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // KetiCanyu - public function keticanyu() - { - $new = new \app\update\model\KetiCanyu; - $old = new \app\Keti\model\KetiCanyu; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - unset($oldList['id']); - unset($oldList['update_time']); - unset($oldList['create_time']); - unset($oldList['delete_time']); - $oldList['ketiinfo_id'] = $oldList['ketiinfoid']; - $oldList['teacher_id'] = $oldList['teacherid']; - $oldList['category'] == 1 ? $oldList['category_id'] = 11901 - : $oldList['category_id'] = 11902; - $newList[] = $oldList; - } - - $newList = $new->saveAll($newList); - $i = $newList->count(); - - dump('KetiCanyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'KetiCanyu : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // KetiInfo - public function KetiInfo() - { - set_time_limit(0); - $new = new \app\update\model\KetiInfo; - $old = new \app\Keti\model\KetiInfo; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['ketice_id'] = $oldList['ketice']; - $oldList['subject_id'] = getNewSubject($oldList['subject']); - $oldList['fzdanwei_id'] = getNewCategory($oldList['fzdanweiid']); - $oldList['jddengji_id'] = getNewDengji($oldList['jddengji']); - $oldList['category_id'] = getNewCategory($oldList['category']); - $oldList['subject_id'] = getNewCategory($oldList['subject']); - $oldList['lxpic'] = 'keti/lixiang/'.$oldList['lxpic']; - $oldList['jtpic'] = 'keti/jieti/'.$oldList['jtpic']; - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('KetiInfo : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'KetiInfo : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // School - public function school() - { - $new = new \app\update\model\School; - $old = new \app\system\model\School; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['xingzhi_id'] = getNewCategory($oldList['xingzhi']); - $oldList['jibie_id'] = getNewCategory($oldList['jibie']); - $oldList['xueduan_id'] = getNewCategory($oldList['xueduan']); - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('School : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'School : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - // Student - public function Student($page) - { - set_time_limit(0); - $new = new \app\update\model\Student; - $old = new \app\renshi\model\Student; - $pinyin = new \Overtrue\Pinyin\Pinyin; - - // 整理数据 - dump('第'.$page.'页'); - $oldId = $old->withTrashed() - ->page($page, 500) - ->select(); - // $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['banji_id'] = $oldList['banji']; - $quanpin = $pinyin->sentence( $oldList['xingming']); - $oldList['shoupin'] = $pinyin->abbr( $oldList['xingming']); - $oldList['quanpin'] = trim(strtolower(str_replace(' ', '', $quanpin))); - - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('Student : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Student : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // Teacher - public function Teacher($page) - { - set_time_limit(0); - $new = new \app\update\model\Teacher; - $old = new \app\renshi\model\Teacher; - $pinyin = new \Overtrue\Pinyin\Pinyin; - - // 整理数据 - dump('第'.$page.'页'); - $oldId = $old::withTrashed() - ->page($page, 500) - ->select(); - // $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['zhiwu_id'] = $oldList['zhiwu']; - $oldList['zhicheng_id'] = $oldList['zhicheng']; - $oldList['danwei_id'] = $oldList['danwei']; - $oldList['xueli_id'] = $oldList['xueli']; - $oldList['subject_id'] = $oldList['subject']; - $quanpin = $pinyin->sentence( $oldList['xingming']); - $oldList['shoupin'] = $pinyin->abbr( $oldList['xingming']); - $oldList['quanpin'] = trim(strtolower(str_replace(' ', '', $quanpin))); - - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('Teacher : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Teacher : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - - // Xueqi - public function xueqi() - { - $new = new \app\update\model\Xueqi; - $old = new \app\teach\model\Xueqi; - - // 整理数据 - $oldId = $old::withTrashed() - ->select(); - - $new->where('id', '>', 0)->delete(); - - $i = 0; - foreach ($oldId as $key => $value) { - $oldList = $value->getData(); - $oldList['category_id'] = $oldList['category']; - - $newList = $new->create($oldList); - if ($newList) { - $i ++; - } - } - - dump('Xueqi : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'); - return 'Xueqi : 共' . count($oldId) . '条记录。创建' . $i . '条记录。'; - } - - -} diff --git a/app/Update/event.php b/app/Update/event.php deleted file mode 100644 index 4eff8908..00000000 --- a/app/Update/event.php +++ /dev/null @@ -1,5 +0,0 @@ - -// +---------------------------------------------------------------------- -use think\facade\Route; - - -// 学期管理 -Route::group('admin', function () { - Route::rule('index','admin/index','get'); # 信息列表 - Route::rule('admin','admin/admin','get'); # 信息列表 - Route::rule('banji','admin/banji','get'); # 信息列表 - Route::rule('chengji','admin/chengji','get'); # 信息列表 - Route::rule('dwrongyu','admin/dwrongyu','get'); # 信息列表 - Route::rule('dwrongyucanyu','admin/dwrongyucanyu','get'); # 信息列表 - Route::rule('fields','admin/fields','get'); # 信息列表 - Route::rule('jsrongyu','admin/jsrongyu','get'); # 信息列表 - Route::rule('jsrongyucanyu','admin/jsrongyucanyu','get'); # 信息列表 - Route::rule('jsrongyuinfo','admin/jsrongyuinfo','get'); # 信息列表 - Route::rule('kaohao/','admin/kaohao','get'); # 信息列表 - Route::rule('kaoshi','admin/kaoshi','get'); # 信息列表 - Route::rule('keti','admin/keti','get'); # 信息列表 - Route::rule('keticanyu','admin/keticanyu','get'); # 信息列表 - Route::rule('ketiinfo','admin/ketiinfo','get'); # 信息列表 - Route::rule('school','admin/school','get'); # 信息列表 - Route::rule('student/','admin/student','get'); # 信息列表 - Route::rule('teacher/','admin/teacher','get'); # 信息列表 - Route::rule('xueqi','admin/xueqi','get'); # 信息列表 - }); - diff --git a/app/Update/view/admin/index.html b/app/Update/view/admin/index.html deleted file mode 100644 index 8a074a56..00000000 --- a/app/Update/view/admin/index.html +++ /dev/null @@ -1,223 +0,0 @@ - -{extend name=".././view/list.html" /} -{block name="jsset"} - -{/block} -{block name="nav"} - - 系统管理 - 文件管理 - 文件列表 - -{/block} -{block name="search"} -
- -
- -
-
-{/block} -{block name="table"} -
-
-
-
- Kaohao、Stuent、Teacher三个表的数据需要分页迁移,否则会卡死。 -
- 127.0.0.1/update/admin/kaosho/1 1是页码
- 127.0.0.1/update/admin/student/1 1是页码
- 127.0.0.1/update/admin/teacher/1 1是页码
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
数据库
- -
- Admin -
-
-
- -
- Banji -
-
-
- -
- Chengji -
-
-
- -
- DwRongyu -
-
-
- -
- DwRongyuCanyu -
-
-
- -
- Fields -
-
-
- -
- JsRongyu -
-
-
- -
- jsrongyucanyu -
-
-
- -
- jsrongyuinfo -
-
-
- -
- kaohao -
-
-
- -
- kaoshi -
-
-
- -
- keti -
-
-
- -
- keticanyu -
-
-
- -
- ketiinfo -
-
-
- -
- school -
-
-
- -
- student -
-
-
- -
- teacher -
-
-
- -
- xueqi -
-
-
- -{/block} -{block name="myjs"} - -{/block} diff --git a/app/admin/view/index/create.html b/app/admin/view/index/create.html index 23e125e7..87701463 100644 --- a/app/admin/view/index/create.html +++ b/app/admin/view/index/create.html @@ -166,7 +166,7 @@ $('#teacher_id').bind({ keyup:function(){ var val = $.trim($(this).val()); - cjgl.selectOnfocus1(this,val,'teacher_id'); + cjgl.searchTeacher(this, val, 'teacher_id', 'addTeacherID'); }, }); diff --git a/app/chengji/controller/Index.php b/app/chengji/controller/Index.php index 03b54382..a5d04767 100644 --- a/app/chengji/controller/Index.php +++ b/app/chengji/controller/Index.php @@ -596,7 +596,7 @@ class Index extends BaseController $query->field('id,title'); }, 'userName'=>function($query){ - $query->field('id,school,xingming') + $query->field('id,school_id,xingming') ->with([ 'adSchool'=>function($query){ $query->field('id,jiancheng'); diff --git a/app/chengji/controller/Luru.php b/app/chengji/controller/Luru.php index 38e1a1e9..a9e49a7d 100644 --- a/app/chengji/controller/Luru.php +++ b/app/chengji/controller/Luru.php @@ -272,7 +272,7 @@ class Luru extends BaseController ], 'POST'); // 读取表格数据 - $excel = new \app\renshi\controller\Myexcel; + $excel = new \app\student\controller\Myexcel; $cjinfo = $excel->readXls(public_path() . 'public\\uploads\\' . $list['url']); $kaoshi_id = $cjinfo[1][0]; #获取考号 diff --git a/app/chengji/model/Chengji.php b/app/chengji/model/Chengji.php index 42d527f4..4f6a717c 100644 --- a/app/chengji/model/Chengji.php +++ b/app/chengji/model/Chengji.php @@ -45,7 +45,7 @@ class Chengji extends BaseModel $src = array_cover( $srcfrom , $src ) ; $src['banji_id'] = strToarray($src['banji_id']); - $stu = new \app\renshi\model\Student; + $stu = new \app\student\model\Student; $stuid = $stu ->when(strlen($src['searchval']) > 0, function ($query) use ($src) { $query->where('xingming', 'like', '%' . $src['searchval'] . '%') diff --git a/app/chengji/view/luru/biaolu.html b/app/chengji/view/luru/biaolu.html index b73dcddf..1b5c4a2e 100644 --- a/app/chengji/view/luru/biaolu.html +++ b/app/chengji/view/luru/biaolu.html @@ -123,7 +123,7 @@ layui.use(['form','upload','cjgl'], function(){ //执行实例 var uploadInst = upload.render({ elem: '#upload' //绑定元素 - ,url: "/renshi/teacher/upload" //上传接口 + ,url: "/teacher/index/upload" //上传接口 ,done: function(res){ if(res.val == 1){ $('#url').val(res.url); diff --git a/app/common.php b/app/common.php index cb2592c2..e51bcafa 100644 --- a/app/common.php +++ b/app/common.php @@ -231,9 +231,8 @@ $list['oldname'] = $file->getOriginalName(); $list['fieldsize'] = $file->getSize(); $list['category_id'] = $list['category_id']; - $list['bianjitime'] = $file->getMTime(); + $list['bianjitime'] = $file->getMTime( ); $list['extension'] = $file->getOriginalExtension(); - $saveinfo = $f::create($list); } diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 1816d5bb..c20cc241 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -71,18 +71,17 @@ class Index extends BaseController // 获取thinkphp版本 $list->thinkphp = \think\facade\App::version(); - // 考试数 $con = new \app\kaoshi\model\Kaoshi; $list['kaoshi'] = $con->count(); // 教师数 - $con = new \app\renshi\model\Teacher; + $con = new \app\teacher\model\Teacher; $list['teacher'] = $con->count(); // 学生数 $con = new \app\teach\model\Banji; $tempsrc['ruxuenian'] = array_keys(nianJiNameList()); $bjids = $con->search($tempsrc)->column('id'); - $con = new \app\renshi\model\Student; + $con = new \app\student\model\Student; $list['student'] = $con->where('banji_id', 'in', $bjids) ->count(); // 管理员数 @@ -95,9 +94,6 @@ class Index extends BaseController $con = new \app\keti\model\KetiInfo; $list['keti'] = $con->count(); - - - $view = app('view'); // 模版赋值 $view->assign('list',$list); diff --git a/app/kaohao/model/Kaohao.php b/app/kaohao/model/Kaohao.php index 38ac7022..5283e382 100644 --- a/app/kaohao/model/Kaohao.php +++ b/app/kaohao/model/Kaohao.php @@ -77,7 +77,7 @@ class Kaohao extends BaseModel // 学生信息关联 public function cjStudent() { - return $this->belongsTo('\app\renshi\model\Student', 'student_id', 'id'); + return $this->belongsTo('\app\student\model\Student', 'student_id', 'id'); } diff --git a/app/kaohao/model/Search.php b/app/kaohao/model/Search.php index 2d0ee4fa..d557b2b1 100644 --- a/app/kaohao/model/Search.php +++ b/app/kaohao/model/Search.php @@ -42,7 +42,7 @@ class Search extends BaseModel } // 实例化学生数据模型 - $stu = new \app\renshi\model\Student; + $stu = new \app\student\model\Student; $data = array(); foreach ($khlist as $key => $value) { $data[$key]['id'] = $value->id; @@ -135,7 +135,7 @@ class Search extends BaseModel ]) ->select(); - $stu = new \app\renshi\model\Student; + $stu = new \app\student\model\Student; // 找出已经被删除学生,并添加该学生信息 foreach ($data as $key => $value) { foreach ($value->banjiKaohao as $k => $val) { @@ -333,7 +333,7 @@ class Search extends BaseModel if($stuCj->cjStudent == Null) { - $stu = new \app\renshi\model\Student; + $stu = new \app\student\model\Student; $stuinfo = $stu::withTrashed() ->where('id', $cjlist->student) ->field('id, xingming, sex') diff --git a/app/keti/model/KetiCanyu.php b/app/keti/model/KetiCanyu.php index 1d7426ea..944b7898 100644 --- a/app/keti/model/KetiCanyu.php +++ b/app/keti/model/KetiCanyu.php @@ -16,6 +16,6 @@ class KetiCanyu extends BaseModel // 教师关联 public function teacher() { - return $this->belongsTo('\app\renshi\model\Teacher', 'teacher_id', 'id'); + return $this->belongsTo('\app\teacher\model\Teacher', 'teacher_id', 'id'); } } diff --git a/app/keti/view/keti_info/create.html b/app/keti/view/keti_info/create.html index a5cea17b..b544d69c 100644 --- a/app/keti/view/keti_info/create.html +++ b/app/keti/view/keti_info/create.html @@ -206,22 +206,12 @@ }); var cjgl = parent.layui.cjgl; - - // 搜索教师 - $('#cySearch').bind({ - keyup:function(){ - var val = $.trim($(this).val()); - if(val.length>0){ - cjgl.selectOnfocus(this,val,'cyteachers[]'); - } - }, - }) // 搜索教师 $('#hjSearch').bind({ keyup:function(){ var val = $.trim($(this).val()); if(val.length>0){ - cjgl.selectOnfocus(this,val,'hjteachers[]'); + cjgl.searchTeacher(this, val, 'hjteachers[]', 'addTeacher'); } }, }) diff --git a/app/keti/view/keti_info/jie_ti.html b/app/keti/view/keti_info/jie_ti.html index 8e335c50..7ed8a632 100644 --- a/app/keti/view/keti_info/jie_ti.html +++ b/app/keti/view/keti_info/jie_ti.html @@ -155,21 +155,12 @@ var cjgl = parent.layui.cjgl; - // 搜索教师 - $('#cySearch').bind({ - keyup:function(){ - var val = $.trim($(this).val()); - if(val.length>0){ - cjgl.selectOnfocus(this,val,'cyteachers[]'); - } - }, - }) // 搜索教师 $('#hjSearch').bind({ keyup:function(){ var val = $.trim($(this).val()); if(val.length>0){ - cjgl.selectOnfocus(this,val,'cyteachers[]'); + cjgl.searchTeacher(this, val, 'cyteachers[]', 'addTeacher'); } }, }) diff --git a/app/rongyu/model/JsRongyuCanyu.php b/app/rongyu/model/JsRongyuCanyu.php index 11c2d544..67117e70 100644 --- a/app/rongyu/model/JsRongyuCanyu.php +++ b/app/rongyu/model/JsRongyuCanyu.php @@ -17,6 +17,6 @@ class JsRongyuCanyu extends BaseModel // 教师关联 public function teacher() { - return $this->belongsTo('\app\renshi\model\Teacher', 'teacher_id', 'id'); + return $this->belongsTo('\app\teacher\model\Teacher', 'teacher_id', 'id'); } } diff --git a/app/rongyu/model/JsRongyuInfo.php b/app/rongyu/model/JsRongyuInfo.php index 8d1dc665..2877f2a2 100644 --- a/app/rongyu/model/JsRongyuInfo.php +++ b/app/rongyu/model/JsRongyuInfo.php @@ -195,9 +195,9 @@ class JsRongyuInfo extends BaseModel }, 'hjJsry' => function($query){ $query->field('rongyu_id, teacher_id') - ->with(['teacher' => function($query){ - $query->field('id, xingming'); - }]); + ->with(['teacher' => function($query){ + $query->field('id, xingming'); + }]); }, ] ) diff --git a/app/rongyu/view/danwei/create.html b/app/rongyu/view/danwei/create.html index 9f03fbf0..f5e3c79d 100644 --- a/app/rongyu/view/danwei/create.html +++ b/app/rongyu/view/danwei/create.html @@ -233,7 +233,7 @@ keyup:function(){ var val = $.trim($(this).val()); if(val.length>0){ - cjgl.selectOnfocus(this,val,'teachers[]'); + cjgl.searchTeacher(this, val, 'teachers[]', 'addTeacher'); } }, }) diff --git a/app/rongyu/view/js_rongyu_info/create.html b/app/rongyu/view/js_rongyu_info/create.html index 0342480c..7a706044 100644 --- a/app/rongyu/view/js_rongyu_info/create.html +++ b/app/rongyu/view/js_rongyu_info/create.html @@ -231,7 +231,7 @@ keyup:function(){ var val = $.trim($(this).val()); if(val.length>0){ - cjgl.selectOnfocus(this,val,'cyteachers[]'); + cjgl.searchTeacher(this, val, 'cyteachers[]', 'addTeacher'); } }, }) @@ -241,7 +241,7 @@ keyup:function(){ var val = $.trim($(this).val()), schoolName = $(this).attr('schoolName'); - cjgl.selectOnfocus(this,val,'hjteachers[]'); + cjgl.searchTeacher(this, val, 'hjteachers[]', 'addTeacher'); }, }) diff --git a/app/renshi/controller/Myexcel.php b/app/student/controller/Myexcel.php similarity index 95% rename from app/renshi/controller/Myexcel.php rename to app/student/controller/Myexcel.php index a26d5c7f..c16148c4 100644 --- a/app/renshi/controller/Myexcel.php +++ b/app/student/controller/Myexcel.php @@ -1,6 +1,6 @@ view->assign('list', $list); @@ -69,7 +69,7 @@ class Student extends BaseController { // 设置要给模板赋值的信息 $list['webtitle'] = '毕业学生'; - $list['dataurl'] = '/renshi/student/databy'; + $list['dataurl'] = '/student/index/databy'; // 模板赋值 $this->view->assign('list', $list); @@ -120,7 +120,7 @@ class Student extends BaseController { // 设置要给模板赋值的信息 $list['webtitle'] = '异动学生'; - $list['dataurl'] = '/renshi/student/datadel'; + $list['dataurl'] = '/student/index/datadel'; // 模板赋值 $this->view->assign('list', $list); @@ -201,7 +201,7 @@ class Student extends BaseController ], 'POST'); // 验证表单数据 - $validate = new \app\renshi\validate\Student; + $validate = new \app\student\validate\Student; $result = $validate->scene('create')->check($list); $msg = $validate->getError(); if(!$result){ @@ -258,7 +258,7 @@ class Student extends BaseController 'webtitle' => '编辑学生' ,'butname' => '修改' ,'formpost' => 'PUT' - ,'url' => '/renshi/student/update/' . $id + ,'url' => '/student/index/update/' . $id ); // 模板赋值 @@ -286,7 +286,7 @@ class Student extends BaseController $list['id'] = $id; // 验证表单数据 - $validate = new \app\renshi\validate\Student; + $validate = new \app\student\validate\Student; $result = $validate->scene('edit')->check($list); $msg = $validate->getError(); if(!$result){ @@ -429,7 +429,7 @@ class Student extends BaseController 'webtitle'=>'同步学生名单', 'butname'=>'同步', 'formpost'=>'POST', - 'url'=>'/renshi/student/saveall', + 'url'=>'/student/index/saveall', ); // 模板赋值 @@ -510,7 +510,7 @@ class Student extends BaseController 'webtitle'=>'根据表格删除学生信息', 'butname'=>'删除', 'formpost'=>'POST', - 'url'=>'/renshi/student/deleteall', + 'url'=>'/student/index/deleteall', ); // 模板赋值 diff --git a/app/renshi/controller/StudentChengji.php b/app/student/controller/StudentChengji.php similarity index 100% rename from app/renshi/controller/StudentChengji.php rename to app/student/controller/StudentChengji.php diff --git a/app/renshi/model/Student.php b/app/student/model/Student.php similarity index 99% rename from app/renshi/model/Student.php rename to app/student/model/Student.php index f28d387e..47e41c24 100644 --- a/app/renshi/model/Student.php +++ b/app/student/model/Student.php @@ -1,6 +1,6 @@ hasMany('\app\renshi\model\Student', 'banji_id', 'id'); + return $this->hasMany('\app\student\model\Student', 'banji_id', 'id'); } diff --git a/app/renshi/controller/Teacher.php b/app/teacher/controller/Index.php similarity index 95% rename from app/renshi/controller/Teacher.php rename to app/teacher/controller/Index.php index 806ebee8..6607aa50 100644 --- a/app/renshi/controller/Teacher.php +++ b/app/teacher/controller/Index.php @@ -1,22 +1,22 @@ view->assign('list', $list); @@ -44,6 +44,7 @@ class Teacher extends BaseController ,'danwei_id' => array() ,'xueli_id' => array() ,'tuixiu' => 0 + ,'zhicheng_id' => '' ,'searchval' => '' ], 'POST'); @@ -74,8 +75,8 @@ class Teacher extends BaseController { // 设置要给模板赋值的信息 $list['webtitle'] = '教师列表'; - $list['dataurl'] = '/renshi/teacher/datadel'; - $list['status'] = '/renshi/teacher/status'; + $list['dataurl'] = '/teacher/index/datadel'; + $list['status'] = '/teacher/index/status'; // 模板赋值 $this->view->assign('list', $list); @@ -165,7 +166,7 @@ class Teacher extends BaseController ], 'POST'); // 验证表单数据 - $validate = new \app\renshi\validate\Teacher; + $validate = new \app\teacher\validate\Teacher; $result = $validate->scene('create')->check($list); $msg = $validate->getError(); if(!$result){ @@ -236,7 +237,7 @@ class Teacher extends BaseController 'webtitle' => '编辑教师' ,'butname' => '修改' ,'formpost' => 'PUT' - ,'url' => '/renshi/teacher/update/' . $id + ,'url' => '/teacher/index/update/' . $id ); // 模板赋值 @@ -268,7 +269,7 @@ class Teacher extends BaseController $list['id'] = $id; // 验证表单数据 - $validate = new \app\renshi\validate\Teacher; + $validate = new \app\teacher\validate\Teacher; $result = $validate->scene('edit')->check($list); $msg = $validate->getError(); if(!$result){ @@ -384,7 +385,7 @@ class Teacher extends BaseController ], 'POST'); // 实例化操作表格类 - $excel = new \app\renshi\controller\Myexcel;; + $excel = new \app\student\controller\Myexcel;; $teacherinfo = $excel->readXls(public_path() . 'public\\uploads\\' . $list['url']); // 判断表格是否正确 @@ -473,7 +474,6 @@ class Teacher extends BaseController ,'update_time' ]); $data = reSetObject($data, $src); - return json($data); } diff --git a/app/renshi/model/Teacher.php b/app/teacher/model/Teacher.php similarity index 97% rename from app/renshi/model/Teacher.php rename to app/teacher/model/Teacher.php index bc24d1fd..8043cb08 100644 --- a/app/renshi/model/Teacher.php +++ b/app/teacher/model/Teacher.php @@ -1,6 +1,6 @@ array() ,'danwei_id' => array() ,'xueli_id' => array() + ,'zhicheng_id' => array() ,'tuixiu' => 0 ,'searchval' => '' ]; @@ -22,6 +23,8 @@ class Teacher extends BaseModel $src['zhiwu_id'] = strToArray($src['zhiwu_id']); $src['danwei_id'] = strToArray($src['danwei_id']); $src['xueli_id'] = strToArray($src['xueli_id']); + $src['zhicheng_id'] = strToArray($src['zhicheng_id']); + $data = $this->when(count($src['danwei_id']) > 0, function($query) use($src){ $query->where('danwei_id', 'in', $src['danwei_id']); @@ -32,6 +35,9 @@ class Teacher extends BaseModel ->when(count($src['xueli_id']) > 0, function($query) use($src){ $query->where('xueli_id', 'in', $src['xueli_id']); }) + ->when(count($src['zhicheng_id']) > 0, function($query) use($src){ + $query->where('zhicheng_id', 'in', $src['zhicheng_id']); + }) ->where('tuixiu', $src['tuixiu']) ->when(strlen($src['searchval']) > 0, function($query) use($src){ $query->where('xingming|shoupin', 'like', '%' . $src['searchval'] . '%'); diff --git a/app/teacher/route/teacher.php b/app/teacher/route/teacher.php new file mode 100644 index 00000000..6ea6d69e --- /dev/null +++ b/app/teacher/route/teacher.php @@ -0,0 +1,34 @@ + +// +---------------------------------------------------------------------- +use think\facade\Route; + +// 教师管理 +Route::group('index', function () { + Route::rule('index','Index/index','get'); # 信息列表 + Route::rule('data','Index/ajaxdata','post'); # 获取数据 + Route::rule('create','Index/create','get'); # 添加信息 + Route::rule('save','Index/save','post'); # 保存信息 + Route::rule('read/','Index/read','get'); # 读取信息 + Route::rule('edit/','Index/edit','get'); # 修改信息 + Route::rule('update/','Index/update','put'); # 更新信息 + Route::rule('delete/','Index/delete','delete'); # 删除信息 + Route::rule('status','Index/setStatus','post'); # 删除信息 + Route::rule('createall','Index/createAll','get'); # 批量导入 + Route::rule('saveall','Index/saveAll','post'); # 批量保存 + Route::rule('upload','Index/upload','post'); # 批量导入 + Route::rule('srcteacher','Index/srcTeacher','post'); # 查询教师 + Route::rule('downloadxls','Index/downloadXls','get'); # 下载模板 + Route::rule('srcry','Index/srcRy','post'); # 查询荣誉 + Route::rule('srckt','Index/srcKt','post'); # 查询课题 + Route::rule('dellist','Index/delList','get'); # 信息列表 + Route::rule('datadel','Index/ajaxDataDel','post'); # 获取数据 + Route::rule('redel/','Index/reDel','delete'); # 获取学生成绩 +}); \ No newline at end of file diff --git a/app/renshi/validate/Teacher.php b/app/teacher/validate/Teacher.php similarity index 98% rename from app/renshi/validate/Teacher.php rename to app/teacher/validate/Teacher.php index c9af84d3..7057d985 100644 --- a/app/renshi/validate/Teacher.php +++ b/app/teacher/validate/Teacher.php @@ -1,6 +1,6 @@ +
+ +
+ + {php} $category = getCategory(106);{/php} + {volist name="category" id="vo"} + + {/volist} +
+
@@ -129,16 +139,16 @@ switch(obj.event){ case 'dels': var checkStatus = table.checkStatus('mytable'); //idmytable 即为基础参数 id 对应的值 - cjgl.delAll(checkStatus,'teacher/delete','mytable'); + cjgl.delAll(checkStatus,'/teacher/index/delete','mytable'); break; case 'add': - cjgl.add('添加教师','teacher/create','','',true); + cjgl.add('添加教师','/teacher/index/create','','',true); break; case 'upload': - cjgl.add('导入教师','teacher/createall','','',true); + cjgl.add('导入教师','/teacher/index/createall','','',true); break; case 'download': - window.open("teacher/downloadxls"); + window.open("/teacher/index/downloadxls"); break; }; }); @@ -150,13 +160,13 @@ var tr = obj.tr; //获得当前行 tr 的DOM对象 switch(layEvent){ case 'detail':// 查看 - cjgl.add(obj.data.xingming+'信息','teacher/read/'+obj.data.id,'','',true); + cjgl.add(obj.data.xingming+'信息','/teacher/index/read/'+obj.data.id,'','',true); break; case 'del':// 删除 - cjgl.del(obj,"teacher/delete"); + cjgl.del(obj,"/teacher/index/delete"); break; case 'edit':// 编辑 - cjgl.add('编辑教师','teacher/edit/'+obj.data.id,'','',true); + cjgl.add('编辑教师','/teacher/index/edit/'+obj.data.id,'','',true); break; }; }); diff --git a/app/renshi/view/teacher/read.html b/app/teacher/view/index/read.html similarity index 98% rename from app/renshi/view/teacher/read.html rename to app/teacher/view/index/read.html index 0a2f8c09..13af7fdc 100644 --- a/app/renshi/view/teacher/read.html +++ b/app/teacher/view/index/read.html @@ -133,7 +133,7 @@ var ry =table.render({ elem: '#rongyu' ,method:"POST" //数据接口 - ,url: '/renshi/teacher/srcry' //数据接口 + ,url: '/teacher/index/srcry' //数据接口 ,where:{ 'teacher_id': "{$list.id}" } @@ -195,7 +195,7 @@ var kt =table.render({ elem: '#keti' ,method:"POST" //数据接口 - ,url: '/renshi/teacher/srckt' //数据接口 + ,url: '/teacher/index/srckt' //数据接口 ,where:{ 'teacher_id': "{$list.id}" } diff --git a/database/migrations/20200616052125_teacher_zhiwu.php b/database/migrations/20200616052125_teacher_zhiwu.php new file mode 100644 index 00000000..2d4e125f --- /dev/null +++ b/database/migrations/20200616052125_teacher_zhiwu.php @@ -0,0 +1,45 @@ +table('teacher'); + + // 添加当前表字段 + $table + ->addColumn('teacherid','integer',['limit'=>11,'default'=>0,'null'=>false,'comment'=>'教师ID']) + ->addColumn('zhiwu_id','integer',['limit'=>11,'null'=>true,'comment'=>'职务']) + + ->addColumn('create_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'创建时间']) + ->addColumn('update_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'更新时间']) + ->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间']) + ->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注']) + ->create(); + } +} diff --git a/public/static/x-admin2.2/js/cjgl.js b/public/static/x-admin2.2/js/cjgl.js index 3d8c7604..38f7ef8d 100644 --- a/public/static/x-admin2.2/js/cjgl.js +++ b/public/static/x-admin2.2/js/cjgl.js @@ -164,19 +164,19 @@ layui.define(['table'],function(exports){ //提示:模块也可以依赖其它 }, // Select获取焦点 - selectOnfocus:function(myobj,val,addname){ + searchTeacher:function(myobj,val,addname,myfunction){ // 声明变量 var srcInput = $(myobj); // 删除原来列表 srcInput.next().remove(); // 添加列表div - srcInput.after('
请选择
'); + srcInput.after('
请选择
'); // 声明变量 var mydl = srcInput.next().children('dl'); // 获取数据 $.post( - "/renshi/teacher/srcteacher", + "/teacher/index/srcteacher", { "str":val, }, @@ -191,7 +191,7 @@ layui.define(['table'],function(exports){ //提示:模块也可以依赖其它 str = ''; str = '