正在显示
20 个修改的文件
包含
0 行增加
和
639 行删除
application/admin/controller/Grade.php
已删除
100644 → 0
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\controller; | ||
4 | - | ||
5 | -use app\common\controller\Backend; | ||
6 | - | ||
7 | -/** | ||
8 | - * 班级管理 | ||
9 | - * | ||
10 | - * @icon fa fa-circle-o | ||
11 | - */ | ||
12 | -class Grade extends Backend | ||
13 | -{ | ||
14 | - | ||
15 | - /** | ||
16 | - * Grade模型对象 | ||
17 | - * @var \app\admin\model\Grade | ||
18 | - */ | ||
19 | - protected $model = null; | ||
20 | - | ||
21 | - public function _initialize() | ||
22 | - { | ||
23 | - parent::_initialize(); | ||
24 | - $this->model = new \app\admin\model\Grade; | ||
25 | - | ||
26 | - } | ||
27 | - | ||
28 | - | ||
29 | - | ||
30 | - /** | ||
31 | - * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 | ||
32 | - * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 | ||
33 | - * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 | ||
34 | - */ | ||
35 | - | ||
36 | - | ||
37 | - /** | ||
38 | - * 查看 | ||
39 | - */ | ||
40 | - public function index() | ||
41 | - { | ||
42 | - //当前是否为关联查询 | ||
43 | - $this->relationSearch = false; | ||
44 | - //设置过滤方法 | ||
45 | - $this->request->filter(['strip_tags', 'trim']); | ||
46 | - if ($this->request->isAjax()) { | ||
47 | - //如果发送的来源是Selectpage,则转发到Selectpage | ||
48 | - if ($this->request->request('keyField')) { | ||
49 | - return $this->selectpage(); | ||
50 | - } | ||
51 | - list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | ||
52 | - | ||
53 | - $list = $this->model | ||
54 | - | ||
55 | - ->where($where) | ||
56 | - ->order($sort, $order) | ||
57 | - ->paginate($limit); | ||
58 | - | ||
59 | - foreach ($list as $row) { | ||
60 | - $row->visible(['id','name']); | ||
61 | - | ||
62 | - } | ||
63 | - | ||
64 | - $result = array("total" => $list->total(), "rows" => $list->items()); | ||
65 | - | ||
66 | - return json($result); | ||
67 | - } | ||
68 | - return $this->view->fetch(); | ||
69 | - } | ||
70 | - | ||
71 | -} |
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\controller\school; | ||
4 | - | ||
5 | -use app\common\controller\Backend; | ||
6 | - | ||
7 | -/** | ||
8 | - * 班级管理 | ||
9 | - * | ||
10 | - * @icon fa fa-circle-o | ||
11 | - */ | ||
12 | -class Grade extends Backend | ||
13 | -{ | ||
14 | - | ||
15 | - /** | ||
16 | - * Grade模型对象 | ||
17 | - * @var \app\admin\model\school\Grade | ||
18 | - */ | ||
19 | - protected $model = null; | ||
20 | - | ||
21 | - public function _initialize() | ||
22 | - { | ||
23 | - parent::_initialize(); | ||
24 | - $this->model = new \app\admin\model\school\Grade; | ||
25 | - | ||
26 | - } | ||
27 | - | ||
28 | - | ||
29 | - | ||
30 | - /** | ||
31 | - * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 | ||
32 | - * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 | ||
33 | - * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 | ||
34 | - */ | ||
35 | - | ||
36 | - | ||
37 | - /** | ||
38 | - * 查看 | ||
39 | - */ | ||
40 | - public function index() | ||
41 | - { | ||
42 | - //当前是否为关联查询 | ||
43 | - $this->relationSearch = false; | ||
44 | - //设置过滤方法 | ||
45 | - $this->request->filter(['strip_tags', 'trim']); | ||
46 | - if ($this->request->isAjax()) { | ||
47 | - //如果发送的来源是Selectpage,则转发到Selectpage | ||
48 | - if ($this->request->request('keyField')) { | ||
49 | - return $this->selectpage(); | ||
50 | - } | ||
51 | - list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | ||
52 | - | ||
53 | - $list = $this->model | ||
54 | - | ||
55 | - ->where($where) | ||
56 | - ->order($sort, $order) | ||
57 | - ->paginate($limit); | ||
58 | - | ||
59 | - foreach ($list as $row) { | ||
60 | - $row->visible(['id','name']); | ||
61 | - | ||
62 | - } | ||
63 | - | ||
64 | - $result = array("total" => $list->total(), "rows" => $list->items()); | ||
65 | - | ||
66 | - return json($result); | ||
67 | - } | ||
68 | - return $this->view->fetch(); | ||
69 | - } | ||
70 | - | ||
71 | -} |
application/admin/lang/zh-cn/grade.php
已删除
100644 → 0
application/admin/model/Grade.php
已删除
100644 → 0
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\model; | ||
4 | - | ||
5 | -use think\Model; | ||
6 | - | ||
7 | - | ||
8 | -class Grade extends Model | ||
9 | -{ | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | - | ||
15 | - // 表名 | ||
16 | - protected $name = 'grade'; | ||
17 | - | ||
18 | - // 自动写入时间戳字段 | ||
19 | - protected $autoWriteTimestamp = 'integer'; | ||
20 | - | ||
21 | - // 定义时间戳字段名 | ||
22 | - protected $createTime = 'createtime'; | ||
23 | - protected $updateTime = 'updatetime'; | ||
24 | - protected $deleteTime = false; | ||
25 | - | ||
26 | - // 追加属性 | ||
27 | - protected $append = [ | ||
28 | - | ||
29 | - ]; | ||
30 | - | ||
31 | - | ||
32 | - | ||
33 | - | ||
34 | - | ||
35 | - | ||
36 | - | ||
37 | - | ||
38 | - | ||
39 | - | ||
40 | -} |
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\model; | ||
4 | - | ||
5 | -use think\Model; | ||
6 | - | ||
7 | - | ||
8 | -class StudyScoreLog extends Model | ||
9 | -{ | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | - | ||
15 | - // 表名 | ||
16 | - protected $name = 'study_score_log'; | ||
17 | - | ||
18 | - // 自动写入时间戳字段 | ||
19 | - protected $autoWriteTimestamp = 'integer'; | ||
20 | - | ||
21 | - // 定义时间戳字段名 | ||
22 | - protected $createTime = 'createtime'; | ||
23 | - protected $updateTime = 'updatetime'; | ||
24 | - protected $deleteTime = false; | ||
25 | - | ||
26 | - // 追加属性 | ||
27 | - protected $append = [ | ||
28 | - | ||
29 | - ]; | ||
30 | - | ||
31 | - | ||
32 | - | ||
33 | - | ||
34 | - | ||
35 | - | ||
36 | - | ||
37 | - | ||
38 | - | ||
39 | - | ||
40 | -} |
application/admin/model/school/Grade.php
已删除
100644 → 0
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\model\school; | ||
4 | - | ||
5 | -use think\Model; | ||
6 | - | ||
7 | - | ||
8 | -class Grade extends Model | ||
9 | -{ | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | - | ||
15 | - // 表名 | ||
16 | - protected $name = 'school_grade'; | ||
17 | - | ||
18 | - // 自动写入时间戳字段 | ||
19 | - protected $autoWriteTimestamp = 'integer'; | ||
20 | - | ||
21 | - // 定义时间戳字段名 | ||
22 | - protected $createTime = 'createtime'; | ||
23 | - protected $updateTime = 'updatetime'; | ||
24 | - protected $deleteTime = false; | ||
25 | - | ||
26 | - // 追加属性 | ||
27 | - protected $append = [ | ||
28 | - | ||
29 | - ]; | ||
30 | - | ||
31 | - | ||
32 | - | ||
33 | - | ||
34 | - | ||
35 | - | ||
36 | - | ||
37 | - | ||
38 | - | ||
39 | - | ||
40 | -} |
application/admin/validate/Grade.php
已删除
100644 → 0
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\validate; | ||
4 | - | ||
5 | -use think\Validate; | ||
6 | - | ||
7 | -class Grade extends Validate | ||
8 | -{ | ||
9 | - /** | ||
10 | - * 验证规则 | ||
11 | - */ | ||
12 | - protected $rule = [ | ||
13 | - ]; | ||
14 | - /** | ||
15 | - * 提示消息 | ||
16 | - */ | ||
17 | - protected $message = [ | ||
18 | - ]; | ||
19 | - /** | ||
20 | - * 验证场景 | ||
21 | - */ | ||
22 | - protected $scene = [ | ||
23 | - 'add' => [], | ||
24 | - 'edit' => [], | ||
25 | - ]; | ||
26 | - | ||
27 | -} |
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\validate; | ||
4 | - | ||
5 | -use think\Validate; | ||
6 | - | ||
7 | -class ItemRondaRel extends Validate | ||
8 | -{ | ||
9 | - /** | ||
10 | - * 验证规则 | ||
11 | - */ | ||
12 | - protected $rule = [ | ||
13 | - ]; | ||
14 | - /** | ||
15 | - * 提示消息 | ||
16 | - */ | ||
17 | - protected $message = [ | ||
18 | - ]; | ||
19 | - /** | ||
20 | - * 验证场景 | ||
21 | - */ | ||
22 | - protected $scene = [ | ||
23 | - 'add' => [], | ||
24 | - 'edit' => [], | ||
25 | - ]; | ||
26 | - | ||
27 | -} |
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\validate\data; | ||
4 | - | ||
5 | -use think\Validate; | ||
6 | - | ||
7 | -class Screen extends Validate | ||
8 | -{ | ||
9 | - /** | ||
10 | - * 验证规则 | ||
11 | - */ | ||
12 | - protected $rule = [ | ||
13 | - ]; | ||
14 | - /** | ||
15 | - * 提示消息 | ||
16 | - */ | ||
17 | - protected $message = [ | ||
18 | - ]; | ||
19 | - /** | ||
20 | - * 验证场景 | ||
21 | - */ | ||
22 | - protected $scene = [ | ||
23 | - 'add' => [], | ||
24 | - 'edit' => [], | ||
25 | - ]; | ||
26 | - | ||
27 | -} |
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\validate\item; | ||
4 | - | ||
5 | -use think\Validate; | ||
6 | - | ||
7 | -class Details extends Validate | ||
8 | -{ | ||
9 | - /** | ||
10 | - * 验证规则 | ||
11 | - */ | ||
12 | - protected $rule = [ | ||
13 | - ]; | ||
14 | - /** | ||
15 | - * 提示消息 | ||
16 | - */ | ||
17 | - protected $message = [ | ||
18 | - ]; | ||
19 | - /** | ||
20 | - * 验证场景 | ||
21 | - */ | ||
22 | - protected $scene = [ | ||
23 | - 'add' => [], | ||
24 | - 'edit' => [], | ||
25 | - ]; | ||
26 | - | ||
27 | -} |
application/admin/validate/item/Info.php
已删除
100644 → 0
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\validate\item; | ||
4 | - | ||
5 | -use think\Validate; | ||
6 | - | ||
7 | -class Info extends Validate | ||
8 | -{ | ||
9 | - /** | ||
10 | - * 验证规则 | ||
11 | - */ | ||
12 | - protected $rule = [ | ||
13 | - ]; | ||
14 | - /** | ||
15 | - * 提示消息 | ||
16 | - */ | ||
17 | - protected $message = [ | ||
18 | - ]; | ||
19 | - /** | ||
20 | - * 验证场景 | ||
21 | - */ | ||
22 | - protected $scene = [ | ||
23 | - 'add' => [], | ||
24 | - 'edit' => [], | ||
25 | - ]; | ||
26 | - | ||
27 | -} |
1 | -<?php | ||
2 | - | ||
3 | -namespace app\admin\validate\school; | ||
4 | - | ||
5 | -use think\Validate; | ||
6 | - | ||
7 | -class Grade extends Validate | ||
8 | -{ | ||
9 | - /** | ||
10 | - * 验证规则 | ||
11 | - */ | ||
12 | - protected $rule = [ | ||
13 | - ]; | ||
14 | - /** | ||
15 | - * 提示消息 | ||
16 | - */ | ||
17 | - protected $message = [ | ||
18 | - ]; | ||
19 | - /** | ||
20 | - * 验证场景 | ||
21 | - */ | ||
22 | - protected $scene = [ | ||
23 | - 'add' => [], | ||
24 | - 'edit' => [], | ||
25 | - ]; | ||
26 | - | ||
27 | -} |
application/admin/view/grade/add.html
已删除
100644 → 0
1 | -<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | - | ||
3 | - <div class="form-group"> | ||
4 | - <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label> | ||
5 | - <div class="col-xs-12 col-sm-8"> | ||
6 | - <input id="c-name" class="form-control" name="row[name]" type="text"> | ||
7 | - </div> | ||
8 | - </div> | ||
9 | - <div class="form-group layer-footer"> | ||
10 | - <label class="control-label col-xs-12 col-sm-2"></label> | ||
11 | - <div class="col-xs-12 col-sm-8"> | ||
12 | - <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button> | ||
13 | - <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
14 | - </div> | ||
15 | - </div> | ||
16 | -</form> |
application/admin/view/grade/edit.html
已删除
100644 → 0
1 | -<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | ||
2 | - | ||
3 | - <div class="form-group"> | ||
4 | - <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label> | ||
5 | - <div class="col-xs-12 col-sm-8"> | ||
6 | - <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}"> | ||
7 | - </div> | ||
8 | - </div> | ||
9 | - <div class="form-group layer-footer"> | ||
10 | - <label class="control-label col-xs-12 col-sm-2"></label> | ||
11 | - <div class="col-xs-12 col-sm-8"> | ||
12 | - <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button> | ||
13 | - <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button> | ||
14 | - </div> | ||
15 | - </div> | ||
16 | -</form> |
application/admin/view/grade/index.html
已删除
100644 → 0
1 | -<div class="panel panel-default panel-intro"> | ||
2 | - {:build_heading()} | ||
3 | - | ||
4 | - <div class="panel-body"> | ||
5 | - <div id="myTabContent" class="tab-content"> | ||
6 | - <div class="tab-pane fade active in" id="one"> | ||
7 | - <div class="widget-body no-padding"> | ||
8 | - <div id="toolbar" class="toolbar"> | ||
9 | - <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | ||
10 | - <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('grade/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a> | ||
11 | - | ||
12 | - | ||
13 | - <div class="dropdown btn-group {:$auth->check('grade/multi')?'':'hide'}"> | ||
14 | - <ul class="dropdown-menu text-left" role="menu"> | ||
15 | - <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li> | ||
16 | - <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li> | ||
17 | - </ul> | ||
18 | - </div> | ||
19 | - | ||
20 | - | ||
21 | - </div> | ||
22 | - <table id="table" class="table table-striped table-bordered table-hover table-nowrap" | ||
23 | - data-operate-edit="{:$auth->check('grade/edit')}" | ||
24 | - data-operate-del="{:$auth->check('grade/del')}" | ||
25 | - width="100%"> | ||
26 | - </table> | ||
27 | - </div> | ||
28 | - </div> | ||
29 | - | ||
30 | - </div> | ||
31 | - </div> | ||
32 | -</div> |
public/assets/js/backend/grade.js
已删除
100644 → 0
1 | -define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { | ||
2 | - | ||
3 | - var Controller = { | ||
4 | - index: function () { | ||
5 | - // 初始化表格参数配置 | ||
6 | - Table.api.init({ | ||
7 | - extend: { | ||
8 | - index_url: 'grade/index' + location.search, | ||
9 | - add_url: 'grade/add', | ||
10 | - edit_url: 'grade/edit', | ||
11 | - del_url: 'grade/del', | ||
12 | - multi_url: 'grade/multi', | ||
13 | - import_url: 'grade/import', | ||
14 | - table: 'grade', | ||
15 | - } | ||
16 | - }); | ||
17 | - | ||
18 | - var table = $("#table"); | ||
19 | - | ||
20 | - // 初始化表格 | ||
21 | - table.bootstrapTable({ | ||
22 | - url: $.fn.bootstrapTable.defaults.extend.index_url, | ||
23 | - pk: 'id', | ||
24 | - sortName: 'id', | ||
25 | - showToggle: false,//浏览模式功能关闭 | ||
26 | - showColumns: false,//显示隐藏列功能关闭 | ||
27 | - //commonSearch: false, //关闭通用搜索按钮 | ||
28 | - showExport: false,//导出功能关闭 | ||
29 | - clickToSelect: false, //是否启用点击选中 | ||
30 | - dblClickToEdit: false, //是否启用双击编辑 | ||
31 | - columns: [ | ||
32 | - [ | ||
33 | - {checkbox: true}, | ||
34 | - {field: 'id', title: __('ID'),operate: false}, | ||
35 | - {field: 'name', title: __('Name'), operate: 'LIKE'}, | ||
36 | - {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | ||
37 | - ] | ||
38 | - ] | ||
39 | - }); | ||
40 | - | ||
41 | - // 为表格绑定事件 | ||
42 | - Table.api.bindevent(table); | ||
43 | - }, | ||
44 | - add: function () { | ||
45 | - Controller.api.bindevent(); | ||
46 | - }, | ||
47 | - edit: function () { | ||
48 | - Controller.api.bindevent(); | ||
49 | - }, | ||
50 | - api: { | ||
51 | - bindevent: function () { | ||
52 | - Form.api.bindevent($("form[role=form]")); | ||
53 | - } | ||
54 | - } | ||
55 | - }; | ||
56 | - return Controller; | ||
57 | -}); |
public/assets/js/backend/school/grade.js
已删除
100644 → 0
1 | -define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { | ||
2 | - | ||
3 | - var Controller = { | ||
4 | - index: function () { | ||
5 | - // 初始化表格参数配置 | ||
6 | - Table.api.init({ | ||
7 | - extend: { | ||
8 | - index_url: 'school.grade/index' + location.search, | ||
9 | - add_url: 'school.grade/add', | ||
10 | - edit_url: 'school.grade/edit', | ||
11 | - del_url: 'school.grade/del', | ||
12 | - multi_url: 'school.grade/multi', | ||
13 | - import_url: 'school.grade/import', | ||
14 | - table: 'school_grade', | ||
15 | - } | ||
16 | - }); | ||
17 | - | ||
18 | - var table = $("#table"); | ||
19 | - | ||
20 | - // 初始化表格 | ||
21 | - table.bootstrapTable({ | ||
22 | - url: $.fn.bootstrapTable.defaults.extend.index_url, | ||
23 | - pk: 'id', | ||
24 | - sortName: 'id', | ||
25 | - columns: [ | ||
26 | - [ | ||
27 | - {checkbox: true}, | ||
28 | - {field: 'id', title: __('Id')}, | ||
29 | - {field: 'name', title: __('Name'), operate: 'LIKE'}, | ||
30 | - {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | ||
31 | - ] | ||
32 | - ] | ||
33 | - }); | ||
34 | - | ||
35 | - // 为表格绑定事件 | ||
36 | - Table.api.bindevent(table); | ||
37 | - }, | ||
38 | - add: function () { | ||
39 | - Controller.api.bindevent(); | ||
40 | - }, | ||
41 | - edit: function () { | ||
42 | - Controller.api.bindevent(); | ||
43 | - }, | ||
44 | - api: { | ||
45 | - bindevent: function () { | ||
46 | - Form.api.bindevent($("form[role=form]")); | ||
47 | - } | ||
48 | - } | ||
49 | - }; | ||
50 | - return Controller; | ||
51 | -}); |
-
请 注册 或 登录 后发表评论