Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3ca6cea6ad | ||
![]() |
8f65a2bf99 | ||
![]() |
5ab1b77e0b | ||
![]() |
d787a6ad95 | ||
![]() |
fc5312692f | ||
![]() |
86bfcea374 | ||
![]() |
0218207848 | ||
![]() |
984c00fe6f | ||
![]() |
c03213e7c3 | ||
![]() |
3867be14b2 | ||
![]() |
08c3cc9a78 | ||
![]() |
af7ac14d5d | ||
![]() |
6ff2204368 | ||
![]() |
a3c3948bc6 | ||
![]() |
c1aa54bbce | ||
![]() |
b53c617984 | ||
![]() |
592cae1e2f | ||
![]() |
d24036d9f1 | ||
![]() |
e18b30e89a |
@@ -26,9 +26,6 @@
|
|||||||
|
|
||||||
我深信,付费后台管理系统将为您带来更多的价值和便利,帮助您提升工作效率
|
我深信,付费后台管理系统将为您带来更多的价值和便利,帮助您提升工作效率
|
||||||
|
|
||||||
## ⚠️Thinkphp 用户注意
|
|
||||||
由于新版本使用 `Laravel` 开发,所以请使用 `thinkphp` 分支或者 tag2.6.2,thinkphp 版本已经非常稳定了。
|
|
||||||
|
|
||||||
## 功能
|
## 功能
|
||||||
- [x] 用户管理 后台用户管理
|
- [x] 用户管理 后台用户管理
|
||||||
- [x] 部门管理 配置公司的部门结构,支持树形结构
|
- [x] 部门管理 配置公司的部门结构,支持树形结构
|
||||||
@@ -47,7 +44,7 @@
|
|||||||
- 加入 Q 群 `302266230` 暗号 `catchadmin`。
|
- 加入 Q 群 `302266230` 暗号 `catchadmin`。
|
||||||
- 加微信入群,新建🆕
|
- 加微信入群,新建🆕
|
||||||
|
|
||||||
<img src="wechat.png" width="300"/>
|
<img src="wechat.png" width="200"/>
|
||||||
|
|
||||||
## 项目地址
|
## 项目地址
|
||||||
- [github catchadmin](https://github.com/jaguarjack/catch-admin)
|
- [github catchadmin](https://github.com/jaguarjack/catch-admin)
|
||||||
|
@@ -14,15 +14,14 @@
|
|||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"ext-zip": "*",
|
"ext-zip": "*",
|
||||||
"guzzlehttp/guzzle": "^7.8.1",
|
"laravel/framework": "^v12.8.1",
|
||||||
"laravel/framework": "^11.0",
|
"laravel/tinker": "^v2.10.1",
|
||||||
"laravel/tinker": "^v2.9.0",
|
"catchadmin/core": "^0.4.5"
|
||||||
"catchadmin/core": "^0.3.7"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^v1.23.1",
|
"fakerphp/faker": "^v1.24.1",
|
||||||
"mockery/mockery": "^1.6.9",
|
"mockery/mockery": "^1.6.12",
|
||||||
"pestphp/pest": "^v2.34.2"
|
"pestphp/pest": "^v3.7.2"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -53,6 +52,10 @@
|
|||||||
"post-create-project-cmd": [
|
"post-create-project-cmd": [
|
||||||
"@php artisan key:generate --ansi"
|
"@php artisan key:generate --ansi"
|
||||||
],
|
],
|
||||||
|
"dev": [
|
||||||
|
"Composer\\Config::disableProcessTimeout",
|
||||||
|
"npx concurrently -c \"#93c5fd,#c4b5fd\" \"cd web && yarn dev\" \"php artisan serve\" --names='vite,server'"
|
||||||
|
],
|
||||||
"cs-diff": "./fixer/vendor/bin/php-cs-fixer fix --dry-run --diff",
|
"cs-diff": "./fixer/vendor/bin/php-cs-fixer fix --dry-run --diff",
|
||||||
"cs": "./fixer/vendor/bin/php-cs-fixer fix"
|
"cs": "./fixer/vendor/bin/php-cs-fixer fix"
|
||||||
},
|
},
|
||||||
|
@@ -71,6 +71,9 @@ return [
|
|||||||
|
|
||||||
'links' => [
|
'links' => [
|
||||||
public_path('storage') => storage_path('app/public'),
|
public_path('storage') => storage_path('app/public'),
|
||||||
|
|
||||||
|
// 创建 storage 对应的软连接
|
||||||
|
public_path('uploads') => storage_path('uploads')
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
30
modules/Common/Repository/Options/Schemas.php
Normal file
30
modules/Common/Repository/Options/Schemas.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Common\Repository\Options;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
class Schemas implements OptionInterface
|
||||||
|
{
|
||||||
|
public function get(): array
|
||||||
|
{
|
||||||
|
$options = [];
|
||||||
|
|
||||||
|
$connection = DB::connection();
|
||||||
|
$databaseName = $connection->getDatabaseName();
|
||||||
|
$tablePrefix = $connection->getTablePrefix();
|
||||||
|
|
||||||
|
foreach (Schema::getTables($databaseName) as $table) {
|
||||||
|
$tableName = Str::of($table['name'])->replaceStart($tablePrefix, '');
|
||||||
|
|
||||||
|
$options[] = [
|
||||||
|
'label' => $tableName . "\t\t\t\t" . $table['comment'],
|
||||||
|
'value' => $tableName,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
|
}
|
@@ -48,6 +48,18 @@ class Schemas extends CatchModel
|
|||||||
*/
|
*/
|
||||||
public function storeBy(array $data): bool
|
public function storeBy(array $data): bool
|
||||||
{
|
{
|
||||||
|
// 从已有 schema 中选择
|
||||||
|
if (isset($data['schema_name'])) {
|
||||||
|
$columns = SchemaFacade::getColumnListing($data['schema_name']);
|
||||||
|
|
||||||
|
return parent::storeBy([
|
||||||
|
'module' => $data['module'],
|
||||||
|
'name' => $data['schema_name'],
|
||||||
|
'columns' => implode(',', $columns),
|
||||||
|
'is_soft_delete' => isset($columns['deleted_at']) ? Status::Enable : Status::Disable,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
$schema = $data['schema'];
|
$schema = $data['schema'];
|
||||||
|
|
||||||
$structures = $data['structures'];
|
$structures = $data['structures'];
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useCreate } from '/admin/composables/curd/useCreate'
|
import { useCreate } from '@/composables/curd/useCreate'
|
||||||
import { useShow } from '/admin/composables/curd/useShow'
|
import { useShow } from '@/composables/curd/useShow'
|
||||||
import { onMounted } from 'vue'
|
import { onMounted } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@@ -28,9 +28,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted } from 'vue'
|
import { computed, onMounted } from 'vue'
|
||||||
import Create from './create.vue'
|
import Create from './create.vue'
|
||||||
import { useGetList } from '/admin/composables/curd/useGetList'
|
import { useGetList } from '@/composables/curd/useGetList'
|
||||||
import { useDestroy } from '/admin/composables/curd/useDestroy'
|
import { useDestroy } from '@/composables/curd/useDestroy'
|
||||||
import { useOpen } from '/admin/composables/curd/useOpen'
|
import { useOpen } from '@/composables/curd/useOpen'
|
||||||
|
|
||||||
const api = '{api}'
|
const api = '{api}'
|
||||||
|
|
||||||
|
@@ -6,7 +6,9 @@ namespace Modules\Permissions\Http\Controllers;
|
|||||||
|
|
||||||
use Catch\Base\CatchController as Controller;
|
use Catch\Base\CatchController as Controller;
|
||||||
use Catch\Exceptions\FailedException;
|
use Catch\Exceptions\FailedException;
|
||||||
|
use Catch\Support\ResponseBuilder;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Foundation\Exceptions\ReportableHandler;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Modules\Permissions\Enums\DataRange;
|
use Modules\Permissions\Enums\DataRange;
|
||||||
use Modules\Permissions\Models\Roles;
|
use Modules\Permissions\Models\Roles;
|
||||||
|
@@ -6,17 +6,17 @@ use Catch\CatchAdmin;
|
|||||||
use Catch\Traits\DB\BaseOperate;
|
use Catch\Traits\DB\BaseOperate;
|
||||||
use Catch\Traits\DB\ScopeTrait;
|
use Catch\Traits\DB\ScopeTrait;
|
||||||
use Catch\Traits\DB\Trans;
|
use Catch\Traits\DB\Trans;
|
||||||
|
use Catch\Traits\DB\WithAttributes;
|
||||||
use Illuminate\Contracts\Http\Kernel;
|
use Illuminate\Contracts\Http\Kernel;
|
||||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
class LogOperate extends Model
|
class LogOperate extends Model
|
||||||
{
|
{
|
||||||
use BaseOperate, Trans, ScopeTrait;
|
use BaseOperate, Trans, ScopeTrait, WithAttributes;
|
||||||
|
|
||||||
protected $table = 'log_operate';
|
protected $table = 'log_operate';
|
||||||
|
|
||||||
|
@@ -32,6 +32,8 @@ class User extends Model implements AuthenticatableContract
|
|||||||
'id', 'username', 'email', 'avatar', 'password', 'remember_token', 'creator_id', 'status', 'department_id', 'login_ip', 'login_at', 'created_at', 'updated_at', 'deleted_at'
|
'id', 'username', 'email', 'avatar', 'password', 'remember_token', 'creator_id', 'status', 'department_id', 'login_ip', 'login_at', 'created_at', 'updated_at', 'deleted_at'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected array $defaultHidden = ['password', 'remember_token'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array|string[]
|
* @var array|string[]
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user