分类 fastadmin 下的文章

select concat('update ck_auth_rule set weigh = ',rn,' where id = ',id,';') as sql_text
  from (select id,pid,
               100 - row_number() over(partition by pid order by id) as rn
          from ck_auth_rule ) t ;

{
    name: 'view_one_btn',
    title: __('View'),
    classname: 'btn btn-xs btn-info btn-dialog',
    icon: 'fa fa-search-plus',
    extend:'data-toggle="tooltip" data-area=\'["1000px","700px"]\'',
    url: 'checking/task/view',
    hidden: function (row) {
        if(row['a.labels_num'] > 1){
            return false;
        }else{
            return true;
        }
    },
},