This commit is contained in:
JaguarJack 2020-09-07 20:14:03 +08:00
parent 377b72ae19
commit b07defb0e9
2 changed files with 31 additions and 19 deletions

View File

@ -5,7 +5,7 @@
<p align="center"><code>CatchAdmin</code>是一款基于<a href="http://www.thinkphp.cn/" target="_blank">thinkphp framework</a> <p align="center"><code>CatchAdmin</code>是一款基于<a href="http://www.thinkphp.cn/" target="_blank">thinkphp framework</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/">element admin</a>二次开发而成后台管理系统。因为 thinkphp 的简单高效,文档齐全。在看了很多 thinkphp 生态中的后台管理系统,发现没有一款合适的前后端分离系统。遂开发了 CatchAdmin。 <a href="https://github.com/PanJiaChen/vue-element-admin/">element admin</a>二次开发而成后台管理系统。因为 thinkphp 的简单高效,文档齐全。在看了很多 thinkphp 生态中的后台管理系统,发现没有一款合适的前后端分离系统。遂开发了 CatchAdmin。
完全利用了 thinkphp6 的新版本特性 ServiceProvider将管理系统模块之间的耦合降到了最低限度。每个模块之间都有独立的 `controller路由模型数据表`。在开发上尽可能将模块之间的影响降到最低,降低了开发上的难度。基于 CatchAdmin 可以开发 cmsCRMOA 等 完全利用了 thinkphp6 的新版本特性 ServiceProvider将管理系统模块之间的耦合降到了最低限度。每个模块之间都有独立的 controller路由模型数据表`。在开发上尽可能将模块之间的影响降到最低,降低了开发上的难度。基于 CatchAdmin 可以开发 cmsCRMOA 等
等系统。也封装了很多实用的工具,提升开发体验。 等系统。也封装了很多实用的工具,提升开发体验。
</p> </p>
@ -32,18 +32,18 @@
</p > </p >
## 功能 ## 功能
- [x] 用户管理 后台用户管理 - [x] `用户管理` 后台用户管理
- [x] 部门管理 配置公司的部门结构,支持树形结构 - [x] `部门管理` 配置公司的部门结构,支持树形结构
- [x] 岗位管理 配置后台用户的职务 - [x] `岗位管理` 配置后台用户的职务
- [x] 菜单管理 配置系统菜单,按钮等等 - [x] `菜单管理` 配置系统菜单,按钮等等
- [x] 角色管理 配置用户担当的角色,分配权限 - [x] `角色管理` 配置用户担当的角色,分配权限
- [x] 数据字典 管理后台表结构 - [x] `数据字典` 管理后台表结构
- [x] 操作日志 后台用户操作记录 - [x] `操作日志` 后台用户操作记录
- [x] 登录日志 后台系统用户的登录记录 - [x] `登录日志` 后台系统用户的登录记录
- [x] 代码生成 生成 API 端的 CURD 操作 - [x] `代码生成` 生成 API 端的 CURD 操作
- [x] 敏感词 支持敏感词配置 - [x] `敏感词` 支持敏感词配置
- [x] 附件管理 可管理上传的文件 - [x] `附件管理` 可管理上传的文件
- [ ] 微信管理 - [ ] `微信管理`
## 项目地址 ## 项目地址
- [github 地址](https://github.com/yanwenwu/catch-admin) - [github 地址](https://github.com/yanwenwu/catch-admin)

View File

@ -13,6 +13,8 @@ class InstallProjectCommand extends Command
protected $databaseLink = []; protected $databaseLink = [];
protected $defaultModule = ['permissions', 'system'];
protected function configure() protected function configure()
{ {
$this->setName('catch:install') $this->setName('catch:install')
@ -194,6 +196,7 @@ class InstallProjectCommand extends Command
foreach (CatchAdmin::getModulesDirectory() as $directory) { foreach (CatchAdmin::getModulesDirectory() as $directory) {
$moduleInfo = CatchAdmin::getModuleInfo($directory); $moduleInfo = CatchAdmin::getModuleInfo($directory);
if (!empty($moduleInfo) && is_dir(CatchAdmin::moduleMigrationsDirectory($moduleInfo['alias']))) { if (!empty($moduleInfo) && is_dir(CatchAdmin::moduleMigrationsDirectory($moduleInfo['alias']))) {
if (in_array($moduleInfo['alias'], $this->defaultModule)) {
$output = Console::call('catch-migrate:run', [$moduleInfo['alias']]); $output = Console::call('catch-migrate:run', [$moduleInfo['alias']]);
$this->output->info(sprintf('module [%s] migrations %s', $moduleInfo['alias'], $output->fetch())); $this->output->info(sprintf('module [%s] migrations %s', $moduleInfo['alias'], $output->fetch()));
@ -202,17 +205,26 @@ class InstallProjectCommand extends Command
} }
} }
} }
}
/**
* 回滚数据
*
* @time 2020年09月07日
* @return void
*/
protected function migrateRollback() protected function migrateRollback()
{ {
foreach (CatchAdmin::getModulesDirectory() as $directory) { foreach (CatchAdmin::getModulesDirectory() as $directory) {
$moduleInfo = CatchAdmin::getModuleInfo($directory); $moduleInfo = CatchAdmin::getModuleInfo($directory);
if (!empty($moduleInfo) && is_dir(CatchAdmin::moduleMigrationsDirectory($moduleInfo['alias']))) { if (!empty($moduleInfo) && is_dir(CatchAdmin::moduleMigrationsDirectory($moduleInfo['alias']))) {
if (in_array($moduleInfo['alias'], $this->defaultModule)) {
$rollbackOut = Console::call('catch-migrate:rollback', [$moduleInfo['alias'], '-f']); $rollbackOut = Console::call('catch-migrate:rollback', [$moduleInfo['alias'], '-f']);
// $this->output->info(sprintf('module [%s] [%s] rollback %s', $moduleInfo['alias'], basename($migration), $rollbackOut->fetch())); // $this->output->info(sprintf('module [%s] [%s] rollback %s', $moduleInfo['alias'], basename($migration), $rollbackOut->fetch()));
} }
} }
} }
}
/** /**
* 安装第四步 * 安装第四步