浏览代码

修改菜单显示

邹景立 4 年之前
父节点
当前提交
52dd88689a
共有 2 个文件被更改,包括 2 次插入6 次删除
  1. 1 5
      app/admin/controller/Menu.php
  2. 1 1
      app/admin/view/menu/index.html

+ 1 - 5
app/admin/controller/Menu.php

@@ -46,12 +46,8 @@ class Menu extends Controller
     public function index()
     {
         $this->title = '系统菜单管理';
-        $query = $this->_query($this->table);
-        // 状态选项卡处理
         $this->type = input('type', 'index');
-        if ($this->type === 'index') $query->where(['status' => 1]);
-        // 数据查询与分页
-        $query->page(false, true);
+        $this->_query($this->table)->page(false, true);
     }
 
     /**

+ 1 - 1
app/admin/view/menu/index.html

@@ -41,7 +41,7 @@
             </thead>
             <tbody>
             {foreach $list as $key=>$vo}
-            <tr data-dbclick>
+            <tr data-dbclick class="{if $vo.status eq 0 and isset($type) and $type eq 'index'}layui-hide{/if}">
                 <td class='list-table-check-td think-checkbox'>
                     <label><input class="list-check-box" value='{$vo.ids}' type='checkbox'></label>
                 </td>