diff --git a/app/admin/controller/Auth.php b/app/admin/controller/Auth.php index adeb29a6c..3d1ceefce 100644 --- a/app/admin/controller/Auth.php +++ b/app/admin/controller/Auth.php @@ -61,7 +61,6 @@ class Auth extends Controller */ public function add() { - $this->_applyFormToken(); $this->_form($this->table, 'form'); } @@ -74,7 +73,6 @@ class Auth extends Controller */ public function edit() { - $this->_applyFormToken(); $this->_form($this->table, 'form'); } @@ -116,11 +114,21 @@ class Auth extends Controller sysoplog('系统权限管理', "配置系统权限[{$map['auth']}]授权成功"); $this->success('访问权限修改成功!', 'javascript:history.back()'); } else { - $this->title = '权限配置节点'; $this->_form($this->table, 'apply'); } } + /** + * 表单后置数据处理 + * @param array $data + */ + protected function _apply_form_filter(array &$data) + { + if ($this->request->isGet()) { + $this->title = "编辑【{$data['title']}】授权"; + } + } + /** * 删除系统权限 * @auth true diff --git a/app/admin/controller/Base.php b/app/admin/controller/Base.php index 934cb7790..697a1ff04 100644 --- a/app/admin/controller/Base.php +++ b/app/admin/controller/Base.php @@ -48,7 +48,8 @@ class Base extends Controller $this->types = (new SystemBase)->types(); $this->type = input('get.type') ?: ($this->types[0] ?? '-'); }, function (QueryHelper $query) { - $query->where(['deleted' => 0])->equal('type')->like('code,name,status')->dateBetween('create_at'); + $query->where(['deleted' => 0])->equal('type'); + $query->like('code,name,status')->dateBetween('create_at'); }); } diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index 2e1860404..b724f3b7a 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -171,7 +171,7 @@ class Menu extends Controller if ($result) { $id = $this->app->db->name($this->table)->getLastInsID(); sysoplog('系统菜单管理', "添加系统菜单[{$id}]成功"); - $this->success('系统菜单添加成功!', 'javascript:location.reload()'); + $this->success('系统菜单添加成功!'); } } @@ -184,7 +184,7 @@ class Menu extends Controller if ($result) { $id = input('id') ?: 0; sysoplog('系统菜单管理', "修改系统菜单[{$id}]成功"); - $this->success('系统菜单修改成功!', 'javascript:location.reload()'); + $this->success('系统菜单修改成功!'); } } diff --git a/app/admin/controller/User.php b/app/admin/controller/User.php index db6147a34..1253ebdaa 100644 --- a/app/admin/controller/User.php +++ b/app/admin/controller/User.php @@ -96,7 +96,6 @@ class User extends Controller */ public function add() { - $this->_applyFormToken(); $this->_form($this->table, 'form'); } @@ -109,7 +108,6 @@ class User extends Controller */ public function edit() { - $this->_applyFormToken(); $this->_form($this->table, 'form'); } diff --git a/app/admin/model/SystemBase.php b/app/admin/model/SystemBase.php index 4f41f1e14..35a369131 100644 --- a/app/admin/model/SystemBase.php +++ b/app/admin/model/SystemBase.php @@ -37,7 +37,7 @@ class SystemBase extends Model public function items(string $type, array &$data = [], string $field = 'base_code', string $bind = 'base_info'): array { $map = ['status' => 1, 'deleted' => 0, 'type' => $type]; - $bases = $this->where($map)->order('sort desc,id desc')->column('code,name,content', 'code'); + $bases = $this->where($map)->order('sort desc,id asc')->column('code,name,content', 'code'); if (count($data) > 0) foreach ($data as &$vo) $vo[$bind] = $bases[$vo[$field]] ?? []; return $bases; } diff --git a/app/admin/model/SystemQueue.php b/app/admin/model/SystemQueue.php index 3c016da26..16a0e0954 100644 --- a/app/admin/model/SystemQueue.php +++ b/app/admin/model/SystemQueue.php @@ -1,5 +1,19 @@ 0) { return d.exec_time + ' ( 每 ' + d.loops_time + ' 秒 ) '; } else { @@ -82,8 +83,9 @@ } }, { - field: 'enter_time', title: '执行时间', minWidth: 180, templet: function (d) { - d.enter_time = d.enter_time || '', d.outer_time = d.outer_time || '0.0000'; + field: 'enter_time', title: '执行时间', minWidth: 175, templet: function (d) { + d.enter_time = d.enter_time || ''; + d.outer_time = d.outer_time || '0.0000'; if (d.enter_time.length > 12) { return d.enter_time.substr(12) + ' ( 耗时 ' + d.outer_time + ' )'; } else { @@ -94,7 +96,7 @@ {field: 'attempts', title: '执行次数', width: 95, align: 'center', sort: true, templet: "
{{d.attempts||0}}
"}, {field: 'exec_desc', title: '执行结果', minWidth: 180}, {field: 'create_at', title: '创建时间', minWidth: 170}, - {toolbar: '#toolbar', title: '操作面板', align: 'left', fixed: 'right', minWidth: 225} + {toolbar: '#toolbar', title: '操作面板', fixed: 'right', minWidth: 235} ]] }); }); @@ -102,13 +104,15 @@