浏览代码

修改模板文件

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

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

@@ -41,12 +41,9 @@ class Menu extends Controller
      */
     public function index()
     {
+        $this->title = '系统菜单管理';
         $this->type = input('get.type', 'index');
-        SystemMenu::mQuery()->layTable(function () {
-            $this->title = '系统菜单管理';
-        }, function (QueryHelper $query) {
-            $query->order('sort desc,id asc');
-        });
+        SystemMenu::mQuery()->layTable();
     }
 
     /**

+ 0 - 1
app/admin/controller/Queue.php

@@ -45,7 +45,6 @@ class Queue extends Controller
         SystemQueue::mQuery()->layTable(function () {
             $this->title = '系统任务管理';
             $this->iswin = ProcessService::instance()->iswin();
-            // 超级管理面板
             if ($this->super = AdminService::instance()->isSuper()) {
                 $process = ProcessService::instance();
                 if ($process->iswin() || empty($_SERVER['USER'])) {

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

@@ -1,4 +1,4 @@
-<form class="layui-form layui-card" data-table-id="MenuData" action="{:sysuri()}" data-auto="true" method="post">
+<form class="layui-form layui-card" data-table-id="MenuTable" action="{:sysuri()}" data-auto="true" method="post">
 
     <div class="layui-card-body">
 

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

@@ -25,13 +25,13 @@
         {/if}{/foreach}
     </ul>
     <div class="layui-tab-content">
-        <table id="MenuData" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
+        <table id="MenuTable" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
     </div>
 </div>
 
 <script>
     $(function () {
-        $('#MenuData').layTable({
+        $('#MenuTable').layTable({
             even: true, height: 'full', page: false,
             sort: {field: 'sort desc,id', type: 'asc'},
             where: {type: '{$type|default="index"}'},
@@ -43,9 +43,9 @@
             },
             cols: [[
                 {checkbox: true, field: 'sps'},
-                {field: 'sort', title: '排序权重', width: 100, align: 'center', sort: true, templet: '#SortInputTpl'},
+                {field: 'sort', title: '排序权重', width: 100, align: 'center', templet: '#SortInputTpl'},
                 {
-                    field: 'icon', title: '图标', width: 80, align: 'center', templet: function (d) {
+                    field: 'icon', title: '图 标', width: 80, align: 'center', templet: function (d) {
                         return layui.laytpl('<i class="{{d.icon}} font-s18"></i>').render(d);
                     }
                 },
@@ -67,9 +67,9 @@
             if (data.status > 0) data.id += obj.elem.dataset.path.replace(/-/g, ',');
             $.form.load("{:url('state')}", data, 'post', function (ret) {
                 if (ret.code < 1) $.msg.error(ret.info, 3, function () {
-                    $('#MenuData').trigger('reload');
+                    $('#MenuTable').trigger('reload');
                 }); else if (obj.value.split(',').length > 2) {
-                    $('#MenuData').trigger('reload');
+                    $('#MenuTable').trigger('reload');
                 }
                 return false;
             }, false);