|
|
@ -277,6 +277,7 @@ |
|
|
|
{title: '备注',field: 'remark'}, |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
|
field: 'operations', |
|
|
|
align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
var actions = []; |
|
|
@ -323,8 +324,22 @@ |
|
|
|
} |
|
|
|
}; |
|
|
|
$.table.init(options); |
|
|
|
}); |
|
|
|
|
|
|
|
$(".pull-right").append("<a class=\"btn btn-default btn-outline\" onclick=\"operateShow()\" style=\"margin-right: 10px;\">\n" + |
|
|
|
" <i class=\"fa fa-list\"></i>\n" + |
|
|
|
" </a>"); |
|
|
|
}); |
|
|
|
function operateShow(){ |
|
|
|
var $operationsTh = $("#bootstrap-table").find('thead th:contains("操作")'); |
|
|
|
// console.log($operationsTh.length); |
|
|
|
if ($operationsTh.length === 0) { |
|
|
|
// 如果“操作”列是隐藏的,则显示它 |
|
|
|
$("#bootstrap-table").bootstrapTable('showColumn', 'operations'); |
|
|
|
} else { |
|
|
|
// 如果“操作”列是显示的,则隐藏它 |
|
|
|
$("#bootstrap-table").bootstrapTable('hideColumn', 'operations'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 作废 |
|
|
|
function cancel(id) { |
|
|
|