一、效果图
二、js代码
function assemble_dg_columns() {
var arr = new Array();
arr.push({"field": "ck", checkbox: true,"hidden": false});
arr.push({"field": "id", "title": "id", "width": "1%", "align": "center", "hidden": true});
arr.push({"field": "find_date", "title": "发现日期", "width": "9%", "align": "center","sortable": true});
arr.push({"field": "question_type", "title": "问题类别", "width": "7%", "align": "center"});
arr.push({"field": "question_property", "title": "问题属性", "width": "9%", "align": "center"});
arr.push({"field": "content", "title": "问题描述", "width": "18%", "align": "center"});
arr.push({"field": "question_evalstandard", "title": "评价标准", "width": "15%", "align": "center"});
arr.push({"field": "name_org", "title": "单位", "width": "6%", "align": "center"});
arr.push({"field": "postduty_name", "title": "岗位", "width": "6%", "align": "center"});
arr.push({"field": "soleduty_type_label", "title": "专职", "width": "6%", "align": "center"});
arr.push({"field": "username", "title": "被考核人员", "width": "7%", "align": "center"});
arr.push({"field": "performance", "title": "扣分值", "width": "6%", "align": "center","sortable": true,"formatter": performance});
arr.push({"field": "createname", "title": "考核组成员", "width": "7%", "align": "center"});
return arr;
}
$("body").on("click", "#btn_print", function () {
assessEvaluationSummaryPrint();
});
function assessEvaluationSummaryPrint() {
var arr_columns = assemble_dg_columns();
var key_columns = [];
var value_columns = [];
for (var i = 0; i < arr_columns.length; i++) {
if(NOTNULL(arr_columns[i].title)