$(document).ready(function(){
var column = "[["+
"{'title':'工号','field':'grantorCode','sortable':'true','hidden':'true','width':fixWidth(0)},"+
"{'title':'外出告知人','field':'grantor','sortable':'true','width':fixWidth(0.15)},"+
"{'title':'开始时间','field':'startTime','sortable':'true','width':fixWidth(0.2),'formatter':function(value,row,index){return value.substring(0,19);}},"+
"{'title':'结束时间','field':'endTime','sortable':'true','width':fixWidth(0.2),'formatter':function(value,row,index){return value.substring(0,19);}},"+
"{'title':'状态','field':'openClose','sortable':'true','width':fixWidth(0.15),'formatter':function(value,row,index){"+
" if (row.openClose=='1'){" +
" return '待确认';" +
" } else if(row.openClose=='2'){" +
" return '待生效';" +
" } else if(row.openClose=='3'){" +
" return '已生效';" +
" } else if(row.openClose=='4'){" +
" return '终止';" +
" } else if(row.openClose=='5'){" +
" return '取消';" +
" }" +
"}},"+
"{'title':'性质','field':'exp1','sortable':'true','width':fixWidth(0.15),'formatter':function(value,row,index){"+
" if (row.exp1=='sq'){" +
" return '授权';" +
" } else if(row.exp1=='qj'){" +
" return '外出告知';" +
" } else if(row.exp1=='zsq'){" +
" return '再授权';" +
" }" +
"}},"+
"{'title':'操作','field':'opt','sortable':'true','width':fixWidth(0.15),'formatter':function(value,row,index){"+
"var str='';"+
"var id=\"'\"+row.id+\"'\";"+
"var exp1=\"'\"+row.exp1+\"'\";"+
"if(row.exp2=='Y'){"+
"str += '<a class=\"ace_button\" href=\"#\" onclick=\"stopOrdeleteOnlick('+id+','+exp1+')\">取消</a>&nbsp;';" +
"}"+
"return str;"+
"}}"+
"]]";
column = eval(column);
$("#tEmDutyAuthorizztionList").datagrid({
columns:column,
rownumber:true,
fitcolumns:true,
idField:"id",
sortOrder:"desc",
sortName:"endTime",
fit:"true",
queryMode:"group"
});
});

//设置宽度百分比
function fixWidth(percent) {
return document.documentElement.clientWidth * percent; //这里你可以自己做调整
}
//设置高度百分比
function fixHeight(percent) {
return document.documentElement.clientHeight * percent - 9; //这里你可以自己做调整
}

最新文章

  1. Flume_初识
  2. ASP.NET 前后台调用方法
  3. 以策略为导向的VI设计
  4. ORM框架详解
  5. jquery层级原则器(匹配前一个元素后的下一个元素,必须是挨着的)
  6. SQL like 模糊查询
  7. DataGridView的DataGridViewComboBoxColumn列在编辑时自动弹出下拉列表
  8. JAVA类加载机制详解
  9. 编写优质无错C程序秘诀!《经验谈》
  10. js中的Call与apply方法
  11. text绑定(The &quot;text&quot; binding)
  12. --@angularJS--模板加载之缓存模板demo
  13. NGUI_Texture
  14. hadoop fs -put 报错
  15. linux中iptables配置文件及命令详解
  16. BZOJ2815 拓扑排序 + LCA
  17. centos Install Mrtg
  18. WPF点滴(1) Main 函数
  19. Scala的文件读写操作与正则表达式
  20. IPV6 简单验证

热门文章

  1. net core发邮件——MimeKit
  2. springboot启动时过滤不需要注入的类
  3. Django -- 高级知识点
  4. NX二次开发-获取当前part所在路径UF_PART_ask_part_name
  5. 报错:[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the paren
  6. Function Run Fun-递归+细节处理
  7. AtCoder ABC 126F XOR Matching
  8. org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
  9. Java 并发工具包——ExecutorService常用线程池
  10. (二十三)Http请求的处理过程