mirror of
http://124.126.16.154:8888/singularity/hyperf-admin.git
synced 2026-01-15 07:15:06 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8a049faeb | ||
|
|
cb2b2b5428 | ||
|
|
8b44c279c1 | ||
|
|
8f1df241a4 | ||
|
|
9abd51cc6b | ||
|
|
f4c429ea28 | ||
|
|
839bd1e0b9 | ||
|
|
4ccb7200eb | ||
|
|
d79fdca30b | ||
|
|
11f249669e | ||
|
|
a707dae623 | ||
|
|
d5a7a584df | ||
|
|
c0379e5137 | ||
|
|
bde50ad7e2 | ||
|
|
e4dd791a66 |
@@ -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",
|
||||
|
||||
@@ -112,7 +112,7 @@ type:表单项类型,以下是支持的组件列表,以下所有组件 pro
|
||||
"field_name|字段名" => [
|
||||
"type" => "textarea",
|
||||
"props" => [
|
||||
"row" => 6, // 行数, 默认6
|
||||
"rows" => 6, // 行数, 默认6
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
@@ -70,7 +70,7 @@ composer require hyperf-admin/hyperf-admin
|
||||
|
||||
如果存在依赖包的版本号问题, 注意, 请使用 composer2
|
||||
```shell
|
||||
composer require hyperf-admin/hyperf-admin:0.2.0 --with-all-dependencies
|
||||
composer require hyperf-admin/hyperf-admin -W
|
||||
```
|
||||
|
||||
!> hyperf-admin 为分包模式, 实际应用中请根据情况安装
|
||||
|
||||
@@ -85,7 +85,9 @@ if (!function_exists('move_local_file_to_filesystem')) {
|
||||
if ($private) {
|
||||
$filesystem->setVisibility($save_file_path, AdapterInterface::VISIBILITY_PRIVATE);
|
||||
}
|
||||
$filesystem->chmod($save_file_path, 0644);
|
||||
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:
|
||||
|
||||
@@ -203,11 +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');
|
||||
@@ -215,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');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,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);
|
||||
@@ -390,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;
|
||||
|
||||
Reference in New Issue
Block a user