lizhen_gitee 8 月之前
父節點
當前提交
789532dd73

+ 1 - 1
application/admin/controller/pcauth/Rule.php

@@ -31,7 +31,7 @@ class Rule extends Backend
         }
         $this->model = model('PcAuthRule');
         // 必须将结果集转换为数组
-        $ruleList = \think\Db::name("pc_auth_rule")->field('type,condition,remark,createtime,updatetime', true)->order('weigh DESC,id ASC')->select();
+        $ruleList = \think\Db::name("pc_auth_rule")->field('condition,remark,createtime,updatetime', true)->order('weigh DESC,id ASC')->select();
         foreach ($ruleList as $k => &$v) {
             $v['title'] = __($v['title']);
         }

+ 1 - 1
application/admin/view/pcauth/rule/edit.html

@@ -22,7 +22,7 @@
     <div class="form-group">
         <label for="type" class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
         <div class="col-xs-12 col-sm-8">
-            {:build_radios('row[type]', $typeList)}
+            {:build_radios('row[type]', $typeList,$row['type'], ['class'=>'form-control', 'required'=>''])}
         </div>
     </div>
 

+ 1 - 0
public/assets/js/backend/pcauth/rule.js

@@ -25,6 +25,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
                     [
                         {field: 'state', checkbox: true,},
                         {field: 'id', title: 'ID'},
+                        {field: 'type', title: __('Type'), searchList: {"1": __('Type 1'), "2": __('Type 2'), "3": __('Type 3')}, formatter: Table.api.formatter.normal},
                         {field: 'title', title: __('Title'), align: 'left', formatter: Controller.api.formatter.title, clickToSelect: !false},
                         {field: 'icon', title: __('Icon'), formatter: Controller.api.formatter.icon},
 //                        {field: 'name', title: __('Name'), align: 'left', formatter: Controller.api.formatter.name},