diff --git a/app/home/controller/Role.php b/app/home/controller/Role.php index 20d0f41..ffe8687 100644 --- a/app/home/controller/Role.php +++ b/app/home/controller/Role.php @@ -41,10 +41,10 @@ class Role extends BaseController { $param = get_params(); if (request()->isAjax()) { - $menuData = isset($param['menu']) ? $param['menu'] : 0; - $ruleData = isset($param['rule']) ? $param['rule'] : 0; - $param['menus'] = implode(',',$menuData); - $param['rules'] = implode(',',$ruleData); + $menuData = isset($param['menu']) ? $param['menu'] : 0; + $ruleData = isset($param['rule']) ? $param['rule'] : 0; + $param['menus'] = implode(',', $menuData); + $param['rules'] = implode(',', $ruleData); if (!empty($param['id']) && $param['id'] > 0) { try { validate(GroupCheck::class)->scene('edit')->check($param); @@ -72,19 +72,17 @@ class Role extends BaseController clear_cache('adminMenu'); clear_cache('adminRules'); return to_assign(); - } - else{ + } else { $id = isset($param['id']) ? $param['id'] : 0; $menu = get_admin_menu(); $rule = get_admin_rule(); - if($id > 0) { + if ($id > 0) { $group = get_admin_group_info($id); $role_menu = create_tree_list(0, $menu, $group['menus']); $role_rule = create_tree_list(0, $rule, $group['rules']); $role = Db::name('AdminGroup')->where(['id' => $id])->find(); View::assign('role', $role); - } - else{ + } else { $role_menu = create_tree_list(0, $menu, []); $role_rule = create_tree_list(0, $rule, []); } diff --git a/app/home/middleware.php b/app/home/middleware.php new file mode 100644 index 0000000..d3b1172 --- /dev/null +++ b/app/home/middleware.php @@ -0,0 +1,14 @@ +isAjax() ? to_assign(1, '请先完成系统安装引导') : redirect((string) url('/install/index')); - } + return $request->isAjax() ? to_assign(1, '请先完成系统安装引导') : redirect((string) url('/install/index')); } + return $next($request); } } diff --git a/app/install/data/gouguoa.sql b/app/install/data/gouguoa.sql index 8ad6b5f..2094421 100644 --- a/app/install/data/gouguoa.sql +++ b/app/install/data/gouguoa.sql @@ -408,6 +408,29 @@ INSERT INTO `oa_config`(`id`, `title`, `name`, `content`, `status`, `create_time INSERT INTO `oa_config`(`id`, `title`, `name`, `content`, `status`, `create_time`, `update_time`) VALUES (4, '其他配置', 'other', 'a:3:{s:2:\"id\";s:1:\"5\";s:6:\"author\";s:15:\"勾股工作室\";s:7:\"version\";s:13:\"v1.2021.07.28\";}', 1, 1613725791, 1635953640); +-- ---------------------------- +-- Table structure for oa_check +-- ---------------------------- +DROP TABLE IF EXISTS `oa_check`; +CREATE TABLE `oa_check` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `uid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核人ID', + `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '审核类型 1报销审核人 2报销打款确认人 3发票审核人 4发票开票人', + `remark` varchar(1000) NULL DEFAULT '' COMMENT '备注', + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', + `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', + `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '审核人配置'; + +-- ---------------------------- +-- Records of oa_check +-- ---------------------------- +INSERT INTO `oa_check`(`id`, `uid`, `type`, `remark`, `status`, `create_time`, `update_time`) VALUES (1, 1, 1, '初始化设置', 1, 1558681814, 0); +INSERT INTO `oa_check`(`id`, `uid`, `type`, `remark`, `status`, `create_time`, `update_time`) VALUES (2, 1, 2, '初始化设置', 1, 1558681814, 0); +INSERT INTO `oa_check`(`id`, `uid`, `type`, `remark`, `status`, `create_time`, `update_time`) VALUES (3, 1, 3, '初始化设置', 1, 1558681814, 0); +INSERT INTO `oa_check`(`id`, `uid`, `type`, `remark`, `status`, `create_time`, `update_time`) VALUES (4, 1, 4, '初始化设置', 1, 1558681814, 0); + -- ---------------------------- -- Table structure for oa_department -- ---------------------------- diff --git a/app/install/view/index/step1.html b/app/install/view/index/step1.html index d209372..7874877 100644 --- a/app/install/view/index/step1.html +++ b/app/install/view/index/step1.html @@ -3,7 +3,7 @@
-