Skip to content

Commit

Permalink
permission迁移到manager目录
Browse files Browse the repository at this point in the history
  • Loading branch information
shirne committed Jun 12, 2024
1 parent c8ad3ac commit bb1ddb9
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 106 deletions.
2 changes: 1 addition & 1 deletion dbscript/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ VALUES
(89,8,'操作日志','member.index/log','member_log','ion-md-clipboard',15,0),
(91,9,'配置管理','Setting/index','setting_index','ion-md-options',0,0),
(92,9,'管理员','manager.index/index','manager_index','ion-md-person',3,0),
(93,9,'菜单管理','Permission/index','permission_index','ion-md-code-working',5,0),
(93,9,'菜单管理','manager.permission/index','permission_index','ion-md-code-working',5,0),
(94,9,'导航管理','Navigator/index','navigator_index','ion-md-reorder',7,0),
(95,9,'操作日志','manager.index/log','manager_log','ion-md-clipboard',9,0),
(96,9,'付款方式','Paytype/index','paytype_index','ion-md-card',11,0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

namespace app\admin\controller;
namespace app\admin\controller\manager;


use app\admin\validate\PermissionValidate;
use app\admin\controller\BaseController;
use think\Db;

/**
Expand Down
121 changes: 121 additions & 0 deletions src/application/admin/view/manager/permission/index.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{extend name="public:base" /}

{block name="body"}

{include file="public/bread" menu="permission_index" title="菜单列表" /}

<div id="page-wrapper">

<div class="row list-header">
<div class="col-6">
<a href="{:url('manager.permission/add')}" class="btn btn-outline-primary btn-sm"><i class="ion-md-add"></i>
添加菜单</a>
<a href="{:url('manager.permission/clearcache')}" class="btn btn-outline-dark btn-sm"><i
class="ion-md-trash"></i> 清除缓存</a>
</div>
<div class="col-6">
</div>
</div>
<table class="table table-hover table-striped">
<thead>
<tr>
<th width="50">编号</th>
<th>菜单名</th>
<th>键值</th>
<th>链接</th>
<th>状态</th>
<th width="160">&nbsp;</th>
</tr>
</thead>
<tbody>
{foreach $model[0] as $key => $v}
<tr>
<td>{$v.id}</td>
<td>{$v.name}</td>
<td>{$v.key}</td>
<td>{$v.url}</td>
<td data-url="{:url('status')}" data-id="{$v.id}">
{if $v['disable'] == 1}
<span class="chgstatus off" data-id="{$v.id}" data-status="0" title="点击显示">隐藏</span>
{else/}
<span class="chgstatus" data-id="{$v.id}" data-status="1" title="点击隐藏">显示</span>
{/if}
</td>
<td class="operations">
<a class="btn btn-outline-primary" title="添加"
href="{:url('manager.permission/add',array('pid'=>$v['id']))}"><i class="ion-md-add"></i> </a>
<a class="btn btn-outline-primary" title="编辑"
href="{:url('manager.permission/edit',array('id'=>$v['id']))}"><i class="ion-md-create"></i>
</a>
<a class="btn btn-outline-danger link-confirm" title="删除" data-confirm="您真的确定要删除吗?\n删除后将不能恢复!"
href="{:url('manager.permission/delete',array('id'=>$v['id']))}"><i class="ion-md-trash"></i>
</a>
</td>
</tr>
{php}$soncount=empty($model[$v['id']])?0:count($model[$v['id']]);{/php}
{if $soncount > 0}
{foreach $model[$v['id']] as $key => $sv}
<tr>
<td>{$sv.id}</td>
<td><span class="tree-pre">{$soncount==$key+1?'└─':'├─'}</span> {$sv.name}</td>
<td>{$sv.key}</td>
<td>{$sv.url}</td>
<td data-url="{:url('status')}" data-id="{$sv.id}">
{if $sv['disable'] == 1}
<span class="chgstatus off" data-id="{$sv.id}" data-status="0" title="点击显示">隐藏</span>
{else/}
<span class="chgstatus" data-id="{$sv.id}" data-status="1" title="点击隐藏">显示</span>
{/if}
</td>
<td class="operations">
<a class="btn btn-outline-primary" title="添加"
href="{:url('manager.permission/add',array('pid'=>$sv['id']))}"><i class="ion-md-add"></i> </a>
<a class="btn btn-outline-primary" title="编辑"
href="{:url('manager.permission/edit',array('id'=>$sv['id']))}"><i class="ion-md-create"></i>
</a>
<a class="btn btn-outline-danger link-confirm" title="删除" data-confirm="您真的确定要删除吗?\n删除后将不能恢复!"
href="{:url('manager.permission/delete',array('id'=>$sv['id']))}"
onclick="javascript:return del(this,'您真的确定要删除吗?\n\n删除后将不能恢复!');"><i class="ion-md-trash"></i>
</a>
</td>
</tr>
{if !empty($model[$sv['id']])}
{foreach $model[$sv['id']] as $key => $mv}
<tr>
<td>{$mv.id}</td>
<td><span class="fa">&nbsp;</span><span class="fa">┣</span> {$mv.name}</td>
<td>{$mv.key}</td>
<td>{$mv.url}</td>
<td data-url="{:url('status')}" data-id="{$mv.id}">
{if $mv['disable'] == 1}
<span class="chgstatus off" data-status="0" title="点击显示">隐藏</span>
{else/}
<span class="chgstatus" data-status="1" title="点击隐藏">显示</span>
{/if}
</td>
<td class="operations">
<a class="btn btn-outline-primary" title="编辑"
href="{:url('manager.permission/edit',array('id'=>$mv['id']))}"><i class="ion-md-create"></i>
</a>
<a class="btn btn-outline-danger link-confirm" title="删除" data-confirm="您真的确定要删除吗?\n删除后将不能恢复!"
href="{:url('manager.permission/delete',array('id'=>$mv['id']))}"><i class="ion-md-trash"></i>
</a>
</td>
</tr>
{/foreach}
{/if}
{/foreach}
{/if}
{/foreach}
</tbody>
</table>
</div>

{/block}
{block name="script"}
<script type="text/javascript">
jQuery(function ($) {
})
</script>
{/block}
104 changes: 0 additions & 104 deletions src/application/admin/view/permission/index.tpl

This file was deleted.

0 comments on commit bb1ddb9

Please sign in to comment.