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} + + +