mirror of
http://124.126.16.154:8888/singularity/hyperf-admin.git
synced 2026-01-15 07:15:06 +08:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b9cea60ff | ||
|
|
c881a36788 | ||
|
|
a1c0372828 | ||
|
|
572c8a1065 | ||
|
|
c8a049faeb | ||
|
|
cb2b2b5428 | ||
|
|
8b44c279c1 | ||
|
|
8f1df241a4 | ||
|
|
9abd51cc6b | ||
|
|
f4c429ea28 | ||
|
|
839bd1e0b9 | ||
|
|
4ccb7200eb | ||
|
|
d79fdca30b | ||
|
|
11f249669e | ||
|
|
a707dae623 | ||
|
|
d5a7a584df | ||
|
|
c0379e5137 | ||
|
|
bde50ad7e2 | ||
|
|
e4dd791a66 | ||
|
|
5f1bdc834e | ||
|
|
0798685e90 | ||
|
|
1891c2053b | ||
|
|
89505d63c3 | ||
|
|
165bfe1a2a | ||
|
|
5e2314292b | ||
|
|
c5ee5692f9 | ||
|
|
de939c1c42 | ||
|
|
5dedcff854 | ||
|
|
1d9e2401fa |
@@ -6,7 +6,7 @@
|
||||
|
||||
> 演示站点部署在`亚马逊免费主机`, 国内访问可能会慢
|
||||
|
||||

|
||||

|
||||
|
||||
前端为`vue multiple page`多页模式, 可以按模块打包, 默认包含两个模块`default` 默认模块, `system`系统管理模块, 绝大部分业务组件在`src/components`目录
|
||||
|
||||
|
||||
54
bin/release.sh
Executable file
54
bin/release.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if (( "$#" != 1 ))
|
||||
then
|
||||
echo "Tag has to be provided"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NOW=$(date +%s)
|
||||
CURRENT_BRANCH="master"
|
||||
VERSION=$1
|
||||
BASEPATH=$(cd `dirname $0`; cd ../src/; pwd)
|
||||
|
||||
# Always prepend with "v"
|
||||
if [[ $VERSION != v* ]]
|
||||
then
|
||||
VERSION="v$VERSION"
|
||||
fi
|
||||
|
||||
git tag $VERSION
|
||||
git push origin --tags
|
||||
|
||||
repos=$(ls $BASEPATH)
|
||||
|
||||
for REMOTE in $repos
|
||||
do
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Cloning $REMOTE";
|
||||
TMP_DIR="/tmp/hyperf-split"
|
||||
REMOTE_URL="git@github.com:hyperf-admin/$REMOTE.git"
|
||||
|
||||
rm -rf $TMP_DIR;
|
||||
mkdir $TMP_DIR;
|
||||
|
||||
(
|
||||
cd $TMP_DIR;
|
||||
|
||||
git clone $REMOTE_URL .
|
||||
git checkout "$CURRENT_BRANCH";
|
||||
|
||||
if [[ $(git log --pretty="%d" -n 1 | grep tag --count) -eq 0 ]]; then
|
||||
echo "Releasing $REMOTE"
|
||||
git tag $VERSION
|
||||
git push origin --tags
|
||||
fi
|
||||
)
|
||||
done
|
||||
|
||||
TIME=$(echo "$(date +%s) - $NOW" | bc)
|
||||
|
||||
printf "Execution time: %f seconds" $TIME
|
||||
@@ -9,7 +9,7 @@ REPOS=$@
|
||||
|
||||
function split()
|
||||
{
|
||||
SHA1=`splitsh-lite --prefix=$1`
|
||||
SHA1=`./bin/splitsh-lite --prefix=$1`
|
||||
git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH" -f
|
||||
}
|
||||
|
||||
|
||||
BIN
bin/splitsh-lite
Executable file
BIN
bin/splitsh-lite
Executable file
Binary file not shown.
@@ -14,27 +14,27 @@
|
||||
"ext-swoole": ">=4.4",
|
||||
"aliyuncs/oss-sdk-php": "^2.3",
|
||||
"box/spout": "^3.1",
|
||||
"hyperf/amqp": "~2.1.0",
|
||||
"hyperf/async-queue": "~2.1.0",
|
||||
"hyperf/cache": "~2.1.0",
|
||||
"hyperf/command": "~2.1.0",
|
||||
"hyperf/config": "~2.1.0",
|
||||
"hyperf/constants": "~2.1.0",
|
||||
"hyperf/crontab": "~2.1.0",
|
||||
"hyperf/database": "~2.1.0",
|
||||
"hyperf/db-connection": "~2.1.0",
|
||||
"hyperf/amqp": "~2.2.0",
|
||||
"hyperf/async-queue": "~2.2.0",
|
||||
"hyperf/cache": "~2.2.0",
|
||||
"hyperf/command": "~2.2.0",
|
||||
"hyperf/config": "~2.2.0",
|
||||
"hyperf/constants": "~2.2.0",
|
||||
"hyperf/crontab": "~2.2.0",
|
||||
"hyperf/database": "~2.2.0",
|
||||
"hyperf/db-connection": "~2.2.0",
|
||||
"hyperf/filesystem": "^2.0",
|
||||
"hyperf/framework": "~2.1.0",
|
||||
"hyperf/guzzle": "~2.1.0",
|
||||
"hyperf/http-server": "~2.1.0",
|
||||
"hyperf/logger": "~2.1.0",
|
||||
"hyperf/memory": "~2.1.0",
|
||||
"hyperf/metric": "~2.1.0",
|
||||
"hyperf/nsq": "~2.1.0",
|
||||
"hyperf/process": "~2.1.0",
|
||||
"hyperf/redis": "~2.1.0",
|
||||
"hyperf/snowflake": "~2.1.0",
|
||||
"hyperf/validation": "~2.1.0",
|
||||
"hyperf/framework": "~2.2.0",
|
||||
"hyperf/guzzle": "~2.2.0",
|
||||
"hyperf/http-server": "~2.2.0",
|
||||
"hyperf/logger": "~2.2.0",
|
||||
"hyperf/memory": "~2.2.0",
|
||||
"hyperf/metric": "~2.2.0",
|
||||
"hyperf/nsq": "~2.2.0",
|
||||
"hyperf/process": "~2.2.0",
|
||||
"hyperf/redis": "~2.2.0",
|
||||
"hyperf/snowflake": "~2.2.0",
|
||||
"hyperf/validation": "~2.2.0",
|
||||
"nette/php-generator": "^3.4",
|
||||
"xxtime/flysystem-aliyun-oss": "^1.5",
|
||||
"yadakhov/insert-on-duplicate-key": "^1.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
`hyperf-admin`是前后端分离的后台管理系统, 前端基于`vue`的 `vue-admin-template`, 针对后台业务`列表`, `表单`等场景封装了大量业务组件, 后端基于`hyperf`实现, 整体思路是后端定义页面渲染规则, 前端页面渲染时首先拉取配置, 然后组件根据具体配置完成页面渲染, 方便开发者仅做少量的配置工作就能完成常见的`CRUD`工作, 同时支持自定义组件和自定义页面, 以开发更为复杂的页面.
|
||||
|
||||

|
||||

|
||||
|
||||
前端为`vue multiple page`多页模式, 可以按模块打包, 默认包含两个模块`default` 默认模块, `system`系统管理模块, 绝大部分业务组件在`src/components`目录, 前端文档详见 [这里](/frontend/form)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
后端的详细文档见[这里](/backend/scaffold)
|
||||
|
||||
### UI预览
|
||||

|
||||

|
||||
|
||||
## 依赖 & 参考
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* [安装](guide/install.md)
|
||||
* [开发样例](guide/dev_example.md)
|
||||
* [线上交流](guide/communication.md)
|
||||
* [常见问题](guide/qa.md)
|
||||
* 后端
|
||||
* [脚手架](backend/scaffold.md)
|
||||
* [表单详解](backend/form.md)
|
||||
|
||||
@@ -60,7 +60,7 @@ php bin/hyperf.php
|
||||
|
||||
可以查看到相关安装命令
|
||||
|
||||

|
||||

|
||||
|
||||
开发环境执行相应命令, 安装依赖的`db`结构即可, 在此之前请先确认`.env` 中已配置好相应连接信息.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
针对 数据库, `Model`, `Controller` 通用模型, 可以使用后台提供的`代码生成工具`来初始化大部分代码.
|
||||
|
||||

|
||||

|
||||
|
||||
连接池对应`config.autoload.databases` 中配置的可用链接, 选择好`连接池`, `数据库`, `表` 后下方表单会根据表结构字段渲染, 完成具体字段的配置, 点击提交.
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ CREATE TABLE `config_center` (
|
||||
|
||||
#### 2. 创建 `Controller`, `Model`
|
||||
|
||||

|
||||

|
||||
|
||||
此时基础文件已经生成在`lib/` 下, 作为一个`composer`包模式开发, 我们将其转移至 `/opt/hyperf-admin/config-center`目录
|
||||
|
||||
@@ -73,7 +73,7 @@ CREATE TABLE `config_center` (
|
||||
|
||||
#### 3. 添加菜单 注册路由
|
||||
|
||||

|
||||

|
||||
|
||||
```php
|
||||
<?php
|
||||
@@ -87,7 +87,7 @@ register_route('/config_center', ConfigCenterController::class);
|
||||
|
||||
?> 若配置有不生效的情况, 执行 `rm vendor/hyperf-admin/config-center && composer require hyperf-admin/config-center` 重新安装即可
|
||||
|
||||

|
||||

|
||||
|
||||
至此已经完成了, 配置的`CRUD`.
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ type:表单项类型,以下是支持的组件列表,以下所有组件 pro
|
||||
"field_name|字段名" => [
|
||||
"type" => "textarea",
|
||||
"props" => [
|
||||
"row" => 6, // 行数, 默认6
|
||||
"rows" => 6, // 行数, 默认6
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
所以我们的服务一步步的变得膨胀, 变得不稳定, 是时候做出改变了
|
||||
|
||||

|
||||

|
||||
|
||||
我们将一些业务边界比较明显, 比较独立的功能, 以微服务的方式拆分出去, 然后注册到主项目上去, 这样我们就可以达到, 既使用一套ui, 又进行服务拆分的目的啦.
|
||||
|
||||
`remote_module`的注册也十分简单, `http://localhost:9528/system/#/cconf/cconf_website_config` 在站点管理中增加相应模块的配置即可
|
||||
|
||||

|
||||

|
||||
|
||||
然后在`菜单管理`中, 增加相应的模块菜单即可使用啦.
|
||||
|
||||
?> 注意 `remote_module` 必须基于`hyperf-admin/admin` 组件构建哦
|
||||
|
||||
?> 另外, 主的`HyperfAdmin`项目, 默认包含两个本地模块, `default`, `system`
|
||||
?> 另外, 主的`HyperfAdmin`项目, 默认包含两个本地模块, `default`, `system`
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
我们以 `用户管理` 这个页面功能为例, 讲解如何使用此功能.
|
||||
|
||||
先上效果图
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
此时我们只用配置好脚手架配置,即可为第三方服务提供后台页面的管理功能
|
||||
```json
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
我们使用微信群进行交流, 由于群二维码经常过期, 请添加下方个人微信, 拉你进群.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
### 架构
|
||||
|
||||

|
||||

|
||||
|
||||
前端为`vue multiple page`多页模式, 可以按模块打包, 默认包含两个模块`default` 默认模块, `system`系统管理模块, 绝大部分业务组件在`src/components`目录, 前端文档详见 [这里](/frontend/form)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
后端的详细文档见[这里](/backend/scaffold)
|
||||
|
||||
### UI预览
|
||||

|
||||

|
||||
|
||||
### 依赖 & 参考
|
||||
|
||||
|
||||
@@ -48,13 +48,13 @@ CREATE TABLE `student_score` (
|
||||
|
||||
2. 通过`DevTools`开发者工具创建 `student_score` 相关的 `Model`, `Controller`
|
||||
|
||||

|
||||

|
||||
|
||||
选择好相应的表后, 点击提交, 此时工具已经帮我们创建好相应的`app/Controller/StudentScoreController.php`和`app/Model/Test/StudentScore.php`
|
||||
|
||||
3. 添加目录和菜单
|
||||
|
||||

|
||||

|
||||
|
||||
注册路由
|
||||
|
||||
@@ -65,7 +65,7 @@ CREATE TABLE `student_score` (
|
||||
|
||||
此时我们也已经完成了基础的`CRUD`开发
|
||||
|
||||

|
||||

|
||||
|
||||
哦对了, 还有各种筛选条件呢? 也很简单, 在 `scaffoldOptions` 中增加 `filter`配置即可
|
||||
|
||||
@@ -84,7 +84,7 @@ CREATE TABLE `student_score` (
|
||||
}
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
还有, 大家别忘了, 需求中还要去可以按页签显示, 改怎么办呢, 这个ui可有点复杂啊, 不过在`hyperf-admin`里也同样简单
|
||||
|
||||
@@ -112,7 +112,7 @@ CREATE TABLE `student_score` (
|
||||
}
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
至此我们已经完成了绝大部分的功能开发, 如果使用熟练, 我们应该能在十分钟内完成整个功能的前后端开发, 而且还支持复杂的前端效果.
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ cd hyperf-admin
|
||||
```
|
||||
|
||||
#### 2. 移除`hyperf-skeleton`中的日志配置, 因为 `admin` 底层已配置
|
||||
|
||||
底层的日志配置见 [base-utils/ConfigProvider](https://github.com/hyperf-admin/hyperf-admin/blob/master/src/base-utils/src/ConfigProvider.php#L22)
|
||||
```shell
|
||||
rm config/autoload/logger.php
|
||||
```
|
||||
@@ -65,6 +67,12 @@ LOCAL_DB_HOST=localhost
|
||||
```shell
|
||||
composer require hyperf-admin/hyperf-admin
|
||||
```
|
||||
|
||||
如果存在依赖包的版本号问题, 注意, 请使用 composer2
|
||||
```shell
|
||||
composer require hyperf-admin/hyperf-admin -W
|
||||
```
|
||||
|
||||
!> hyperf-admin 为分包模式, 实际应用中请根据情况安装
|
||||
|
||||
#### 6. 初始化`validation`的依赖文档
|
||||
|
||||
22
docs/guide/qa.md
Normal file
22
docs/guide/qa.md
Normal file
@@ -0,0 +1,22 @@
|
||||
#### 1. 导出服务的进度一直是0
|
||||
|
||||
导出任务没有默认启动,有两种方式可以启用他
|
||||
1. 使用croncenter 的话,在 定时任务的管理后台 增加 export-task 任务即可, 参见[cron-center](http://daodao97.gitee.io/hyperf-admin/#/backend/components/business/cron-center)
|
||||
2. 未使用croncenter 自己起个进程或定时任务 启动 `HyperfAdmin/Admin/Service/ExportService` 即可
|
||||
|
||||
#### 2. 前端页面点击菜单, 不能正常跳转
|
||||
打开控制台可见如下错
|
||||
|
||||

|
||||
|
||||
此时, 保证本地的 `node`, `npm` 为最新版本, 安装依赖时, 不要使用 `cnpm`
|
||||
|
||||
然后 `npm i` 或 `yarn` 重新安装并启动
|
||||
|
||||
#### 3. 点击下载中心的文件链接跳转地址提示需要登录
|
||||
|
||||
这里的逻辑是先跳转到 http://hyperf-admin.daodao.run/api/upload/ossprivateurl?key=oss/1/export_task/xxxxx.csv, 由接口 `api/upload/ossprivateurl` 生成临时的下载地址, 也就是我们需要此接口的权限, 如下操作即可
|
||||

|
||||
勾选接口后, 点击提交, 并清理权限缓存
|
||||

|
||||
同理, 其他接口的权限问题也可在此管理
|
||||
@@ -9,8 +9,8 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"hyperf/async-queue": "~2.1.0",
|
||||
"hyperf/process": "~2.1.0",
|
||||
"hyperf/async-queue": "~2.2.0",
|
||||
"hyperf/process": "~2.2.0",
|
||||
"hyperf-admin/rule-engine": "dev-master"
|
||||
},
|
||||
"autoload": {
|
||||
|
||||
@@ -16,31 +16,31 @@
|
||||
"ext-yaml": "*",
|
||||
"aliyuncs/oss-sdk-php": "^2.3",
|
||||
"box/spout": "^3.1",
|
||||
"hyperf/amqp": "~2.1.0",
|
||||
"hyperf/cache": "~2.1.0",
|
||||
"hyperf/command": "~2.1.0",
|
||||
"hyperf/config": "~2.1.0",
|
||||
"hyperf/constants": "~2.1.0",
|
||||
"hyperf/database": "~2.1.0",
|
||||
"hyperf/db-connection": "~2.1.0",
|
||||
"hyperf/filesystem": "~2.1.0",
|
||||
"hyperf/framework": "~2.1.0",
|
||||
"hyperf/guzzle": "~2.1.0",
|
||||
"hyperf/http-server": "~2.1.0",
|
||||
"hyperf/logger": "~2.1.0",
|
||||
"hyperf/memory": "~2.1.0",
|
||||
"hyperf/metric": "~2.1.0",
|
||||
"hyperf/nsq": "~2.1.0",
|
||||
"hyperf/process": "~2.1.0",
|
||||
"hyperf/redis": "~2.1.0",
|
||||
"hyperf/snowflake": "~2.1.0",
|
||||
"hyperf/amqp": "~2.2.0",
|
||||
"hyperf/cache": "~2.2.0",
|
||||
"hyperf/command": "~2.2.0",
|
||||
"hyperf/config": "~2.2.0",
|
||||
"hyperf/constants": "~2.2.0",
|
||||
"hyperf/database": "~2.2.0",
|
||||
"hyperf/db-connection": "~2.2.0",
|
||||
"hyperf/filesystem": "~2.2.0",
|
||||
"hyperf/framework": "~2.2.0",
|
||||
"hyperf/guzzle": "~2.2.0",
|
||||
"hyperf/http-server": "~2.2.0",
|
||||
"hyperf/logger": "~2.2.0",
|
||||
"hyperf/memory": "~2.2.0",
|
||||
"hyperf/metric": "~2.2.0",
|
||||
"hyperf/nsq": "~2.2.0",
|
||||
"hyperf/process": "~2.2.0",
|
||||
"hyperf/redis": "~2.2.0",
|
||||
"hyperf/snowflake": "~2.2.0",
|
||||
"yadakhov/insert-on-duplicate-key": "^1.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"swoft/swoole-ide-helper": "^4.2",
|
||||
"phpstan/phpstan": "^0.11.2",
|
||||
"hyperf/devtool": "~2.1.0",
|
||||
"hyperf/testing": "~2.1.0",
|
||||
"hyperf/devtool": "~2.2.0",
|
||||
"hyperf/testing": "~2.2.0",
|
||||
"daodao97/hyperf-watch": "dev-master",
|
||||
"symfony/var-dumper": "^5.0"
|
||||
},
|
||||
|
||||
@@ -85,6 +85,9 @@ if (!function_exists('move_local_file_to_filesystem')) {
|
||||
if ($private) {
|
||||
$filesystem->setVisibility($save_file_path, AdapterInterface::VISIBILITY_PRIVATE);
|
||||
}
|
||||
if (method_exists($filesystem, 'chmod')) {
|
||||
$filesystem->chmod($save_file_path, 0644);
|
||||
}
|
||||
$meta = $filesystem->getMetadata($save_file_path);
|
||||
switch (config("file.storage.{$bucket}.driver")) {
|
||||
case \Hyperf\Filesystem\Adapter\LocalAdapterFactory::class:
|
||||
|
||||
@@ -148,7 +148,10 @@ abstract class AbstractController extends Controller
|
||||
if (isset($item[0])) {
|
||||
$buttons[$key] = $this->buttonConfigConvert($item);
|
||||
}
|
||||
}
|
||||
if (isset($item['method'])) {
|
||||
$buttons[$key]['method'] = $item['method'];
|
||||
}
|
||||
}
|
||||
return $buttons;
|
||||
}
|
||||
|
||||
@@ -200,8 +203,12 @@ abstract class AbstractController extends Controller
|
||||
}
|
||||
}
|
||||
$order_by = $this->options['order_by'] ?? '';
|
||||
$group_by = $this->options['group_by'] ?? '';
|
||||
if ($sortColumn = $this->request->input('_sort_column') && $sortType = $this->request->input('_sort_type')) {
|
||||
$order_by = $sortColumn . ' ' . $sortType;
|
||||
}
|
||||
if (empty($conditions) && !($this->options['defaultList'] ?? true)) {
|
||||
return compact('page', 'size', 'conditions', 'order_by', 'columns', 'table_options');
|
||||
return compact('page', 'size', 'conditions', 'order_by', 'columns', 'table_options', 'group_by');
|
||||
}
|
||||
if (method_exists($this, 'beforeListQuery')) {
|
||||
$hook_params = get_class_method_params_name($this, 'beforeListQuery');
|
||||
@@ -209,9 +216,11 @@ abstract class AbstractController extends Controller
|
||||
$this->beforeListQuery($conditions, $order_by);
|
||||
} elseif (count($hook_params) === 1) {
|
||||
$this->beforeListQuery($conditions);
|
||||
} elseif (count($hook_params) === 4) {
|
||||
$this->beforeListQuery($conditions, $order_by, $group_by, $columns);
|
||||
}
|
||||
}
|
||||
return compact('page', 'size', 'conditions', 'order_by', 'columns', 'table_options');
|
||||
return compact('page', 'size', 'conditions', 'order_by', 'columns', 'table_options', 'group_by');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,13 +235,25 @@ abstract class AbstractController extends Controller
|
||||
$order_by,
|
||||
$columns,
|
||||
$tableOptions,
|
||||
$group_by
|
||||
] = array_values($this->makeWhere());
|
||||
$entity = $this->getEntity();
|
||||
$count = $entity->count($conditions);
|
||||
if ($group_by) {
|
||||
$entity->getModel()->groupBy($group_by);
|
||||
$count_query = clone $entity;
|
||||
$count = $count_query->getModel()->select(
|
||||
gettype($group_by) == 'array' ? $group_by[0] : $group_by,
|
||||
DB::raw('count(*) as total')
|
||||
)->get()->count();
|
||||
} else {
|
||||
$count = $entity->count($conditions);
|
||||
}
|
||||
|
||||
$list = [];
|
||||
if ($count) {
|
||||
$attr['select'] = $columns;
|
||||
$order_by && $attr['order_by'] = $order_by;
|
||||
$group_by && $attr['group_by'] = $group_by;
|
||||
$list = $entity->list($conditions, $attr, $page, $size);
|
||||
}
|
||||
$list = $this->listFilter($list, $tableOptions);
|
||||
@@ -384,7 +405,8 @@ abstract class AbstractController extends Controller
|
||||
$order_by = $this->options['order_by'] ?? '';
|
||||
$attr['select'] = $columns;
|
||||
$order_by && $attr['order_by'] = $order_by;
|
||||
$childs = $this->getEntity()->list(['pid' => $id], $attr);
|
||||
$parent_key = $this->options['table']['tree']['pid'] ?? 'pid';
|
||||
$childs = $this->getEntity()->list([$parent_key => $id], $attr);
|
||||
foreach ($tableOptions as $item) {
|
||||
if (!isset($item['render'])) {
|
||||
continue;
|
||||
@@ -893,7 +915,6 @@ abstract class AbstractController extends Controller
|
||||
])
|
||||
&& isset($_form['options'])) {
|
||||
$_form['type'] = 'select';
|
||||
unset($_form['value']);
|
||||
$options_labels = array_column($_form['options'], 'label');
|
||||
if (!isset($_form['props']['selectApi']) && !in_array('全部', $options_labels)) {
|
||||
array_unshift($_form['options'], [
|
||||
|
||||
@@ -44,7 +44,7 @@ class ProviderConfig
|
||||
|
||||
$providers = array_values($package);
|
||||
usort($providers, function ($a, $b) {
|
||||
return $a['weight'] > $b['weight'];
|
||||
return intval($a['weight'] > $b['weight']);
|
||||
});
|
||||
$providers = array_column($providers, 'provider');
|
||||
static::$providerConfigs = static::loadProviders($providers);
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"hyperf/crontab": "~2.1.0",
|
||||
"hyperf/process": "~2.1.0",
|
||||
"hyperf/command": "~2.1.0",
|
||||
"hyperf/event": "~2.1.0",
|
||||
"hyperf/crontab": "~2.2.0",
|
||||
"hyperf/process": "~2.2.0",
|
||||
"hyperf/command": "~2.2.0",
|
||||
"hyperf/event": "~2.2.0",
|
||||
"hyperf-admin/base-utils": "dev-master"
|
||||
},
|
||||
"autoload": {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"hyperf/process": "~2.1.0",
|
||||
"hyperf/amqp": "~2.1.0"
|
||||
"hyperf/process": "~2.2.0",
|
||||
"hyperf/amqp": "~2.2.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"hyperf/amqp": "~2.1.0",
|
||||
"hyperf/crontab": "~2.1.0",
|
||||
"hyperf/nsq": "~2.1.0",
|
||||
"hyperf/process": "~2.1.0"
|
||||
"hyperf/amqp": "~2.2.0",
|
||||
"hyperf/crontab": "~2.2.0",
|
||||
"hyperf/nsq": "~2.2.0",
|
||||
"hyperf/process": "~2.2.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"hyperf/validation": "~2.1.0",
|
||||
"hyperf/validation": "~2.2.0",
|
||||
"hyperf-admin/base-utils": "dev-master"
|
||||
},
|
||||
"autoload": {
|
||||
|
||||
Reference in New Issue
Block a user