码上敲享录 > bootstrap简单例子分享 > bootstrap table 获取选中的行

bootstrap table 获取选中的行

上一章章节目录下一章 2019-08-10已有2146人阅读 评论(0)

columns: [

               {

                   title: "全选",

                   field: "select",

                   checkbox: true,

                   align: "left",//水平

                   valign: "middle",//垂直

                   align: "center",//水平

               },

             

               {

                   title: "标志",

                   field: "a_flag",

                   sortable: true,//是否可排序

                   align: "center",//水平

                   visible:true,

                   formatter: function (value, row, index) {

                       switch (value){

                           case 1:

                               value="录入";

                               break;

                           case 2:

                               value="递送";

                               break;

                           case 3:

                               value="接收";

                               break;

                           case 4:

                               value="核收";

                               break;

                           case 5:

                               value="报告";

                               break;

                           case 6:

                               value="<span style='color:red;'>回退</span>";

                               break;

                           case 7:

                               value="已处理";

                               break;

                           case 8:

                               value="已解决";

                               break;

                       }

                       return value;

                   }

               },

               {

                   title: "打印",

                   field: "a_print_flag",

                   sortable: true,//是否可排序

                   align: "center",//水平

                   visible:true,

                   formatter: function (value, row, index) {

                       switch (value){

                           case 0:

                               value="未";

                               break;

                           case 1:

                               value="<span style='color:red;'>已</span>";

                               break;

                       }

                       return value;

                   }

               },

             

           ]


//获取所有选中的行,循环

var array= $("#table").bootstrapTable('getSelections');

$(array).each(function(i,e){

     if( e.a_flag != "1"){

            num = 2;

     }

});


 

向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交