From 5faa35e9804c5273b5a957d6a522d569ba5cd534 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 4 May 2018 12:11:57 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E8=A1=A8=E5=8D=95=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Node.php | 10 +- application/admin/view/node/index.html | 139 ++++++++++++++----------- vendor/autoload.php | 2 +- vendor/composer/autoload_classmap.php | 12 +-- vendor/composer/autoload_real.php | 14 +-- vendor/composer/autoload_static.php | 20 ++-- 6 files changed, 111 insertions(+), 86 deletions(-) diff --git a/application/admin/controller/Node.php b/application/admin/controller/Node.php index 8995274ce..8e3d6e6bb 100644 --- a/application/admin/controller/Node.php +++ b/application/admin/controller/Node.php @@ -43,7 +43,15 @@ class Node extends BasicAdmin public function index() { $nodes = ToolsService::arr2table(NodeService::get(), 'node', 'pnode'); - return $this->fetch('', ['title' => '系统节点管理', 'nodes' => $nodes]); + $groups = []; + foreach ($nodes as $node) { + $pnode = explode('/', $node['node'])[0]; + if ($node['node'] === $pnode) { + $groups[$pnode]['node'] = $node; + } + $groups[$pnode]['list'][] = $node; + } + return $this->fetch('', ['title' => '系统节点管理', 'nodes' => $nodes, 'groups' => $groups]); } /** diff --git a/application/admin/view/node/index.html b/application/admin/view/node/index.html index 8bae2bfba..98ee187d3 100644 --- a/application/admin/view/node/index.html +++ b/application/admin/view/node/index.html @@ -7,9 +7,7 @@ {/block} {block name="content"} - - - + - - -

没 有 记 录 哦!

- - - - - + + + + + + +
- {$vo.spl|raw} {$vo.node} - {if auth("$classuri/save")} {/if} - - {if auth("$classuri/save") and $vo.spt eq 1} - -      - -      - - {/if} - {if auth("$classuri/save") and $vo.spt eq 2} -   ├─  -
+ {$vo.spl|raw} {$vo.node} + {if auth("$classuri/save")} {/if} + + {if auth("$classuri/save") and $vo.spt eq 1} + +      + +      + + {/if} + {if auth("$classuri/save") and $vo.spt eq 2} +   ├─  + +      ├─  + +      ├─  + + {/if} +
+ + {/foreach} + + +